RE: Juniper vs. Cisco Med

From: Keegan.Holley@sungard.com
Date: Mon Mar 10 2008 - 15:31:29 ARST


 "Joseph Brunner" <joe@affirmedsystems.com>
Sent by: nobody@groupstudy.com
03/10/08 11:22 AM
Please respond to
"Joseph Brunner" <joe@affirmedsystems.com>

To
<Keegan.Holley@sungard.com>, "'Huan Pham'" <huan.pham@valuenet.com.au>
cc
"'Cisco certification'" <ccielab@groupstudy.com>
Subject
RE: Juniper vs. Cisco Med

>>I don't see how processing order would affect the routing decision.
>>Shouldn't the best route always win no matter when it enters the
decision
>>process?

>Keegan, I still remember how this works, how I tested in my lab, and
where I
>was when I read this same tech doc you posted last year.

>Read it again! It's clearly explained how group then comparing the meds
>effects the best route decision taken by bgp... you're making kibble into
K2

Care to elaborate oh great internetwork expert? I read it twice and still
don't get it..

I know I'm turning kibble into K2, but this is a list for network
engineers so I know I'm not the only one here who's a little anal when it
comes to this stuff. Besides, I try to avoid the phrase "I don't know"
whenever possible.

>When doing this process in your lab, don't forget to make the bgp routes
>unique (hence not subject to rib failure if those routes are carried by
>another protocol).

>-Joe

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Keegan.Holley@sungard.com
Sent: Monday, March 10, 2008 9:25 AM
To: Huan Pham
Cc: 'Cisco certification'
Subject: RE: Juniper vs. Cisco Med

The comparison between iBGP and eBGP comes after MED for both vendors. The

administrative distance comparison is last after BGP has MED it's decision

