Showing posts with label BGP. Show all posts
Showing posts with label BGP. Show all posts

Saturday, 26 July 2025

Overview of BGP Aggregation

BGP route aggregation is a powerful feature that helps reduce the size of routing tables by summarizing multiple specific routes into a single, broader route. This is especially useful in large-scale networks where route optimization and scalability are critical.

In Cisco IOS, the aggregate-address command provides flexible options to control how and when summary routes are advertised. Whether you're looking to advertise only the summary, retain specific routes, or apply custom attributes, this command gives you granular control over BGP route announcements.

By default, when you use the aggregate-address command, the router advertises both the aggregate route and the more specific routes that fall under it

Let’s dive in and understand how each option can be used to fine-tune your BGP advertisements.

  1. as-set

  • Purpose: Includes the AS numbers of the contributing routes in the AS path of the aggregate.
  • Use Case: When you want to preserve AS path information for loop prevention or policy decisions.
  • Effect: The aggregate route will have an AS_SET attribute, which is a list of AS numbers from the contributing routes.

2. summary-only

  • Purpose: Suppresses the advertisement of the more specific routes.
  • Use Case: When you want to advertise only the summarized route and hide the specifics.
  • Effect: Only the aggregate route is advertised; specific routes are not sent to BGP peers.

3. suppress-map <map-name>

  • Purpose: Selectively suppress specific routes from being advertised.
  • Use Case: When you want to suppress some specific prefixes but still advertise others along with the aggregate.
  • Effect: Routes matching the route-map are suppressed; others are advertised.

4. advertise-map <map-name>

  • Purpose: Controls which specific routes are used to generate the aggregate.
  • Use Case: When you want the aggregate to be created only if certain routes exist.
  • Effect: Aggregate is advertised only if routes matching the map are present in the BGP table.

5. attribute-map <map-name>

  • Purpose: Applies specific BGP attributes to the aggregate route.
  • Use Case: When you want to set attributes like MED, community, or local preference on the aggregate.
  • Effect: The aggregate route inherits attributes defined in the route-map.

 


Wednesday, 17 June 2020

BGP: x.x.x.x Active open failed - no route to peer, open active delayed 9216ms (35000ms max, 60% jitter)


BGP: x.x.x.x Active open failed - no route to peer, open active delayed 9216ms (35000ms max, 60% jitter)


I was working on an issue and got above logs while doing the debug of BGP on the cisco router.

Below are the two thing which we need to test to resolve such issues.

1. Specific route for the BGP neighbor IP address. BGP neighborship is dependent on it and default route won't work.

2. Ebgp multihop. Make sure to configure the eBGP multihop command while making the ebgp neighborship on the indirectly connected routers.

Saturday, 13 May 2017

BGP - Path Selection Criteria


Below is the BGP path selection criteria.

1.       Highest Weight
2.       Highest local preference
3.       Locally generated routes
4.       Shortest AS Path
5.      Origin Code
6.    Lowest MED
7.       eBGP over iBGP
8.       Lowest IGP metric to the BGP next hop.
9.       Oldest Route in case of ebgp
10.   BGP router with the lowest router ID.
11.   Minimum cluster id
12.   Lowest neighbor address.

Sunday, 7 May 2017

Weight attribute - BGP

Below are the characteristics of weight:-

1.       Manipulate Outgoing traffic
2.       Cisco Proprietary
3.       Only applicable when two exit points are on single router.
4.       Never advertise out from router and will remain local to router.
5.       Higher is preferred
6.       Range is 0 – 65535.
7.       When using Route-map to manipulate weight then it cannot be applied in Outgoing direction as shown below. It has to be in inbound direction.
          
            R1(config-router)#neighbor 13.13.13.3 route-map SET_WEIGHT out
                % "SET_WEIGHT" used as BGP outbound route-map, set weight not supported


In below configuration example, R1 is having two paths to reach to 20.1.1.x subnet and best path is from R2 i.e. 12.12.12.2. We want to change the outgoing traffic from R1 to R3 by increasing the weight of R3 neighbor but remember it will not manipulate the incoming traffic. It will change the outgoing traffic directions only,



