{"id":3739,"date":"2022-12-20T17:19:55","date_gmt":"2022-12-20T20:19:55","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/ipnexthop-man8\/"},"modified":"2022-12-20T17:19:55","modified_gmt":"2022-12-20T20:19:55","slug":"ipnexthop-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/ipnexthop-man8\/","title":{"rendered":"IP&minus;NEXTHOP (man8)"},"content":{"rendered":"<h1 align=\"center\">IP\u2212NEXTHOP<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ip-nexthop \u2212 nexthop object management<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip<\/b> [ <i>ip-OPTIONS<\/i> ] <b>nexthop<\/b> { <i>COMMAND<\/i> | <b>help<\/b> }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip nexthop<\/b> { <b>show<\/b> | <b>flush<\/b> } <i>SELECTOR<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip nexthop<\/b> { <b>add<\/b> | <b>replace<\/b> } id <i>ID NH<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip nexthop<\/b> { <b>get<\/b> | <b>del<\/b> } id <i>ID<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip nexthop bucket list<\/b> <i>BUCKET_SELECTOR<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><b>ip nexthop bucket get<\/b> id <i>ID<\/i> index <i>INDEX<\/i><\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><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> ] [ <b>fdb<\/b> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>BUCKET_SELECTOR<\/i> := <i>SELECTOR<\/i> | [ <b>nhid<\/b> <i>ID<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><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>fdb<\/b> ] | <b>group<\/b> <i>GROUP<\/i> [ <b>fdb<\/b> ] [ <b>type<\/b> <i>TYPE<\/i> [ <i>TYPE_ARGS<\/i> ] ] }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>ENCAP<\/i> := [ <i>ENCAP_MPLS<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>ENCAP_MPLS<\/i> := <b>mpls<\/b> [ <i>LABEL<\/i> ] [ <b>ttl<\/b> <i>TTL<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>GROUP<\/i> := <b>id<\/b>[,<b>weight<\/b>[\/&#8230;]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>TYPE<\/i> := { <b>mpath<\/b> | <b>resilient<\/b> }<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>TYPE_ARGS<\/i> := [ <i>RESILIENT_ARGS<\/i> ]<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"><i>RESILIENT_ARGS<\/i> := [ <b>buckets<\/b> <i>BUCKETS<\/i> ] [ <b>idle_timer<\/b> <i>IDLE<\/i> ] [ <b>unbalanced_timer<\/b> <i>UNBALANCED<\/i> ]<\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ip nexthop<\/b> is used to manipulate entries in the kernel\u2019s nexthop tables. <br \/> ip nexthop add id ID<\/p>\n<p style=\"margin-left:22%;\">add new nexthop entry<\/p>\n<p style=\"margin-left:11%;\">ip nexthop replace id ID<\/p>\n<p style=\"margin-left:22%;\">change the configuration of a nexthop or add new one <b><br \/> via<\/b> <i>[ FAMILY ] ADDRESS<\/i><\/p>\n<p style=\"margin-left:32%;\">the address of the nexthop router, in the address family FAMILY. Address family must match address family of nexthop instance.<\/p>\n<p style=\"margin-left:22%;\"><b>dev<\/b> <i>NAME<\/i><\/p>\n<p style=\"margin-left:32%;\">is the output device.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"9%\">\n<p><b>onlink<\/b><\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"68%\">\n<p>pretend that the nexthop is directly attached to this link, even if it does not match any interface prefix.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\"><b>encap<\/b> <i>ENCAPTYPE ENCAPHDR<\/i><\/p>\n<p style=\"margin-left:32%;\">attach tunnel encapsulation attributes to this route.<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\"><i>ENCAPTYPE<\/i> is a string specifying the supported encapsulation type. Namely:<\/p>\n<p style=\"margin-left:45%; margin-top: 1em\"><b>mpls<\/b> &#8211; encapsulation type MPLS<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\"><i>ENCAPHDR<\/i> is a set of encapsulation attributes specific to the <i>ENCAPTYPE.<\/i><\/p>\n<p style=\"margin-left:45%; margin-top: 1em\"><b>mpls<\/b><\/p>\n<p style=\"margin-left:48%;\"><i>MPLSLABEL<\/i> &#8211; mpls label stack with labels separated by <i>\/<\/i><\/p>\n<p style=\"margin-left:48%; margin-top: 1em\"><b>ttl<\/b> <i>TTL<\/i> &#8211; TTL to use for MPLS header or 0 to inherit from IP header<\/p>\n<p style=\"margin-left:22%;\"><b>group<\/b> <i>GROUP [<\/i> <b>type<\/b> <i>TYPE [ TYPE_ARGS ] ]<\/i><\/p>\n<p style=\"margin-left:32%;\">create a nexthop group. Group specification is id with an optional weight (id,weight) and a \u2019\/\u2019 as a separator between entries.<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\"><i>TYPE<\/i> is a string specifying the nexthop group type. Namely:<\/p>\n<p style=\"margin-left:45%; margin-top: 1em\"><b>mpath<\/b> &#8211; Multipath nexthop group backed by the hash-threshold algorithm. The default when the type is unspecified.<\/p>\n<p style=\"margin-left:45%; margin-top: 1em\"><b>resilient<\/b> &#8211; Resilient nexthop group. Group is resilient to addition and deletion of nexthops.<\/p>\n<p style=\"margin-left:32%; margin-top: 1em\"><i>TYPE_ARGS<\/i> is a set of attributes specific to the <i>TYPE.<\/i><\/p>\n<p style=\"margin-left:45%; margin-top: 1em\"><b>resilient<\/b><\/p>\n<p style=\"margin-left:48%;\"><b>buckets<\/b> <i>BUCKETS<\/i> &#8211; Number of nexthop buckets. Cannot be changed for an existing group<\/p>\n<p style=\"margin-left:48%; margin-top: 1em\"><b>idle_timer<\/b> <i>IDLE<\/i> &#8211; Time in seconds in which a nexthop bucket does not see traffic and is therefore considered idle. Default is 120 seconds<\/p>\n<p style=\"margin-left:48%; margin-top: 1em\"><b>unbalanced_timer<\/b> <i>UNBALANCED<\/i> &#8211; Time in seconds in which a nexthop group is unbalanced and is therefore considered unbalanced. The kernel will try to rebalance unbalanced groups, which might result in some flows being reset. A value of 0 means that no rebalancing will take place. Default is 0 seconds<\/p>\n<p style=\"margin-left:22%;\"><b>blackhole<\/b><\/p>\n<p style=\"margin-left:32%;\">create a blackhole nexthop<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"4%\">\n<p><b>fdb<\/b><\/p>\n<\/td>\n<td width=\"6%\"><\/td>\n<td width=\"68%\">\n<p>nexthop and nexthop groups for use with layer-2 fdb entries. A fdb nexthop group can only have fdb nexthops. Example: Used to represent a vxlan remote vtep ip. layer-2 vxlan fdb entry pointing to an ecmp nexthop group containing multiple remote vtep ips.<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">ip nexthop delete id ID<\/p>\n<p style=\"margin-left:22%;\">delete nexthop with given id.<\/p>\n<p style=\"margin-left:11%;\">ip nexthop show<\/p>\n<p style=\"margin-left:22%;\">show the contents of the nexthop table or the nexthops selected by some criteria. <b><br \/> dev<\/b> <i>DEV<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthops using the given device.<\/p>\n<p style=\"margin-left:22%;\"><b>vrf<\/b> <i>NAME<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthops using devices associated with the vrf name<\/p>\n<p style=\"margin-left:22%;\"><b>master<\/b> <i>DEV<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthops using devices enslaved to given master device<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"9%\">\n<p><b>groups<\/b><\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"63%\">\n<p>show only nexthop groups<\/p>\n<\/td>\n<td width=\"5%\"> <\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"9%\">\n<p><b>fdb<\/b><\/p>\n<\/td>\n<td width=\"1%\"><\/td>\n<td width=\"63%\">\n<p>show only fdb nexthops and nexthop groups<\/p>\n<\/td>\n<td width=\"5%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:11%;\">ip nexthop flush<\/p>\n<p style=\"margin-left:22%;\">flushes nexthops selected by some criteria. Criteria options are the same as show.<\/p>\n<p style=\"margin-left:11%;\">ip nexthop get id ID<\/p>\n<p style=\"margin-left:22%;\">get a single nexthop by id<\/p>\n<p style=\"margin-left:11%;\">ip nexthop bucket show<\/p>\n<p style=\"margin-left:22%;\">show the contents of the nexthop bucket table or the nexthop buckets selected by some criteria.<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"22%\"><\/td>\n<td width=\"7%\">\n<p><b>id<\/b> <i>ID<\/i><\/p>\n<\/td>\n<td width=\"3%\"><\/td>\n<td width=\"68%\">\n<p>show the nexthop buckets that belong to a nexthop group with a given id<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:22%;\"><b>nhid<\/b> <i>ID<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthop buckets that hold a nexthop with a given id<\/p>\n<p style=\"margin-left:22%;\"><b>dev<\/b> <i>DEV<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthop buckets using the given device<\/p>\n<p style=\"margin-left:22%;\"><b>vrf<\/b> <i>NAME<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthop buckets using devices associated with the vrf name<\/p>\n<p style=\"margin-left:22%;\"><b>master<\/b> <i>DEV<\/i><\/p>\n<p style=\"margin-left:32%;\">show the nexthop buckets using devices enslaved to given master device<\/p>\n<p style=\"margin-left:11%;\">ip nexthop bucket get id ID index INDEX<\/p>\n<p style=\"margin-left:22%;\">get a single nexthop bucket by nexthop group id and bucket index<\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop ls<\/p>\n<p style=\"margin-left:17%;\">Show all nexthop entries in the kernel.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 1 via 192.168.1.1 dev eth0<\/p>\n<p style=\"margin-left:17%;\">Adds an IPv4 nexthop with id 1 using the gateway 192.168.1.1 out device eth0.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 2 encap mpls 200\/300 via 10.1.1.1 dev eth0<\/p>\n<p style=\"margin-left:17%;\">Adds an IPv4 nexthop with mpls encapsulation attributes attached to it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 3 group 1\/2<\/p>\n<p style=\"margin-left:17%;\">Adds a nexthop with id 3. The nexthop is a group using nexthops with ids 1 and 2 at equal weight.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 4 group 1,5\/2,11<\/p>\n<p style=\"margin-left:17%;\">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.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 5 via 192.168.1.2 fdb<\/p>\n<p style=\"margin-left:17%;\">Adds a fdb nexthop with id 5.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 7 group 5\/6 fdb<\/p>\n<p style=\"margin-left:17%;\">Adds a fdb nexthop group with id 7. A fdb nexthop group can only have fdb nexthops.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">ip nexthop add id 10 group 1\/2 type resilient buckets 32<\/p>\n<p style=\"margin-left:17%;\">Add a resilient nexthop group with id 10 and 32 nexthop buckets.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ip<\/b>(8)<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Original Manpage by David Ahern <dsahern@kernel.org><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  ip-nexthop \u2212 nexthop object management <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,845,4],"class_list":["post-3739","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-ip-nexthop","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3739","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3739"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3739\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3739"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3739"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3739"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}