Pages

Wednesday, June 2, 2010

Manipulating Administrative Distance (AD) value on EIGRP and OSPF - GNS3






Running Config click here

do redistribution between OSPF area 0 and EIGRP 1 on R3
R3 will become an ASBR

R3(config)#router os 1
R3(config-router)#redistribute eigrp 1 subnets
R3(config-router)#redistribute connected subnets

R3(config)#router ei 1
R3(config-router)#redistribute ospf 1 metric 100 1 255 1 1500

analyze R2 routing table

R2>sh ip rou
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
     33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       33.1.1.1/32 [110/2] via 10.1.1.3, 00:05:07, FastEthernet0/1
D EX    33.1.1.0/24 [170/25602816] via 172.16.1.3, 00:02:20, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/2] via 10.1.1.3, 00:05:07, FastEthernet0/1
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/2] via 10.1.1.4, 00:05:07, FastEthernet0/1
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/2] via 10.1.1.5, 00:05:07, FastEthernet0/1
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, FastEthernet0/0
     22.0.0.0/24 is subnetted, 1 subnets
C       22.1.1.0 is directly connected, Loopback22
     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, FastEthernet0/1
D    11.0.0.0/8 [90/156160] via 172.16.1.1, 01:21:34, FastEthernet0/0

in yellow, route to 11.1.1.1 is via 172.16.1.1 because EIGRP has a better AD (90) compare to OSPF (110)
we'll manipulate AD so route to this network is thru OSPF

R2(config)#router ospf 1
R2(config-router)#dista ospf external 80 //because OSPF also learn this network from redistribution, so it's an external OSPF route

R2#sh ip rou
...
O E2 11.0.0.0/8 [80/20] via 10.1.1.3, 00:03:28, FastEthernet0/1

or

R2#sh ip rou 11.1.1.1
Routing entry for 11.0.0.0/8
  Known via "ospf 1", distance 80, metric 20, type extern 2, forward metric 1
  Last update from 10.1.1.3 on FastEthernet0/1, 00:03:18 ago
  Routing Descriptor Blocks:
  * 10.1.1.3, from 3.3.3.3, 00:03:18 ago, via FastEthernet0/1
      Route metric is 20, traffic share count is 1

now we'll adjust internal and external EIGRP AD
we'll make external EIGRP AD lower than OSPF
and internal EIGRP AD higher than OSPF
so, R2 will replace all route with external EIGRP route (if they have any)

*default AD = OSPF 110, EIGRP 90, external EIGRP = 170

now all route in green (above) is in OSPF and learn directly via OSPF with AD 110, we'll change this

R2(config)#router ei 1
R2(config-router)#distance eigrp 170 90

R2#sh ip rou
..
D EX    33.1.1.0/24 [90/25602816] via 172.16.1.3, 00:11:58, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
D EX    3.3.3.3 [90/25602816] via 172.16.1.3, 00:11:58, FastEthernet0/0
     4.0.0.0/32 is subnetted, 1 subnets
D EX    4.4.4.4 [90/25602816] via 172.16.1.3, 00:11:58, FastEthernet0/0
     5.0.0.0/32 is subnetted, 1 subnets
D EX    5.5.5.5 [90/25602816] via 172.16.1.3, 00:11:58, FastEthernet0/0
..
O E2 11.0.0.0/8 [80/20] via 10.1.1.3, 00:11:59, FastEthernet0/1

now all route in green are routed via R1, because we've changed the external EIGRP AD to be lower than OSPF and internal EIGRP

No comments:

Post a Comment