Page MenuHomeFreeBSD

route(8): Add metric argument
AcceptedPublic

Authored by pouria on Thu, Apr 9, 10:58 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 19, 7:44 AM
Unknown Object (File)
Sat, Apr 18, 9:48 PM
Unknown Object (File)
Sat, Apr 18, 3:16 PM
Unknown Object (File)
Sat, Apr 18, 3:16 PM
Unknown Object (File)
Sat, Apr 18, 3:16 PM
Unknown Object (File)
Sat, Apr 18, 3:11 PM
Unknown Object (File)
Sat, Apr 18, 3:11 PM
Unknown Object (File)
Sat, Apr 18, 3:11 PM
Subscribers

Details

Reviewers
melifaro
markj
glebius
Group Reviewers
network
Summary

Add support for metric in route command.

Test Plan
[root@ftsr1] [~] # route -n6 add -net 3fff::/64 -gateway ::2 -weight 3 -metric 3
add net 3fff::/64: gateway ::2 fib 0
[root@ftsr1] [~] # netstat -On6W
Nexthop groups data

Internet6:
GrpIdx  NhIdx     Weight   Slots                                 Gateway     Netif  Refcnt
11        ------- ------- ------- --------------------------------------- ---------       2
9       2      25                                     ::3       lo0
10       3      39                                     ::2       lo0
[root@ftsr1] [~] # route -n6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
gateway: ::3
fib: 0
interface: lo0
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe  sendpipe  ssthresh  rtt,msec    mtu       metric    weight    expire
0         0         0         0     16384         3         2         0
[root@ftsr1] [~] # route -on6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
fib: 0
flags: <UP,GATEWAY,DONE,STATIC>
nhops: 2
via gw ::3 iface lo0 metric 3 weight 2 mtu 16384 table inet6.0
via gw ::2 iface lo0 metric 3 weight 3 mtu 16384
[root@ftsr1] [~] # route -n6 add -net 3fff::/64 -gateway ::1 -weight 3 -metric 1
add net 3fff::/64: gateway ::1 fib 0
[root@ftsr1] [~] # route -n6 get 3fff::/64
route to: 3fff::
destination: 3fff::
mask: ffff:ffff:ffff:ffff::
gateway: ::3
fib: 0
interface: lo0
flags: <UP,GATEWAY,DONE,STATIC>
recvpipe  sendpipe  ssthresh  rtt,msec    mtu       metric    weight    expire
0         0         0         0     16384         3         2         0

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 72098
Build 68981: arc lint + arc unit