July 2008


What are the ways of getting IP layer address e.g. ip address on an inteface using PPP without putting an IP address directly on an interface?

Scenario: Two routers connected back-to-back via serial inteface.

Dynamips config:

# Simple lab P2P via Serial
[localhost]
[[3640]]
idlepc= 0x604f96b4
image = \IOS\c3640-js-mz.124-19a\c3640-js-mz.124-19a.extracted.bin <<= edit this!
ram = 160
[[ROUTER R1]]
s1/0 = R2 s1/0
console = 2001
model = 3640
[[router R2]]
console = 2002
model = 3640

The following are the methods of geting this done:

1. IP unnumbered- can use HDLC, PPP on layer 2
2. Multilink PPP
3. PPP IPCP
4. PPP over Frame-Relay

Answers: Configs on next post.

This the “home-grown” back office lab and is on development stage. The FRS is a 7200 Vxr NPE-G1. I only have a DCE v.35 cable so I’m instead using real NTU (Terra Uno). The FRS has controller E1 8 port PA, connected back to back, I call this “Telco Power”.  For switching I setup 4 x 3550 switch.

My books have arrived but some them are out of stock from Cisco press.

NetMasterClass

NetMasterClass

I’m using Netmasterclass self-paced study. NMC have learning materials they call LEARNiT,  CIERSWB,  DOiT II,  Graded Labs,  CHECKiT,  Tech Library,  Written,  RoadMap. I reserved 10 graded labs (mock lab) to work on. I have not started any on these as of writing.

At first, I found it awkward in using NMC due to their “fancy” terminologies, but I’m getting use to it.

Their LearnIT Module has VODS for Frame-Relay, IPV6, Link-Layer Connectivity, IGP, BGP, Cat Qos.

I like the way they present these VOD’s because they chopped it to a 10-20 minutes chunks of vital information, also the presentations are focus to the subject matter.  Btw, I wonder why their BGP module is still incomplete, I need to email NMC on this.

I like much the Frame-Relay VOD, it is very well presented, still half way to go on these VODs. IPV6 have dynamips scenario, I am able to simulate the subject at hand.

Trying to eat this elephant of CCIE studies in chunks… using “horizontal approach” I can concentrate per topic basis. I do not proceed to the next topic until I feel very comfortable to each subject matter.

I dont like much some interface like the Drill-It because its not a real router telnet but on a mere webbased access to a recorded router, but I think I can get used to it. Overall NMC works fine for me, but I still have some ? in mind about their PORTAL.

Overall, NMC’s approach is very digestible to a student CCIE Pilot  like me, their teachings and approach is very practical and attainable.

It is now a matter of time on my flyt to CCIE.

My CCIE PILOT website  is now officially known at http://www.ccciepilot.com or http://cciepilot.com :-)

How to use Cisco’s Universal CD? Ask the Doctor.

I found this nice free material from InternetworkExpert.com.

Launch here: Cisco’s Documentation CD (Doc CD)

Thank you IE.

Catalyst 3560 Only Features [12.2(25)SEE2]

Access Switch Device Manager (SDM) Template
IEEE 802.3af Power over Ethernet
IGMP Throttling
IPv6 (Internet Protocol Version 6)

MLD Snooping

Private VLANs
QoS Policy Propagation via Border Gateway Protocol (QPPB)
VLAN-Based QoS on Physical Ports
SRR (Shaped Round Robin)
Weighted Tail Drop (WTD)
Auto-MDIX

3560 Only Commands [12.2(25)SEE2]

clear dot1x
clear eap
clear ipc
clear mac address-table move update
exception crashinfo
ipv6 access-list
ipv6 mld snooping
ipv6 mld snooping last-listener-query-count
ipv6 mld snooping last-listener-query-interval
ipv6 mld snooping listener-message-suppression
ipv6 mld snooping robustness-variable
ipv6 mld snooping tcn
ipv6 mld snooping vlan
ipv6 traffic-filter
ip vrf (global configuration)Not Documented
ip vrf (interface configuration)Not Documented
mdix auto
mls qos queue-set output buffers
mls qos queue-set output threshold
mls qos rewrite ip dscp
mls qos srr-queue input bandwidth
mls qos srr-queue input buffers
mls qos srr-queue input cos-map
mls qos srr-queue input dscp-map
mls qos srr-queue input priority-queue
mls qos srr-queue input threshold
mls qos srr-queue output cos-map
mls qos srr-queue output dscp-map
mls qos vlan-based
power inline consumption
renew ip dhcp snooping database
queue-set
radius-server dead-criteria
show cable-diagnostics tdr
show controllers power inline
show eap
show ipc
show ipv6 access-list
show ipv6 mld snooping
show ipv6 mld snooping address
show ipv6 mld snooping mrouter
show ipv6 mld snooping querier
show link state group
show mac address-table move update
show mls qos input-queue
show mls qos queue-set
show mls qos vlan
srr-queue bandwidth limit
srr-queue bandwidth shape
srr-queue bandwidth share
switchport mode private-vlan
switchport private-vlan
system env temperature threshold yellow
test cable-diagnostics tdr