Weight will change the path for 20.1.1.x from R2 to R3.


R1:-

interface Loopback0
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet0/0
 description " Connected to R2"
 ip address 12.12.12.1 255.255.255.0
no shut

interface FastEthernet0/1
 description " Connected to R3"
 ip address 13.13.13.1 255.255.255.0
 no shut

interface FastEthernet2/0
 description " Connected to PC1"
 ip address 10.1.1.1 255.255.255.0
no shut

router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 10.1.1.0 mask 255.255.255.0
 neighbor 12.12.12.2 remote-as 1

 neighbor 13.13.13.3 remote-as 1

Without Weight configured.

R1#sh ip bgp
BGP table version is 3, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      0.0.0.0                  0         32768 i
* i20.1.1.0/24      13.13.13.3               0    100      0 2 i

*>i                 12.12.12.2               0    100      0 2 I  \\Route Via R2 is preferred without weight


With Weight configured.

Weight can be set using any of the below methods:-

Option A:-

router bgp 1
neighbor 13.13.13.3 weight 100

OR

Option B:-  It is more flexible as in here we can apply weight on specific routes as well by calling an Prefix-list or access-list that matches the routes under Route map.

router bgp 1
neighbor 13.13.13.3 route-map SET_WEIGHT in

route-map  SET_WEIGHT
set weight 100

R1#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      0.0.0.0                  0         32768 i
*>i20.1.1.0/24      13.13.13.3               0    100    100 2 I   \\Above configured weight has changed the path


* i                 12.12.12.2               0    100      0 2 i

R2:-

interface Loopback0
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0
 description " Connected to R1"
 ip address 12.12.12.2 255.255.255.0
no shut

interface FastEthernet1/0
 description " Connected to R5"
 ip address 25.25.25.2 255.255.255.0
 no shut

router bgp 1
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 12.12.12.1 remote-as 1
 neighbor 12.12.12.1 next-hop-self
 neighbor 25.25.25.5 remote-as 2

R3:-

interface Loopback0
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/1
description " Connected to R1"
 ip address 13.13.13.3 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R4"
 ip address 34.34.34.3 255.255.255.0
no shut

router bgp 1
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 13.13.13.1 remote-as 1
 neighbor 13.13.13.1 next-hop-self
 neighbor 34.34.34.4 remote-as 2
 no auto-summary
!

R4:-

interface FastEthernet0/1
description " Connected to R6"
 ip address 46.46.46.4 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R3"
 ip address 34.34.34.4 255.255.255.0
no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 34.34.34.3 remote-as 1
 neighbor 46.46.46.6 remote-as 2
 neighbor 46.46.46.6 next-hop-self
 no auto-summary
!
R5:-

interface Loopback0
 ip address 5.5.5.5 255.255.255.255

interface FastEthernet0/0
description " Connected to R6"
 ip address 56.56.56.5 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R2"
 ip address 25.25.25.5 255.255.255.0
no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 25.25.25.2 remote-as 1
 neighbor 56.56.56.6 remote-as 2
 neighbor 56.56.56.6 next-hop-self
 no auto-summary


R6:-

interface Loopback0
 ip address 6.6.6.6 255.255.255.255

interface FastEthernet0/0
description " Connected to R5"
 ip address 56.56.56.6 255.255.255.0
no shut

interface FastEthernet0/1
description " Connected to R4"
 ip address 46.46.46.6 255.255.255.0
no shut

interface FastEthernet2/0
description " Connected to PC2"
 ip address 20.1.1.1 255.255.255.0
 no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 20.1.1.0 mask 255.255.255.0
 neighbor 46.46.46.4 remote-as 2
 neighbor 56.56.56.5 remote-as 2
 no auto-summary

PC1:-

PC1> show ip

NAME        : PC1[1]
IP/MASK     : 10.1.1.10/24
GATEWAY     : 10.1.1.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10003
RHOST:PORT  : 127.0.0.1:10002
MTU:        : 1500

