Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

Bronze

BGP Question

Hi

Is it possible that same distination reach via diffrent ISP but metric value is same.? and that destination route is install in "Show ip route" table. Please let me known.

-M

16 REPLIES
Hall of Fame Super Silver

Re: BGP Question

Hello minu,

yes you can have two different eBGP advertisements installed in your routing table for an IP prefix.

Look at the command maximum-paths in the router bgp process. The default value is 1. if you use maximum-paths 2 you can have two paths installed in your ip routing table.

If you want to compare MED for advertisements coming from two different ISPs (BGP ASN) you can use the command

router bgp

bgp always-compare-med

! and to have a deterministic behaviour

bgp deterministic-med

maximum-paths 2

!

hope to help

Giuseppe

Cisco Employee

Re: BGP Question

Giuseppe,

Bear in mind that IOS will not install the two paths in the RIB by default if they are not from the same neighbor AS.

You can use the following hidden command to change this behavior.

"bgp bestpath as-path multipath-relax"

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Blue

Re: BGP Question

Thats interesting...

So, the maximum-paths command is only for installing multiple paths from the same neighbor?

Victor

Cisco Employee

Re: BGP Question

Victor,

That is correct.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Blue

Re: BGP Question

Thanks, Harold. Makes sense.

Victor

Bronze

Re: BGP Question

Hi

That mean in " show ip route" do not have multiple routes for same destionation only this is happend with same AS not different different AS.

Please correct me if i am wrong..

-Minu

Re: BGP Question

yes.. if you have maximum-paths configured under BGP, and you receive multiple routes to the same destination via different AS, it will not be installed in the routing table

you need to enter the command that harold pointed out

bgp bestpath as-path multipath-relax

configuring the above along with the maximum-paths will ensure that multiple entries are installed in the RT

Narayan

HTH

Narayan

Bronze

Re: BGP Question

Hi Narayan

I beliave maximum-path command only use only AS. that means it is useful when you have two link with same AS, here my question is the if i have two links with different AS and it will design in such way that i will have all attributes are same , in that case should i get two routes in "show ip route "

-minu

Re: BGP Question

Minu,

When you enter the bgp best-path as-path multipath-relax command along with maximum paths command, the router will install 2 routes provided the other attributes are same

here is an example output where R1 (AS 100) is connected to both R2 (AS 200) and R3 (AS 300) both advertising prefix 1.1.1.0/24

R1

router bgp 100

no synchronization

bgp log-neighbor-changes

bgp bestpath as-path multipath-relax

neighbor 10.10.10.2 remote-as 200

neighbor 20.20.20.2 remote-as 300

maximum-paths 2

no auto-summary

R2

router bgp 200

no synchronization

bgp log-neighbor-changes

network 1.1.1.0 mask 255.255.255.0

neighbor 10.10.10.1 remote-as 100

no auto-summary

R3

router bgp 300

no synchronization

bgp log-neighbor-changes

network 1.1.1.0 mask 255.255.255.0

neighbor 20.20.20.1 remote-as 100

no auto-summary

r1#sh ip bgp

BGP table version is 3, local router ID is 20.20.20.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

*> 1.1.1.0/24 10.10.10.2 0 0 200 i

* 20.20.20.2 0 0 300 i

r1#

r1#sh ip route

Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP

D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

E1 - OSPF external type 1, E2 - OSPF external type 2

i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2

ia - IS-IS inter area, * - candidate default, U - per-user static route

o - ODR, P - periodic downloaded static route

Gateway of last resort is not set

1.0.0.0/24 is subnetted, 1 subnets

B 1.1.1.0 [20/0] via 10.10.10.2, 00:07:53

[20/0] via 20.20.20.2, 00:03:49

20.0.0.0/24 is subnetted, 1 subnets

C 20.20.20.0 is directly connected, FastEthernet0/1

10.0.0.0/24 is subnetted, 1 subnets

C 10.10.10.0 is directly connected, FastEthernet0/0

r1#

Note : it is possible that the command may not appear in the CLI help but you can type it as it is

HTH

Narayan

Blue

Re: BGP Question

Narayan:

Nice presentation. There's no better way to prove the theory than to actually put it to the test.

I rated your post.

Victor

Re: BGP Question

victor

appreciate the comments as well as the rating

Narayan

New Member

Re: BGP Question

Narayan,

Since both paths are installed into the routing table does this mean it will load-balance between the 2 routers?

Thanks,

Phil

Re: BGP Question

Yes it would and would be based on the CEF per destination loadbalance by default

Narayan

Bronze

Re: BGP Question

Hi

thanks for clarification , this is really great help, onces again thanks

-minu

Hall of Fame Super Silver

Re: BGP Question

Hello Harold,

I thought that the usage of the command bgp always-compare-med was enough to achieve the intended result.

From

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_bgp1.html#wp1011748

To enable the comparison of the Multi Exit Discriminator (MED) for paths from neighbors in different autonomous systems, use the bgp always-compare-med command in router configuration mode. To disallow the comparison, use the no form of this command.

Actually, I haven't tried what I was suggesting.

Thanks for your correction.

Best Regards

Giuseppe

Cisco Employee

Re: BGP Question

Giuseppe,

This command will only force the comparison of MEDs between different ASes. It doesn't mean both paths will be installed if the MEDs are equal.

You absolutely need the hidden command "bgp bestpath as-path multipath-relax" to get the two paths to be installed in the RIB.

Regards,

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
1323
Views
29
Helpful
16
Replies
CreatePlease login to create content