BGP Question

Unanswered Question
May 17th, 2008
User Badges:
  • Bronze, 100 points or more

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.8 (6 ratings)
Loading.
Giuseppe Larosa Sat, 05/17/2008 - 10:49
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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


Harold Ritter Sat, 05/17/2008 - 17:16
User Badges:
  • Cisco Employee,

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,

lamav Sun, 05/18/2008 - 08:59
User Badges:
  • Blue, 1500 points or more

Thats interesting...


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


Victor

lamav Sun, 05/18/2008 - 12:43
User Badges:
  • Blue, 1500 points or more

Thanks, Harold. Makes sense.


Victor

minumathur Sun, 05/18/2008 - 18:41
User Badges:
  • Bronze, 100 points or more

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

royalblues Sun, 05/18/2008 - 23:54
User Badges:
  • Green, 3000 points or more

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

minumathur Mon, 05/19/2008 - 23:11
User Badges:
  • Bronze, 100 points or more

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

royalblues Mon, 05/19/2008 - 23:34
User Badges:
  • Green, 3000 points or more

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

lamav Tue, 05/20/2008 - 06:47
User Badges:
  • Blue, 1500 points or more

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

royalblues Tue, 05/20/2008 - 07:43
User Badges:
  • Green, 3000 points or more

victor


appreciate the comments as well as the rating


Narayan

philiechang Tue, 05/20/2008 - 08:19
User Badges:

Narayan,


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


Thanks,


Phil

royalblues Tue, 05/20/2008 - 20:31
User Badges:
  • Green, 3000 points or more

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


Narayan

minumathur Wed, 05/21/2008 - 00:11
User Badges:
  • Bronze, 100 points or more

Hi


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


-minu

Giuseppe Larosa Tue, 05/20/2008 - 02:31
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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

Harold Ritter Tue, 05/20/2008 - 05:00
User Badges:
  • Cisco Employee,

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,

Actions

This Discussion