so it is technically moot. (AFAIK)
Also, I think both vendors will run the path selection process again when
the route disappears, since there may be another route in the BGP tables
but BGP doesn't choose "feasible successor" routes. I looked it up on
cisco dot com and found an example that is fundamentally the same as the
example in the JNCIS book and inaccurate as well (
http://www.cisco.com/warp/public/459/bgp-med.html#examp1 ) . Next, I
looked up the BGP deterministic command in the CCIE official exam
certification guide and it said that by default cisco processes routes
from newest to oldest. Deterministic-med overrides this behavior but it
didn't mention what the alternative was. I don't see how processing
order would affect the routing decision. Shouldn't the best route always
win no matter when it enters the decision process?

"Huan Pham" <huan.pham@valuenet.com.au>
Sent by: nobody@groupstudy.com
03/10/08 02:32 AM
Please respond to
"Huan Pham" <huan.pham@valuenet.com.au>

To
<Keegan.Holley@sungard.com>, "'Cisco certification'"
<ccielab@groupstudy.com>
cc

Subject
RE: Juniper vs. Cisco Med

Hi Keegan,

Just to add to my previous post, both Cisco & Juniper check MED before
eBGP/iBGP type. The only different is the way MED is implemented:
non-deterministic (Cisco) vs deterministic (Juniper) by default.

Cheers,
 
Huan

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Huan
Pham
Sent: Monday, 10 March 2008 3:45 PM
To: Keegan.Holley@sungard.com; 'Cisco certification'
Subject: RE: Juniper vs. Cisco Med

Hi Keegan,

The sort answer to your question is Cisco use non-deteministic MED by
default, whereas Juniper use deterministic MED.

My understanding is that admin distance is used to make route selection
from
DIFFERENT routing protocols. It is not used within a single routing
protocol. For BGP, the way that a route is learnt (ether via eBGP or iBGP)
is one of the criteria used in the route selection. It is not the admin
distance (20/200 by default) associated with it.

More on your question, by default Cisco use non-deterministic MED.

*MY* interpretation of this is that,

- Router does not compare MED for routes from different AS.
- Router may skip MED comparison (for route from same AS) if there is
route
leant from different AS.
- Router does not run BGP route-selection process again if one of the BGP
entries (which is not the best path) goes away

These behaviors (which may exclude MED comparison depending on the order
BGP
routes are learnt) may result in different route selection outcome.

My interpretation of "non-deterministic MED" might be wrong, and I would
like to hear feedback on this.

On the other hand, Juniper automatically groups advertisements from the
same
AS together to compare their MED values. The best value from each group is
then compared with each other using other route attributes.

So by default, Juniper implementation is different from Cisco. The Juniper
implementation is the same as if we add "bgp deterministic-med" command
under BGP.

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094934

.shtml

"Enabling bgp deterministic-med removes any temporal dependency of
MED-based
best path decisions. It ensures that an accurate MED comparison is made
across all routes received from the same autonomous system (AS).

If you disable bgp deterministic-med, the order in which routes are
received
may impact MED-based best path decisions. This can occur when the same
route
is received from multiple ASs or confederation sub-ASs, with exactly the
same path length, but different MEDs."

BTW, I happen to see another difference in the way Cisco and Juniper
implement BGP:

Cisco: Origin (IGP, EGP, Incomplete) is checked before AS path.
Juniper: AS path is checked before Origin.

Here' the way BGP route selection process takes place in Cisco vs Juniper

CISCO:
------

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

JUNIPER:
--------

The BGP route selection algorithm in the JUNOS software uses a
deterministic
set of steps
to select the active route for the routing table. This means that given
the
same set of route
attributes, the algorithm makes the same selection every time. The steps
of
the algorithm are
as follows:

1. The router first verifies that a current route exists in the inet.0
routing table that provides
reachability to the address specified by the Next Hop attribute. Should a
valid route not
exist, the path advertisement is not usable by the router and the route is
marked as hidden
in the routing table.

2. The router checks the Local Preference value and prefers all
advertisements with the highest
value. This is the only step in the algorithm that prefers a higher value
over a lower value.

3. The router evaluates the length of the AS Path attribute. A shorter
path
length is preferred
over a longer path length. When the attribute contains an AS Set segment,
designated by the
{ and } braces, this set of values is considered to have a length of 1.
For
example, the AS
Path of 65010 {65020 65030 65040} has a path length of 2.

4. The router checks the value in the Origin attribute. A lower Origin
value
is preferred over
a higher value.

5. The router checks the value of the MED attribute for routes advertised
from the same
neighboring AS. A lower MED value is preferred over a higher MED value.

6. The router checks the type of BGP peer the path advertisement was
learned
from. Advertisements
from EBGP peers are preferred over advertisements from IBGP peers.

7. The router determines the IGP metric cost to each BGP peer it received
a
path advertisement
from. Advertisements from the peer with the lowest IGP cost are preferred.
For all
IBGP advertisements, the router also selects a physical next hop (or
multiple next hops)
for the advertisements from the lowest-cost peer. These physical next hops
are selected
using the following criteria:
a. The router examines both the inet.0 and the inet.3 routing tables for
the
address of
the BGP Next Hop. The physical next hop(s) associated with the lowest
JUNOS
software
route preference is preferred. This often means that the router uses the
inet.3 version of
the next hop-a Multiprotocol Label Switching (MPLS)-label switched path.
b. Should the preference values in the inet.0 and the inet.3 routing
tables
be equal, the
router uses the physical next hop(s) of the instance in inet.3.
c. Should the preference values be identical and the routes be in the same
routing table,
inet.0 for example, the router evaluates the number of equal-cost paths of
each route
instance. The instance with the larger number of paths is preferred and
its
physical next
hops are installed. This situation might occur when the default preference
values are modified
and the traffic-engineering bgp-igp MPLS configuration command is used.

8. The router determines the length of the Cluster List attribute. A
shorter
list length is preferred
over a longer list length.

9. The router determines the router ID for each peer that advertised a
path
to the route destination.
A lower router ID value is preferred over a higher router ID value.

10. The router determines the peer ID for each peer that advertised a path
to the router destination.
A lower peer ID value is preferred over a higher peer ID value. The peer
ID
is the
IP address of the established BGP peering session.

Cheers,
 
Huan
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Keegan.Holley@sungard.com
Sent: Monday, 10 March 2008 10:35 AM
To: 'Cisco certification'
Subject: Juniper vs. Cisco Med

Hello all,

On page 336 - 337 of the JNCIS study guide it describes the portion of the

BGP route selection process pertaining to MED and then attempts to
describe the behavior of a cisco systems router in making the same
decision. The examples used are a little confusing. They use the same
three routes in both examples two coming from the same AS with differing
MED values and another coming from a different AS. With the Juniper method

the router choose the iBGP route with a lower MED. With the cisco method
the router chooses the eBGP route because eBGP is preferred. However, the
eBGP route is only preferred by the cisco router because of administrative

distance. The next decision in the path selection process of both vendors
is eBGP over iBGP, so Juniper router would have chosen the eBGP route as
well. My question is what is the difference between the cisco and juniper
treatment of MED?



This archive was generated by hypermail 2.1.4 : Tue Apr 01 2008 - 07:53:53 ART