From f428410ad04909ad98a3be475c234b0e48c5126b Mon Sep 17 00:00:00 2001 From: Leonid Voronkin Date: Wed, 13 Jan 2021 23:36:36 +0400 Subject: bgp: fix linter errors --- docs/configuration/protocols/bgp.rst | 213 ++++++++++++++++++++++++++--------- 1 file changed, 160 insertions(+), 53 deletions(-) (limited to 'docs/configuration/protocols/bgp.rst') diff --git a/docs/configuration/protocols/bgp.rst b/docs/configuration/protocols/bgp.rst index b577e5b9..ae7eb795 100644 --- a/docs/configuration/protocols/bgp.rst +++ b/docs/configuration/protocols/bgp.rst @@ -231,7 +231,8 @@ Route Selection have a value of infinity. The default state, where the missing MED attribute is considered to have a value of zero. -.. cfgcmd:: set protocols bgp parameters default local-pref +.. cfgcmd:: set protocols bgp parameters default local-pref + This command specifies the default local preference value. The local preference range is 0 to 4294967295. @@ -246,13 +247,15 @@ Route Selection Administrative Distance ----------------------- -.. cfgcmd:: set protocols bgp parameters distance global +.. cfgcmd:: set protocols bgp parameters distance global + This command change distance value of BGP. The arguments are the distance values for external routes, internal routes and local routes respectively. The distance range is 1 to 255. -.. cfgcmd:: set protocols bgp parameters distance prefix distance +.. cfgcmd:: set protocols bgp parameters distance prefix distance + This command sets the administrative distance for a particular route. The distance range is 1 to 255. @@ -263,34 +266,47 @@ Administrative Distance Network Advertisement --------------------- -.. cfgcmd:: set protocols bgp address-family network +.. cfgcmd:: set protocols bgp address-family + network This command is used for advertising IPv4 or IPv6 networks. - .. note:: By default, the BGP prefix is advertised even if it's not present in - the routing table. This behaviour differs from the implementation of some vendors. + .. note:: By default, the BGP prefix is advertised even if it's not present + in the routing table. This behaviour differs from the implementation of + some vendors. -.. cfgcmd:: set protocols bgp parameters network-import-check +.. cfgcmd:: set protocols bgp parameters network-import-check - This configuration modifies the behavior of the network statement. - If you have this configured the underlying network must exist in the - routing table. + This configuration modifies the behavior of the network statement. If you + have this configured the underlying network must exist in the routing table. + +.. cfgcmd:: set protocols bgp neighbor address-family + default-originate [route-map ] + + By default, VyOS does not advertise a default route (0.0.0.0/0) even if it is + in routing table. When you want to announce default routes to the peer, use + this command. Using optional argument :cfgcmd:`route-map` you can inject the + default route to given neighbor only if the conditions in the route map are + met. Route Aggregation ----------------- -.. cfgcmd:: set protocols bgp address-family aggregate-address +.. cfgcmd:: set protocols bgp address-family + aggregate-address This command specifies an aggregate address. The router will also announce longer-prefixes inside of the aggregate address. -.. cfgcmd:: set protocols bgp address-family aggregate-address as-set +.. cfgcmd:: set protocols bgp address-family + aggregate-address as-set This command specifies an aggregate address with a mathematical set of autonomous systems. This command summarizes the AS_PATH attributes of all the individual routes. -.. cfgcmd:: set protocols bgp address-family aggregate-address summary-only +.. cfgcmd:: set protocols bgp address-family + aggregate-address summary-only This command specifies an aggregate address and provides that longer-prefixes inside of the aggregate address are suppressed @@ -299,54 +315,64 @@ Route Aggregation Redistribution -------------- -.. cfgcmd:: set protocols bgp address-family redistribute connected +.. cfgcmd:: set protocols bgp address-family + redistribute connected Redistribute connected routes to BGP process. -.. cfgcmd:: set protocols bgp address-family redistribute kernel +.. cfgcmd:: set protocols bgp address-family + redistribute kernel Redistribute kernel routes to BGP process. -.. cfgcmd:: set protocols bgp address-family redistribute ospf +.. cfgcmd:: set protocols bgp address-family + redistribute ospf Redistribute OSPF routes to BGP process. -.. cfgcmd:: set protocols bgp address-family redistribute rip +.. cfgcmd:: set protocols bgp address-family + redistribute rip Redistribute RIP routes to BGP process. -.. cfgcmd:: set protocols bgp address-family redistribute static +.. cfgcmd:: set protocols bgp address-family + redistribute static Redistribute static routes to BGP process. -.. cfgcmd:: set protocols bgp address-family redistribute metric +.. cfgcmd:: set protocols bgp address-family + redistribute metric This command specifies metric (MED) for redistributed routes. The metric range is 0 to 4294967295. -.. cfgcmd:: set protocols bgp address-family redistribute route-map +.. cfgcmd:: set protocols bgp address-family + redistribute route-map This command allows to use route map to filter redistributed routes. -Peers ------ +Peers Configuration +------------------- Defining Peers ^^^^^^^^^^^^^^ -.. cfgcmd:: set protocols bgp neighbor remote-as +.. cfgcmd:: set protocols bgp neighbor remote-as + This command creates a new neighbor whose remote-as is NASN. The neighbor address can be an IPv4 address or an IPv6 address or an interface to use for the connection. The command it applicable for peer and peer group. -.. cfgcmd:: set protocols bgp neighbor remote-as internal +.. cfgcmd:: set protocols bgp neighbor remote-as + internal Create a peer as you would when you specify an ASN, except that if the peers ASN is different than mine as specified under the :cfgcmd:`protocols bgp ` command the connection will be denied. -.. cfgcmd:: set protocols bgp neighbor remote-as external +.. cfgcmd:: set protocols bgp neighbor remote-as + external Create a peer as you would when you specify an ASN, except that if the peers ASN is the same as mine as specified under the :cfgcmd:`protocols @@ -357,11 +383,13 @@ Defining Peers This command disable the peer or peer group. To reenable the peer use the delete form of this command. -.. cfgcmd:: set protocols bgp neighbor description +.. cfgcmd:: set protocols bgp neighbor description + Set description of the peer or peer group. -.. cfgcmd:: set protocols bgp neighbor update-source +.. cfgcmd:: set protocols bgp neighbor update-source + Specify the IPv4 source address to use for the BGP session to this neighbour, may be specified as either an IPv4 address directly or as an interface name. @@ -369,12 +397,14 @@ Defining Peers Capability Negotiation ^^^^^^^^^^^^^^^^^^^^^^ -.. cfgcmd:: set protocols bgp neighbor capability dynamic +.. cfgcmd:: set protocols bgp neighbor capability + dynamic This command would allow the dynamic update of capabilities over an established BGP session. -.. cfgcmd:: set protocols bgp neighbor capability extended-nexthop +.. cfgcmd:: set protocols bgp neighbor capability + extended-nexthop Allow bgp to negotiate the extended-nexthop capability with it’s peer. If you are peering over a IPv6 Link-Local address then this capability @@ -382,7 +412,8 @@ Capability Negotiation then turning on this command will allow BGP to install IPv4 routes with IPv6 nexthops if you do not have IPv4 configured on interfaces. -.. cfgcmd:: set protocols bgp neighbor disable-capability-negotiation +.. cfgcmd:: set protocols bgp neighbor + disable-capability-negotiation Suppress sending Capability Negotiation as OPEN message optional parameter to the peer. This command only affects the peer is @@ -394,20 +425,22 @@ Capability Negotiation You may prefer locally configured capabilities more than the negotiated capabilities even though remote peer sends capabilities. If the peer is - configured by :cfgcmd:`override-capability`, VyOS ignores received capabilities - then override negotiated capabilities with configured values. + configured by :cfgcmd:`override-capability`, VyOS ignores received + capabilities then override negotiated capabilities with configured values. Additionally you should keep in mind that this feature fundamentally disables the ability to use widely deployed BGP features. BGP unnumbered, hostname support, AS4, Addpath, Route Refresh, ORF, Dynamic Capabilities, and graceful restart. -.. cfgcmd:: set protocols bgp neighbor override-capability +.. cfgcmd:: set protocols bgp neighbor + override-capability This command allow override the result of Capability Negotiation with local configuration. Ignore remote peer’s capability value. -.. cfgcmd:: set protocols bgp neighbor strict-capability-match +.. cfgcmd:: set protocols bgp neighbor + strict-capability-match This command forces strictly compare remote capabilities and local capabilities. If capabilities are different, send Unsupported Capability @@ -421,7 +454,8 @@ Capability Negotiation Peer Parameters ^^^^^^^^^^^^^^^ -.. cfgcmd:: set protocols bgp neighbor address-family allowas-in number +.. cfgcmd:: set protocols bgp neighbor address-family + allowas-in number This command accept incoming routes with AS path containing AS number with the same value as the current system AS. This is @@ -434,7 +468,8 @@ Peer Parameters This command is only allowed for eBGP peers. It is not applicable for peer groups. -.. cfgcmd:: set protocols bgp neighbor address-family as-override +.. cfgcmd:: set protocols bgp neighbor address-family + as-override This command override AS number of the originating router with the local AS number. @@ -447,23 +482,43 @@ Peer Parameters This command is only allowed for eBGP peers. -.. cfgcmd:: set protocols bgp neighbor address-family attribute-unchanged +.. cfgcmd:: set protocols bgp neighbor address-family + attribute-unchanged This command specifies attributes to be left unchanged for advertisements sent to a peer or peer group. -.. cfgcmd:: set protocols bgp neighbor address-family maximum-prefix +.. cfgcmd:: set protocols bgp neighbor address-family + distribute-list + + This command applys the access list filters named in to the + specified BGP neighbor to restrict the routing information that BGP learns + and/or advertises. The arguments :cfgcmd:`export` and :cfgcmd:`import` + specify the direction in which the prefix lists are applied. + +.. cfgcmd:: set protocols bgp neighbor address-family + filter-list + + This command applys the AS path access list filters named in to the + specified BGP neighbor to restrict the routing information that BGP learns + and/or advertises. The arguments :cfgcmd:`export` and :cfgcmd:`import` + specify the direction in which the prefix lists are applied. + +.. cfgcmd:: set protocols bgp neighbor address-family + maximum-prefix This command specifies a maximum number of prefixes we can receive from a given peer. If this number is exceeded, the BGP session will be destroyed. The number range is 1 to 4294967295. -.. cfgcmd:: set protocols bgp neighbor address-family nexthop-self +.. cfgcmd:: set protocols bgp neighbor address-family + nexthop-self This command forces the BGP speaker to report itself as the next hop for an advertised route it advertised to a neighbor. -.. cfgcmd:: set protocols bgp neighbor address-family remove-private-as +.. cfgcmd:: set protocols bgp neighbor address-family + remove-private-as This command removes the private ASN of routes that are advertised to the configured peer. It removes only private ASNs on routes @@ -475,24 +530,45 @@ Peer Parameters If the AS-Path for the route has a private ASN between public ASNs, it is assumed that this is a design choice, and the private ASN is not removed. + +.. cfgcmd:: set protocols bgp neighbor address-family + soft-reconfiguration inbound + + Changes in BGP policies require the BGP session to be cleared. Clearing has a + large negative impact on network operations. Soft reconfiguration enables you + to generate inbound updates from a neighbor, change and activate BGP policies + without clearing the BGP session. + + This command specifies that route updates received from this neighbor will be + stored unmodified, regardless of the inbound policy. When inbound soft + reconfiguration is enabled, the stored updates are processed by the new + policy configuration to create new inbound updates. + + .. note:: Storage of route updates uses memory. If you enable soft + reconfiguration inbound for multiple neighbors, the amount of memory used + can become significant. -.. cfgcmd:: set protocols bgp neighbor address-family weight +.. cfgcmd:: set protocols bgp neighbor address-family + weight This command specifies a default weight value for the neighbor’s routes. The number range is 1 to 65535. -.. cfgcmd:: set protocols bgp neighbor advertisement-interval +.. cfgcmd:: set protocols bgp neighbor + advertisement-interval This command specifies the minimum route advertisement interval for - the peer. This number is between 0 and 600 seconds, with the default + the peer. The interval value is 0 to 600 seconds, with the default advertisement interval being 0. -.. cfgcmd:: set protocols bgp neighbor disable-connected-check +.. cfgcmd:: set protocols bgp neighbor + disable-connected-check This command allows peerings between directly connected eBGP peers using loopback addresses without adjusting the default TTL of 1. -.. cfgcmd:: set protocols bgp neighbor ebgp-multihop +.. cfgcmd:: set protocols bgp neighbor ebgp-multihop + This command allows sessions to be established with eBGP neighbors when they are multiple hops away. When the neighbor is not directly @@ -500,7 +576,8 @@ Peer Parameters The number of hops range is 1 to 255. This command is mutually exclusive with :cfgcmd:`ttl-security hops`. -.. cfgcmd:: set protocols bgp neighbor local-as [no-prepend] [replace-as] +.. cfgcmd:: set protocols bgp neighbor local-as + [no-prepend] [replace-as] Specify an alternate AS for this BGP process when interacting with the specified peer or peer group. With no modifiers, the specified @@ -515,15 +592,15 @@ Peer Parameters local-as is prepended to the AS_PATH when transmitting local-route updates to this peer. - Note that replace-as can only be specified if no-prepend is. - This command is only allowed for eBGP peers. + .. note:: This command is only allowed for eBGP peers. .. cfgcmd:: set protocols bgp neighbor passive Configures the BGP speaker so that it only accepts inbound connections from, but does not initiate outbound connections to the peer or peer group. -.. cfgcmd:: set protocols bgp neighbor ttl-security hops +.. cfgcmd:: set protocols bgp neighbor ttl-security + hops This command enforces Generalized TTL Security Mechanism (GTSM), as specified in :rfc:`5082`. With this command, only neighbors @@ -543,10 +620,15 @@ are treated as belonging to a default peer group, and will share updates. .. cfgcmd:: set protocols bgp peer-group - This command defines a new peer group. You can specify to the group - the same parameters that you can specify for specific neighbors. + This command defines a new peer group. You can specify to the group the same + parameters that you can specify for specific neighbors. + + .. note:: If you apply a parameter to an individual neighbor IP address, you + override the action defined for a peer group that includes that IP + address. -.. cfgcmd:: set protocols bgp neighbor peer-group +.. cfgcmd:: set protocols bgp neighbor peer-group + This command bind specific peer to peer group with a given name. @@ -597,6 +679,30 @@ Timers This command specifies keep-alive time in seconds. The timer can range from 4 to 65535.The default value is 60 second. +Route Reflector Configuration +----------------------------- + +BGP routers connected inside the same AS through BGP belong to an internal BGP +session, or IBGP. In order to prevent routing table loops, IBGP speaker does not +advertise IBGP-learned routes to other IBGP speaker (Split Horizon mechanism). +As such, IBGP requires a full mesh of all peers. For large networks, this +quickly becomes unscalable. Introducing route reflectors removes the need for +the full-mesh. Route reflectors mechanism is described in :rfc:`4456` and +updated by :rfc:`7606`. + +.. cfgcmd:: set protocols bgp neighbor
address-family + route-reflector-client + + This command specifies the given neighbor as route reflector client. + +.. cfgcmd:: set protocols bgp parameters cluster-id + + This command specifies cluster ID which identifies a collection of route + reflectors and their clients, and is used by route reflectors to avoid + looping. By default cluster ID is set to the BGP router id value, but can be + set to an arbitrary 32-bit value. + + Operational Mode Commands ========================= @@ -624,7 +730,8 @@ Show .. opcmd:: show bgp - This command displays information about the particular entry in the BGP routing table. + This command displays information about the particular entry in the BGP + routing table. .. code-block:: none -- cgit v1.2.3