]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/ip-nexthop.8
ipnexthop: support for fdb nexthops
[mirror_iproute2.git] / man / man8 / ip-nexthop.8
CommitLineData
42cce67e
DA
1.TH IP\-NEXTHOP 8 "30 May 2019" "iproute2" "Linux"
2.SH "NAME"
3ip-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
76is used to manipulate entries in the kernel's nexthop tables.
77.TP
78ip nexthop add id ID
79add new nexthop entry
80.TP
81ip nexthop replace id ID
82change the configuration of a nexthop or add new one
83.RS
84.TP
85.BI via " [ FAMILY ] ADDRESS"
86the address of the nexthop router, in the address family FAMILY.
87Address family must match address family of nexthop instance.
88.TP
89.BI dev " NAME"
90is the output device.
91.TP
92.B onlink
93pretend that the nexthop is directly attached to this link,
94even if it does not match any interface prefix.
95.TP
96.BI encap " ENCAPTYPE ENCAPHDR"
97attach tunnel encapsulation attributes to this route.
98.sp
99.I ENCAPTYPE
100is 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
108is 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"
126create a nexthop group. Group specification is id with an optional
127weight (id,weight) and a '/' as a separator between entries.
128.TP
129.B blackhole
130create a blackhole nexthop
a56d1746
RP
131.TP
132.B fdb
133nexthop and nexthop groups for use with layer-2 fdb entries.
134A fdb nexthop group can only have fdb nexthops.
135Example: Used to represent a vxlan remote vtep ip. layer-2 vxlan
136fdb entry pointing to an ecmp nexthop group containing multiple
137remote vtep ips.
42cce67e
DA
138.RE
139
140.TP
141ip nexthop delete id ID
142delete nexthop with given id.
42cce67e
DA
143
144.TP
145ip nexthop show
146show the contents of the nexthop table or the nexthops
147selected by some criteria.
148.RS
149.TP
150.BI dev " DEV "
151show the nexthops using the given device.
152.TP
153.BI vrf " NAME "
154show the nexthops using devices associated with the vrf name
155.TP
156.BI master " DEV "
157show the nexthops using devices enslaved to given master device
158.TP
159.BI groups
160show only nexthop groups
a56d1746
RP
161.TP
162.BI fdb
163show only fdb nexthops and nexthop groups
42cce67e
DA
164.RE
165.TP
166ip nexthop flush
167flushes nexthops selected by some criteria. Criteria options are the same
168as show.
42cce67e
DA
169
170.TP
171ip nexthop get id ID
172get a single nexthop by id
173
174.SH EXAMPLES
175.PP
176ip nexthop ls
177.RS 4
178Show all nexthop entries in the kernel.
179.RE
180.PP
181ip nexthop add id 1 via 192.168.1.1 dev eth0
182.RS 4
183Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0.
184.RE
185.PP
186ip nexthop add id 2 encap mpls 200/300 via 10.1.1.1 dev eth0
187.RS 4
188Adds an IPv4 nexthop with mpls encapsulation attributes attached to it.
189.RE
190.PP
191ip nexthop add id 3 group 1/2
192.RS 4
193Adds a nexthop with id 3. The nexthop is a group using nexthops with ids
1941 and 2 at equal weight.
195.RE
196.PP
197ip nexthop add id 4 group 1,5/2,11
198.RS 4
199Adds a nexthop with id 4. The nexthop is a group using nexthops with ids
2001 and 2 with nexthop 1 at weight 5 and nexthop 2 at weight 11.
201.RE
a56d1746
RP
202.PP
203ip nexthop add id 5 via 192.168.1.2 fdb
204.RS 4
205Adds a fdb nexthop with id 5.
206.RE
207.PP
208ip nexthop add id 7 group 5/6 fdb
209.RS 4
210Adds a fdb nexthop group with id 7. A fdb nexthop group can only have
211fdb nexthops.
212.RE
42cce67e
DA
213.SH SEE ALSO
214.br
215.BR ip (8)
216
217.SH AUTHOR
218Original Manpage by David Ahern <dsahern@kernel.org>