cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
468
Views
0
Helpful
4
Replies

BGP multiple routes

ashish
Level 1
Level 1

Hi

I have a topology as per attached diagram. R1,R2 and R3 are running OSPF and R1 and R3 are having iGBP neighborship. I have redistributed OSPF in BGP and BGP in OSPF so that AS 100 becomes an transit AS. Now i have networks 7.7.7.1/24,8.8.8.1/24,9.9.9.1/24 and 10.10.10.1/24 on R2 which i advertised in OSPF. I can see 2 bgp routes for all these networks on R6 and R5 but on R4 i can only see single route for these networks which is through R3.

When i clear bgp routes with command clear ip bgp * on R4 2 routes on R5 becomes single route i.e. through R3 and on R4 single route becomes 2 routes i.e. one from R3 nad other from R6.

According to my understanding on R6, R4 nad R5 i should see 2 routes for these networks while on either R4 or R5 i see only single route for these networks.

I have pasted the configs of all routers as below:

R1 CONFIG

--------------------------------

version 12.2

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!

hostname R1

!

!

ip subnet-zero

!

!

!

call rsvp-sync

!

!

!

!

!

!

!

!

interface Loopback0

ip address 1.1.1.1 255.255.255.0

!

interface Serial0/0

ip address 150.1.14.1 255.255.255.0

serial restart-delay 0

clockrate 64000

!

interface Serial0/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/3

no ip address

shutdown

serial restart-delay 0

!

interface FastEthernet1/0

ip address 150.1.12.1 255.255.255.0

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

redistribute bgp 100 subnets

network 1.1.1.0 0.0.0.255 area 0

network 150.1.12.0 0.0.0.255 area 0

!

router bgp 100

no synchronization

bgp router-id 1.1.1.1

bgp log-neighbor-changes

network 1.1.1.0 mask 255.255.255.0

network 150.1.12.0 mask 255.255.255.0

network 150.1.14.0 mask 255.255.255.0

redistribute ospf 100

neighbor 3.3.3.3 remote-as 100

neighbor 3.3.3.3 update-source Loopback0

neighbor 3.3.3.3 next-hop-self

neighbor 4.4.4.4 remote-as 400

neighbor 4.4.4.4 ebgp-multihop 2

neighbor 4.4.4.4 update-source Loopback0

no auto-summary

!

ip classless

ip route 4.4.4.4 255.255.255.255 150.1.14.4

ip http server

ip pim bidir-enable

!

!

dial-peer cor custom

!

!

!

!

gatekeeper

shutdown

!

!

----------------------------------------

R2 CONFIG

----------------------------------------

hostname R2

!

ip subnet-zero

interface Loopback0

ip address 2.2.2.2 255.255.255.0

!

interface Loopback1

ip address 7.7.7.1 255.255.255.0

!

interface Loopback2

ip address 8.8.8.1 255.255.255.0

!

interface Loopback3

ip address 9.9.9.1 255.255.255.0

!

interface Loopback4

ip address 10.10.10.1 255.255.255.0

!

interface FastEthernet1/0

ip address 150.1.12.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet2/0

ip address 150.1.23.2 255.255.255.0

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

network 2.2.2.0 0.0.0.255 area 0

network 7.7.7.0 0.0.0.255 area 0

network 8.8.8.0 0.0.0.255 area 0

network 9.9.9.0 0.0.0.255 area 0

network 10.10.10.0 0.0.0.255 area 0

network 150.1.12.0 0.0.0.255 area 0

network 150.1.23.0 0.0.0.255 area 0

!

Thanks in advance

Best Regards

4 Replies 4

ashish
Level 1
Level 1

Please find below the configs of remaining routers

---------------------------------------

R3 CONFIG

---------------------------------------

hostname R3

!

ip subnet-zero

interface Loopback0

ip address 3.3.3.3 255.255.255.0

!

interface Serial0/0

ip address 150.1.35.3 255.255.255.0

no fair-queue

serial restart-delay 0

clockrate 64000

!

interface Serial0/1

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/3

no ip address

shutdown

serial restart-delay 0

!

interface FastEthernet2/0

ip address 150.1.23.3 255.255.255.0

duplex auto

speed auto

!

router ospf 100

log-adjacency-changes

redistribute bgp 100 subnets

network 3.3.3.0 0.0.0.255 area 0

network 150.1.23.0 0.0.0.255 area 0

!

router bgp 100

no synchronization

bgp router-id 3.3.3.3

bgp log-neighbor-changes

network 3.3.3.0 mask 255.255.255.0

network 150.1.23.0 mask 255.255.255.0

network 150.1.35.0 mask 255.255.255.0

redistribute ospf 100

neighbor 1.1.1.1 remote-as 100

neighbor 1.1.1.1 update-source Loopback0

