From a141959f0729b2381a90aaa9b7ed0e41a5f9513e Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Thu, 7 Jan 2021 01:20:56 +0100 Subject: [PATCH] Doc: Describe per-nexthop static route options Also remove description of (no longer supported) per-route 'bfd' option, and add examples of IPv6 routes with link-local nexthops. --- doc/bird.sgml | 79 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 57 insertions(+), 22 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 23239328..28b0e400 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -4965,8 +4965,8 @@ static protocols, each with appropriate routes and channel. . - route - Next hop routes may bear one or more . + route + Regular routes may bear one or more . Every next hop is preceded by route @@ -4985,6 +4985,46 @@ the next hop of the route is not a neighbor at the moment), Static just uninstalls the route from the table it is connected to and adds it again as soon as the destination becomes adjacent again. +Per-nexthop options + +

There are several options that in a case of multipath route are per-nexthop +(i.e., they can be used multiple times for a route, one time for each nexthop). +Syntactically, they are not separate options but just parts of +

The ROA config is just route with no nexthop. @@ -5123,21 +5163,6 @@ protocol static { Per-route options

- -Example static config +Example static configs +

protocol static { @@ -5158,21 +5184,30 @@ protocol static { via 198.51.100.10 weight 2 via 198.51.100.20 bfd # BFD-controlled next hop via 192.0.2.1; - route 203.0.113.0/24 unreachable; # Sink route + route 203.0.113.0/24 blackhole; # Sink route route 10.2.0.0/24 via "arc0"; # Secondary network route 192.168.10.0/24 via 198.51.100.100 { ospf_metric1 = 20; # Set extended attribute }; - route 192.168.10.0/24 via 198.51.100.100 { + route 192.168.11.0/24 via 198.51.100.100 { ospf_metric2 = 100; # Set extended attribute ospf_tag = 2; # Set extended attribute - bfd; # BFD-controlled route }; - route 192.168.11.0/24 via 198.51.100.100 { + route 192.168.12.0/24 via 198.51.100.100 { bgp_community.add((65535, 65281)); # Set extended BGP attribute bgp_large_community.add((64512, 1, 1)); # Set extended BGP attribute }; } + +protocol static { + ipv6; # Channel is mandatory + route 2001:db8:10::/48 via 2001:db8:1::1; # Route with global nexthop + route 2001:db8:20::/48 via fe80::10%eth0; # Route with link-local nexthop + route 2001:db8:30::/48 via fe80::20%'eth1.60'; # Iface with non-alphanumeric characters + route 2001:db8:40::/48 via "eth2"; # Direct route to eth2 + route 2001:db8::/32 unreachable; # Unreachable route + route ::/0 via 2001:db8:1::1 bfd; # BFD-controlled default route +}