3550 Only Commands [12.2(25)SEE2]

access-list hardware program nonblocking
boot buffersize
ip dhcp snooping information option format snmp-ifindex
ip igmp snooping source-only-learning age-timer
mls qos cos policy-map
mls qos min-reserve
show fm
show fm interface
show fm vlan
show forward
show tcam
show tcam pbr
show tcam qos
switchcore
wrr-queue bandwidth
wrr-queue cos-map
wrr-queue dscp-map
wrr-queue min-reserve
wrr-queue queue-limit
wrr-queue random-detect max-threshold
wrr-queue threshold

Additional Notes

3560 – IPv6 routing is not documented in the 3560 command reference
3560 – IPv6 QoS not supported as of 12.2(25)SEE2
3560 – The SDM needs to be changed to support IPv6 routing.  This will require a reload to take affect.  More…
3560 – Support for bits per second when using Storm Control
3560 – Ports are set by default to dynamic auto as opposed to dynamic desireable.  This means that two 3560′s will not automatically trunk but a 3560 will trunk if connected to a 3550. More…
3560 – The SMI image is now called IP Base and the EMI image is now called IP Services
3550 – IPv6 can be bridged using fallback bridging

My Ethernet Switching Lab

My Ethernet Switching Lab

Working for a telco is an advantage, I found these unused Cat 3550 in the office, got permission from the keeper and walla! My switching lab! I’m doing VTP, STP, MSTP, MLS, Qos, SVI, etc,etc on this. I also upgraded the IOS to EMI. I believe a key to success to CCIE is hand’s on and exposure. So I am exposing myself to the radiation of this equipment. Hehehe.

Lab Date: 21-Nov-2008
Location: Sydney
Lab Type: Routing and Switching
Payment Due Date: 24-Oct-2008

I have scheduled by laboratory exam above. I tried to get a schedule for Hong Kong but I cannot find a single available slots for November or December 2008. So my next options is either Tokyo or Sydney.

I have N-135 days. Tick tock….

Terminology:

AF – Assured forwarding

EF – Expedite Forwarding

BE – Best Effort

CS – Class Selector – use for backward compatibility with IP Precedence.

MPD – Mark Probability Denominator.

FIFO – First-In-First-Out

 

The number on the bracket ( x ) is the decimal equivalence of the AF or CS value.

 

Typical Classification Table:

 

Class-Map            Value

AF1x:                      ip dscp cs1 ( 8 ) af11 (10) af12 (12) af13 (14)

AF2x:                      ip dscp cs2 (16) af21 ( 18 ) af22 (20) af23 (22)

AF3x:                      ip dscp cs3 (24) af31 (26) af32 ( 28 ) af33 (30)

AF4x:                      ip dscp cs4 (32) af41 (34) af42 (36) af43 ( 38 )

EF/Prec 5:             ip dscp cs5 (40) ef (46)

  

You don’t need for memorize the conversion of AFx / CSx value to its decimal equivalent. There is a formula on how it arrived. Let’s do some basic math.

 

Formula for AF:

 

Given: AFxy

Let x = first digit [1 -4 ]

Let y = second digit [1 -3]

Decimal Value = 8x +2y

 

Formula for CS = 8y

EF = always = 46.

 

Sample:

 

AF43 : x=4 , 3=y;

Decimal Value = 8x +2y

Decimal Value = 8(4) + 2(3)

Decimal Value = 32 + 6

Decimal Value = 38

 

Sample 2:

 

CS1 =   8y    =       8

CS2 =   8(2) =       16

 

How get the value to be used for the extended ping test:

Examples:

 Decimal Value = 38 =  100110 in binary

                 Then 100110 + “00”  = 10011000

