diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-05-26 00:01:45 +0200 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-05-26 00:01:45 +0200 |
commit | 1534070b0d555d5da2a7e96bfe129843ad00fc40 (patch) | |
tree | 3187ced1fe77de948326a5a4b971f8291fd6c92d /docs/configuration/protocols/bgp.rst | |
parent | 274b4dc65f4323b0dd046f71cee5310c9b230095 (diff) | |
download | vyos-documentation-1534070b0d555d5da2a7e96bfe129843ad00fc40.tar.gz vyos-documentation-1534070b0d555d5da2a7e96bfe129843ad00fc40.zip |
bgp: adjust to new CLI syntax where local-as is an individual leafNode
Diffstat (limited to 'docs/configuration/protocols/bgp.rst')
-rw-r--r-- | docs/configuration/protocols/bgp.rst | 77 |
1 files changed, 43 insertions, 34 deletions
diff --git a/docs/configuration/protocols/bgp.rst b/docs/configuration/protocols/bgp.rst index 2ef7c247..f1f15f38 100644 --- a/docs/configuration/protocols/bgp.rst +++ b/docs/configuration/protocols/bgp.rst @@ -897,15 +897,14 @@ between these sub-ASes we use something that looks like EBGP but behaves like IBGP (called confederation BGP). Confederation mechanism is described in :rfc:`5065` -.. cfgcmd:: set protocols bgp <subasn> parameters confederation identifier +.. cfgcmd:: set protocols bgp parameters confederation identifier <asn> This command specifies a BGP confederation identifier. <asn> is the number of the autonomous system that internally includes multiple sub-autonomous - systems (a confederation). <subasn> is the number sub-autonomous system - inside <asn>. + systems (a confederation). -.. cfgcmd:: set protocols bgp <subasn> parameters confederation confederation +.. cfgcmd:: set protocols bgp parameters confederation confederation peers <nsubasn> This command sets other confederations <nsubasn> as members of autonomous @@ -1070,21 +1069,23 @@ A simple eBGP configuration: .. code-block:: none - set protocols bgp 65534 neighbor 192.168.0.2 ebgp-multihop '2' - set protocols bgp 65534 neighbor 192.168.0.2 remote-as '65535' - set protocols bgp 65534 neighbor 192.168.0.2 update-source '192.168.0.1' - set protocols bgp 65534 address-family ipv4-unicast network '172.16.0.0/16' - set protocols bgp 65534 parameters router-id '192.168.0.1' + set protocols bgp local-as 65534 + set protocols bgp neighbor 192.168.0.2 ebgp-multihop '2' + set protocols bgp neighbor 192.168.0.2 remote-as '65535' + set protocols bgp neighbor 192.168.0.2 update-source '192.168.0.1' + set protocols bgp address-family ipv4-unicast network '172.16.0.0/16' + set protocols bgp parameters router-id '192.168.0.1' **Node 2:** .. code-block:: none - set protocols bgp 65535 neighbor 192.168.0.1 ebgp-multihop '2' - set protocols bgp 65535 neighbor 192.168.0.1 remote-as '65534' - set protocols bgp 65535 neighbor 192.168.0.1 update-source '192.168.0.2' - set protocols bgp 65535 address-family ipv4-unicast network '172.17.0.0/16' - set protocols bgp 65535 parameters router-id '192.168.0.2' + set protocols bgp local-as 65535 + set protocols bgp neighbor 192.168.0.1 ebgp-multihop '2' + set protocols bgp neighbor 192.168.0.1 remote-as '65534' + set protocols bgp neighbor 192.168.0.1 update-source '192.168.0.2' + set protocols bgp address-family ipv4-unicast network '172.17.0.0/16' + set protocols bgp parameters router-id '192.168.0.2' Don't forget, the CIDR declared in the network statement MUST **exist in your @@ -1113,23 +1114,25 @@ A simple BGP configuration via IPv6. .. code-block:: none - set protocols bgp 65534 neighbor 2001:db8::2 ebgp-multihop '2' - set protocols bgp 65534 neighbor 2001:db8::2 remote-as '65535' - set protocols bgp 65534 neighbor 2001:db8::2 update-source '2001:db8::1' - set protocols bgp 65534 neighbor 2001:db8::2 address-family ipv6-unicast - set protocols bgp 65534 address-family ipv6-unicast network '2001:db8:1::/48' - set protocols bgp 65534 parameters router-id '10.1.1.1' + set protocols bgp local-as 65534 + set protocols bgp neighbor 2001:db8::2 ebgp-multihop '2' + set protocols bgp neighbor 2001:db8::2 remote-as '65535' + set protocols bgp neighbor 2001:db8::2 update-source '2001:db8::1' + set protocols bgp neighbor 2001:db8::2 address-family ipv6-unicast + set protocols bgp address-family ipv6-unicast network '2001:db8:1::/48' + set protocols bgp parameters router-id '10.1.1.1' **Node 2:** .. code-block:: none - set protocols bgp 65535 neighbor 2001:db8::1 ebgp-multihop '2' - set protocols bgp 65535 neighbor 2001:db8::1 remote-as '65534' - set protocols bgp 65535 neighbor 2001:db8::1 update-source '2001:db8::2' - set protocols bgp 65535 neighbor 2001:db8::1 address-family ipv6-unicast - set protocols bgp 65535 address-family ipv6-unicast network '2001:db8:2::/48' - set protocols bgp 65535 parameters router-id '10.1.1.2' + set protocols bgp local-as 65535 + set protocols bgp neighbor 2001:db8::1 ebgp-multihop '2' + set protocols bgp neighbor 2001:db8::1 remote-as '65534' + set protocols bgp neighbor 2001:db8::1 update-source '2001:db8::2' + set protocols bgp neighbor 2001:db8::1 address-family ipv6-unicast + set protocols bgp address-family ipv6-unicast network '2001:db8:2::/48' + set protocols bgp parameters router-id '10.1.1.2' Don't forget, the CIDR declared in the network statement **MUST exist in your routing table (dynamic or static), the best way to make sure that is true is @@ -1164,6 +1167,7 @@ Route filter can be applied using a route-map: set policy prefix-list6 AS65535-IN rule 10 prefix '2001:db8:2::/48' set policy prefix-list6 AS65535-OUT rule 10 action 'deny' set policy prefix-list6 AS65535-OUT rule 10 prefix '2001:db8:2::/48' + set policy route-map AS65535-IN rule 10 action 'permit' set policy route-map AS65535-IN rule 10 match ip address prefix-list 'AS65535-IN' set policy route-map AS65535-IN rule 10 match ipv6 address prefix-list 'AS65535-IN' @@ -1172,10 +1176,12 @@ Route filter can be applied using a route-map: set policy route-map AS65535-OUT rule 10 match ip address prefix-list 'AS65535-OUT' set policy route-map AS65535-OUT rule 10 match ipv6 address prefix-list 'AS65535-OUT' set policy route-map AS65535-OUT rule 20 action 'permit' - set protocols bgp 65534 neighbor 2001:db8::2 address-family ipv4-unicast route-map export 'AS65535-OUT' - set protocols bgp 65534 neighbor 2001:db8::2 address-family ipv4-unicast route-map import 'AS65535-IN' - set protocols bgp 65534 neighbor 2001:db8::2 address-family ipv6-unicast route-map export 'AS65535-OUT' - set protocols bgp 65534 neighbor 2001:db8::2 address-family ipv6-unicast route-map import 'AS65535-IN' + + set protocols bgp local-as 65534 + set protocols bgp neighbor 2001:db8::2 address-family ipv4-unicast route-map export 'AS65535-OUT' + set protocols bgp neighbor 2001:db8::2 address-family ipv4-unicast route-map import 'AS65535-IN' + set protocols bgp neighbor 2001:db8::2 address-family ipv6-unicast route-map export 'AS65535-OUT' + set protocols bgp neighbor 2001:db8::2 address-family ipv6-unicast route-map import 'AS65535-IN' **Node2:** @@ -1189,6 +1195,7 @@ Route filter can be applied using a route-map: set policy prefix-list6 AS65534-IN rule 10 prefix '2001:db8:1::/48' set policy prefix-list6 AS65534-OUT rule 10 action 'deny' set policy prefix-list6 AS65534-OUT rule 10 prefix '2001:db8:1::/48' + set policy route-map AS65534-IN rule 10 action 'permit' set policy route-map AS65534-IN rule 10 match ip address prefix-list 'AS65534-IN' set policy route-map AS65534-IN rule 10 match ipv6 address prefix-list 'AS65534-IN' @@ -1197,10 +1204,12 @@ Route filter can be applied using a route-map: set policy route-map AS65534-OUT rule 10 match ip address prefix-list 'AS65534-OUT' set policy route-map AS65534-OUT rule 10 match ipv6 address prefix-list 'AS65534-OUT' set policy route-map AS65534-OUT rule 20 action 'permit' - set protocols bgp 65535 neighbor 2001:db8::1 address-family ipv4-unicast route-map export 'AS65534-OUT' - set protocols bgp 65535 neighbor 2001:db8::1 address-family ipv4-unicast route-map import 'AS65534-IN' - set protocols bgp 65535 neighbor 2001:db8::1 address-family ipv6-unicast route-map export 'AS65534-OUT' - set protocols bgp 65535 neighbor 2001:db8::1 address-family ipv6-unicast route-map import 'AS65534-IN' + + set protocols bgp local-as 65535 + set protocols bgp neighbor 2001:db8::1 address-family ipv4-unicast route-map export 'AS65534-OUT' + set protocols bgp neighbor 2001:db8::1 address-family ipv4-unicast route-map import 'AS65534-IN' + set protocols bgp neighbor 2001:db8::1 address-family ipv6-unicast route-map export 'AS65534-OUT' + set protocols bgp neighbor 2001:db8::1 address-family ipv6-unicast route-map import 'AS65534-IN' We could expand on this and also deny link local and multicast in the rule 20 action deny. |