Tuesday, 18 October 2011

Another Expensive Lunch

Yesterday I grappled with the CCIE R&S Version 4.0 lab for the third time and walked away again without a number.

Troubleshooting is again the bane of my existence with configuration being challenging but more of a good exercise.  To be quite honest I would have preferred to have given up an hour of configuration time to take an extra half hour for troubleshooting, I think I probably needed an extra 10 minutes to close off another ticket.  The score report for the TS section was in alignment with my expectations that I was one ticket away from a pass - which I guess is at least an improvement on each of my previous attempts but still a fail.

I'm very thankful for my wife for her patience and understanding and encouragement not to give up.  Her support coupled with the original intentions on why I wanted to pursue this certification in the first place (Like the title of blog says, I do like playing with routers) helps keep the motivation going when the chips are down when otherwise I could throw in the towel.  Fortunately I still have some vacation days available I can use for a couple of days preparation before the next attempt however at this rate I think someone may be assigned #31337 before I get my digits :)

Friday, 14 October 2011

EIGRP and Static Routes

This posting is going to cover an interesting topic - redistribution and specifically redistribution of static routes into EIGRP.  Now before you skip the post, we're going to cover how you can make static routes appear as if they are internal to EIGRP.

Here's the initial configs - the topology is R1-R2-R3.  Where R1 is not performing any dynamic routing (R2 is it's default gateway) and R2 has an EIGRP adjacency with R3.

R1
hostname R1
interface Loopback0
 ip address 10.1.1.0 255.255.255.255
!
interface Loopback1
 ip address 10.1.1.1 255.255.255.255
!
interface Loopback2
 ip address 10.1.1.2 255.255.255.255
!
interface Loopback3
 ip address 10.1.1.3 255.255.255.255
!
interface Serial0/0
 ip address 10.1.12.1 255.255.255.0
 encapsulation frame-relay
 frame-relay map ip 10.1.12.2 102 broadcast
 no frame-relay inverse-arp
!
ip route 0.0.0.0 0.0.0.0 10.1.12.2

R2
hostname R2
interface Serial0/0
 no ip address
 encapsulation frame-relay
 no frame-relay inverse-arp
!
interface Serial0/0.21 point-to-point
 ip address 10.1.12.2 255.255.255.0
 snmp trap link-status
 frame-relay interface-dlci 201
!
interface Serial0/0.23 point-to-point
 ip address 10.1.23.2 255.255.255.0
 snmp trap link-status
 frame-relay interface-dlci 203
!
router eigrp 23
 redistribute static metric 1 1 1 1 1
 network 10.1.23.2 0.0.0.0
 no auto-summary
!
ip route 10.1.1.0 255.255.255.255 10.1.12.1
ip route 10.1.1.1 255.255.255.255 10.1.12.1
ip route 10.1.1.2 255.255.255.255 10.1.12.1
ip route 10.1.1.3 255.255.255.255 10.1.12.1

R3
hostname R3
interface Serial0/0
 ip address 10.1.23.3 255.255.255.0
 encapsulation frame-relay
 frame-relay map ip 10.1.23.2 302 broadcast
 no frame-relay inverse-arp
!
router eigrp 23
 network 10.1.23.3 0.0.0.0
 no auto-summary
!

Ok, so nothing special so far, lets have look at what's in the EIGRP topology table:

R2#sh ip eigrp topology
IP-EIGRP Topology Table for AS(23)/ID(10.1.23.2)

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
       r - reply Status, s - sia Status

P 10.1.1.2/32, 1 successors, FD is 2560000256
        via Rstatic (2560000256/0)
P 10.1.1.3/32, 1 successors, FD is 2560000256
        via Rstatic (2560000256/0)
P 10.1.1.0/32, 1 successors, FD is 2560000256
        via Rstatic (2560000256/0)
P 10.1.1.1/32, 1 successors, FD is 2560000256
        via Rstatic (2560000256/0)
P 10.1.23.0/24, 1 successors, FD is 2169856
        via Connected, Serial0/0.23
R2#sh ip eigrp topology 10.1.1.0/32
IP-EIGRP (AS 23): Topology entry for 10.1.1.0/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560000256
  Routing Descriptor Blocks:
  10.1.12.1, from Rstatic, Send flag is 0x0
      Composite metric is (2560000256/0), Route is External
      Vector metric:
        Minimum bandwidth is 1 Kbit
        Total delay is 10 microseconds
        Reliability is 1/255
        Load is 1/255
        Minimum MTU is 1
        Hop count is 0
      External data:
        Originating router is 10.1.23.2 (this system)
        AS number of route is 0
        External protocol is Static, external metric is 0
        Administrator tag is 0 (0x00000000)

This is all normal, static routes redistributed to into EIGRP are external routes...

R3#sh ip route | b Gateway
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 5 subnets, 2 masks
D EX    10.1.1.2/32 [170/2560512256] via 10.1.23.2, 00:03:05, Serial0/0
D EX    10.1.1.3/32 [170/2560512256] via 10.1.23.2, 00:03:05, Serial0/0
D EX    10.1.1.0/32 [170/2560512256] via 10.1.23.2, 00:03:05, Serial0/0
D EX    10.1.1.1/32 [170/2560512256] via 10.1.23.2, 00:03:05, Serial0/0
C       10.1.23.0/24 is directly connected, Serial0/0

So as I mentioned earlier we can actually make these static routes appear as internal to EIGRP but to make it happen we need to follow a few rules to make it work:

1) The static routes must use an interface as the next-hop rather than an using the next-hop IP Address:

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#no ip route 10.1.1.0 255.255.255.255 10.1.12.1
R2(config)#ip route 10.1.1.0 255.255.255.255 s0/0.21
R2(config)#no ip route 10.1.1.1 255.255.255.255 10.1.12.1
R2(config)#ip route 10.1.1.1 255.255.255.255 s0/0.21
R2(config)#no ip route 10.1.1.2 255.255.255.255 10.1.12.1
R2(config)#ip route 10.1.1.2 255.255.255.255 s0/0.21
R2(config)#no ip route 10.1.1.3 255.255.255.255 10.1.12.1
R2(config)#ip route 10.1.1.3 255.255.255.255 s0/0.21

2) Enable EIGRP on the interface that has the static routes (making the interface passive is optional)


R2(config)#router eigrp 23
R2(config-router)#passive-interface Serial0/0.21
R2(config-router)#network 10.1.12.2 0.0.0.0

Update: 31 March 2012 - Tom Kacprzynski rightly informed me that step 2 is not actually required at all for this procedure to work.  Thanks Tom!

3) Include the networks of the static routes into EIGRP


R2(config-router)#network 10.1.1.0 0.0.0.3
R2(config-router)#end



Now to see what has changed:

R2#show ip route | b Gateway
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
C       10.1.12.0/24 is directly connected, Serial0/0.21
S       10.1.1.2/32 is directly connected, Serial0/0.21
S       10.1.1.3/32 is directly connected, Serial0/0.21
S       10.1.1.0/32 is directly connected, Serial0/0.21
S       10.1.1.1/32 is directly connected, Serial0/0.21
C       10.1.23.0/24 is directly connected, Serial0/0.23

These are still definitely static routes, what about the EIGRP topology?

R2#sh ip eigrp topology 10.1.1.0/32
IP-EIGRP (AS 23): Topology entry for 10.1.1.0/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560000256
  Routing Descriptor Blocks:
  0.0.0.0, from Rstatic, Send flag is 0x0
      Composite metric is (2560000256/0), Route is Internal
      Vector metric:
        Minimum bandwidth is 1 Kbit
        Total delay is 10 microseconds
        Reliability is 1/255
        Load is 1/255
        Minimum MTU is 1
        Hop count is 0

It is now showing up as an internal route even though it shows it was redistributed from static, what does our EIGRP peer R3 see?

R3#show ip route | b Gateway
Gateway of last resort is not set

     10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
D       10.1.12.0/24 [90/2681856] via 10.1.23.2, 00:02:55, Serial0/0
D       10.1.1.2/32 [90/2560512256] via 10.1.23.2, 00:02:55, Serial0/0
D       10.1.1.3/32 [90/2560512256] via 10.1.23.2, 00:02:55, Serial0/0
D       10.1.1.0/32 [90/2560512256] via 10.1.23.2, 00:02:55, Serial0/0
D       10.1.1.1/32 [90/2560512256] via 10.1.23.2, 00:02:55, Serial0/0
C       10.1.23.0/24 is directly connected, Serial0/0

R3#sh ip eigrp topology 10.1.1.0/32
IP-EIGRP (AS 23): Topology entry for 10.1.1.0/32
  State is Passive, Query origin flag is 1, 1 Successor(s), FD is 2560512256
  Routing Descriptor Blocks:
  10.1.23.2 (Serial0/0), from 10.1.23.2, Send flag is 0x0
      Composite metric is (2560512256/2560000256), Route is Internal
      Vector metric:
        Minimum bandwidth is 1 Kbit
        Total delay is 20010 microseconds
        Reliability is 1/255
        Load is 1/255
        Minimum MTU is 1
        Hop count is 1


Yes, those static routes on R2 appear to R3 as if they are internal EIGRP routes.  Actually, we can remove the "redistribute static" from the EIGRP process as it is no longer required in this instance.

R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#router eigrp 23
R2(config-router)#no redistribute static
R2(config-router)#end


Strange as it seems, this appears to be a design intent for EIGRP and is documented on Cisco's website about this.