320 lines
5.1 KiB
HTML
320 lines
5.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of IP-NEXTHOP</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>IP-NEXTHOP</H1>
|
|
Section: Linux (8)<BR>Updated: 30 May 2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
ip-nexthop - nexthop object management
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
|
|
|
|
<BR>
|
|
|
|
<B>ip</B>
|
|
|
|
[ <I>ip-OPTIONS</I> ]
|
|
|
|
<B>nexthop</B>
|
|
|
|
{ <I>COMMAND</I> |
|
|
|
|
<B>help</B> }
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip nexthop</B> {
|
|
|
|
<B>show</B> | <B>flush</B> }
|
|
|
|
<I>SELECTOR</I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip nexthop</B> { <B>add</B> | <B>replace</B> } id
|
|
|
|
<I>ID</I>
|
|
|
|
<I>NH</I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<B>ip nexthop</B> { <B>get</B> | <B>del</B> } id
|
|
|
|
<I>ID</I>
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>SELECTOR</I> :=
|
|
|
|
[ <B>id</B>
|
|
|
|
<I>ID</I> ] [
|
|
|
|
<B>dev</B>
|
|
|
|
<I>DEV</I> ] [
|
|
|
|
<B>vrf</B>
|
|
|
|
<I>NAME</I> ] [
|
|
|
|
<B>master</B>
|
|
|
|
<I>DEV</I> ] [
|
|
|
|
<B>groups</B> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>NH</I> := {
|
|
|
|
<B>blackhole</B> | [
|
|
|
|
<B>via</B>
|
|
|
|
<I>ADDRESS</I> ] [
|
|
|
|
<B>dev</B>
|
|
|
|
<I>DEV</I> ] [
|
|
|
|
<B>onlink</B> ] [
|
|
|
|
<B>encap</B>
|
|
|
|
<I>ENCAP</I> ] |
|
|
|
|
<B>group</B>
|
|
|
|
<I>GROUP</I> }
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>ENCAP</I> := [
|
|
|
|
<I>ENCAP_MPLS</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>ENCAP_MPLS</I> :=
|
|
|
|
<B>mpls</B> [
|
|
|
|
<I>LABEL</I> ] [
|
|
|
|
<B>ttl</B>
|
|
|
|
<I>TTL</I> ]
|
|
|
|
<P>
|
|
<BR>
|
|
|
|
<I>GROUP</I> :=
|
|
|
|
<B>id</B>[,<B>weight</B>[/...]
|
|
|
|
<P>
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>ip nexthop</B>
|
|
|
|
is used to manipulate entries in the kernel's nexthop tables.
|
|
<DL COMPACT>
|
|
<DT id="1">ip nexthop add id ID<DD>
|
|
add new nexthop entry
|
|
<DT id="2">ip nexthop replace id ID<DD>
|
|
change the configuration of a nexthop or add new one
|
|
<DL COMPACT><DT id="3"><DD>
|
|
<DL COMPACT>
|
|
<DT id="4"><B>via</B><I> [ FAMILY ] ADDRESS</I>
|
|
|
|
<DD>
|
|
the address of the nexthop router, in the address family FAMILY.
|
|
Address family must match address family of nexthop instance.
|
|
<DT id="5"><B>dev</B><I> NAME</I>
|
|
|
|
<DD>
|
|
is the output device.
|
|
<DT id="6"><B>onlink</B>
|
|
|
|
<DD>
|
|
pretend that the nexthop is directly attached to this link,
|
|
even if it does not match any interface prefix.
|
|
<DT id="7"><B>encap</B><I> ENCAPTYPE ENCAPHDR</I>
|
|
|
|
<DD>
|
|
attach tunnel encapsulation attributes to this route.
|
|
<P>
|
|
<I>ENCAPTYPE</I>
|
|
|
|
is a string specifying the supported encapsulation type. Namely:
|
|
<P>
|
|
|
|
<B>mpls</B>
|
|
|
|
- encapsulation type MPLS
|
|
<P>
|
|
|
|
<I>ENCAPHDR</I>
|
|
|
|
is a set of encapsulation attributes specific to the
|
|
<I>ENCAPTYPE.</I>
|
|
|
|
<P>
|
|
|
|
<B>mpls</B>
|
|
|
|
|
|
<I>MPLSLABEL</I>
|
|
|
|
- mpls label stack with labels separated by
|
|
<I>/</I>
|
|
|
|
<P>
|
|
<P>
|
|
<B>ttl</B>
|
|
|
|
<I>TTL</I>
|
|
|
|
- TTL to use for MPLS header or 0 to inherit from IP header
|
|
|
|
<P>
|
|
<DT id="8"><B>group</B><I> GROUP</I>
|
|
|
|
<DD>
|
|
create a nexthop group. Group specification is id with an optional
|
|
weight (id,weight) and a '/' as a separator between entries.
|
|
<DT id="9"><B>blackhole</B>
|
|
|
|
<DD>
|
|
create a blackhole nexthop
|
|
</DL>
|
|
</DL>
|
|
|
|
<P>
|
|
<DT id="10">ip nexthop delete id ID<DD>
|
|
delete nexthop with given id.
|
|
<P>
|
|
<DT id="11">ip nexthop show<DD>
|
|
show the contents of the nexthop table or the nexthops
|
|
selected by some criteria.
|
|
<DL COMPACT><DT id="12"><DD>
|
|
<DL COMPACT>
|
|
<DT id="13"><B>dev</B><I> DEV </I>
|
|
|
|
<DD>
|
|
show the nexthops using the given device.
|
|
<DT id="14"><B>vrf</B><I> NAME </I>
|
|
|
|
<DD>
|
|
show the nexthops using devices associated with the vrf name
|
|
<DT id="15"><B>master</B><I> DEV </I>
|
|
|
|
<DD>
|
|
show the nexthops using devices enslaved to given master device
|
|
<DT id="16"><B>groups</B>
|
|
|
|
<DD>
|
|
show only nexthop groups
|
|
</DL>
|
|
</DL>
|
|
|
|
<DT id="17">ip nexthop flush<DD>
|
|
flushes nexthops selected by some criteria. Criteria options are the same
|
|
as show.
|
|
<P>
|
|
<DT id="18">ip nexthop get id ID<DD>
|
|
get a single nexthop by id
|
|
<P>
|
|
</DL>
|
|
<A NAME="lbAE"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
|
|
ip nexthop ls
|
|
<DL COMPACT><DT id="19"><DD>
|
|
Show all nexthop entries in the kernel.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip nexthop add id 1 via 192.168.1.1 dev eth0
|
|
<DL COMPACT><DT id="20"><DD>
|
|
Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip nexthop add id 2 encap mpls 200/300 via 10.1.1.1 dev eth0
|
|
<DL COMPACT><DT id="21"><DD>
|
|
Adds an IPv4 nexthop with mpls encapsulation attributes attached to it.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip nexthop add id 3 group 1/2
|
|
<DL COMPACT><DT id="22"><DD>
|
|
Adds a nexthop with id 3. The nexthop is a group using nexthops with ids
|
|
1 and 2 at equal weight.
|
|
</DL>
|
|
|
|
<P>
|
|
|
|
ip nexthop add id 4 group 1,5/2,11
|
|
<DL COMPACT><DT id="23"><DD>
|
|
Adds a nexthop with id 4. The nexthop is a group using nexthops with ids
|
|
1 and 2 with nexthop 1 at weight 5 and nexthop 2 at weight 11.
|
|
</DL>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<BR>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+ip">ip</A></B>(8)
|
|
|
|
<P>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
Original Manpage by David Ahern <<A HREF="mailto:dsahern@kernel.org">dsahern@kernel.org</A>>
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="24"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="25"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="26"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="27"><A HREF="#lbAE">EXAMPLES</A><DD>
|
|
<DT id="28"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
<DT id="29"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:13 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|