Prepend BGP how often Leonardo has

BGP: Frequently Asked Questions


This document contains frequently asked questions (FAQs) about the Border Gateway Protocol (BGP).

How do I configure BGP?

These documents provide information on how to configure the BGP and BGP functionality:

How do I configure BGP with a loopback address?

Using a loopback interface ensures that the neighbor remains available and is not affected by faulty hardware.

The BGP uses the IP address configured on the physical interface directly connected to the BGP peer as the source address when it establishes the BGP peering session by default. Give the command neighbor update-source to change this behavior and configure the BGP that is talking to the router to set up peering using a loopback address as the source address.

For more information, see Sample configuration for iBGP and eBGP with or without a loopback address.

In what order are attributes preferred when some or all in the BGP are applied to a neighbor?

The order of the preferences depends on whether the attributes for incoming or outgoing updates are adopted.

For incoming updates, the preferred order is determined as follows:

  1. Route Map

  2. Filter list

  3. Prefix list, distribution list

For outbound updates, the preferred order is:

  1. Filter list

  2. Route Map | UnsuppressMap

  3. Display board (conditional advertising)

  4. prefix-list | distribute-list

  5. ORF prefix list (a prefix list sent to us by the neighbor)

Note: The prefix list and the distribution list of attributes are mutually exclusive, and only one command (Neighbor prefix list orNeighbor distribution list) can be applied to any direction in or out of a particular neighbor.

What does a next hop of mean in the command output show ip bgp?

A network in the BGP table with the next-hop address means that the network can be accessed locally via the redistribution of the Interior Gateway Protocol (IGP) in BGP or via a network- or AggregationCommand is generated in the BGP configuration.

What are the known communities of the BGP Community Attribute?

The community attribute is a transitive, optional attribute designed to group goals in a specific community and apply specific guidelines (e.g., accept, promote, or redistribute). This table shows the known BGP communities.

Local ASUse this option in conglomerate scenarios to prevent packets from being sent outside of the local autonomous system (AS).
do not exportDo not advertise with external BGP (eBGP) peers. Keep this route in an AS.
not advertiseDo not assign this route to a peer, internal or external.
NoDo not apply a community attribute if you want to delete the communities associated with a route.
InternetAssign this route to the Internet community and all associated routers.

For more information on configuring communities, see the Configuring BGP Community Filtering section in the Configuring BGP section.

What formats can I use to configure the BGP community attribute?

In the Cisco IOS® software from version 12.0, communities can be configured in three different formats: decimal format, hexadecimal format and AA: NN. Cisco IOS uses the older decimal format by default. To configure and display in AA: NN, where the first part is the AS number and the second part is a 2-byte number, run the global configuration command ip bgp-community in the new format.

Note: BGP Community Attribute is a numerical value (arbitrary) that can be assigned to a specific prefix and communicated to other neighbors. While the community attribute can be represented as a decimal number, hexadecimal number, or AA: NN, it is still a 32-bit number. For example, one of the three configuration commands specifies the community 30:20 (AS 30, number 20):
- Set Community 30:20
Set Community 0x1E0014
- Community established 1966 100

Regardless of the command used, the 30:20 community is displayed in the router configuration file and in the BGP table.

For more information, see the Community Attribute Section of BGP Case Studies and Using BGP Community Values ​​to Control Routing Policy in the Upstream Provider Network.

How does BGP differ with automatic summary enabled or disabled?

The behavior of the automatic summary has changed in all Cisco IOS software releases. Initially, the automatic summary was activated by default. However, this behavior has changed with the Cisco bug ID CSCdu81680 (registered customers only). In the latest Cisco IOS, automatic summary is disabled by default. If the automatic summarization is activated, the locally created BGP networks are summarized up to their classic limits. The automatic summary is only activated by default in the old versions. If the automatic summarization is deactivated, the routes introduced locally in the BGP table are not summarized in their class boundaries. If there is a subnet in the routing table and these three conditions are met, each subnet of this class-related network asks the BGP in the local routing table to install the classic network in the BGP table.

  • Classful network statement for a network in the routing table

  • Class mask for this network statement

  • Automatic summary enabled

