cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1713
Views
70
Helpful
30
Replies

HQ to DR Preferred route, BGP OSPF

wilson_1234_2
Level 3
Level 3

Our HQ to DR connection has a point to point DS3 and a connection via MPLS.

HQ has the DS3 and 6 T1s multilinked into the MPLS cloud.

DR has the DS3 and a T1 into the cloud.

There is BGP configured between the two sites and each site is distributing the local OSPF routes into the BGP.

Both HQ and DR are doing mutual distribution of BGP and OSPF.

HQ has this in the BGP config:

distance bgp 150 200 201

The HQ site preferrs the MPLS cloud for all remote branches, but preferrs the DS3 for the HQ subnets.

I want to know why this is happeneing, I see nothing in the config that would point to costing on the interfaces.

Is the cost from the OSPF config being distributed into BGP also and due to the serial interface being 45Mps on the DS# making this the preferred route to DR?

The serial iterface is subinterfaced.

interface Serial1/0

no ip address

encapsulation frame-relay IETF

ip route-cache flow

load-interval 30

dsu bandwidth 44210

framing c-bit

cablelength 50

clock source internal

serial restart-delay 0

frame-relay lmi-type ansi

frame-relay intf-type dce

Serial1/0 is up, line protocol is up

Hardware is M1T-T3+ pa

Description: connected to MCI DS3 Disaster Recovery

MTU 4470 bytes, BW 44210 Kbit, DLY 200 usec,

reliability 255/255, txload 27/255, rxload 2/255

Does this set the Bandwiith on the interface:

dsu bandwidth 44210

30 Replies 30

Edison Ortiz
Hall of Fame
Hall of Fame

The HQ site preferrs the MPLS cloud for all remote branches, but preferrs the DS3 for the HQ subnets.

I want to know why this is happeneing, I see nothing in the config that would point to costing on the interfaces.

Very hard to tell without seeing the BGP configuration but one thing I can tell you, BGP does not rely on IGP metrics to select a path in the network.

Please read the following article for understanding on BGP Best Path algorithm

http://www.cisco.com/warp/public/459/25.shtml

Your BGP routers are configured a certain way to choose one link over the other.

HTH,

__

Edison.

sorry

"The HQ site preferrs the MPLS cloud for all remote branches, but preferrs the DS3 for the HQ subnets. "

This should be:

The HQ site preferrs the MPLS cloud for all remote branches, but preferrs the DS3 for the DR subnets.

Here is the BGP config for the edge router to the DR site.

There is a multilink to the MPLS cloud that has a link to DR and the serial interface for the DS3.

The 192.168.2.66 is the serial interface for the DS3.

The 1.2.1.29 is the multilink to the MPLS cloud, that goes to DR.

All subnets to DR have the next hop as 192.168.2.65, which is the DS3 interface on the DR router.

See anything that makes the DS3 preferred?

router bgp 65001

no synchronization

bgp log-neighbor-changes

network 0.0.0.0

network 10.1.0.0 mask 255.255.0.0

network 172.16.254.1 mask 255.255.255.255

redistribute static route-map STATICtoBGP

redistribute ospf 1 match internal external 2

neighbor 192.168.2.66 remote-as 65011

neighbor 192.168.2.66 version 4

neighbor 192.168.2.66 soft-reconfiguration inbound

neighbor 1.2.1.29 remote-as 65000

neighbor 1.2.1.29 version 4

neighbor 1.2.1.29 soft-reconfiguration inbound

distance bgp 150 200 201

no auto-summary

Hi there,

I think that HQ prefers the MPLS cloud for all remote branches is because is has the smaller AS path attribute.

Secondly, when redistributing OSPF into BGP, the cost is transferred into the Metric attribute of BGP (or MED - Multiple Exit Discriminator). To see that I think the command is "show ip bgp 10.x.x.0" from memory.

The distance bgp 150 200 201 is changing the administrative distance of external bgp, internal bgp and local. Which means that when there is a choice between OSPF (admin distance of 110) and external BGP (usually admin distance of 20, but now 150) the router would choose OSPF.

I hope I've helped and answered your questions to your satisfaction champ!

Brad

As Edison points out, Administrative distance does not play a part with BGP path selection

Have a look at this discussion.

http://forums.cisco.com/eforum/servlet/NetProf?page=netprof&forum=Network%20Infrastructure&topic=Routing%20and%20Switching&CommCmd=MB%3Fcmd%3Ddisplay_location%26location%3D.1dda2f44

HTH

Narayan

I agree, but what gets installed into the routing table does..

