Advertisement Control in BGP with Incorrect Route Map Name

Rashmi Bhardwaj | Blog,BUZZ,Config & Troubleshoot
Advertisements

BGP Route Advertisement via Route Map is essential when controlling the BGP Routes and preventing Loops across administrative domains. Errors while configuring Route Map need to be understood by all network administrators to have better traction of BGP route advertisement and its impact.

Scenario: BGP with Incorrect Route Map Name

Below is one such scenario wherein wrong name in configured in BGP while advertising to neighbour via Route Map. Router R1 and R2 connected to each other directly and forming eBGP neighborship to each other .R1 is advertising 2 Loopbacks (1.1.1.0/2 and 1.1.2.0/24) while R2 is advertising 1 Loopback (2.2.2.0/24).

(R1 Configuration)

interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface Loopback2
ip address 1.1.2.1 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
!
router bgp 1
no synchronization
network 1.1.1.0 mask 255.255.255.0
network 1.1.2.0 mask 255.255.255.0
network 192.168.12.0
neighbor 192.168.12.2 remote-as 2
neighbor 192.168.12.2 soft-reconfiguration inbound   

(R2 Configuration)

interface Loopback0
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
ip address 192.168.12.2 255.255.255.0
!
router bgp 2
no synchronization
network 2.2.2.0 mask 255.255.255.0
network 192.168.12.0
neighbor 192.168.12.1 remote-as 1
neighbor 192.168.12.1 soft-reconfiguration inbound
The output on each Router (R1 and R2) with no traffic filtering configured is shown below –
R1#sh ip bgp
BGP table version is 7, local router ID is 1.1.2.1
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incompleteNetwork          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*> 1.1.2.0/24       0.0.0.0                  0         32768 i
*> 2.2.2.0/24       192.168.12.2         0              0 2 i
*> 192.168.12.0   0.0.0.0                  0         32768 i
*                            192.168.12.2         0              0 2 i 
R2#sh ip bgp
BGP table version is 17, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incompleteNetwork          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       192.168.12.1          0             0 1 i
*> 1.1.2.0/24       192.168.12.1          0             0 1 i
*> 2.2.2.0/24       0.0.0.0                    0         32768 i
*  192.168.12.0    192.168.12.1          0             0 1 i
*>                          0.0.0.0                    0         32768 i 

Now we will implement a Route Map to filter routes advertised from R1 towards BGP neighbor R2. The Route-Map (FORNET1) should ideally block network 1.1.2.0/24 (via access list NET1) from being advertised to R2. However, due to error in configuration wrong Route Map is called in BGP advertisement i.e. FORNET2 instead of FORNET1 is called in BGP.

Advertisements


R1(config)#ip access-list standard NET1
R1(config-std-nacl)#permit 1.1.2.0 0.0.0.255
R1(config-std-nacl)#deny any
R1(config-std-nacl)#exitR1(config)#Route-map FORNET1 deny 10
R1(config-route-map)#match ip address NET1
R1(config-route-map)#route-map FORNET1 permit 20

R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 route-map FORNET2 out 

BGP routing output is shown below when incorrect Route Map is called in BGP Route filtering –

R2#sh ip bgp
BGP table version is 25, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*> 192.168.12.0   0.0.0.0                  0         32768 i   

As shown above, incorrect Route Map blocks all the network prefixes advertised by R1 to R2 via BGP.
Now, we will call out the correct Route Map ie FORNET1 on BGP Router R1 as below –

R1(config)#router bgp 1
R1(config-router)#no neighbor 192.168.12.2 route-map FORNET2 out
R1(config-router)# neighbor 192.168.12.2 route-map FORNET1 out     

Once configured with correct Route map, BGP advertisement (using Route map filtering) is able to block network 1.1.2.0/24 from being advertised to R2 neighbor as per below output –

R2#sh ip bgp
BGP table version is 18, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal,r RIB-failure, S Stale
Origin codes: i – IGP, e – EGP, ? – incomplete
Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       192.168.12.1        0              0 1 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*  192.168.12.0    192.168.12.1       0               0 1 i
*>                          0.0.0.0                  0         32768 i       

Continue Reading:

Non-Exist-Map & BGP Advertise-Map

BGP Route Aggregation : Suppress MAP And Attribute MAP

ABOUT THE AUTHOR

Advertisements

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
Select your currency
INR Indian rupee
Scroll to Top