cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
683
Views
0
Helpful
6
Replies

BGP Updates Question

haithamnofal
Level 3
Level 3

Hi,

I configured iBGP on 2 routers in my lab and a PIX in between them. I allowed TCP traffic between the 2 in the PIX.

I could see out of the debug output a successfull BGP communication as follows:

*Mar 1 03:44:24.755: BGP: Import walker start version 0, end version 1

*Mar 1 03:44:24.755: BGP: ... start import cfg version = 0

Router(config-router)#

*Mar 1 03:44:45.755: BGP: 2.2.2.2 went from Idle to Active

*Mar 1 03:44:45.755: BGP: 2.2.2.2 open active, delay 9004ms

*Mar 1 03:44:54.759: BGP: 2.2.2.2 open active, local address 1.1.1.1

*Mar 1 03:44:54.763: BGP: 2.2.2.2 went from Active to OpenSent

*Mar 1 03:44:54.763: BGP: 2.2.2.2 sending OPEN, version 4, my as: 1

*Mar 1 03:44:54.763: BGP: 2.2.2.2 send message type 1, length (incl. header) 45

*Mar 1 03:44:54.771: BGP: 2.2.2.2 rcv message type 1, length (excl. header) 26

*Mar 1 03:44:54.771: BGP: 2.2.2.2 rcv OPEN, version 4

*Mar 1 03:44:54.771: BGP: 2.2.2.2 rcv OPEN w/ OPTION parameter len: 16

*Mar 1 03:44:54.771: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capab

ility) len 6

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has CAPABILITY code: 1, length 4

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has MP_EXT CAP for afi/safi: 1/1

*Mar 1 03:44:54.775: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capab

ility) len 2

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has CAPABILITY code: 128, length 0

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has ROUTE-REFRESH capability(old) for al

l address-families

*Mar 1 03:44:54.775: BGP: 2.2.2.2 rcvd OPEN w/ optional parameter type 2 (Capab

ility) len 2

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has CAPABILITY code: 2, length 0

*Mar 1 03:44:54.775: BGP: 2.2.2.2 OPEN has ROUTE-REFRESH capability(new) for al

l address-families

*Mar 1 03:44:54.775: BGP: 2.2.2.2 went from OpenSent to OpenConfirm

*Mar 1 03:44:54.779: BGP: 2.2.2.2 went from OpenConfirm to Established

*Mar 1 03:44:54.779: %BGP-5-ADJCHANGE: neighbor 2.2.2.2 Up

*Mar 1 03:44:55.083: BGP(0): 2.2.2.2 computing updates, afi 0, neighbor version

0, table version 1, starting at 0.0.0.0

*Mar 1 03:44:55.083: BGP(0): 2.2.2.2 update run completed, afi 0, ran for 0ms,

neighbor version 0, start version 1, throttled to 1

*Mar 1 03:44:55.083: BGP(0): 2.2.2.2 initial update completed

*Mar 1 03:45:09.759: BGP: Import walker start version 0, end version 1

*Mar 1 03:45:09.759: BGP: ... start import cfg version = 0