PC2:-
PC2> show ip

NAME        : PC2[1]
IP/MASK     : 20.1.1.10/24
GATEWAY     : 20.1.1.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10003
RHOST:PORT  : 127.0.0.1:10002
MTU:        : 1500


Verification:-

R2:-

R2#sh ip bgp summ
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 3, main routing table version 3
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4            1     316     317        3    0    0 04:41:15        1
25.25.25.5      4            2     312     313        3    0    0 04:41:10        1

R2#sh ip bgp
BGP table version is 3, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      12.12.12.1               0    100      0 i
*> 20.1.1.0/24      25.25.25.5                             0 2 i


R3:-

R3#sh ip bgp summ
BGP router identifier 3.3.3.3, local AS number 1
BGP table version is 3, main routing table version 3
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
13.13.13.1      4            1     318     314        3    0    0 04:41:25        1
34.34.34.4      4            2     312     316        3    0    0 04:41:21        1

R3#sh ip bgp
BGP table version is 3, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      13.13.13.1               0    100      0 i
*> 20.1.1.0/24      34.34.34.4                             0 2 i


R4:-

R4#sh ip bgp summ
BGP router identifier 4.4.4.4, local AS number 2
BGP table version is 4, main routing table version 4
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
34.34.34.3      4            1     323     319        4    0    0 04:47:19        1
46.46.46.6      4            2     321     320        4    0    0 04:47:20        1

R4#sh ip bgp
BGP table version is 4, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      34.34.34.3                             0 1 i
*>i20.1.1.0/24      46.46.46.6               0    100      0 i
R4#

R5:-

R5#sh ip bgp summ
BGP router identifier 5.5.5.5, local AS number 2
BGP table version is 3, main routing table version 3
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 2/0 prefixes, 2/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
25.25.25.2      4            1     321     320        3    0    0 04:47:42        1
56.56.56.6      4            2     319     320        3    0    0 04:47:43        1

R5#sh ip bgp
BGP table version is 3, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      25.25.25.2                             0 1 i
*>i20.1.1.0/24      56.56.56.6               0    100      0 i
R5#
R6:-

R6#sh ip bgp summ
BGP router identifier 6.6.6.6, local AS number 2
BGP table version is 4, main routing table version 4
2 network entries using 256 bytes of memory
3 path entries using 156 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 684 total bytes of memory
BGP activity 2/0 prefixes, 3/0 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
46.46.46.4      4            2     321     322        4    0    0 04:48:27        1
56.56.56.5      4            2     320     319        4    0    0 04:48:28        1
R6#sh ip bgp
BGP table version is 4, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      46.46.46.4               0    100      0 1 i
* i                 56.56.56.5               0    100      0 1 i
*> 20.1.1.0/24      0.0.0.0                  0         32768 i
R6#

PC1:-

PC1> trace 20.1.1.10
trace to 20.1.1.10, 8 hops max, press Ctrl+C to stop
 1   10.1.1.1   40.000 ms  10.000 ms  10.000 ms
 2   13.13.13.3   30.000 ms  30.000 ms  30.000 ms
 3   34.34.34.4   50.000 ms  50.000 ms  50.000 ms
 4   46.46.46.6   90.000 ms  80.000 ms  70.000 ms
 5   *20.1.1.10   150.000 ms (ICMP type:3, code:3, Destination port unreachable)


PC2:-

PC2> trace 10.1.1.10
trace to 10.1.1.10, 8 hops max, press Ctrl+C to stop
 1   20.1.1.1   10.000 ms  10.000 ms  10.000 ms
 2   46.46.46.4   30.000 ms  30.000 ms  30.000 ms
 3   34.34.34.3   40.000 ms  50.000 ms  50.000 ms
 4   13.13.13.1   60.000 ms  60.000 ms  60.000 ms
 5   *10.1.1.10   70.000 ms (ICMP type:3, code:3, Destination port unreachable)



Wednesday, 3 May 2017

BGP Attribute - MED