For example, if the subnet in the routing table has the mask and you have the Network under the command bgp of the router and automatic aggregation is activated, BGP introduces the classic network 75.0. Mask in the BGP table.

If these three conditions are not all met, BGP will not install an entry in the BGP table unless an exact match is found in the local routing table.

Note: If the AS running the BGP doesn't have the entire classic network, Cisco recommends running the commandno auto-summary underOutput router bgp, to disable the automatic summary.

How can I check whether a BGP router advertises its BGP networks and distributes them to the global BGP mesh?

Use these commands to verify that the IP blocks are advertised to the directly connected ISP:

  • The command show ip bgp neighbors [address] insersed routes shows which messages are being sent.

  • The command show ip bgp neighbors [address] routes shows which messages are being received.

Note: The commandshow ip bgp neighbors [address] ads routes does not consider outbound calling policies that you may have applied. In future releases of Cisco IOS software, the command output will be modified to reflect the outbound policy. When there are two alternative paths to a destination, BGP always uses the best route to advertise.

To check how the IP blocks are propagated to the global BGP network via the directly connected ISP, log on to a routing server on the Internet and look for the BGP entries of the prefix in the route server.

When and how should I reset a BGP session?

Delete a BGP session if you change the entry / exit policy for that session. Run the command clear ip bgp x.x.x.x.x soft out to delete a BGP session for the outbound policy changes to take effect. Run the Command clear ip bgp x.x.x.xto delete a BGP session so that incoming policy changes take effect. If the neighbor has the soft reconfiguration function, you can use the command clear ip bgp x.x.x.x soft in output. The BGP session can be automatically deleted if you have set up Optimized Edge Routing (OER). OER automatically deletes the BGP session for inbound and outbound directions. For more information on the OER network component, see Setting Up OER Network Components.

Note: With the Cisco IOS software version 12.0 and higher, a new function is introduced to extend the BGP soft resets. For more information, see BGP Soft Reset Enhancement.

Is there any special configuration required on PIX / ASA to allow BGP sessions through?

Yes, see ASA / PIX: BGP through ASA Configuration Example for complete configuration details.

What is an AS (Autonomous System) number and how do I get one?

AS numbers are globally unique numbers that are used to identify ASs and enable an AS to exchange external routing information between neighboring ASs. An AS is a connected group of IP networks that adhere to a single, well-defined routing policy.

There are a limited number of AS numbers available. It is therefore important to determine which locations need unique AS numbers and which do not. Locations that do not require a unique AS number should use one or more of the AS numbers reserved for private use, which range from 64512 to 65535. Call the AS Number Registration Services Website to get an AS number.

What are the BGP path selection criteria?

The BGP path selection criteria are documented in the BGP Best Path Selection Algorithm.

What's the difference between always comparable and more deterministicmedicine?

For a full explanation of the differences between these commands, see How the bgp deterministic-med Command differs from the bgp always-Comparer-med Command.

Do internal BGP sessions (iBGP) change the next hop?

iBGP sessions retain the next hop attribute learned from eBGP peers. Because of this, it is important to have an internal route to the next hop. Otherwise the BGP route cannot be reached. To ensure you can reach the eBGP Next Hop, include or issue the command to the network that the next hop belongs to next-hop-self neighbor to force the router to advertise itself rather than the external peer as the next hop. For BGP case studies, see the BGP Next Hop Attributes section.

Do external BGP (eBGP) sessions between federations change the next hop?

No, eBGP sessions between converbative sub-ASs do not change the next hop attribute. All iBGP rules continue to apply if the entire AS behaves as a unit. The metric and local preference values ​​also remain unchanged for federal confederal eBGP peers. Further information on associations can be found in the section on BGP user reports from the BGP-Bund.

Which IP address is sent as the next hop in external BGP (eBGP) sessions?

With eBGP peering, the next hop is the IP address of the neighbor announcing the route. However, if the route is advertised on a multi-access medium (such as Ethernet or Frame Relay), the next hop is typically the IP address of the router interface connected to that medium from which the route originated. Please refer to the BGP Next Hop Attributes of the BGP case studies for further explanation.

Does the route reflector change the next hop attribute of a reflected prefix?