10011000 convert back to decimal becomes 152.

 

 Decimal Value = 46 = 101110 binary

 Then 101110 + “00”  = 10111000

                 10111000 convert back to decimal becomes 184.

 

 

1.       Once you get the decimal value, open your scientific calculator (windows – calc.exe will do )

2.       Input the decimal value, convert to binary, then add two zeros “00”

3.       Convert back to decimal. Here you get the actually value to be used for you extended ping test.

 

 

Based on our classification above we use  5 queue only  to make classification not to complicated. Let call the the “ETM” Enhanced Traffic Marking.

 

Also per bucket or class we do WRED (weighted random early detection) based on DSCP. Also configured with MPD = 1, means 100 drop rate  once the maximum threshold is reach.

 

In the ERA of MPLS, a mere packet loss on our ping test does not  give a direct conclusion of a dirty line or circuit. We should always check each QoS queue and see if this taking violations, remarked or even drops.

 

You can use this command in looking for the values you need.

 

show policy-map interface [Interface-Name] output  | i op|ass|ark|form|iola

show policy-map interface [Interface-Name] input |  | i op|ass|ark|form|iola

 

 On this case you can see a  Qos in action. As you can follow logs below, we did a ping test on the EF queue (Decimal 184) and we see a packet drops. This is because the output queue is already congested.

 

While pinging at BE marked ping packets (0) value we see a vey clean sweet ping results.

 

This will conclude that the issue is not on the circuit, meaning , ckt must be error free and clean. The problem is the congestion of traffic class. Btw, within a class scheduling used is FIFO.

  

Router Logs:

 

Ping test using BE:

 

MPLS-Router-1>ping vrf VPN-CustomerA 19.25.19.25 repeat 1000 size 1400

 

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Snip…

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/2/24 ms

  

Ping test using EF Queue:

 

MPLS-Router-1>ping vrf VPN-CustomerA

Protocol [ip]:

Target IP address: 19.25.19.25

Repeat count [5]: 1000

Datagram size [100]: 1400  <<<<<<<<<<<<<<<- Large packet size

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

Type of service [0]: 184  <<<<<<<<<<<<<<<- EF- Marked ICMP Packet

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!.!!!!.!!!!.!!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.

Snip….

!!.!!!!.!!!!.!!!!.!!!!.!!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!!.!!

Success rate is 76 percent (769/1000), round-trip min/avg/max = 1/1/224 ms

MPLS-Router-1>ping vrf VPN-CustomerA

Protocol [ip]:

Target IP address: 19.25.19.25

Repeat count [5]: 1000

Datagram size [100]: 1400

Timeout in seconds [2]:

Extended commands [n]: y

Source address or interface:

Type of service [0]: 136  <<<<<<<<<<<<- af41 (34) marked ICMP

Set DF bit in IP header? [no]:

Validate reply data? [no]:

Data pattern [0xABCD]:

Loose, Strict, Record, Timestamp, Verbose[none]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000, 1400-byte ICMP Echos to 19.25.19.25, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Snip….

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!

Success rate is 100 percent (1000/1000), round-trip min/avg/max = 1/2/20 ms

MPLS-Router-1>

 

Input Policy is clean, no drops on the EF queue.

 

