BGP Path

Unanswered Question
Jun 4th, 2007
User Badges:

i have question about the incoming traffic to my network from multiple link from same ISP and multiple link from different ISP.

If i have two connection from same isp then i can use the MED for influancing the incoming traffic from the ISP to my network. But how will MED will work if i will have two different connection from the two different ISP?

same thing i want to understand about the AS Path also. I know shortest the ASPATH will be prefer over the longest one. but let say if i will have the two different connection from the two different ISP then how both isp will manuplate the AS path attributes? will bot the ISP will exchange their route?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.7 (3 ratings)
mohammedmahmoud Mon, 06/04/2007 - 06:15
User Badges:
  • Green, 3000 points or more


MED is only considered for route coming from the same AS, to change this behavior use "bgp always-compare-med" --> In order to check MED even if the multiple routes are from different AS.

As for AS-Path, if i understand you right, then when doing AS-Path manipulation using prepending it is a trial an error method until you reach the desired result, by prepending as needed on the backup path.

I hope that i've been informative.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

dangal.43 Mon, 06/04/2007 - 06:20
User Badges:

hi mohammed,

will you please explain me more about the bgp always-compare med, how two different ISP will interect with the various MED value for two different link?

and for AS path trial and error i didnt get you properly, whats that means? here i have two connection from two different ISP and i am prepending the AS number in one of the ISP link now how other ISP will have that information.... do both the ISP will exchange their routes? but i heared taht mostly ISP doesnot exchange their routes with each other

Amit Singh Mon, 06/04/2007 - 06:29
User Badges:
  • Cisco Employee,

Yes, If you have the connection from the same ISP, you will use MED to influence the traffic incoming in your network.

MED is not compared by default when you have connections from two different ISP. You can enable the AS path manipulation to prefer the incmoing traffic to your nrtwork. However Cisco implmentation allows you to set few " MED " commands that you can use to enable the incmoing traffic. Both the ISP's have to agree mutually to trust on the the MED Values. Please see the features used below:

To answer the second part of your questions, when you have to implement BGP using with two differnt ISP's, you have to have your own block of public IP addresses which will be provided by internet authority so that both the ISP's can advertise you network. Otherwise 1 ISP will not advertise the routes from other ISP, this will be a hole in ISP's cloud. Int his situtation when you have your own IP address range you can manipulate the AS PATH attribute when advertising the routes to the ISP and have your own prefreed ISP path setup.

HTH,Please rate if it does.

-amit singh

dangal.43 Mon, 06/04/2007 - 09:56
User Badges:

thanks amit,

so you mean to say is i can not have the addressing space from any of the ISP otherwise one will become tranist right!!! so i have to buy new range of IP address from IANA (not from ISP)is that correct?

and about MED, we are advertising MED for different link to different ISP, so we need to have always compare MED command on the ISP routers right??? so service providers will do that for us?

mohammedmahmoud Mon, 06/04/2007 - 10:43
User Badges:
  • Green, 3000 points or more

Hi Dan,

You have go it perfectly :), you'll need something called PI (Provider Independant) addresses (although there are work arounds but this is the best practice).

At the moment, there are 5 RIRs(Regional Internet Registries) which IANA delegates the registration of IPs and ASNs to: RIPE NCC, ARIN, APNIC, LACNIC and AfriNIC. LACNIC was only active from 2002 onwards. AfriNIC started its operations in February 2005.

IP address allocation is controlled by what are referred to as RIRs. Each RIR is responsible for a specific region of the world; there are currently 5 RIRs:

RIPE, the Europeans IP Networks.

AFRINIC, the African Internet Numbers Registry.

APNIC, the Asia Pacific Network Information Center.

ARIN, the American Registry for Internet Numbers.

LACNIC, the Latin American and Caribbean Internet Addresses Registry.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.

dangal.43 Mon, 06/04/2007 - 11:21
User Badges:

mohammed will you please clear the issue of MED?

mohammedmahmoud Mon, 06/04/2007 - 12:09
User Badges:
  • Green, 3000 points or more


I'll try to arrange the MED aspect:

The multi-exit discriminator (MED) or metric attribute is used as a suggestion to an external AS regarding the preferred route into the local AS that is advertising the metric. (it is used to influence the download to the local AS rather than the upload from the local AS).

MED is an optional non-transitive attribute. MED is a hint to external neighbors about the preferred path into an autonomous system (AS) that has multiple entry points. The MED is also known as the external metric of a route. A lower MED value is preferred over a higher value.

The MED attribute indicates (to an external peer) a preferred path into an autonomous system (local AS). If there are multiple entry points into an autonomous system, the MED (as if route metric) can be used to influence another autonomous system to choose one particular entry point (to the local AS). A metric is assigned where a lower MED metric is preferred by the software over a higher MED metric. The MED metric is exchanged between autonomous systems, but after a MED is forwarded into an autonomous system, the MED metric is reset to the default value of 0. When an update is sent to an internal BGP (iBGP) peer, the MED is passed along without any change, allowing all the peers in the same autonomous system to make a consistent path selection.

By default, a router will compare the MED attribute for paths only from BGP peers that reside in the same autonomous system. The bgp "always-compare-med" command can be configured to allow the router to compare metrics from peers in different autonomous systems. Example, for a customer specific network, if ISP 1 sets the MED to 100, and ISP 2 sets the MED to 200, both ISPs agree that ISP 1 has the preferred path to the network and thus both providers need to mutually agree on the MED values to be used.

HTH, please do rate all helpful replies,

Mohammed Mahmoud.


This Discussion