By default, the next hop attribute is not changed when a prefix is ​​reflected from the route reflector. However, you can use the command neighbor next-hop-self run to change the next hop attribute for prefixes reflected from an eBGP peer to any route reflector client.

How can I conditionally pass a prefix to an ISP only if the connection to my primary ISP is lost?

By default, the BGP advertises routes to its BGP table to external peers. The BGP conditional advertisement feature provides additional control over routing advertisements, depending on whether there are other prefixes in the BGP table. As a rule, routes are propagated regardless of the existence of another path. The BGP conditional advertisement function uses the configuration commands for nonexistent assignment and Ad mappingto track routes based on the route prefix. When in command non-existent map there is no route prefix, which is indicated by the command insert map announced route. For more information, see the Configuring BGP Conditional BGP Advertising section.

How can I configure the BGP to ensure load balancing and redundancy in my network?

You can find detailed configuration information in these documents:

How much memory should I have in my router to get the full BGP routing table from my ISP?

The amount of memory required to store BGP routes depends on many factors, such as: B. from the router, the number of available alternative paths, route dampening, the community, the number of configured maximum paths, BGP attributes and VPN configurations. Without knowing these parameters, it is difficult to calculate the amount of memory required to store a given number of BGP routes. Cisco typically recommends at least 512MB of RAM in the router to store a full BGP global routing table from a BGP peer. However, it is important to understand ways in which to reduce memory consumption and achieve optimal routing without the full Internet routing table. For more detailed information, see Optimal Routing and Reduction of BGP Memory Usage.

What are the advantages of configuring BGP peer groups?

The main benefit of specifying a BGP peer group is that it reduces the number of system resources (CPU and memory) that are used during the upgrade. In addition, BGP configuration is simplified because the routing table can only be checked once and updates can be replicated to all other synchronized peer group members. This can significantly reduce the load, depending on the number of group members, the number of prefixes in the table, and the number of prefixes specified. Cisco recommends grouping peers with identical outbound announcement policies. For more information, see BGP Peer Groups.

Why is the same route shown twice in the BGP by the same peer?