MPLS-Router-1>sh policy-map interface  Serial1/0/0.20892 in 

 

 Serial1/0/0.20892

 

  Service-policy input: INPUT-POLICY

 

    Class-map: EF(match-any)

      26677343 packets, 1708347477 bytes

      5 minute offered rate 68000 bps, drop rate 0 bps

      Match: ip dscp cs5 (40) ef (46)

        26677343 packets, 1708347477 bytes

        5 minute rate 68000 bps

      Police:

        256000 bps, 32000 limit, 32000 extended limit

        conformed 26676976 packets, 1708323989 bytes; action: set-mpls-exp-transmit 5

        exceeded 0 packets, 0 bytes; action: set-mpls-exp-transmit 5

        violated 0 packets, 0 bytes; action: drop

 

    Class-map: AF4x(match-any)

      4744649 packets, 2171531130 bytes

      5 minute offered rate 4000 bps, drop rate 0 bps

      Match: ip dscp cs4 (32) af41 (34) af42 (36) af43 (38)

        4744649 packets, 2171531130 bytes

        5 minute rate 4000 bps

      QoS Set

        mpls experimental imposition 4

          Packets marked 4744649

 

    Class-map: AF3x(match-any)

      28039 packets, 5503914 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: ip dscp cs3 (24) af31 (26) af32 (28) af33 (30)

        11407 packets, 4611124 bytes

        5 minute rate 0 bps

      Match: ip dscp cs6 (48) cs7 (56)

        16632 packets, 892790 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 3

          Packets marked 28039

 

    Class-map: AF2x(match-any)

      2664905 packets, 867531648 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

        2664905 packets, 867531648 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 2

          Packets marked 2664905

 

    Class-map: BE(match-any)

      1473520 packets, 219300011 bytes

      5 minute offered rate 3000 bps, drop rate 0 bps

      Match: ip precedence 0  1  2  3

        1473520 packets, 219300011 bytes

        5 minute rate 3000 bps

      Match: ip precedence 4  5  6  7

        0 packets, 0 bytes

        5 minute rate 0 bps

      QoS Set

        mpls experimental imposition 0

          Packets marked 1473520

 

    Class-map: class-default (match-any)

      0 packets, 0 bytes

      5 minute offered rate 0 bps, drop rate 0 bps

      Match: any

        0 packets, 0 bytes

        5 minute rate 0 bps

 

 

MPLS-Router-1>sh policy-map interface Serial1/0/0.20892 out

 

 Serial1/0/0.20892

 

  Service-policy output: NESTED-PE-CE-6K

 

    Class-map: class-default (match-any)

      36751759 packets, 8673566210 bytes

      5 minute offered rate 155000 bps, drop rate 0 bps

      Match: any

        0 packets, 0 bytes

        5 minute rate 0 bps

      Output queue: 0/128; 0/0 packets/bytes output, 0/0 drops

      Shape : 6092 kbps

 

      Service-policy : OUT-POLICY

 

        Class-map: EF(match-any)

          26002327 packets, 1665771828 bytes

          5 minute offered rate 68000 bps, drop rate 0 bps

          Match: ip dscp cs5 (40) ef (46)

            26002327 packets, 1665771828 bytes

            5 minute rate 68000 bps

      Output queue: 0/256; 26002327/1665723508 packets/bytes output, 0/0 drops

          Absolute priority

          Police:

            3048000 bps, 9525 limit, 0 extended limit

            conformed 26001319 packets, 1665666996 bytes; action: transmit

            exceeded 0 packets, 0 bytes; action: transmit

            violated 29 packets, 42176 bytes; action: drop

 

        Class-map: AF4x(match-any)

          3748257 packets, 2208700671 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs4 (32) af41 (34) af42 (36) af43 (38)

            3748257 packets, 2208700671 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 3735280/2190803028 packets/bytes output, 12977/17941551 drops

      Bandwidth : (Weight 40)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 32   171   500      1/1         0          0          0          0

                 34   171   500      1/1         0          0          0          0

                 36    52   171      1/1     12977   17941551          0          0

                 38    52   171      1/1         0          0          0          0

            Default   256   512      1/10             0          0          0          0

 

        Class-map: AF3x(match-any)

          2107826 packets, 1588258194 bytes

          5 minute offered rate 92000 bps, drop rate 0 bps

          Match: ip dscp cs3 (24) af31 (26) af32 (28) af33 (30)

            2090633 packets, 1587146544 bytes

            5 minute rate 92000 bps

          Match: ip dscp cs6 (48) cs7 (56)

            17193 packets, 1111650 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 2107827/1588123702 packets/bytes output, 0/0 drops

      Bandwidth : (Weight 39)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 24   250   500      1/1         0          0          0          0

                 26   250   500      1/1         0          0          0          0

                 28    52   250      1/1         0          0          0          0

                 30    52   250      1/1         0          0          0          0

                 48   511   512      1/10        0          0          0          0

                 56   511   512      1/10        0          0          0          0

            Default   256   512      1/10             0          0          0          0

 

        Class-map: AF2x(match-any)

          1599388 packets, 1526755319 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs2 (16) af21 (18) af22 (20) af23 (22)

            1599388 packets, 1526755319 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 1599343/1526694011 packets/bytes output, 45/61488 drops

      Bandwidth : (Weight 16)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 18   171   500      1/1         0          0          0          0

                 20    52   171      1/1         0          0          0          0

                 22    52   171      1/1        45      61488          0          0

            Default   171   500      1/1              0          0          0          0

 

        Class-map: dscp_AF1x_ipprec_1_6Qs (match-any)

          0 packets, 0 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip dscp cs1 (8) af11 (10) af12 (12) af13 (14)

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 0/0 packets/bytes output, 0/0 drops

      Bandwidth : (Weight 1)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

                 10   171   500      1/1         0          0          0          0

                 12    52   171      1/1         0          0          0          0

                 14    52   171      1/1         0          0          0          0

            Default   171   500      1/1              0          0          0          0

 

        Class-map: BE(match-any)

          3293961 packets, 1684080198 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: ip precedence 0  1  2  3

            3293961 packets, 1684080198 bytes

            5 minute rate 0 bps

          Match: ip precedence 4  5  6  7

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/1024; 3293710/1683786046 packets/bytes output, 251/286996 drops

      Bandwidth : (Weight 4)

          Random-detect (DSCP-based):

            Exponential weight: 9 (1/512)

            Current average queue length: 0 packets

            ———————————————————————–

            Diff-Serv   Min   Max    Mark           Rand-Drop          Tail-Drop

            codepoint  thres  thres  probability  Pkts     Bytes    Pkts      Bytes

            ———————————————————————–

            Default   171   500      1/1            251     286996          0          0

 

        Class-map: class-default (match-any)

          0 packets, 0 bytes

          5 minute offered rate 0 bps, drop rate 0 bps

          Match: any

            0 packets, 0 bytes

            5 minute rate 0 bps

      Output queue: 0/128; 0/0 packets/bytes output, 0/0 drops

