]>
Commit | Line | Data |
---|---|---|
42cce67e DA |
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 | .IR SELECTOR " := " | |
33 | .RB "[ " id | |
34 | .IR ID " ] [ " | |
35 | .B dev | |
36 | .IR DEV " ] [ " | |
37 | .B vrf | |
38 | .IR NAME " ] [ " | |
39 | .B master | |
40 | .IR DEV " ] [ " | |
a56d1746 RP |
41 | .BR groups " ] [ " |
42 | .BR fdb " ]" | |
42cce67e DA |
43 | |
44 | .ti -8 | |
45 | .IR NH " := { " | |
46 | .BR blackhole " | [ " | |
47 | .B via | |
48 | .IR ADDRESS " ] [ " | |
49 | .B dev | |
50 | .IR DEV " ] [ " | |
51 | .BR onlink " ] [ " | |
52 | .B encap | |
a56d1746 RP |
53 | .IR ENCAP " ] [ " |
54 | .BR fdb " ] | " | |
42cce67e | 55 | .B group |
a56d1746 RP |
56 | .IR GROUP " [ " |
57 | .BR fdb " ] } " | |
42cce67e DA |
58 | |
59 | .ti -8 | |
60 | .IR ENCAP " := [ " | |
61 | .IR ENCAP_MPLS " ] " | |
62 | ||
63 | .ti -8 | |
64 | .IR ENCAP_MPLS " := " | |
65 | .BR mpls " [ " | |
66 | .IR LABEL " ] [" | |
67 | .B ttl | |
68 | .IR TTL " ]" | |
69 | ||
70 | .ti -8 | |
71 | .IR GROUP " := " | |
72 | .BR id "[," weight "[/...]" | |
73 | ||
74 | .SH DESCRIPTION | |
75 | .B ip nexthop | |
76 | is used to manipulate entries in the kernel's nexthop tables. | |
77 | .TP | |
78 | ip nexthop add id ID | |
79 | add new nexthop entry | |
80 | .TP | |
81 | ip nexthop replace id ID | |
82 | change the configuration of a nexthop or add new one | |
83 | .RS | |
84 | .TP | |
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. | |
88 | .TP | |
89 | .BI dev " NAME" | |
90 | is the output device. | |
91 | .TP | |
92 | .B onlink | |
93 | pretend that the nexthop is directly attached to this link, | |
94 | even if it does not match any interface prefix. | |
95 | .TP | |
96 | .BI encap " ENCAPTYPE ENCAPHDR" | |
97 | attach tunnel encapsulation attributes to this route. | |
98 | .sp | |
99 | .I ENCAPTYPE | |
100 | is a string specifying the supported encapsulation type. Namely: | |
101 | ||
102 | .in +8 | |
103 | .BI mpls | |
104 | - encapsulation type MPLS | |
105 | .sp | |
106 | .in -8 | |
107 | .I ENCAPHDR | |
108 | is a set of encapsulation attributes specific to the | |
109 | .I ENCAPTYPE. | |
110 | ||
111 | .in +8 | |
112 | .B mpls | |
113 | .in +2 | |
114 | .I MPLSLABEL | |
115 | - mpls label stack with labels separated by | |
116 | .I "/" | |
117 | .sp | |
118 | ||
119 | .B ttl | |
120 | .I TTL | |
121 | - TTL to use for MPLS header or 0 to inherit from IP header | |
122 | .in -2 | |
123 | ||
124 | .TP | |
125 | .BI group " GROUP" | |
126 | create a nexthop group. Group specification is id with an optional | |
127 | weight (id,weight) and a '/' as a separator between entries. | |
128 | .TP | |
129 | .B blackhole | |
130 | create a blackhole nexthop | |
a56d1746 RP |
131 | .TP |
132 | .B fdb | |
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 | |
137 | remote vtep ips. | |
42cce67e DA |
138 | .RE |
139 | ||
140 | .TP | |
141 | ip nexthop delete id ID | |
142 | delete nexthop with given id. | |
42cce67e DA |
143 | |
144 | .TP | |
145 | ip nexthop show | |
146 | show the contents of the nexthop table or the nexthops | |
147 | selected by some criteria. | |
148 | .RS | |
149 | .TP | |
150 | .BI dev " DEV " | |
151 | show the nexthops using the given device. | |
152 | .TP | |
153 | .BI vrf " NAME " | |
154 | show the nexthops using devices associated with the vrf name | |
155 | .TP | |
156 | .BI master " DEV " | |
157 | show the nexthops using devices enslaved to given master device | |
158 | .TP | |
159 | .BI groups | |
160 | show only nexthop groups | |
a56d1746 RP |
161 | .TP |
162 | .BI fdb | |
163 | show only fdb nexthops and nexthop groups | |
42cce67e DA |
164 | .RE |
165 | .TP | |
166 | ip nexthop flush | |
167 | flushes nexthops selected by some criteria. Criteria options are the same | |
168 | as show. | |
42cce67e DA |
169 | |
170 | .TP | |
171 | ip nexthop get id ID | |
172 | get a single nexthop by id | |
173 | ||
174 | .SH EXAMPLES | |
175 | .PP | |
176 | ip nexthop ls | |
177 | .RS 4 | |
178 | Show all nexthop entries in the kernel. | |
179 | .RE | |
180 | .PP | |
181 | ip nexthop add id 1 via 192.168.1.1 dev eth0 | |
182 | .RS 4 | |
183 | Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0. | |
184 | .RE | |
185 | .PP | |
186 | ip nexthop add id 2 encap mpls 200/300 via 10.1.1.1 dev eth0 | |
187 | .RS 4 | |
188 | Adds an IPv4 nexthop with mpls encapsulation attributes attached to it. | |
189 | .RE | |
190 | .PP | |
191 | ip nexthop add id 3 group 1/2 | |
192 | .RS 4 | |
193 | Adds a nexthop with id 3. The nexthop is a group using nexthops with ids | |
194 | 1 and 2 at equal weight. | |
195 | .RE | |
196 | .PP | |
197 | ip nexthop add id 4 group 1,5/2,11 | |
198 | .RS 4 | |
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. | |
201 | .RE | |
a56d1746 RP |
202 | .PP |
203 | ip nexthop add id 5 via 192.168.1.2 fdb | |
204 | .RS 4 | |
205 | Adds a fdb nexthop with id 5. | |
206 | .RE | |
207 | .PP | |
208 | ip nexthop add id 7 group 5/6 fdb | |
209 | .RS 4 | |
210 | Adds a fdb nexthop group with id 7. A fdb nexthop group can only have | |
211 | fdb nexthops. | |
212 | .RE | |
42cce67e DA |
213 | .SH SEE ALSO |
214 | .br | |
215 | .BR ip (8) | |
216 | ||
217 | .SH AUTHOR | |
218 | Original Manpage by David Ahern <dsahern@kernel.org> |