64512 28513 8151 65194 65230 65085 from ( Origin IGP, localpref 200, valid, external Community: 100: 2 28513: 1281 64512 28513 8151 65194 65230 65085, (received-only) from ( Origin IGP, localpref 100, valid, external Community: 28513: 1281

Two entries are displayed due to a soft reconfiguration. Both the unchanged path and the changed path, which is dependent on the incoming policy, are stored in the path table for the prefix, if allowed.

What is synchronization and how does it affect the BGP routes installed in the IP routing table?

If your AS forwards data traffic from another AS to a third AS, the BGP should not announce a route before all routers in the AS receive information about the route via IGP. The BGP waits until IGP forwards the route within the AS and then forwards it to external peers. A BGP router with activated synchronization does not install routes obtained from the iBGP in its routing table if it cannot validate these routes in its IGP. Run the command no sync under Router bgp offto turn off synchronization. This prevents BGP iBGP routes from being validated in the IGP. For more information, see BGP Case Studies: Synchronization for a more detailed explanation.

How do I know which Cisco IOS software version supports a particular BGP feature?

Use Software Research (registered customers only) to quickly find out which Cisco IOS software version supports your function.

How can I set the Multi Exit Discriminator (MED) value for prefixes advertised to external BGP (eBGP) neighbors to match the Interior Gateway Protocol (IGP) next-hop metric?

The configuration command set metric-type internal route-map causes the BGP to specify a MED that corresponds to the IGP metric associated with the next hop on the route. This command is available from version 10.3 of the Cisco IOS software.

What is the default BGP ConnectRetry timer and is it possible to set the BGP ConnectRetry timer?

The default BGP ConnectRetry timer is 120 seconds. Only after this time has elapsed does the BGP process check whether the passive TCP session has been set up.If the passive TCP session is not established, the BGP process starts a new active TCP connection attempt with the remote BGP speaker. During this 120 second inactivity of the ConnectRetry timer, the remote BGP peer can establish a BGP session with it. Currently, the Cisco IOS ConnectRetry timer cannot be changed from the default of 120 seconds.

What does in the command output show ip bgp?

R1> show ip bgp BGP table version is 5, local router ID is Status codes: s suppressed, d damped, h history, * valid,> best, i - internal, r RIB failure Origin codes: i - IGP, e - EGP,? - incomplete Network Next Hop Metric LocPrf Weight Path r> 0 130 0 30 i *> 0 125 0 30 i

When BGP tries to install the best path prefix in the Routing Information Base (RIB) (for example, the IP routing table), the RIB may reject the BGP route for one of the following reasons:

  • Route with better administrative distance is already available in the IGP. Example: When a static route already exists in the IP routing table.

  • Memory failure.

  • The number of routes in VPN Routing / Forwarding (VRF) exceeds the route limit configured in the VRF instance.

In such cases, the prefixes that are rejected for these reasons are shown through in the command output show ip bgp identified and announced to the peers. This feature was first made available in Cisco IOS software version 12.2 (08.05) T.

How can I redistribute internal BGP (iBGP) routings ( that were recorded by the standard routing in EIGRP / OSPF / IS-IS?

The redistribution of iBGP routes in Interior Gateway Protocol (IGP) - Enhanced Interior Gateway Routing Protocol / Open Shortest Path First / Intermediate System-to-Intermediate System (EIGRP / OSPF / IS-IS) - can create routing loops within the autonomous system cause what is not recommended. By default, iBGP redistribution is disabled in IGP. Give the command bgp redistribute-internal to enable redistribution of iBGP routes in IGP. Precautions must be taken to redistribute certain routes using routing maps in IGP. This output shows an example configuration for the redistribution of a standard route adopted from the iBGP in EIGRP. The configurations for OSPF / IS-IS are similar.

router bgp 65345 [...] bgp redistribute-internal ! router eigrp 10 [...] redistribute bgp 65345 route-map check-def! ip prefix-list def-route seq 5 permit! route-map check-def permit 10 match ip address prefix-list def-route

Note: After you have the commandbgp redistribute internalconfigured, make sure the commandclear ip bgp is entered to delete all routes in the local routing table.

How can I filter all IP routes sent to a BGP neighbor with the exception of the default route

The specific routes can be filtered if you use incoming filter lists, distribution lists, prefix lists and route assignments for the same bgp neighbor at the same time. This is the order of operation:

  1. Filter list

  2. Router map

  3. Distribution list (or) prefix list

How is that that is dissolved?

The error message log is retrieved because the BGP feature is not supported in the version of Cisco IOS running on the router. To resolve this error, update the Cisco IOS to a newer Cisco IOS version that supports BGP.

BGP: The timer wheel, which is slowly turning 1 tick, is shown in the debug output.

This message only appears if BGP debugging is enabled on the router. It is just an informational message and not an error message. This informational message relates to internal BGP timers. This message can be ignored by the command debug all is issued.

Is it possible to trace an interface and change route availability?

Yes, it is possible to track changes in the state of an interface and route availability with Enhanced Object Tracking.

How does IP RIB Update reserve memory?

IP RIB Update assigns the prefixes and attributes are stored in chunks. It is not possible to release the entire text block until every element in the text block is released. If more routes are recorded, these free elements are used in the chunks.

Which command is used to display IPv6 BGP neighbors?

The command show bgp ipv6 unicast summary is used to show the IPv6 BGP neighbors.

Does not automatically summarize in BGP when removing the static route "ip route Null0" means that all subnets of are announced?


network mask no auto-summary ip route Null0

The router stops showing the route but still sends the other most specific routes.

Why are there no statistical results when i use the commands debug bfd events and debug bfd packages use?

This is normal behavior as the bfd hellos are sent in less than minimal seconds. If you debug this, the router will not be able to process it. So the bfd messages are only displayed when debugging when flaps occur. That is the purpose of the command debug bfd:

Debug bfd events

This command enables logging of BFD events for all currently configured BFD sessions. It captures BFD events such as session state changes, session configuration changes triggered by local CLI or by remote end.

Debug bfd packages

This command enables the logging of BFD packets for all currently configured BFD sessions. It only captures BFD hello packets that are exchanged when changes are made to the bfd configuration such as a change in session state. Normal BFD packets are not captured by this command.

Does the router need to restart after configuring a new maximum prefix for BGP Neighbor?

If the new maximum number of prefixes is greater than the current maximum number, there is no need to gently / hard delete the BGP session and do not need to reload it.

Is there a command to check the specified routes along with prepending the AS paths?

If the AS path advance warning is set, the AS numbers that precede them are appended to the AS path, and when the update leaves the AS to the eBGP peers, the local AS number is placed in front of the full AS path.

However, you can easily check that the AS path output is done with one of the following options:

  1. Enable the BGP AS PATH attribute on peering devices. This is one of the easiest ways to check whether or not the router is doing an AS PATH preset.

  2. Debug BGP updates (outbound), then see if it goes forward. Use an access list when debugging BGP updates.

    Example: Debug ip bgp update 1 out BGP: TX IPv4 Unicast Mem global 3 1 Refresh has to wait for net prepend. BGP: TX IPv4 Unicast Top global Start net prepend. BGP: TX IPv4 Unicast Top global Done net prepend (1 attrs). The router has prepended the prefix. BGP: TX IPv4 Unicast Grp global 3 Starting refresh after prepend completion.
  3. Another option is to do a packet capture on the outbound interface and see what update is being sent over the line.

How does the incoming command for soft reconfiguration of the neighbor work?

The command Soft reconfiguration on incoming calls causes the router to save all received (incoming) routing policy updates without changes, e.g. B. a duplicate table for each peer in memory. This method is memory-intensive and is only recommended if absolutely necessary. Read below Soft Reset Enhancement to activate the soft reset function without additional memory.

What does the error message mean?

This message occurs when another BGP session has already been established. The router that terminated the message tried to send a BGP OPEN message to the same peer on a different IP address. This message is cosmetic and due to a misconfiguration.

What does the error message mean?

This error message indicates that there is insufficient memory for BGP prefixes received from neighbors.

Does the GSR with Cisco IOS-XR support the function for automatic VPLS-BGP detection as a route reflector?

Yes, the GSR with Cisco IOS-XR supports the Route Reflector functionality for automatic VPLS-BGP detection.

How do I debug routes for a specific VRF in the Cisco IOS-XR environment?

use this Debug BGP keepalive [vrf [vrf-name]. | all]] vpnv4 unicast-Command to debug routes for a specific VRF in the Cisco IOS-XR environment. This is an example output:

* Mar 1 00: 16: 06.735: BGP: ses TWO (0x69A1C8F4: 1) Keep alive timerfired. * Mar 1 00: 16: 06.735: BGP: KEEPALIVE requested (bgp_keepalive_timer_expired) * Mar 1 00: 16: 06.743: BGP: ses TWO (0x69A1C8F4: 1) service keepalive IO request. * Mar 1 00: 16: 06.747: BGP: KEEPALIVE write request serviced in BGP_IO * Mar 1 00: 16: 07.759: BGP: ses ONE (0x6900D344: 1) Keep alive timer fired. * Mar 1 00: 16: 07.759: BGP: KEEPALIVE requested (bgp_keepalive_timer_expired) * Mar 1 00: 16: 07.759: BGP: ses ONE (0x6900D344: 1) service keepalive IO request. * Mar 1 00: 16: 07.763: BGP: KEEPALIVE write request serviced in BGP_IO

What is the difference between injecting a route into the BGP using the redistribute command or a network command?

If you use the rebalance of the IGP to the BGP to advertise the route, it is not necessary to specify the network directive for each subnet individually. If the route is obtained by redistributing other routing protocols into the BGP table, the Origin attribute is and if you are using the Network-Specify command is it. The lowest source code is preferred for route selection.

How can I review summaries of Layer 4 forwarding information?

To see the summary information about Layer 4 routing, use the command show mls cef summary. Example:

Router #show mls cef summary Total routes: 532462 IPv4 unicast routes: 502841 IPv4 multicast routes: 6 MPLS routes: 19794 IPv6 unicast routes: 9821 IPv6 multicast routes: 3 EoM routes: 0 Router #show mls cef maximum-routes FIB TCAM maximum routes: ======================= Current: - ------- IPv4 + MPLS - 512k (default) IPv6 + IP multicast - 256k

Related information