61200860L1-29.4E March 2012 Configuration Guide Configuring Border Gateway Protocol in AOS for Releases Prior to 18.03.00/R10.1.0 This guide only addresses BGP in AOS data products using AOS firmware prior to 18.03.00 and AOS voice products using AOS firmware prior to R10.1.0. For information about BGP configuration for products using AOS firmware later than these releases, refer to Configuring BGP in AOS for Releases 18.03.00/R10.1.0 or Later, available online at http://kb.adtran.
BGP Overview BGP Overview BGP is an Exterior Gateway Protocol (EGP) that is used within the Internet and multinational organizations. EGP is one of two different types of dynamic routing protocols. The other protocol is Interior Gateway Protocol (IGP). The difference between the two protocols is that IGPs (for example, Routing Information Protocol (RIP), Open Shortest Path First (OSPF)) operate within an autonomous system (AS), whereas EGPs allow routes to be exchanged between different autonomous systems.
BGP Overview By defining autonomous systems, a demarcation point is created between organizations and the Internet. Within the AS, information about all networks can be transmitted to every other router using some type of IGP, such as OSPF or RIP. However, since the Internet is so vast, it would be impractical for all routers to hold routes to all networks in all of the autonomous systems.
BGP Overview BGP Neighbors and Messages Unlike other routing protocols, BGP does not automatically discover its neighbors. The transport medium for BGP is Transmission Control Protocol (TCP), port 179. TCP is a connection-oriented protocol; thus, providing an extra layer of reliability for BGP communication. BGP neighbors must be manually configured.
BGP Overview Multi-Exit Discriminator The multi-exit discriminator (MULTI_EXIT_DISC or MED) attribute is used to influence eBGP neighbors to select a certain path for inbound traffic into the AS that is advertising the metric. The lower the MED metric, the more desirable a route becomes. The MED metric is merely a suggestion to the external neighbor as to which path should be used inbound to the local AS.
BGP Overview BGP Path Selection When BGP receives advertisements for the same route from multiple sources, one path is selected as the best path and stored in the routing table. The decision logic used by BGP to determine the best path is fairly extensive. The following BGP criteria are used in AOS to select the best path to a destination: 1. Prefer the path with the higher LOCAL_PREF value. 2. If the LOCAL_PREF value is identical, compare local-origination status.
BGP Overview For example, in Figure 1 on page 7 the provider’s edge routers connect to two independent customers, Customer A and Customer B. Each customer would like to communicate private information between their own respective sites. Customer A Site 1 uses an IPv4 network address of 192.168.1.0 /24 and Customer A Site 2 uses an IPv4 network address of 192.168.2.0 /24. These identical network addresses are also used for Customer B Sites 1 and 2, respectively.
Hardware and Software Requirements and Limitations The Internet connections for a multihomed router can be to the same provider or to two different providers. Regardless, when a router has two Internet connections, the router must decide which connection to use for certain traffic. BGP allows a router to receive different routes from the various service providers to which it connects. Based on this information, traffic can be routed accordingly.
Basic BGP Configuration Using the CLI Basic BGP Configuration Using the CLI There are several commands that must be issued for BGP to operate at the basic level. The following steps outline the minimum configuration required to enable BGP on an AOS device.
Basic BGP Configuration Using the CLI If the routing table does not include a route that has been specified in BGP, a null route must be configured. For example, a routing table only includes routes to the 24-bit networks, but not to the 20-bit network that contains them all. A route to network 10.1.0.0 /20 must be manually added so that the BGP interface can advertise it. The route is added from the Global Configuration mode with the null 0 keyword indicating the next-hop address: (config)#ip route 10.1.
Basic BGP Configuration Using the CLI When configuring eBGP, the remote AS number must be different from that of the local router (which is defined using the router bgp command). The following example configures a remote AS number of 200 for neighbor 172.16.1.2: (config)#router bgp 1 (config-bgp)#router bgp-neighbor 172.16.1.2 (config-bgp-neighbor)#remote-as 200 Assuming the neighbor is properly configured, the AOS device should now be able to connect to the neighbor and exchange routes with it.
Additional BGP Configuration Additional BGP Configuration Depending on the network, additional BGP configuration might be needed. This section contains detailed explanations on additional BGP-related options that are available in AOS devices.
Additional BGP Configuration BGP Communities Within BGP, the community is an optional attribute that can be used for identification, security, or to signal a BGP peer that it should take a particular action. When used for identification and security, the attribute adds another layer of complexity that requires special configuration to bring the BGP connection up.
Additional BGP Configuration local-as Specifies routes that contain the reserved community number for NO_EXPORT_SUBCONFED. Routes containing this attribute should not be advertised to external BGP peers. no-advertise Specifies routes that contain the reserved community number for NO_ADVERTISE. Routes containing this attribute should not be advertised to any BGP peer. no-export Specifies routes that contain the reserved community number for NO_EXPORT.
Additional BGP Configuration Specifies a privately defined community for routes serviced by this route map. This is a numeric value that can be an integer from 1 to 4294967295 or string in the form aa:nn, where aa is the AS number and nn is the community number. Multiple community number parameters can be present in the command. add Appends the listed community number to the end of the community attribute for routes serviced by this route map.
Additional BGP Configuration Deleting communities from a route can be accomplished by first creating a community list that permits the communities that are to be deleted (refer to Configuring a Community List on page 13). Next, create a route map (refer to Route Map on page 23) and use the set comm-list delete command to specify a list of communities to delete: (config-route-map)#set comm-list delete Specifies the name of the community list that contains the communities to delete.
Additional BGP Configuration Routes with lower administrative distances are favored. Distribute List Use the distribute-list command to add route filtering functionality by assigning inbound and outbound IPv4 access control lists (ACLs) to a BGP neighbor. Only one inbound/outbound pair of ACLs can be configured for a particular neighbor. (config-bgp-neighbor)#distribute-list [in | out] Specifies an IPv4 ACL name.
Additional BGP Configuration Hold Timer Use the hold-timer command to set the default hold time for BGP neighbors. The command can be issued in BGP configuration mode to set the default hold time for all neighbors in that BGP process, or the command can be issued in BGP Neighbor Configuration mode to set the hold time for only that neighbor.
Additional BGP Configuration Log Neighbor Changes Use the bgp log-neighbor-changes command to control the logging of neighbor state changes. This command controls logging of BGP neighbor state changes (up/down) and resets. This information is useful for troubleshooting and determining network stability. (config-bgp)#bgp log-neighbor-changes Maximum Paths Use the maximum-paths command to specify the number of equal cost parallel routes (shared paths) learned by BGP that can be exported to the route table.
Additional BGP Configuration the external AS, packets destined for those networks will be dropped. A remedy for this scenario is for the iBGP peer to advertise its own IPv4 address as the next-hop address to the external networks. Consider the following example: AS 65000 10.10.10.1 Router A AS 65001 192.168.1.1 Router B 192.168.1.2 Router C Figure 2. Using the Next-Hop-Self Command between iBGP Peers Router B in AS 65001 has an eBGP neighbor relationship with Router A in AS 65000.
Additional BGP Configuration An entry for the default route must appear in the IGP routing table in order for the previous command to work in BGP. Refer to Example 7 on page 49 for an illustration using the network command to enable transmission of the default route to the eBGP neighbor. Password Use the password command to enable message digest 5 (MD5) password authentication on Transmission Control Protocol (TCP) segments exchanged with the BGP peer.
Additional BGP Configuration deny Denies access to entries matching the specified network IPv4 address and the corresponding network prefix length (for example, 10.10.10.0/24). le Specifies the upper end of the range. Range is 0 to 32. ge Specifies the lower end of the range. Range is 0 to 32. If the IPv4 network address is entered without specifying a range for prefix lengths, the router assumes that the route must be an exact match.
Additional BGP Configuration (config-bgp-neighbor)#prefix-list [in | out] Assigns the specified prefix list to this BGP neighbor. in Specifies that all inbound BGP route updates received from the neighbor are filtered. out Specifies that all outbound BGP route updates being sent to the neighbor are filtered. A prefix list can be used to create even more complicated policies when it is applied to a route map entry rather than a BGP neighbor (as shown above).
Additional BGP Configuration After creating a route map, route map attributes can be defined from the Route Map Configuration mode. Enter ? at the (config-route-map)# prompt to explore the available options.
Additional BGP Configuration If an attribute is to be applied to the route, then a set command must be entered in addition to the match command. Attributes are applied to the routes selected by the match command.
Additional BGP Configuration Refer to Example 6 on page 46 for a detailed BGP configuration example featuring the use of route maps to filter routes according to network address. Filtering Routes According to AS Path Routes can also be filtered according to the hops listed in the AS_PATH field. For advertised routes, this type of filtering allows a degree of influence over which autonomous systems external neighbors can access.
Additional BGP Configuration (config-as-path-list)#permit \b400\b It is important to enter any deny commands before the permit commands since the router processes statements in the AS path list in the order that they are entered. After configuring the AS path list, use the match command to reference the list in a route map entry. (config-route-map)#match as-path Specifies the name of the AS path list.
Additional BGP Configuration Prepending Private AS Numbers for Load Balancing A router sends identical routes to all neighbors unless policies are configured to filter and add attributes to the routes. When service provider routers receive multiple identical routes from an organization, it is up to the service provider to select the connection over which inbound traffic is sent to the organization.
Additional BGP Configuration The algorithm BGP uses to select routes relies on many factors, some of which are dependent upon configurations on the remote router. It is impossible to ensure that the route with the lower metric will actually be selected. This metric is sometimes called the multi-exit discriminator or MED because it is used to differentiate routes sent over various external connections to the same neighboring AS.
Additional BGP Configuration (config-route-map)#set local-preference Sets the local preference value. Valid range is 0 to 4294967295. The default local preference for all BGP routes in AOS is 100. The default value can be changed using the bgp default local-preference command. The valid range for the default value is 0 to 4294967295. The route with the largest local preference value is preferred in BGP.
Additional BGP Configuration Refer to Example 6 on page 46 for a detailed BGP configuration example where route maps are applied inbound and outbound to different BGP neighbors. Router ID The BGP interface identifies itself to neighbors with its router ID. Often this ID is the IPv4 address of the logical interface that connects to each neighbor. However, the ID can also be the address of a loopback interface used as the update source.
Additional BGP Configuration Update Source Use the update-source command to specify which interface’s IPv4 address will be used as the source IPv4 address for the BGP TCP connection. (config-bgp-neighbor)#update-source Specifies the interface to be used as the source IPv4 address. Specify an interface in the format
Additional BGP Configuration The peering router would also use a loopback interface in this scenario. The neighbor address configured on each router would be the IPv4 address of the loopback interface on the peering router. Since the loopback address enables the BGP neighbors to use an IPv4 address that is not reachable by a directly connected interface, separate static routes would need to be specified for each individual link that can reach the neighbor’s loopback IPv4 address.
Additional BGP Configuration set local preference 110 ! router bgp redistribute route-map REDISTRIBUTE ! The redistribute command supports connected, OSPF, RIP, and static routes. These are all considered locally originated routes to BGP.
Example Configurations Example Configurations The example scenarios contained within this section are designed to enhance understanding of BGP configurations on AOS products. The examples describe some of the common real-world applications of BGP. All configurations provided in this section use the command line interface (CLI). The configuration parameters entered in these examples are sample configurations only.
Example Configurations The following configuration applies to Example 1: ! interface eth 0/1 ip address 192.168.1.1 255.255.255.0 no shutdown ! interface t1 1/1 clock source line tdm-group 1 timeslots 1-24 speed 64 no shutdown ! interface ppp 1 ip address 172.16.1.1 255.255.255.252 no shutdown cross-connect 1 t1 1/1 1 ppp 1 ! router bgp 201 no auto-summary no synchronization network 192.168.1.0 mask 255.255.255.0 neighbor 172.16.1.
Example Configurations Example 2: Exchanging Routes between Peers with the Same AS Number Some MPLS providers assign the same AS to every remote location in a customer’s network. This type of assignment is problematic because eBGP has a built-in loop avoidance mechanism that prevents the protocol from adding any routes that include its own configured AS from the router bgp command in the AS path list. The issue can be avoided by using the local-as command from BGP Neighbor Configuration mode in AOS.
Example Configurations Site B Site A Local AS: 65001 Local AS: 65001 AS 65000 AS 65002 NetVanta 1234 9 13 17 10 14 18 3 7 11 15 19 23 G3 4 8 12 16 20 24 G4 1 2 STAT (LAN) (ETH 0/1) 192.168.1.1 /24 5 6 21 22 1 3 5 7 9 11 13 15 17 19 21 23 G1 G3 2 4 6 8 10 12 14 16 18 20 22 24 G2 G4 G1 G2 AOS Device (CE) AS 65003 PE PE MPLS T1 (PPP) T1 (PPP) 172.16.1.
Example Configurations Example 3: Filtering Routes with Prefix Lists BGP routes advertised and received on an interface can be filtered using prefix lists. The following example illustrates the use of prefix lists to discard incoming routing information and to limit the routes advertised to certain peers. The AOS device in Figure 5 is expecting a specific route from its eBGP neighbor (208.61.209.253). All other advertised routes from this neighbor are to be discarded.
Example Configurations interface ppp 1 ip address 208.61.209.254 255.255.255.252 no shutdown cross-connect 1 t1 1/1 1 ppp 1 ! ip prefix-list ADVERTISE seq 10 permit 65.162.109.201/29 ip prefix-list EXPECTED-ROUTE seq 10 permit 208.61.209.0/29 ip prefix-list FILTER seq 10 deny 0.0.0.0/0 le 32 ! router bgp 65001 no auto-summary no synchronization neighbor 208.61.209.253 no default-originate prefix-list EXPECTED-ROUTE in prefix-list ADVERTISE out soft-reconfiguration inbound remote-as 65000 neighbor 65.162.
Example Configurations Example 4: Multihoming and Influencing Traffic over a Preferred Path Multihoming is when a router has more than one connection to the Internet. The following example illustrates a customer multihoming to two different Internet service providers (ISPs). The customer owns a public block 208.61.209.0 /29 that will be advertised to both ISPs. The preferred path for incoming traffic is the high speed Metro-Ethernet connection to ISP 1. The secondary path is the T1 connection to ISP 2.
Example Configurations The following configuration applies to Example 4: ! interface eth 0/1 description 10 Mbps Metro-Ethernet connection to ISP 1 ip address 208.61.209.254 255.255.255.252 traffic-shape rate 10000000 no shutdown ! interface eth 0/2 description Public Block of IPs being advertised to both ISPs ip address 208.61.209.1 255.255.255.
Example Configurations Consult with the ISP to determine which BGP attributes they will honor when making a decision on routing traffic back to your advertised AS. The command clock source line is enabled by default. Therefore, this command will not appear in the output when the show running-config command is issued. Example 5: Load Sharing When Multihomed to Multiple ISPs AOS allows multiple equal cost routes to be used for the purposes of load sharing outbound traffic.
Example Configurations outbound to both ISPs. This prefix will prevent any routes learned by the AOS device using BGP from one ISP from being advertised to the other ISP. If default routes are only learned from the ISPs, then the potential of becoming a transit AS is not an issue. However, it is good practice to use outbound prefixes as a preventative measure for multihoming setups. AS 65001 AS 65000 T1 65.162.109.
Example Configurations interface ppp 2 ip address 65.162.109.201 255.255.255.252 no shutdown cross-connect 2 t1 2/1 1 ppp 2 ! ip prefix-list PUBLIC-BLOCK seq 10 permit 208.61.209.0/29 ip prefix-list DEFAULT seq 10 permit 0.0.0.0/0 ! route-map LOAD-SHARE permit 10 match ip address prefix-list DEFAULT set as-path prepend 65009 ! router bgp 65000 no auto-summary no synchronization maximum-paths 2 network 208.61.209.0 mask 255.255.255.248 neighbor 65.162.109.
Example Configurations Example 6: Configuring Local Preference, MED, and Next-Hop-Self on an AOS Router with Both iBGP and eBGP Neighbors The following example illustrates a scenario where an AOS router has both eBGP and iBGP neighbors. The AOS device in AS 65000 has two eBGP neighbors: Remote Router 1 and Remote Router 2. This means that there are multiple exit points from the local AS (65000). One exit is through the AOS router over the Ethernet WAN interface (eth 0/1) to Remote Router 1.
Example Configurations AS 65001 Remote Router 1 metric 100 AS 65000 local preference 110 192.168.2.2 /30 Metro-Ethernet 172.16.5.0 /24 eth 0/1 192.168.2.1 /30 NetVanta 1234 STAT 1 5 2 6 9 13 17 21 10 14 18 22 3 7 11 15 19 23 G3 4 8 12 16 20 24 G4 1 3 5 7 9 11 13 15 17 19 21 23 G1 G3 2 4 6 8 10 12 14 16 18 20 22 24 G2 G4 G1 G2 eth 0/2 192.168.1.1 /24 PPP 1 10.10.10.1 /30 T1 10.10.10.2 /30 metric 200 Remote Router 2 192.168.1.
Example Configurations route-map SETMULTIEXIT2 permit 10 match ip address prefix-list NETWORK set metric 200 ! router bgp 65000 no auto-summary no synchronization network 192.168.1.0 mask 255.255.255.0 neighbor 192.168.2.2 no default-originate route-map SETLOCALPREF in route-map SETMULTIEXIT1 out soft-reconfiguration inbound remote-as 65001 neighbor 10.10.10.2 no default-originate route-map SETMULTIEXIT2 out soft-reconfiguration inbound remote-as 65001 neighbor 192.168.1.
Example Configurations Example 7: Using Local Preference to Promote a BGP Route as the Primary Internet Connection over a Backup Static Route The following example illustrates how to configure an AOS device to prefer a default route learned from an ISP using eBGP as superior to a manually configured static route for the on-site backup Internet connection. In addition, the AOS device will advertise the default route to a local iBGP neighbor.
Example Configurations AS 500 Internet AOS Device NetVanta 1234 1 9 13 17 10 14 18 3 7 11 15 19 23 G3 4 8 12 16 20 24 G4 2 STAT 5 6 21 22 1 3 5 7 9 11 13 15 17 19 21 23 G1 G3 2 4 6 8 10 12 14 16 18 20 22 24 G2 G4 G1 G2 eth 0/1 Default Route PPP 1 65.162.109.201 /30 T1 Default Route 65.162.109.202 /30 192.168.1.1 /24 ISP Router AS 200 iBGP Neighbor 192.168.1.2 Backup Internet Router 192.168.1.254 Figure 9.
Example Configurations router bgp 500 no auto-summary no synchronization network 0.0.0.0 mask 0.0.0.0 neighbor 65.162.109.202 no default-originate prefix-list FILTER out route-map DEFAULT-ROUTE-IN in soft-reconfiguration inbound remote-as 200 neighbor 192.168.1.2 no default-originate next-hop-self prefix-list DEFAULT out soft-reconfiguration inbound remote-as 500 ! ip route 0.0.0.0 0.0.0.0 192.168.1.254 30 ! The command clock source line is enabled by default.
Example Configurations Example 8: Using BGP Communities in an MPLS Network to Change Local Preference The most common application for BGP community strings occurs in MPLS networks. Since MPLS providers tend to ignore the AS path attribute and the MED, a community string is often sent to signal the provider that the local preference should be changed. The change in local preference is necessary so that one prefix is seen as less preferable than another identical prefix.
Example Configurations This example represents a typical MPLS BGP configuration where there is only one PE router that is an eBGP neighbor to the customer’s router. Much of the BGP community configuration is done by the MPLS provider, leaving the customer with a much simpler configuration for the desired failover application. A sample configuration that shows what the configuration would look like if the MPLS cloud was a single AOS unit is provided at the end of this example.
Example Configurations interface t1 1/1 clock source line tdm-group 1 timeslots 1-24 speed 64 no shutdown ! interface ppp 1 ip address 172.16.1.1 255.255.255.252 no shutdown cross-connect 1 t1 1/1 1 ppp 1 ! ip prefix-list DEFAULT seq 10 permit 0.0.0.0/0 ! route-map REDISTRIBUTE permit 10 match ip address prefix-list DEFAULT set local-preference 110 ! router bgp 65001 redistribute rip route-map REDISTRIBUTE network 192.168.1.0 mask 255.255.255.0 neighbor 172.16.1.
Example Configurations router bgp 65002 redistribute rip route-map REDISTRIBUTE network 192.168.2.0 mask 255.255.255.0 neighbor 172.16.2.2 route-map BGP-OUT out send-community standard remote-as 65000 ! Tertiary Site In this example, the BGP prefix is to be preferred. ! interface eth 0/1 ip address 192.168.3.1 255.255.255.0 no shutdown ! interface t1 1/1 clock source line tdm-group 1 timeslots 1-24 speed 64 no shutdown ! interface ppp 1 ip address 172.16.3.1 255.255.255.
Example Configurations ! interface eth 0/1 ip address 192.168.X.1 255.255.255.0 no shutdown ! interface t1 1/1 clock source line tdm-group 1 timeslots 1-24 speed 64 no shutdown ! interface ppp 1 ip address 172.16.X.1 255.255.255.252 no shutdown cross-connect 1 t1 1/1 1 ppp 1 ! router bgp 65XXX network 192.168.X.0 mask 255.255.255.0 neighbor 172.16.X.
Example Configurations ! router bgp 65000 neighbor 172.16.1.1 route-map BGP-IN in send-community standard remote-as 65001 neighbor 172.16.2.1 route-map BGP-IN in send-community standard remote-as 65002 neighbor 172.16.3.1 route-map BGP-IN in send-community standard remote-as 65003 neighbor 172.16.X.1 route-map BGP-IN in send-community standard remote-as 65XXX 61200860L1-29.4E Copyright © 2012 ADTRAN, Inc.
Configuration Command Summary Configuration Command Summary It is important to note that BGP sessions must be cleared for BGP policy changes, such as alterations to the prefix list filters, to take effect. Use the clear ip bgp command to clear BGP neighbors. Typically, soft resets should be used because hard resets can disrupt the network. Refer to Clear IP BGP on page 74 for detailed information on how to properly use this command. Table 4.
Configuration Command Summary Table 5. Additional BGP Configuration Options Command Description (config-bgp)#distance bgp Specifies the administrative distance for BGP routes learned via eBGP (external), iBGP (internal), the network command and redistributed routes (local). By default, external is set to 20, internal to 200, and local to 200. (config-bgp)#bgp fast-external-failover Enables the fast-external-failover feature.
Configuration Command Summary Table 6. Additional BGP Neighbor Configuration Options Command Description (config-bgp-neighbor)#advertisement-interval Specifies the minimum interval between sending updates to the neighbor. The default advertisement interval is 30 seconds for external neighbors and 5 seconds for internal neighbors. Range is 0 to 600 seconds.
Configuration Command Summary Refer to Additional BGP Configuration on page 12 for more detailed information on the commands referenced in the table above. Table 7. Filtering Routes and Applying Attributes with Route Maps Command Step 1 (config)#route-map [deny | permit] Description Creates a route map and enters the Route Map Configuration mode. Range is 1 to 4294967295.
Configuration Command Summary Lists referenced in Step 2 (prefix, IPv4 ACL, AS path, and community) first must be created separately before they can be used within the route map for filtering. Refer to Route Map on page 23 for additional information on route maps and related commands used to filter routes and apply attributes. Table 8. Defining a Community Policy Command Description Step 1 (config)#ip community-list Creates a community list for a BGP route map to use.
Configuration Command Summary Table 8. Defining a Community Policy (Continued) Command Description Step 8 (config-bgp)#neighbor Enters BGP Neighbor Configuration mode for the neighbor to which the route map is to be applied. Step 9 (config-bgp-neighbor)#send-community standard Enables this AOS device to accept a community attribute or adds a community attribute to any advertisement sent by this peer.
Configuration Command Summary Table 9. Advertising a BGP Community Command Description Step 1 (config)#ip prefix-list seq [deny | permit] [ge | le] Creates a prefix list to define the routes that are to be tagged with a community string. Range is 1 to 4294967294. Step 2 (config)#route-map [deny | permit] Creates a route map (if one does not already exist) to reference the prefix list. Range is 1 to 4294967294.
Configuration Command Summary Table 10. Deleting a Community Command Description Step 1 (config)#ip prefix-list seq [deny | permit] [ge | le] Creates a prefix list to define the routes from which a community is to be deleted. Range is 1 to 4294967294. Step 2 (config)#ip community-list Creates a community list for a BGP route map use. The communities defined in this list will be deleted.
Troubleshooting Troubleshooting After configuring BGP, several different commands can be issued from Enable mode in the CLI to assist in troubleshooting. The following tables contain the show and debug commands that are implemented specifically for BGP. Please note that as of AOS firmware release 18.3, the command syntax, organization, and configuration of BGP changed. If you are using firmware 18.
Troubleshooting Table 11. Viewing BGP Information (Continued) Command Description #show ip bgp neighbors received-routes Displays all IPv4 routes (accepted and rejected) advertised by the specified neighbor. #show ip bgp neighbors routes Displays all accepted received IPv4 routes advertised by the specified neighbor. Routes displayed have passed inbound filtering.
Troubleshooting Show Commands Show IP AS-Path List Use the show ip as-path-list command to display any AS path lists that have been configured in the router, along with any permit and deny clauses in each list. #show ip as-path-list Optional. Specifies that the command display only the list matching the specified AS path list name. If not specified, all AS path lists are displayed.
Troubleshooting The exact prefixes that are being transmitted and received are shown in this output. The o in front of the 172.16.70.0/30 route indicates it is a received route. For received routes to be exported to the route table, they must be the best valid route indicated with the *> for the received route. Use the show ip bgp summary command to display a summary of the BGP route table.
Troubleshooting In the following example, all BGP routes are displayed whose community attributes match those listed in the show ip bgp community command. #show ip bgp community local-as 10:405 BGP local router ID is 10.22.131.241, local AS is 302. Status codes: * valid, > best, i - internal, o - local Origin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf 10.22.152.20/30 10.22.131.10 304 10.22.152.24/29 10.22.131.10 304 10.22.152.36/30 10.22.131.10 304 10.22.152.52/30 10.22.131.
Troubleshooting Show IP BGP Neighbors Use the show ip bgp neighbors command to display information for the specified BGP neighbor. #show ip bgp neighbors [] [advertised-routes | received-routes | routes] Optional. Displays information for the specified neighbor. IPv4 addresses should be expressed in dotted decimal notation (for example, 10.10.10.1). If no IPv4 address is entered, information for all neighbors is displayed. advertised-routes Optional.
Troubleshooting #show ip bgp neighbors 10.15.43.34 advertised-routes BGP local router ID is 10.0.0.1, local AS is 101. Status codes: * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete *> *> Network 1.0.0.0/8 2.0.0.0/9 NextHop 10.15.43.17 10.15.43.17 Metric Path 1 100 i 1 100 i Show IP BGP Regexp Use the show ip bgp regexp command to display a summary of the BGP route table that includes routes whose AS path matches the specified expression.
Troubleshooting * 10.22.132.8/29 * i10.22.132.240/28 *> 10.22.132.240/28 10.22.134.0/29 10.22.134.8/29 10.22.134.16/29 10.22.134.24/29 10.22.134.32/29 10.22.134.40/29 10.22.134.48/29 10.22.134.56/29 10.22.134.64/29 10.22.134.80/29 10.22.135.0/29 10.22.135.8/29 Total RIB entries = 30 10.22.132.9 10.22.132.1 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.9 10.22.132.
Troubleshooting Debug Commands Debug IP BGP Use the debug ip bgp command to activate debug messages associated with BGP. Debug messages are displayed in real time. Use the no form of this command to disable the debug messages. Turning on a large amount of debug information can adversely affect the performance of your unit. #debug ip bgp [events | in | out | keepalives | updates | updates quiet] events Optional. Displays significant BGP events, such as a neighbor state change. in/out Optional.
Troubleshooting Typically, soft resets should be used because hard resets can disrupt the network. A hard reset clears the TCP connection with the specified peers, which results in clearing the table. This method of clearing is disruptive and causes peer routers to record a route flap for each route. Refer to Soft Reconfiguration Inbound on page 31 for additional information.
Troubleshooting Remove an IPv4 ACL: (config-bgp-neighbor)#no distribute-list [in | out] Specifies the name of the IPv4 ACL to be removed. in Specifies to remove the inbound filter. out Specifies to remove the outbound filter. Clear the BGP neighbor with a soft reset and observe if the AOS device begins to receive routes. If routes are received, then it is confirmed that the filter is the problem.
Troubleshooting Router# show ip bgp neighbors 192.168.0.25 routes BGP local router ID is 192.168.88.1, local AS is 501. Status codes: * valid, > best, i - internal, o - local Origin codes: i - IGP, e - EGP, ? - incomplete Network *> 192.168.5.0/24 Total RIB entries = 2 NextHop 192.168.0.25 Metric LocPrf Path The AOS device is 500 i accepting one route from the neighbor. Router# show ip bgp neighbors 192.168.0.25 received-routes BGP local router ID is 192.168.88.1, local AS is 501.
Troubleshooting Next, record the current settings in the AOS device and verify that they match those that have been agreed upon with the entity that controls the external AS. Table 13 on page 78 displays the key information that should be verified and how to view the settings on the AOS device. Table 13.
Troubleshooting Router#show ip bgp neighbors BGP neighbor is 192.168.0.25, remote AS 500, external link Configured hold time is 180, keepalive interval is 60 seconds Default minimum time between advertisement runs is 30 seconds Connections established 2; dropped 1 Neighbor IPv4 Last reset: Peer closed connection address Neighbor AS Connection ID: 5 BGP version 4, remote router ID 192.168.5.
Troubleshooting Check all of the statements for hits. Statements that have been misconfigured often have no hits. If the entire list has no hits, then the list might not have been applied to the BGP neighbor (if the list is applied to a route map, ensure that the map has been applied to the BGP neighbor). Also, verify that the list is correctly applied to either inbound or outbound data. Figure 14 on page 80 shows sample output of the detailed command.
Troubleshooting Criteria for selecting routes. Policies applied to routes. NetVanta_4305#show route-map route-map DEFAULT-ROUTE-IN, permit, sequence 10 Match clauses: ip address (prefix-lists): DEFAULT Set clauses: local-preference 110 BGP Filtering matches: 7 routes Policy routing matches: 0 packets 0 bytes Redistribution Filtering matches: 0 routes Number of routes matched by this map entry. Figure 15.
Troubleshooting Network Flooded with External Traffic One of the most common uses for BGP is BGP multihoming. Multihoming allows connections to two different ISPs. An unintended consequence of multihoming is that the ISPs can advertise routes to each other through the multihomed router. This results in the local router becoming a transit network for external traffic.This should be prevented by utilizing prefix lists that only allow specific subnets to be advertised to each provider.
Appendix Appendix AS Regular Expressions Regular expressions, also known as regexp, are used in BGP to identify routes that are to be included in outbound routing advertisements or filtered from received inbound routing updates. Regular expressions identify an expected pattern to match against the AS path associated with a BGP route. AS paths identified by the regular expressions are subject to the actions specified in AOS.
Appendix Examples of Regular Expressions .* Matches any character or sequence of characters. 3+ Matches any BGP route entry with at least one occurrence of the number 3 in the AS path. \b300\b Matches any BGP route entry containing 300 in the AS path. \b300$ Matches any BGP route entry with an AS path ending in 300. ^300\b.* Matches any BGP route entry with an AS path that begins with 300. ^$ Matches any BGP route entry with an AS path containing only the local AS. ^300\b.