In the below topology, Traffic is asymmetric as outgoing taffic from R1 is going via R2 -> R5 ->R6 whereas
Incoming traffic is coming from R6-> R4 ->R3->R1




To remove asymmetric routing, we need to manipulate the incoming traffic. MED is used on R3 so that R6 will always prefer the path from R5




R1:-

interface Loopback0
 ip address 1.1.1.1 255.255.255.255

interface FastEthernet0/0
 description " Connected to R2"
 ip address 12.12.12.1 255.255.255.0
no shut

interface FastEthernet0/1
 description " Connected to R3"
 ip address 13.13.13.1 255.255.255.0
 no shut

interface FastEthernet2/0
 description " Connected to PC1"
 ip address 10.1.1.1 255.255.255.0
no shut

router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 10.1.1.0 mask 255.255.255.0
 neighbor 12.12.12.2 remote-as 1
 neighbor 13.13.13.3 remote-as 1



R2:-

interface Loopback0
 ip address 2.2.2.2 255.255.255.255

interface FastEthernet0/0
 description " Connected to R1"
 ip address 12.12.12.2 255.255.255.0
no shut

interface FastEthernet1/0
 description " Connected to R5"
 ip address 25.25.25.2 255.255.255.0
 no shut

router bgp 1
 no synchronization
 bgp router-id 2.2.2.2
 bgp log-neighbor-changes
 neighbor 12.12.12.1 remote-as 1
 neighbor 12.12.12.1 next-hop-self
 neighbor 25.25.25.5 remote-as 2

R3:-

interface Loopback0
 ip address 3.3.3.3 255.255.255.255

interface FastEthernet0/1
description " Connected to R1"
 ip address 13.13.13.3 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R4"
 ip address 34.34.34.3 255.255.255.0
no shut

router bgp 1
 no synchronization
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 13.13.13.1 remote-as 1
 neighbor 13.13.13.1 next-hop-self
 neighbor 34.34.34.4 remote-as 2
 no auto-summary

configured MED:-

router bgp 1
neighbor 34.34.34.4 route-map SET_MED out

route-map SET_MED permit 10
 set metric 500

R4:-

interface FastEthernet0/1
description " Connected to R6"
 ip address 46.46.46.4 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R3"
 ip address 34.34.34.4 255.255.255.0
no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 34.34.34.3 remote-as 1
 neighbor 46.46.46.6 remote-as 2
 neighbor 46.46.46.6 next-hop-self
 no auto-summary

R5:-

interface Loopback0
 ip address 5.5.5.5 255.255.255.255

interface FastEthernet0/0
description " Connected to R6"
 ip address 56.56.56.5 255.255.255.0
no shut

interface FastEthernet1/0
description " Connected to R2"
 ip address 25.25.25.5 255.255.255.0
no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 25.25.25.2 remote-as 1
 neighbor 56.56.56.6 remote-as 2
 neighbor 56.56.56.6 next-hop-self
 no auto-summary


R6:-

interface Loopback0
 ip address 6.6.6.6 255.255.255.255

interface FastEthernet0/0
description " Connected to R5"
 ip address 56.56.56.6 255.255.255.0
no shut

interface FastEthernet0/1
description " Connected to R4"
 ip address 46.46.46.6 255.255.255.0
no shut

interface FastEthernet2/0
description " Connected to PC2"
 ip address 20.1.1.1 255.255.255.0
 no shut

router bgp 2
 no synchronization
 bgp log-neighbor-changes
 network 20.1.1.0 mask 255.255.255.0
 neighbor 46.46.46.4 remote-as 2
 neighbor 56.56.56.5 remote-as 2
 no auto-summary

PC1:-

PC1> show ip

NAME        : PC1[1]
IP/MASK     : 10.1.1.10/24
GATEWAY     : 10.1.1.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10003
RHOST:PORT  : 127.0.0.1:10002
MTU:        : 1500

PC2:-
PC2> show ip