MPLS-Router-1>  end

Today I pass the CCIE Written Exam 350-001.  I’m now officially a “CCIE Candidate”.

Some questions were tough and tricky,  but some were “easy”. The exam would able you click the “back” button. Questions can be reviewed and marked after answering. It was a 105 question exam.  I only got 91.

Next stop is to schedule the BIG DAY!: https://tools.cisco.com/CCIE/Schedule_Lab/CCIEOnline/jsp/UpdateProfile_Form.jsp

I plan to take my first LAB attempt  by end of October 2008. (Soft Deadline)

My calvary officially starts today!

I have been using BGP for 8 years now, but still I cannot do 100% memorized all details of the best path selection rule. Below is the short cut to perfection for BGP Path best path selection criteria.

If Next Hop not accessible drop the update!

We                 – Weight (Highest)
Love               – Local Pref (Highest)
Oranges         – Originated by BGP – this router! – network statement
AS                  – AS Path (shortest)
Oranges         – Origin Code i<e<?
Means            – MED (lowest)
Pure               – Path – to closest IGP Neighbor
Refresment    – Router ID (lowest)

We Love Oranges AS Orages Means Pure Refrement.

MTTR = 1 / Morale

Explanation:

MTTR is inversely proportional to Morale

If Morale is higher, then MTTR is lower or

If MTTR is lower, then Morale is higher.

MORALE: http://en.wikipedia.org/wiki/Morale

Morale, also known as esprit de corps when discussing the morale of a group, is an intangible term used for the capacity of people to maintain belief in an institution or a goal, or even in oneself and others.

MTTR: http://en.wikipedia.org/wiki/Mean_time_to_repair

MTTR is the average time that a system, device, link, network will take to recover from any failure.

A basic 802.1x configuration consists of the following:

Switch(config)# aaa new-model
Switch(config)# aaa authentication dot1x default group radius
Switch(config)# dot1x system-auth-control
Switch(config)# interface fastethernet0/10
Switch(config-if)# switchport mode access
Switch(config-if)# dot1x port-control auto

The configuration shown in the Exhibit results in 802.1x authentication against the configured RADIUS server.

More Information

802.1x Authentication

There are two BGP configuration commands that can influence the MED-based path selection, the bgp deterministic-med and the bgp always-compare-med commands.

Enabling the bgp deterministic-med command ensures the comparison of the MED variable when choosing routes advertised by different peers in the same autonomous system. Enabling the bgp always-compare-med command ensures the comparison of the MED for paths from neighbors in different autonomous systems. The bgp always-compare-med command is useful when multiple service providers or enterprises agree on a uniform policy for setting MED. Thus, for network X, if Internet Service Provider A (ISP A) sets the MED to 10, and ISP B sets the MED to 20, both ISPs agree that ISP A has the better performing path to X.

These two often commonly misunderstood. Read on for clarification.

Source: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094925.shtml