However, when I do show ip route on any of the 2 routers I dont see the network updates of the networks which are added to the BGP router config. (i.e. when I do "show ip route" I dont see BGP updates in there!!

I tried to connect the routers directly with no PIX and the same happens.

Here is my BGP config on R1:

router bgp 1

no synchronization

bgp log-neighbor-changes

network 1.1.1.0

network 7.7.7.0

network 10.10.10.0

neighbor 2.2.2.2 remote-as 1

neighbor 2.2.2.2 update-source Loopback0

no auto-summary

on R2:

router bgp 1

no synchronization

bgp log-neighbor-changes

network 2.2.2.0

network 4.4.4.0

network 10.10.20.0

neighbor 1.1.1.1 remote-as 1

neighbor 1.1.1.1 update-source Loopback0

no auto-summary

What is also surprising is that when I run "sho bgp" on any of the 2 routers, I dont see any output!!

Any idea on why the routing table is not getting propogated?

My other question is how frquent BGP updates happens? I tried to disable the loopback interfaces but I couldnt see any BGP down messages on any of the 2 routers!!

I wish you can help me here.

Thanks,

Haitham

2 Accepted Solutions

Accepted Solutions

Haitham,

For BGP to advertise a network via the network command, there must be an exact match of this network in the routing table, moreover if the network command under the BGP is configured without a mask, then it will use the default classful mask, and thus in your case it didn't find an exact match in the routing table, since 2.2.2.2 belongs to the Class A, while you are using it with a /24, thus all you need to solve your issue, is use "network 2.2.2.0 mask 255.255.255.0".

!

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

network 2.2.2.0 mask 255.255.255.0

BR,

Mohammed Mahmoud.

View solution in original post

Haitham,

You are very welcomed, "neighbor x.x.x.x ebgp-multihop x" command is required whenever an ebgp session is configured with any other interface other than the directly connected, which applies to your case. But the reason behind the error you see is that your router is using a default route to reach its peer address, a default route is never going to be used to establish a BGP session (iBGP or eBGP) this is the reason for "no route" in the output of the debugs, although you will be able to ping the BGP neighbor, you need a more specific route rather than the default route.

BR,

Mohammed Mahmoud.

View solution in original post

6 Replies 6

mohammedmahmoud
Level 11
Level 11

Hi Haitham,

Can you please post, show ip bgp summary, show ip bgp and show ip route from both routers.

BR,

Mohammed Mahmoud.

guruprasadr
Level 7
Level 7

HI Haitham, [Pls Rate if HELPS]

Your Configuration looks OK

Can you paste the "sh ip bgp summary" output and see whether the BGP status as "Active" or NOT

Execute "ip route 1.1.1.1" and viceversa on other Router to see from where its learning.

Also for a BGP to Origniate a Route it needs a "Route" to be available in the Global Routing Table. Add a static route for the Adversised prefixes pointing to the NULL0 Interface.

By default, the keepalive timer is 60 seconds, and the holdtime timer is 180 seconds.

Also try to execute the commands at both sides of Router to see the Results:

router bgp 1

neighbor 1.1.1.1 shutdown

no neighbor 1.1.1.1 shutdown

"Viceversa on other Router"

Refer the document about Configuring BGP:

http://www.cisco.com/en/US/docs/ios/11_3/np1/configuration/guide/1cbgp.html

Pls Rate if HELPS

Best Regards,

Guru Prasad R

Hi Guru and Mohammed,

The "show ip bgp" shows nothing.

The "show ip bgp summary" is as follows:

on R1:

R1#sho ip bgp summary

BGP router identifier 7.7.7.1, local AS number 1

BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

2.2.2.2 4 1 68 68 1 0 0 01:04:12 0

192.1.24.4 4 13 0 0 0 0 0 never Active

R1#sho ip b

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

1.1.1.1 4 1 152 168 1 0 0 01:03:52 0

on R2:

R2#sho ip bgp summary

BGP router identifier 10.10.20.1, local AS number 1

BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

1.1.1.1 4 1 152 168 1 0 0 01:03:52 0

The particular R1/R2 relationship is not Active as you can see here!!

Here is R1 complete config:

Current configuration : 1480 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R1

!

interface Loopback0

ip address 1.1.1.1 255.255.255.0

!

interface Loopback30

ip address 7.7.7.1 255.255.255.0

!

interface Ethernet0/0

ip address 10.10.10.1 255.255.255.0

half-duplex

!

router bgp 1

no synchronization

bgp log-neighbor-changes

network 1.1.1.0

network 7.7.7.0

network 10.10.10.0

neighbor 2.2.2.2 remote-as 1

--More--

neighbor 2.2.2.2 remote-as 1

neighbor 2.2.2.2 update-source Loopback0

neighbor 192.1.24.4 remote-as 13

neighbor 192.1.24.4 ebgp-multihop 255

no auto-summary

!

ip route 0.0.0.0 0.0.0.0 10.10.10.253

ip route 1.1.1.1 255.255.255.255 10.10.20.254

ip route 2.2.2.2 255.255.255.255 10.10.10.254

!

R2 config:

Building configuration...

Current configuration : 1256 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R2

!

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

interface Loopback10

ip address 4.4.4.1 255.255.255.0

!

interface Ethernet0/0

ip address 10.10.10.254 255.255.255.0

half-duplex

!

router bgp 1

no synchronization

bgp log-neighbor-changes

network 2.2.2.0

network 4.4.4.0

network 10.10.20.0

neighbor 1.1.1.1 remote-as 1

neighbor 1.1.1.1 update-source Loopback0

no auto-summary

!

--More--

!

ip http server

no ip http secure-server

ip classless

ip route 1.1.1.1 255.255.255.255 10.10.10.1

!

!

!

!

!

call rsvp-sync

!

!

mgcp profile default

!

!

!

dial-peer cor custom

call rsvp-sync

!

!

mgcp profile default

!

!

!

dial-peer cor custom

!

!

!

!

!

line con 0

line aux 0

line vty 0 4

!

!

end

R/ Haitham

Haitham,

For BGP to advertise a network via the network command, there must be an exact match of this network in the routing table, moreover if the network command under the BGP is configured without a mask, then it will use the default classful mask, and thus in your case it didn't find an exact match in the routing table, since 2.2.2.2 belongs to the Class A, while you are using it with a /24, thus all you need to solve your issue, is use "network 2.2.2.0 mask 255.255.255.0".

!

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

network 2.2.2.0 mask 255.255.255.0

BR,

Mohammed Mahmoud.

Thanks Mohammed, this is really appreciated the iBGP worked perfectly.

I have another question if you allow me, during the same lab setup, I am configuring eBGP to a 3rd router connected thru a core switch. Do I need to configure the command "neighbour x.x.x.x ebgp-multihop"?

I am getting this error message when running debug:

*Mar 1 05:33:20.062: BGP: 192.1.24.4 multihop open delayed 14902ms (no route)

The BGP is between R1 which I sent its config before and R4. Both are able to ping the loopback interfaces of each other and here is R4 config:

Current configuration : 1306 bytes

!

version 12.2

service timestamps debug datetime msec

service timestamps log datetime msec

no service password-encryption

!

hostname R4

!

logging queue-limit 100

!

memory-size iomem 10

ip subnet-zero

!

!

!

ip audit notify log

ip audit po max-events 100

mpls ldp logging neighbor-changes

!

!

!

--More--

interface Loopback0

ip address 9.9.9.9 255.255.255.0

interface Ethernet1/0

ip address 192.1.24.4 255.255.255.0

half-duplex

!

interface ATM2/0

no ip address

shutdown

no atm ilmi-keepalive

!

router bgp 13

no synchronization

bgp log-neighbor-changes

network 9.9.9.0 mask 255.255.255.0

network 192.1.24.0

neighbor 10.10.10.1 remote-as 1

neighbor 10.10.10.1 ebgp-multihop 255

neighbor 10.10.10.1 update-source Loopback0

no auto-summary

!

ip classless

ip route 0.0.0.0 0.0.0.0 192.1.24.254

The sho ip bgp summary from R4 is:

R4#sho ip bgp summary

BGP router identifier 192.1.24.4, local AS number 13

BGP table version is 3, main routing table version 3

2 network entries using 202 bytes of memory

2 path entries using 96 bytes of memory

1 BGP path attribute entries using 60 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 358 total bytes of memory

BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

10.10.10.1 4 1 0 0 0 0 0 never Active

In case I did some changes, here is the R1 BGP cinfig:

router bgp 1

no synchronization

bgp log-neighbor-changes

network 1.1.1.0 mask 255.255.255.0

network 7.7.7.0 mask 255.255.255.0

network 10.10.10.0

neighbor 2.2.2.2 remote-as 1

neighbor 2.2.2.2 update-source Loopback0

neighbor 192.1.24.4 remote-as 13

neighbor 192.1.24.4 ebgp-multihop 255

neighbor 192.1.24.4 update-source Loopback0

no auto-summary

and here is the show ip bgp summary from R1:

BGP router identifier 7.7.7.1, local AS number 1

BGP table version is 5, main routing table version 5

4 network entries using 404 bytes of memory

4 path entries using 192 bytes of memory

2 BGP path attribute entries using 120 bytes of memory

0 BGP route-map cache entries using 0 bytes of memory

0 BGP filter-list cache entries using 0 bytes of memory

BGP using 716 total bytes of memory

BGP activity 4/0 prefixes, 4/0 paths, scan interval 60 secs

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

2.2.2.2 4 1 118 118 5 0 0 01:52:53 2

192.1.24.4 4 13 0 0 0 0 0 never Active

R1#

Haitham,

You are very welcomed, "neighbor x.x.x.x ebgp-multihop x" command is required whenever an ebgp session is configured with any other interface other than the directly connected, which applies to your case. But the reason behind the error you see is that your router is using a default route to reach its peer address, a default route is never going to be used to establish a BGP session (iBGP or eBGP) this is the reason for "no route" in the output of the debugs, although you will be able to ping the BGP neighbor, you need a more specific route rather than the default route.

BR,

Mohammed Mahmoud.

Review Cisco Networking for a $25 gift card