NAME        : PC2[1]
IP/MASK     : 20.1.1.10/24
GATEWAY     : 20.1.1.1
DNS         :
MAC         : 00:50:79:66:68:00
LPORT       : 10003
RHOST:PORT  : 127.0.0.1:10002
MTU:        : 1500

Verification:-

R1:-

Without AS Prepend:-

R1#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, FastEthernet2/0
L        10.1.1.1/32 is directly connected, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet0/1
L        13.13.13.1/32 is directly connected, FastEthernet0/1
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 12.12.12.2, 00:10:52  //best path is selected as per selection criteria, lowest router ID.

R1#sh ip bgp summ
BGP router identifier 1.1.1.1, local AS number 1
BGP table version is 18, main routing table version 18
2 network entries using 256 bytes of memory
3 path entries using 156 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 684 total bytes of memory
BGP activity 3/1 prefixes, 9/6 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.2      4            1      84      83       18    0    0 01:11:37        1
13.13.13.3      4            1     192     187       18    0    0 02:47:10        1

R1#sh ip bgp neighbors | in router
  BGP version 4, remote router ID 2.2.2.2
  BGP version 4, remote router ID 3.3.3.3
R1#

With MED:-

R1#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      1.0.0.0/32 is subnetted, 1 subnets
C        1.1.1.1 is directly connected, Loopback0
      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.1.1.0/24 is directly connected, FastEthernet2/0
L        10.1.1.1/32 is directly connected, FastEthernet2/0
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.1/32 is directly connected, FastEthernet0/0
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet0/1
L        13.13.13.1/32 is directly connected, FastEthernet0/1
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 12.12.12.2, 00:37:25    \\No change in outgoing traffic

R2:-

Without MED

R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 1
BGP table version is 5, main routing table version 5
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 11/9 prefixes, 11/9 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
12.12.12.1      4            1     509     517        5    0    0 07:39:45        1
25.25.25.5      4            2     522     525        5    0    0 07:50:54        1

R2#sh ip bgp
BGP table version is 5, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      12.12.12.1               0    100      0 i
*> 20.1.1.0/24      25.25.25.5                             0 2 i


R2#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 12.12.12.1, 07:39:52
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.2/32 is directly connected, FastEthernet0/0
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [20/0] via 25.25.25.5, 07:50:04
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.2/32 is directly connected, FastEthernet1/0
R2#

With MED:-

R2#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
C        2.2.2.2 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 12.12.12.1, 08:00:35
      12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        12.12.12.0/24 is directly connected, FastEthernet0/0
L        12.12.12.2/32 is directly connected, FastEthernet0/0
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [20/0] via 25.25.25.5, 08:10:47
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.2/32 is directly connected, FastEthernet1/0

R3:-

Without MED

R3#sh ip bgp su
BGP router identifier 3.3.3.3, local AS number 1
BGP table version is 3, main routing table version 3
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 5/3 prefixes, 5/3 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
13.13.13.1      4            1      30      33        3    0    0 00:23:58        1
34.34.34.4      4            2      31      32        3    0    0 00:23:58        1

R3#sh ip bgp
BGP table version is 3, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      13.13.13.1               0    100      0 i
*> 20.1.1.0/24      34.34.34.4                             0 2 i

R3#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 13.13.13.1, 00:23:03
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet0/1
L        13.13.13.3/32 is directly connected, FastEthernet0/1
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [20/0] via 34.34.34.4, 00:23:03
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet1/0
L        34.34.34.3/32 is directly connected, FastEthernet1/0

With MED:-

R3#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 13.13.13.1, 00:43:14
      13.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        13.13.13.0/24 is directly connected, FastEthernet0/1
L        13.13.13.3/32 is directly connected, FastEthernet0/1
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [20/0] via 34.34.34.4, 00:43:14
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet1/0
L        34.34.34.3/32 is directly connected, FastEthernet1/0

R4:-

Without MED

R4#sh ip bgp summ
BGP router identifier 4.4.4.4, local AS number 2
BGP table version is 9, main routing table version 9
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 4/2 prefixes, 4/2 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
34.34.34.3      4            1      33      32        9    0    0 00:24:21        1
46.46.46.6      4            2     609     618        9    0    0 09:12:16        1

