Debian Codegraph @

upstream/debian-unstable/man8/ip-nexthop.8

raw
1 .TH IP\-NEXTHOP 8 "30 May 2019" "iproute2" "Linux"
2 .SH "NAME"
3 ip-nexthop \- nexthop object management
4 .SH "SYNOPSIS"
5 .sp
6 .ad l
7 .in +8
8 .ti -8
9 .B ip
10 .RI "[ " ip-OPTIONS " ]"
11 .B nexthop
12 .RI " { " COMMAND " | "
13 .BR help " }"
14 .sp
15 .ti -8
16
17 .ti -8
18 .BR "ip nexthop" " { "
19 .BR show " | " flush " } "
20 .I SELECTOR
21
22 .ti -8
23 .BR "ip nexthop" " { " add " | " replace " } id "
24 .I ID
25 .IR NH
26
27 .ti -8
28 .BR "ip nexthop" " { " get " | " del " } id "
29 .I ID
30
31 .ti -8
32 .BI "ip nexthop bucket list " BUCKET_SELECTOR
33
34 .ti -8
35 .BR "ip nexthop bucket get " id
36 .I ID
37 .RI "index " INDEX
38
39 .ti -8
40 .IR SELECTOR " := "
41 .RB "[ " id
42 .IR ID " ] [ "
43 .B dev
44 .IR DEV " ] [ "
45 .B vrf
46 .IR NAME " ] [ "
47 .B master
48 .IR DEV " ] [ "
49 .BR groups " ] [ "
50 .BR fdb " ]"
51
52 .ti -8
53 .IR BUCKET_SELECTOR " := "
54 .IR SELECTOR
55 .RB " | [ " nhid
56 .IR ID " ]"
57
58 .ti -8
59 .IR NH " := { "
60 .BR blackhole " | [ "
61 .B via
62 .IR ADDRESS " ] [ "
63 .B dev
64 .IR DEV " ] [ "
65 .BR onlink " ] [ "
66 .B encap
67 .IR ENCAP " ] [ "
68 .BR fdb " ] | "
69 .B group
70 .IR GROUP " [ "
71 .BR hw_stats " { "
72 .BR on " | " off " } ] [ "
73 .BR fdb " ] [ "
74 .B type
75 .IR TYPE " [ " TYPE_ARGS " ] ] }"
76
77 .ti -8
78 .IR ENCAP " := [ "
79 .IR ENCAP_MPLS " ] "
80
81 .ti -8
82 .IR ENCAP_MPLS " := "
83 .BR mpls " [ "
84 .IR LABEL " ] ["
85 .B ttl
86 .IR TTL " ]"
87
88 .ti -8
89 .IR GROUP " := "
90 .BR id "[," weight "[/...]"
91
92 .ti -8
93 .IR TYPE " := { "
94 .BR mpath " | " resilient " }"
95
96 .ti -8
97 .IR TYPE_ARGS " := [ "
98 .IR RESILIENT_ARGS " ] "
99
100 .ti -8
101 .IR RESILIENT_ARGS " := "
102 .RB "[ " buckets
103 .IR BUCKETS " ] [ "
104 .B idle_timer
105 .IR IDLE " ] [ "
106 .B unbalanced_timer
107 .IR UNBALANCED " ]"
108
109 .SH DESCRIPTION
110 .B ip nexthop
111 is used to manipulate entries in the kernel's nexthop tables.
112 .TP
113 ip nexthop add id ID
114 add new nexthop entry
115 .TP
116 ip nexthop replace id ID
117 change the configuration of a nexthop or add new one
118 .RS
119 .TP
120 .BI via " [ FAMILY ] ADDRESS"
121 the address of the nexthop router, in the address family FAMILY.
122 Address family must match address family of nexthop instance.
123 .TP
124 .BI dev " NAME"
125 is the output device.
126 .TP
127 .B onlink
128 pretend that the nexthop is directly attached to this link,
129 even if it does not match any interface prefix.
130 .TP
131 .BI encap " ENCAPTYPE ENCAPHDR"
132 attach tunnel encapsulation attributes to this route.
133 .sp
134 .I ENCAPTYPE
135 is a string specifying the supported encapsulation type. Namely:
136
137 .in +8
138 .BI mpls
139 - encapsulation type MPLS
140 .sp
141 .in -8
142 .I ENCAPHDR
143 is a set of encapsulation attributes specific to the
144 .I ENCAPTYPE.
145
146 .in +8
147 .B mpls
148 .in +2
149 .I MPLSLABEL
150 - mpls label stack with labels separated by
151 .I "/"
152 .sp
153
154 .B ttl
155 .I TTL
156 - TTL to use for MPLS header or 0 to inherit from IP header
157 .in -2
158
159 .TP
160 .BI group " GROUP [ " type " TYPE [ TYPE_ARGS ] ]"
161 create a nexthop group. Group specification is id with an optional
162 weight (id,weight) and a '/' as a separator between entries.
163 .sp
164 .I TYPE
165 is a string specifying the nexthop group type. Namely:
166
167 .in +8
168 .BI mpath
169 - Multipath nexthop group backed by the hash-threshold algorithm. The
170 default when the type is unspecified.
171 .sp
172 .BI resilient
173 - Resilient nexthop group. Group is resilient to addition and deletion of
174 nexthops.
175
176 .sp
177 .in -8
178 .I TYPE_ARGS
179 is a set of attributes specific to the
180 .I TYPE.
181
182 .in +8
183 .B resilient
184 .in +2
185 .B buckets
186 .I BUCKETS
187 - Number of nexthop buckets. Cannot be changed for an existing group
188 .sp
189
190 .B idle_timer
191 .I IDLE
192 - Time in seconds in which a nexthop bucket does not see traffic and is
193 therefore considered idle. Default is 120 seconds
194
195 .B unbalanced_timer
196 .I UNBALANCED
197 - Time in seconds in which a nexthop group is unbalanced and is therefore
198 considered unbalanced. The kernel will try to rebalance unbalanced groups, which
199 might result in some flows being reset. A value of 0 means that no
200 rebalancing will take place. Default is 0 seconds
201 .in -2
202
203 .TP
204 .B blackhole
205 create a blackhole nexthop
206 .TP
207 .B fdb
208 nexthop and nexthop groups for use with layer-2 fdb entries.
209 A fdb nexthop group can only have fdb nexthops.
210 Example: Used to represent a vxlan remote vtep ip. layer-2 vxlan
211 fdb entry pointing to an ecmp nexthop group containing multiple
212 remote vtep ips.
213 .RE
214
215 .TP
216 ip nexthop delete id ID
217 delete nexthop with given id.
218
219 .TP
220 ip nexthop show
221 show the contents of the nexthop table or the nexthops
222 selected by some criteria.
223 .RS
224 .TP
225 .BI dev " DEV "
226 show the nexthops using the given device.
227 .TP
228 .BI vrf " NAME "
229 show the nexthops using devices associated with the vrf name
230 .TP
231 .BI master " DEV "
232 show the nexthops using devices enslaved to given master device
233 .TP
234 .BI groups
235 show only nexthop groups
236 .TP
237 .BI fdb
238 show only fdb nexthops and nexthop groups
239 .RE
240 .TP
241 ip nexthop flush
242 flushes nexthops selected by some criteria. Criteria options are the same
243 as show.
244
245 .TP
246 ip nexthop get id ID
247 get a single nexthop by id
248
249 .TP
250 ip nexthop bucket show
251 show the contents of the nexthop bucket table or the nexthop buckets
252 selected by some criteria.
253 .RS
254 .TP
255 .BI id " ID "
256 .in +0
257 show the nexthop buckets that belong to a nexthop group with a given id
258 .TP
259 .BI nhid " ID "
260 .in +0
261 show the nexthop buckets that hold a nexthop with a given id
262 .TP
263 .BI dev " DEV "
264 .in +0
265 show the nexthop buckets using the given device
266 .TP
267 .BI vrf " NAME "
268 .in +0
269 show the nexthop buckets using devices associated with the vrf name
270 .TP
271 .BI master " DEV "
272 .in +0
273 show the nexthop buckets using devices enslaved to given master device
274 .RE
275
276 .TP
277 ip nexthop bucket get id ID index INDEX
278 get a single nexthop bucket by nexthop group id and bucket index
279
280 .SH EXAMPLES
281 .PP
282 ip nexthop ls
283 .RS 4
284 Show all nexthop entries in the kernel.
285 .RE
286 .PP
287 ip nexthop add id 1 via 192.168.1.1 dev eth0
288 .RS 4
289 Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0.
290 .RE
291 .PP
292 ip nexthop add id 2 encap mpls 200/300 via 10.1.1.1 dev eth0
293 .RS 4
294 Adds an IPv4 nexthop with mpls encapsulation attributes attached to it.
295 .RE
296 .PP
297 ip nexthop add id 3 group 1/2
298 .RS 4
299 Adds a nexthop with id 3. The nexthop is a group using nexthops with ids
300 1 and 2 at equal weight.
301 .RE
302 .PP
303 ip nexthop add id 4 group 1,5/2,11
304 .RS 4
305 Adds a nexthop with id 4. The nexthop is a group using nexthops with ids
306 1 and 2 with nexthop 1 at weight 5 and nexthop 2 at weight 11.
307 .RE
308 .PP
309 ip nexthop add id 5 via 192.168.1.2 fdb
310 .RS 4
311 Adds a fdb nexthop with id 5.
312 .RE
313 .PP
314 ip nexthop add id 7 group 5/6 fdb
315 .RS 4
316 Adds a fdb nexthop group with id 7. A fdb nexthop group can only have
317 fdb nexthops.
318 .RE
319 .PP
320 ip nexthop add id 10 group 1/2 type resilient buckets 32
321 .RS 4
322 Add a resilient nexthop group with id 10 and 32 nexthop buckets.
323 .RE
324 .SH SEE ALSO
325 .br
326 .BR ip (8)
327
328 .SH AUTHOR
329 Original Manpage by David Ahern <[email protected]>