I have read all of the replys and the other thread and I still do not see it.

Here is the output of a couple of the related "sh" commands to one of the DR subnets.

This shows weight the same on both paths, local preference is the same on both paths, the only thing I see that is different is metric (not supposed to matter) and the preferred path is 2, the other path shows nothing.

The only thing I see in HQ and DR BGP config is that the remote-as is higher for the DS3 path than the MPLS path.

The MPLS cloud remote-as is 65000 for both DR and HQ.

The HQ router, the remote-as for DR via DS3 is 65011

The DR router, the remote-as for HQ vis DS3 is 65001.

Here is some information from the GQ edge router for a DR subnet:

#sh ip bgp

BGP table version is 4279, local router ID is 172.16.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, ? - incomplete

Network Next Hop Metric LocPrf Weight Path

* 10.100.10.0/24 1.2.1.29 0 65000 65011 ?

*> 192.168.2.66 2 0 65011 ?

#sh ip bgp 10.100.40.0/24

BGP routing table entry for 10.100.40.0/24, version 89

Paths: (2 available, best #2, table Default-IP-Routing-Table)

Advertised to update-groups:

1

65000 65011, (received & used)

1.2.1.29 from 1.2.1.29 (1.24.1.128)

Origin incomplete, localpref 100, valid, external

65011, (received & used)

192.168.2.66 from 192.168.2.66 (172.16.2.5)

Origin incomplete, metric 2, localpref 100, valid, external, best

#sh ip route 10.100.40.0

Routing entry for 10.100.40.0/24

Known via "bgp 65001", distance 150, metric 2

Tag 65011, type external

Redistributing via ospf 1

Advertised by ospf 1 subnets

Last update from 192.168.2.66 7w0d ago

Routing Descriptor Blocks:

* 192.168.254.66, from 192.168.2.66, 7w0d ago

Route metric is 2, traffic share count is 1

AS Hops 1

Route tag 65011

Does anyone see anything the would answer this, or is it obvious and I missed it?

Based on your output you have 2 BGP routes in the table for network 10.100.40.0/24.

Looking at the output closer, it 'almost' look identical but let me help you spot the difference

65000 65011, (received & used)

1.2.1.29 from 1.2.1.29 (1.24.1.128)

Origin incomplete, localpref 100, valid, external

65011, (received & used)

192.168.2.66 from 192.168.2.66 (172.16.2.5)

Origin incomplete, metric 2, localpref 100, valid, external, best

Notice how the last entry only has one AS in the path vs the first entry with 2 AS's in the path?

The link I referred in the first post explains the BGP Best Path selection. Take a moment to read it, please :)

Edison,

I really appreciate your reply and knowlege.

I laughed when I saw your smiley face.

I will read it again and see if it sinks in, but sometiems it is like getting through lead.

Thanks for pointing out the difference.

Edison,

Wouldn't the shortest AS-Path be like hop count?

BGP is counting hops?

Not really. If you have an iBGP peer the AS_PATH remains the same but you are one hop away :)

You can consider the AS_PATH a 'hop count' only between eBGP routers.

__

Edison.

On my example is the "external" shown here designating the "e" in the eBGP router that you are talking about?

If so, why are they considered external?

65000 65011, (received & used)

1.2.1.29 from 1.2.1.29 (1.24.1.128)

Origin incomplete, localpref 100, valid, external

65011, (received & used)

192.168.2.66 from 192.168.2.66 (172.16.2.5)

Origin incomplete, metric 2, localpref 100, valid, external, best

eBGP peering is considered any neighbor that does not belong to the same AS.

For instance, if you have a router with BGP AS 65000 and peer with another router with BGP 65000, that's considered an iBGP peering.

While if you have a router with BGP 65001 peering with another router with BGP 65000, that's considered an eBGP peering.

Edison,

When having both OSPF and BGP doing mutual distribution from each other,

BGP would show all routes in the OSPF route table as being BGP routes, and conversly, all BGP routes would be in the OSPF route table.

If My HQ edge router is the one doing the distribution, will the distributed routes only show up in the routers adjacent to the edge router, or should they show up in the Edge router as well?

And what prevents the router (doing the mutual distribution) from continually distributing routes into each other and going into some type of runaway conditon?

Best thing is to avoid Mutual redistribution altogether. Distribute ospf into BGP and use network statement under BGP (we do something similar in our network)

If mutual redistribution is a must, you need to setup filters in such a way that a ospf learnt route is not injected back into OSPF via BGP and vice versa

HTH

Narayan

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