Flylib.com

Books Software

 
 
 

Chapter 6. BGP Route Filtering

 <  Free Open Study  >  

Chapter 6. BGP Route Filtering

Section 6-1.   distribute-list

 <  Free Open Study  >  
 <  Free Open Study  >  

6-1 distribute-list

Purpose: This form of the distribute-list command works only with Interior Gateway Protocols. Even though this command appears as a BGP router configuration option, do not use this command when configuring BGP. Use the neighbor { ip-address peer- group } distribute-list { in out } command described in sections 8-6 and 8-7.

 <  Free Open Study  >  
 <  Free Open Study  >  

Chapter 7. BGP Maximum Paths

Section 7-1.   maximum-paths number-of-paths

 <  Free Open Study  >  
 <  Free Open Study  >  

7-1 maximum-paths number-of-paths

Syntax Description:

  • number-of-paths ” Number of BGP learned paths to the same destination that will be installed in the IP routing table. The value can be 1 to 6.

Purpose: By default, BGP installs only the best path to a destination in the IP routing table. The maximum-paths command allows up to six paths to the same destination to be installed in the IP routing table.

IOS Release: 11.2

Configuration Example

In Figure 7-1, Router A is learning two paths to network 172.17.1.x via EBGP. By default, BGP will install only one of these paths in the IP routing table. If all the attributes of the paths are equal, such as MED, Local Preference, and Weight, the route that will be installed is the one learned from the router with the lowest router ID. Initially, the routers will be configured without using the maximum-paths command, as shown in the following listing. This is done to demonstrate that only one route to 172.17.1.0 will be installed.

Figure 7-1. Configuration Used to Demonstrate the maximum-paths Command

graphics/07fig01.gif

Router A

ip subnet-zero


!


interface Serial0


ip address 10.1.1.1 255.255.255.252


!


interface Serial1


ip address 10.1.2.1 255.255.255.252


!


router bgp 2


neighbor 10.1.1.2 remote-as 1


neighbor 10.1.2.2 remote-as 1

___________________________________________________________________________

Router B

ip subnet-zero


!


interface Ethernet0


ip address 172.17.1.1 255.255.255.0


!


interface Serial0


ip address 10.1.1.2 255.255.255.252


clockrate 64000


!


router bgp 1


network 172.17.1.0 mask 255.255.255.0


network 10.1.1.0 mask 255.255.255.252


neighbor 10.1.1.1 remote-as 2


neighbor 172.17.1.2 remote-as 1


no synchronization

___________________________________________________________________________

Router C

ip subnet-zero


!


interface Ethernet0


ip address 172.17.1.2 255.255.255.0


!


interface Serial0


ip address 10.1.2.2 255.255.255.252


clockrate 64000


!


router bgp 1


network 172.17.1.0 mask 255.255.255.0


network 10.1.2.0 mask 255.255.255.252


neighbor 10.1.2.1 remote-as 2


neighbor 172.17.1.1 remote-as 1


no synchronization

The BGP table on Router A should contain two paths to network 172.17.1.0:

rtrA#

show ip bgp

BGP table version is 4, local router ID is 10.1.1.1

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal

Origin codes: i - IGP, e - EGP, ? - incomplete



   Network          Next Hop            Metric LocPrf Weight Path

*  172.17.1.0/24    10.1.2.2                 0             0 1 i


*>                  10.1.1.2                 0             0 1 I

Notice that the path to 172.17.1.0/24 learned from 10.1.1.2 is considered the best path, as denoted by the > symbol. This is the best path because the BGP neighbor advertising this path has a lower router ID than the neighbor advertising the other path, as seen in the show ip bgp neighbors command on Router A:

rtrA#

show ip bgp neighbors


BGP neighbor is 10.1.1.2,  remote AS 1, external link

Index 1, Offset 0, Mask 0x2

BGP version 4, remote router ID 172.17.1.1

BGP state = Established, table version = 6, up for 00:01:38

  Last read 00:00:37, hold time is 180, keepalive interval is 60 seconds

  Minimum time between advertisement runs is 30 seconds

  Received 24 messages, 0 notifications, 0 in queue

  Sent 20 messages, 0 notifications, 0 in queue

  Prefix advertised 0, suppressed 0, withdrawn 0

  Connections established 3; dropped 2

  Last reset 00:02:00, due to Peer closed the session

  1 accepted prefixes consume 32 bytes

  0 history paths consume 0 bytes

Connection state is ESTAB, I/O status: 1, unread input bytes: 0

Local host: 10.1.1.1, Local port: 179

Foreign host: 10.1.1.2, Foreign port: 11006

BGP neighbor is 10.1.2.2,  remote AS 1, external link

Index 2, Offset 0, Mask 0x4

BGP version 4, remote router ID 172.17.1.2

BGP state = Established, table version = 6, up for 00:02:54

  Last read 00:00:55, hold time is 180, keepalive interval is 60 seconds

  Minimum time between advertisement runs is 30 seconds

  Received 23 messages, 0 notifications, 0 in queue

  Sent 20 messages, 0 notifications, 0 in queue

  Prefix advertised 0, suppressed 0, withdrawn 0

  Connections established 3; dropped 2

  Last reset 00:03:19, due to Peer closed the session

  1 accepted prefixes consume 32 bytes

  0 history paths consume 0 bytes

Only one of the paths to 172.17.1.0/24 will be installed in the IP routing table on Router A:

rtrA#

show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route, o - ODR, P - periodic downloaded static route

       T - traffic engineered route



Gateway of last resort is not set

172.17.0.0/24 is subnetted, 1 subnets


B       172.17.1.0 [20/0] via 10.1.1.2

10.0.0.0/30 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial1

C       10.1.1.0 is directly connected, Serial0

Now add the maximum-paths 2 command to the configuration on Router A:

Router A

router bgp 2


neighbor 10.1.1.2 remote-as 1


neighbor 10.1.2.2 remote-as 1


maximim-paths 2

Verification

Verify that both routes to 172.17.1.0/24 learned via EBGP are being installed in the IP routing table on Router A:

rtrA#

show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default

       U - per-user static route, o - ODR, P - periodic downloaded static route

       T - traffic engineered route



Gateway of last resort is not set

172.17.0.0/24 is subnetted, 1 subnets


B       172.17.1.0 [20/0] via 10.1.1.2

[20/0] via 10.1.2.2

     10.0.0.0/30 is subnetted, 2 subnets

C       10.1.2.0 is directly connected, Serial1

C       10.1.1.0 is directly connected, Serial0
Troubleshooting
Step 1. Verify that the BGP neighbors are in the Established state using the show ip bgp neighbors command.

If the neighbor relationship is not in the Established state, see section 8-23.

Step 2. Verify that the router is learning multiple paths to the same destination using the show ip bgp command.

Step 3. If multiple paths are not being learned via BGP, check your BGP neighbor configuration, especially the syntax for the network and/or redistribution commands. Also check for any filters that might be blocking the desired routes.

Step 4. Verify that multiple routes to the same destination have been installed in the IP routing table using the show ip route command.

 <  Free Open Study  >