1 .TH IP\-NEXTHOP 8 "30 May 2019" "iproute2" "Linux"
3 ip-nexthop \- nexthop object management
10 .RI "[ " ip-OPTIONS " ]"
12 .RI " { " COMMAND " | "
18 .BR "ip nexthop" " { "
19 .BR show " | " flush " } "
23 .BR "ip nexthop" " { " add " | " replace " } id "
28 .BR "ip nexthop" " { " get " | " del " } id "
72 .BR id "[," weight "[/...]"
76 is used to manipulate entries in the kernel's nexthop tables.
81 ip nexthop replace id ID
82 change the configuration of a nexthop or add new one
85 .BI via " [ FAMILY ] ADDRESS"
86 the address of the nexthop router, in the address family FAMILY.
87 Address family must match address family of nexthop instance.
93 pretend that the nexthop is directly attached to this link,
94 even if it does not match any interface prefix.
96 .BI encap " ENCAPTYPE ENCAPHDR"
97 attach tunnel encapsulation attributes to this route.
100 is a string specifying the supported encapsulation type. Namely:
104 - encapsulation type MPLS
108 is a set of encapsulation attributes specific to the
115 - mpls label stack with labels separated by
121 - TTL to use for MPLS header or 0 to inherit from IP header
126 create a nexthop group. Group specification is id with an optional
127 weight (id,weight) and a '/' as a separator between entries.
130 create a blackhole nexthop
133 nexthop and nexthop groups for use with layer-2 fdb entries.
134 A fdb nexthop group can only have fdb nexthops.
135 Example: Used to represent a vxlan remote vtep ip. layer-2 vxlan
136 fdb entry pointing to an ecmp nexthop group containing multiple
141 ip nexthop delete id ID
142 delete nexthop with given id.
146 show the contents of the nexthop table or the nexthops
147 selected by some criteria.
151 show the nexthops using the given device.
154 show the nexthops using devices associated with the vrf name
157 show the nexthops using devices enslaved to given master device
160 show only nexthop groups
163 show only fdb nexthops and nexthop groups
167 flushes nexthops selected by some criteria. Criteria options are the same
172 get a single nexthop by id
178 Show all nexthop entries in the kernel.
181 ip nexthop add id 1 via 192.168.1.1 dev eth0
183 Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0.
186 ip nexthop add id 2 encap mpls 200/300 via 10.1.1.1 dev eth0
188 Adds an IPv4 nexthop with mpls encapsulation attributes attached to it.
191 ip nexthop add id 3 group 1/2
193 Adds a nexthop with id 3. The nexthop is a group using nexthops with ids
194 1 and 2 at equal weight.
197 ip nexthop add id 4 group 1,5/2,11
199 Adds a nexthop with id 4. The nexthop is a group using nexthops with ids
200 1 and 2 with nexthop 1 at weight 5 and nexthop 2 at weight 11.
203 ip nexthop add id 5 via 192.168.1.2 fdb
205 Adds a fdb nexthop with id 5.
208 ip nexthop add id 7 group 5/6 fdb
210 Adds a fdb nexthop group with id 7. A fdb nexthop group can only have
218 Original Manpage by David Ahern <dsahern@kernel.org>