4#sh ip bgp
BGP table version is 9, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      34.34.34.3                             0 1 i
*>i20.1.1.0/24      46.46.46.6               0    100      0 i

R4#sh ip rou
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [20/0] via 34.34.34.3, 00:18:39
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 46.46.46.6, 09:07:54
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet1/0
L        34.34.34.4/32 is directly connected, FastEthernet1/0
      46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        46.46.46.0/24 is directly connected, FastEthernet0/1
L        46.46.46.4/32 is directly connected, FastEthernet0/1
R4#

With MED:-

R4#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      4.0.0.0/32 is subnetted, 1 subnets
C        4.4.4.4 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [20/500] via 34.34.34.3, 00:04:15
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 46.46.46.6, 09:51:26
      34.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        34.34.34.0/24 is directly connected, FastEthernet1/0
L        34.34.34.4/32 is directly connected, FastEthernet1/0
      46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        46.46.46.0/24 is directly connected, FastEthernet0/1
L        46.46.46.4/32 is directly connected, FastEthernet0/1

R4#sh ip bgp
BGP table version is 12, local router ID is 4.4.4.4
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      34.34.34.3             500             0 1 i
*>i20.1.1.0/24      46.46.46.6               0    100      0 i

R5:-

Without MED

R5#sh ip bgp sum
BGP router identifier 5.5.5.5, local AS number 2
BGP table version is 13, main routing table version 13
2 network entries using 256 bytes of memory
2 path entries using 104 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 632 total bytes of memory
BGP activity 7/5 prefixes, 7/5 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
25.25.25.2      4            1     527     524       13    0    0 07:52:40        1
56.56.56.6      4            2     614     616       13    0    0 09:12:04        1
R5#sh ip bgp
BGP table version is 13, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      25.25.25.2                             0 1 i
*>i20.1.1.0/24      56.56.56.6               0    100      0 i

R5#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [20/0] via 25.25.25.2, 07:41:34
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 56.56.56.6, 09:07:32
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.5/32 is directly connected, FastEthernet1/0
      56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        56.56.56.0/24 is directly connected, FastEthernet0/0
L        56.56.56.5/32 is directly connected, FastEthernet0/0
R5#

With MED:-

R5#sh ip bgp
BGP table version is 13, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 10.1.1.0/24      25.25.25.2                             0 1 i
*>i20.1.1.0/24      56.56.56.6               0    100      0 i

R5#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      5.0.0.0/32 is subnetted, 1 subnets
C        5.5.5.5 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [20/0] via 25.25.25.2, 08:03:18
      20.0.0.0/24 is subnetted, 1 subnets
B        20.1.1.0 [200/0] via 56.56.56.6, 09:29:16
      25.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        25.25.25.0/24 is directly connected, FastEthernet1/0
L        25.25.25.5/32 is directly connected, FastEthernet1/0
      56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        56.56.56.0/24 is directly connected, FastEthernet0/0
L        56.56.56.5/32 is directly connected, FastEthernet0/0

R6:-

Without MED

R6#sh ip bgp summ
BGP router identifier 6.6.6.6, local AS number 2
BGP table version is 14, main routing table version 14
2 network entries using 256 bytes of memory
3 path entries using 156 bytes of memory
2/2 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 684 total bytes of memory
BGP activity 3/1 prefixes, 10/7 paths, scan interval 60 secs

Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
46.46.46.4      4            2     619     610       14    0    0 09:13:10        1
56.56.56.5      4            2     617     615       14    0    0 09:13:20        1

R6#sh ip bgp
BGP table version is 14, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i10.1.1.0/24      46.46.46.4               0    100      0 1 i
* i                 56.56.56.5               0    100      0 1 i
*> 20.1.1.0/24      0.0.0.0                  0         32768 i

R6#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      6.0.0.0/32 is subnetted, 1 subnets
C        6.6.6.6 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 46.46.46.4, 00:14:25
      20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        20.1.1.0/24 is directly connected, FastEthernet2/0
