cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
691
Views
0
Helpful
2
Replies

Bgp multihop problem!!

ahmeteris81
Level 1
Level 1

Hi everybody,

My project topolgy and config files at the attached. The ip address arent real only simulation. I have 5 router. R1,R2,BB1,BB2 at the customer site. They have connect with frame-relay via ISP for intranet. R1 R2 connect same ISP but other tecnology with G.shdsl. R5 router is a ISP router for internet. I have some web server at my R1 and R2 site. I have a c class subnet real ip address. I want to announce 64 ip from R1 and other 64 ip from R2. İf one site internet connection is failed, the other site onnounce 128 ip for two site. So they connect with g.shdsl and failed site can announce with g.shdsl via live router.

ı have configured all router and first time everythink is ok. First 64 ip announced with R1 and the other 64 announced with R2. At the R5 routing table ı see two routing information about this sites. First routing information for 64 ip's gateway is R1 and the other 64 ip's gateway is R2. no problem. When ı broke R1 or R2 internet connection, all routing information for my real subnet direction go to other live router. again no problem:) but when ı reconnect broken link, the routing still goes old direction. (not on the broken link router)

2 Replies 2

milan.kulik
Level 10
Level 10

Hi,

looking to your configs, I've got a feeling:

a) your plan was to advertise 95.0.95.0/24 from both R1 and R2?

And in the case the /26 more specific subnet would not be advertised from R2 because of the R2-R5 line failure, the /24 would still be there advertised from R1 and take the routing?

But IMHO, as there's no route to this subnet, it's not advertised by BGP.

b) What happens instead is:

R2 is advertising the 95.0.95.64/26 to R1 via iBGP.

When the R2-R5 line fails, R1 is still advertising 95.0.95.64/26 to R5.

So R5 is routing the 95.0.95.64/26 to R2 via R1.

When the R2-R5 line goes up again, R5 is receiveng 95.0.95.64/26 prefix advertised from both R1 and R2.

As both R1 and R2 are in the same AS, R5 has to decide somehow whitch path to prefer.

I don't know why it prefers R1.

You should use sh ip bgp 95.0.95.64/26  command at that moment on R5 to compare both prefixes received from R1 and R2 and identify why R5 is preferring the prefix received from R1 (see http://www.cisco.com/en/US/customer/tech/tk365/technologies_tech_note09186a0080094431.shtml  for BGP Best Path Selection algorithm).

(It's even possible "step 10. When both paths are external, prefer the path that was received first (the oldest one)." is applied.)

c) You could create an outgoing route-map setting MED value for 95.0.95.64/26 to 10 on R2 and 100 on R1 (and similarly for 95.0.95.0/26 MED 10 on R1 and 100 on R2).

Or you could use as-prepend to manipulate AS-PATH length.

Or, if you are configuring R5, you could modify local preferences for the /26 subnets via an incoming route-map.

HTH,

Milan

Thanks Milan for your reply. ı solved the problem. I set the Med (Metric) with route_map. This is the new bgp config at r1 and r2.

R1

router bgp 200
no synchronization
bgp log-neighbor-changes
network 95.0.95.0 mask 255.255.255.192
network 95.0.95.64 mask 255.255.255.192
neighbor 212.85.111.2 remote-as 300
neighbor 212.85.111.2 route-map med_traffic out
no auto-summary
!
no ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 212.85.111.2
ip route 0.0.0.0 0.0.0.0 10.1.0.2 20
ip route 95.0.95.64 255.255.255.192 Null0
ip route 192.168.3.0 255.255.255.0 172.31.1.2
ip route 192.168.4.0 255.255.255.0 172.31.1.2
!
!
!
access-list 90 permit 95.0.95.0 0.0.0.63
!
route-map med_traffic permit 10
match ip address 90
set metric 100
!
route-map med_traffic permit 100
set metric 200

R2

router bgp 200
no synchronization
bgp log-neighbor-changes
network 95.0.95.0 mask 255.255.255.192
network 95.0.95.64 mask 255.255.255.192
neighbor 212.85.111.6 remote-as 300
neighbor 212.85.111.6 route-map med_traffic out
no auto-summary
!
no ip http server
no ip http secure-server
ip classless
ip route 0.0.0.0 0.0.0.0 212.85.111.6
ip route 0.0.0.0 0.0.0.0 10.1.0.1 10
ip route 95.0.95.0 255.255.255.192 Null0
ip route 192.168.1.0 255.255.255.0 172.31.1.1
ip route 192.168.2.0 255.255.255.0 172.31.1.1
!
!
!
access-list 90 permit 95.0.95.64 0.0.0.63
!
route-map med_traffic permit 10
match ip address 90
set metric 100
!
route-map med_traffic permit 100
set metric 200

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco