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

Tuesday, June 1, 2010

Redistribution EIGRP and OSPF - GNS3





check at bottom page for full running configuration

redistribute all route from OSPF area 0 into EIGRP 1
R1(config-router)#redistribute ospf 1

But R2 didn’t any route from OSPF routing table
R2>sh ip rou ei
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/156160] via 192.168.1.1, 00:20:32, FastEthernet0/0

This is because we need initiate the seed metric for the learned route, if not redistribution not gonna work
R1(config-router)#redistribute ospf 1 metric 100 1 255 1 1500

R2>sh ip rou ei
     1.0.0.0/32 is subnetted, 1 subnets
D       1.1.1.1 [90/156160] via 192.168.1.1, 00:34:24, FastEthernet0/0
     3.0.0.0/32 is subnetted, 1 subnets
D EX    3.3.3.3 [170/25602816] via 192.168.1.1, 00:01:02, FastEthernet0/0
     172.16.0.0/24 is subnetted, 1 subnets
D EX    172.16.1.0 [170/25602816] via 192.168.1.1, 00:01:02, FastEthernet0/0
     10.0.0.0/32 is subnetted, 1 subnets
D EX    10.1.1.1 [170/25602816] via 192.168.1.1, 00:01:02, FastEthernet0/0

From routing table, there’s route to R3 loopback0, 3.3.3.3
Ping the R3 loopback
R2>p 3.3.3.3

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Can’t ping? What happen, let’s try traceroute to see where’s the problem
It’s look like the problem is on R1, the trace stop at R1
R2>traceroute 3.3.3.3

Type escape sequence to abort.
Tracing the route to 3.3.3.3

  1 192.168.1.1 40 msec 36 msec 16 msec
  2  *  *  *

The problem is because we only redistribute route from OSPF into EIGRP, but no in the other way
So R3 loopback don’t know how to return the packet it receive from R2
Redistribute from EIGRP to OSPF
R1(config-router)#redistribute eigrp 1
% Only classful networks will be redistributed

Notice the alert in yellow, let see is the router really meant it.. so in this case R3 should only learn classful; 192.168.1.0/24 only, there’ll no 1.1.1.1/32 and 2.2.2.2/32
R3>sh ip rou os
O E2 192.168.1.0/24 [110/20] via 172.16.1.1, 00:02:20, FastEthernet0/1

Yes, they really meant it
Here is the command to make sure that redistribution happen for both classful and classless
R1(config-router)#redistribute ei 1 subnets

R3>sh ip rou os
     1.0.0.0/32 is subnetted, 1 subnets
O E2    1.1.1.1 [110/20] via 172.16.1.1, 00:00:25, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
O E2    2.2.2.2 [110/20] via 172.16.1.1, 00:00:25, FastEthernet0/1
O E2 192.168.1.0/24 [110/20] via 172.16.1.1, 00:00:25, FastEthernet0/1

 click here for full Running Configuration