L        20.1.1.1/32 is directly connected, FastEthernet2/0
      46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        46.46.46.0/24 is directly connected, FastEthernet0/1
L        46.46.46.6/32 is directly connected, FastEthernet0/1
      56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        56.56.56.0/24 is directly connected, FastEthernet0/0
L        56.56.56.6/32 is directly connected, FastEthernet0/0
R6#

With MED:-

R6#sh ip bgp
BGP table version is 17, local router ID is 6.6.6.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
* i10.1.1.0/24      46.46.46.4             500    100      0 1 I   \\ Least preferred path – higher metric
*>i                 56.56.56.5               0    100      0 1 i
*> 20.1.1.0/24      0.0.0.0                  0         32768 i


R6#sh ip route
Codes: L - local, 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, H - NHRP
       + - replicated route, % - next hop override

Gateway of last resort is not set

      6.0.0.0/32 is subnetted, 1 subnets
C        6.6.6.6 is directly connected, Loopback0
      10.0.0.0/24 is subnetted, 1 subnets
B        10.1.1.0 [200/0] via 56.56.56.5, 00:05:36
      20.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        20.1.1.0/24 is directly connected, FastEthernet2/0
L        20.1.1.1/32 is directly connected, FastEthernet2/0
      46.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        46.46.46.0/24 is directly connected, FastEthernet0/1
L        46.46.46.6/32 is directly connected, FastEthernet0/1
      56.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        56.56.56.0/24 is directly connected, FastEthernet0/0
L        56.56.56.6/32 is directly connected, FastEthernet0/0


PC1:-

Without MED

PC1> trace 20.1.1.10
trace to 20.1.1.10, 8 hops max, press Ctrl+C to stop
 1   10.1.1.1   10.000 ms  10.000 ms  20.000 ms
 2   12.12.12.2   30.000 ms  30.000 ms  30.000 ms \\R2
 3   25.25.25.5   50.000 ms  50.000 ms  50.000 ms  \\R5
 4   56.56.56.6   80.000 ms  60.000 ms  50.000 ms   \\R6
 5   *20.1.1.10   80.000 ms (ICMP type:3, code:3, Destination port unreachable)

With MED:-

PC1> trace 20.1.1.10   --<< No change
trace to 20.1.1.10, 8 hops max, press Ctrl+C to stop
 1   10.1.1.1   10.000 ms  10.000 ms  10.000 ms
 2   12.12.12.2   50.000 ms  30.000 ms  30.000 ms  \\R2
 3   25.25.25.5   50.000 ms  50.000 ms  50.000 ms  \\R5
 4   56.56.56.6   60.000 ms  60.000 ms  60.000 ms  \\R6
 5    20.1.1.10   70.000 ms (ICMP type:3, code:3, Destination port unreachable)


PC2:-

Without MED

C2> trace 10.1.1.10
trace to 10.1.1.10, 8 hops max, press Ctrl+C to stop
 1   20.1.1.1   10.000 ms  10.000 ms  10.000 ms
 2   46.46.46.4   30.000 ms  30.000 ms  30.000 ms        \\R4
 3   34.34.34.3   50.000 ms  40.000 ms  50.000 ms        \\R3
 4   13.13.13.1   50.000 ms  70.000 ms  70.000 ms        \\R1
 5   *10.1.1.10   70.000 ms (ICMP type:3, code:3, Destination port unreachable)

With MED:-

PC2> trace 10.1.1.10
trace to 10.1.1.10, 8 hops max, press Ctrl+C to stop
 1   20.1.1.1   10.000 ms  10.000 ms  10.000 ms
 2   56.56.56.5   20.000 ms  30.000 ms  30.000 ms       \\R5
 3   25.25.25.2   30.000 ms  40.000 ms  30.000 ms       \\R2
 4   12.12.12.1   70.000 ms  70.000 ms  60.000 ms       \\R1

 5   *10.1.1.10   80.000 ms (ICMP type:3, code:3, Destination port unreachable)