neighbor 1.1.1.1 next-hop-self

neighbor 5.5.5.5 remote-as 500

neighbor 5.5.5.5 ebgp-multihop 2

neighbor 5.5.5.5 update-source Loopback0

no auto-summary

!

ip classless

ip route 5.5.5.5 255.255.255.255 150.1.35.5

ip http server

ip pim bidir-enable

!

---------------------------------------

R4 CONFIG

---------------------------------------

hostname R4

!

ip subnet-zero

!

interface Loopback0

ip address 4.4.4.4 255.255.255.0

!

interface Loopback1

ip address 144.1.1.1 255.255.255.0

!

interface Serial0/0

ip address 150.1.14.4 255.255.255.0

no fair-queue

serial restart-delay 0

!

interface Serial0/1

ip address 180.180.180.2 255.255.255.0

serial restart-delay 0

!

interface Serial0/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/3

no ip address

shutdown

serial restart-delay 0

!

router bgp 400

bgp router-id 4.4.4.4

bgp cluster-id 2415984897

bgp log-neighbor-changes

network 4.4.4.0 mask 255.255.255.0

network 144.1.1.0 mask 255.255.255.0

network 150.1.1.0 mask 255.255.255.0

network 150.1.14.0 mask 255.255.255.0

network 180.180.180.0 mask 255.255.255.0

neighbor 1.1.1.1 remote-as 100

neighbor 1.1.1.1 ebgp-multihop 2

neighbor 1.1.1.1 update-source Loopback0

neighbor 6.6.6.6 remote-as 600

neighbor 6.6.6.6 ebgp-multihop 2

neighbor 6.6.6.6 update-source Loopback0

!

ip classless

ip route 1.1.1.1 255.255.255.255 150.1.14.1

ip route 6.6.6.6 255.255.255.255 180.180.180.1

--------------------------------------

R5 CONFIG

--------------------------------------

hostname R5

!

ip subnet-zero

!

interface Loopback0

ip address 5.5.5.5 255.255.255.0

!

interface Loopback1

ip address 15.1.1.1 255.255.255.0

!

interface Serial0/0

ip address 150.1.35.5 255.255.255.0

no fair-queue

serial restart-delay 0

!

interface Serial0/1

ip address 190.190.190.2 255.255.255.0

serial restart-delay 0

!

interface Serial0/2

no ip address

shutdown

serial restart-delay 0

!

interface Serial0/3

no ip address

shutdown

serial restart-delay 0

!

router bgp 500

no synchronization

bgp router-id 5.5.5.5

bgp cluster-id 251724033

bgp log-neighbor-changes

network 5.5.5.0 mask 255.255.255.0

network 150.1.1.0 mask 255.255.255.0

network 150.1.35.0 mask 255.255.255.0

network 190.190.190.0 mask 255.255.255.0

neighbor 3.3.3.3 remote-as 100

neighbor 3.3.3.3 ebgp-multihop 2

neighbor 3.3.3.3 update-source Loopback0

neighbor 6.6.6.6 remote-as 600

neighbor 6.6.6.6 ebgp-multihop 2

neighbor 6.6.6.6 update-source Loopback0

no auto-summary

!

ip classless

ip route 3.3.3.3 255.255.255.255 150.1.35.3

ip route 6.6.6.6 255.255.255.255 190.190.190.1

Can you post a sh ip bgp and sh ip route from all the routers?

Narayan

Dear Narayan

Please find attached the sh ip route and sh ip bgp of all the routers, Routers R1,R2 and R3 are running OSPF .

Regards

Ashish

Hello,

I do not claim to have understood every detail of your setup. However, having made a quick look throughout your config, your bgp tables and your routing tables, I do have a few first comments to make.

1) When you examine the routes you have in the bgp table or in the routing table, do not forget to pay attention to the mask that accompanies the route. Some of the /24 routes you claim you can see in your first posting are /32's instead.

2) Redistribution is a tricky thing. Mutual redistribution takes this to another level. Unfortunately, many people are unlucky enough to have to study it :-). You have a non-deterministic setup, that is your cannot easily tell what the routing behavior is when a slight change happens in the network (clear the bgp). Redistribution is better when it is highly controlled in specific parts of the network.

3) In routers that run both BGP and OSPF make sure you have /32 loopback's (instead of /24's) as router-id's and that on a single router the bgp router-id and the ospf-router-id are the same. In general, ospf normally likes /32 router-id's and bgp and ospf interwork better when they have the same router-id.

4) Redistribution of iBGP routes into IGP (that is ospf in your case) is disabled by default to avoid routing loops within an AS and you have to explicitly issue (inside the bgp process configuration) the command bgp redistribute-internal. Even with this extra command, you would better setup some route-maps to have better control over your redistribution.

Kind Regards,

M.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card