Showing posts with label EIGRP. Show all posts
Showing posts with label EIGRP. Show all posts

Wednesday, March 2, 2011

Subnet Mask in IGP for Loopbacks

Topology :



Configuration :

R1#

interface Serial0/0
 ip address 10.0.12.1 255.255.255.0

router eigrp 100
 network 0.0.0.0
 no auto-summary


router ospf 100
 router-id 11.11.11.11
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0


R2#

interface Serial0/0
 ip address 10.0.12.2 255.255.255.0

interface Serial0/1
 ip address 10.0.23.2 255.255.255.0

router eigrp 100
 network 0.0.0.0
 no auto-summary


router ospf 100
 router-id 22.22.22.22
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0


R3#

interface Loopback3
 ip address 3.3.3.3 255.255.0.0


interface Loopback33
 ip address 33.33.33.33 255.255.255.248

interface Serial0/0
 ip address 10.0.23.3 255.255.255.0
 clock rate 2000000


router eigrp 100
 network 3.3.0.0 0.0.255.255
 network 10.0.23.0 0.0.0.255
 network 33.33.33.32 0.0.0.7
 no auto-summary


router ospf 100
 router-id 32.32.32.32
 log-adjacency-changes
 network 0.0.0.0 255.255.255.255 area 0


 Testing :

Related configuration :

R3(config)#do sh int lo33
Loopback33 is up, line protocol is up
  Hardware is Loopback
  Internet address is 33.33.33.33/29


Observe the output carefully :

R1#sh ip route
Codes: 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
Gateway of last resort is not set
     33.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       33.33.33.33/32 [110/129] via 10.0.12.2, 00:21:22, Serial0/0
D       33.33.33.32/29 [90/2809856] via 10.0.12.2, 00:12:11, Serial0/0
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       3.3.3.3/32 [110/129] via 10.0.12.2, 00:21:22, Serial0/0
D       3.3.0.0/16 [90/2809856] via 10.0.12.2, 00:12:11, Serial0/0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.0.12.0 is directly connected, Serial0/0
D       10.0.23.0 [90/2681856] via 10.0.12.2, 00:32:09, Serial0/0

I want to reach 33.33.33.33 which is configured in R3 and this Network is learned by both IGP's EIGRP and OSPF.
So obviously i expect to reach by EIGRP as this is preferred and less AD value than OSPF.

R1#sh ip route 33.33.33.33
Routing entry for 33.33.33.33/32
  Known via "ospf 100", distance 110, metric 129, type intra area  Last update from 10.0.12.2 on Serial0/0, 00:17:52 ago
  Routing Descriptor Blocks:
  * 10.0.12.2, from 32.32.32.32, 00:17:52 ago, via Serial0/0
      Route metric is 129, traffic share count is 1

R2#sh ip route 33.33.33.33
Routing entry for 33.33.33.33/32
  Known via "ospf 100", distance 110, metric 65, type intra area  Last update from 10.0.23.3 on Serial0/1, 00:18:41 ago
  Routing Descriptor Blocks:
  * 10.0.23.3, from 32.32.32.32, 00:18:41 ago, via Serial0/1
      Route metric is 65, traffic share count is 1

Why it did not prefer to take the path by EIGRP ?
Have you noticed the mask information ?

Then you are good to go.

** Always longest match will be preferred first then followed by AD or metric values etc..
** So here OSPF took the advantage of taking / learning this as /32 but EIGRP still took as it is so it is still /29
** obviously OSPF is preferred.


How to fix this ?

Check how OSPF is treating Loopback interface details here :

R3(config)#do sh ip ospf inter l33
Loopback33 is up, line protocol is up
  Internet Address 33.33.33.33/29, Area 0
  Process ID 100, Router ID 32.32.32.32, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
Check how EIGRP is treating Loopback interface details here :

R3(config)#do sh ip eigrp int l33
IP-EIGRP interfaces for process 100
                        Xmit Queue   Mean   Pacing Time   Multicast    Pending
Interface        Peers  Un/Reliable  SRTT   Un/Reliable   Flow Timer   Routes
Lo33               0        0/0         0       0/1            0           0

** So there is a difference in treatment.
** So to advertise currect subnet mask for Loopbacks there are multiple ways to do this but

simple way is just change the Network type from Loopback to "Point-to-Point"

Solution:

R3(config)#int lo33
R3(config-if)#ip ospf network point-to-point
R3(config-if)#end

And the Routing table update is :

R1#sh ip route 33.33.33.33
Routing entry for 33.33.33.32/29
  Known via "eigrp 100", distance 90, metric 2809856, type internal  Redistributing via eigrp 100
  Last update from 10.0.12.2 on Serial0/0, 00:34:52 ago
  Routing Descriptor Blocks:
  * 10.0.12.2, from 10.0.12.2, 00:34:52 ago, via Serial0/0
      Route metric is 2809856, traffic share count is 1
      Total delay is 45000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2

R2#sh ip route 33.33.33.33
Routing entry for 33.33.33.32/29
  Known via "eigrp 100", distance 90, metric 2297856, type internal  Redistributing via eigrp 100
  Last update from 10.0.23.3 on Serial0/1, 00:34:39 ago
  Routing Descriptor Blocks:
  * 10.0.23.3, from 10.0.23.3, 00:34:39 ago, via Serial0/1
      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1

** So this is just to make sure the behavior of these IGP protocols on how they treat the Network types based on media types. The same follows for 3.3.3.3 also


Happy Labbing  ^_^

Sunday, February 20, 2011

EIGRP Basics

Objective:

    How EIGRP metric influence the Routing from R2 --> R4 by changing the metric Values from Default to customized.
   We are going to change only DELAY rather bandwidth, this is easy to influence and verify the paths.


Topology:


Interface configuration ::

R1#sh prot | e do
Global values:
  Internet Protocol routing is enabled
Serial0/0 is up, line protocol is up
  Internet address is 10.0.12.1/24
Loopback1 is up, line protocol is up
  Internet address is 1.1.1.1/32


R2#sh prot | e do
Global values:
  Internet Protocol routing is enabled
Serial0/0 is up, line protocol is up
  Internet address is 10.0.23.2/24
Serial0/1 is up, line protocol is up
  Internet address is 10.0.24.2/24
Serial0/2 is up, line protocol is up
  Internet address is 10.0.12.2/24
Loopback2 is up, line protocol is up
  Internet address is 2.2.2.2/32


R3#sh prot | e do
Global values:
  Internet Protocol routing is enabled
Serial0/0 is up, line protocol is up
  Internet address is 10.0.23.3/24
Serial0/1 is up, line protocol is up
  Internet address is 10.0.34.3/24
Loopback3 is up, line protocol is up
  Internet address is 3.3.3.3/32


R4#sh prot | e do
Global values:
  Internet Protocol routing is enabled
Serial0/0 is up, line protocol is up
  Internet address is 10.0.24.4/24
Serial0/1 is up, line protocol is up
  Internet address is 10.0.34.4/24
Loopback4 is up, line protocol is up
  Internet address is 4.4.4.4/32


EIGRP Configuration ::


R1#sh run | s r e
router eigrp 1
 network 1.1.1.1 0.0.0.0
 network 10.0.12.0 0.0.0.255
 no auto-summary


R2#sh run | s r e
router eigrp 1
 network 2.2.2.2 0.0.0.0
 network 10.0.12.0 0.0.0.255
 network 10.0.23.0 0.0.0.255
 network 10.0.24.0 0.0.0.255
 no auto-summary


R3#sh run | s r e
router eigrp 1
 network 3.3.3.3 0.0.0.0
 network 10.0.23.0 0.0.0.255
 network 10.0.34.0 0.0.0.255
 no auto-summary


R4#sh run | s r e
router eigrp 1
 network 4.4.4.4 0.0.0.0
 network 10.0.24.0 0.0.0.255
 network 10.0.34.0 0.0.0.255
 no auto-summary


=> In order to reach 4.4.4.4 Network available in R4, R2 have to paths but based FD & Successors paths

R2#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "eigrp 1", distance 90, metric 2297856, type internal
  Redistributing via eigrp 1
  Last update from 10.0.24.4 on Serial0/1, 00:00:02 ago
  Routing Descriptor Blocks:
  * 10.0.24.4, from 10.0.24.4, 00:00:02 ago, via Serial0/1
      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1


=> Check out the available paths here.

R2#sh ip eigrp top al
IP-EIGRP Topology Table for AS(1)/ID(10.0.24.2)

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

P 1.1.1.1/32, 1 successors, FD is 2297856, serno 9
        via 10.0.12.1 (2297856/128256), Serial0/2
P 2.2.2.2/32, 1 successors, FD is 128256, serno 8
        via Connected, Loopback2
P 3.3.3.3/32, 1 successors, FD is 2809856, serno 57
        via 10.0.24.4 (2809856/2297856), Serial0/1
        via 10.0.23.3 (6905856/128256), Serial0/0
P 4.4.4.4/32, 1 successors, FD is 2246656, serno 55
        via 10.0.24.4 (2297856/128256), Serial0/1
P 10.0.12.0/24, 1 successors, FD is 2169856, serno 1
        via Connected, Serial0/2
P 10.0.24.0/24, 1 successors, FD is 2169856, serno 3
        via Connected, Serial0/1
P 10.0.23.0/24, 1 successors, FD is 6777856, serno 52
        via Connected, Serial0/0
        via 10.0.24.4 (3193856/2681856), Serial0/1
P 10.0.34.0/24, 1 successors, FD is 2681856, serno 58
        via 10.0.24.4 (2681856/2169856), Serial0/1

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

        via 10.0.23.3 (11897856/6777856), Serial0/0, serno 59

** Now i want ot influence the paths by calculating the existing Reported distance and Feasible distance
** So that i can LOAD-BALNCE the traffic to reach 4.4.4.4 by

               R2 -> R4 and
               R2 -> R3 -> R4


** I will change the Delay from 20000 to 10000 on  R3 ( S 0/1 ) Interfaces which takes to R4 paths.

Testing ::

R2#sh ip eigrp top al
IP-EIGRP Topology Table for AS(1)/ID(10.0.24.2)

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

P 1.1.1.1/32, 1 successors, FD is 2297856, serno 9
        via 10.0.12.1 (2297856/128256), Serial0/2
P 2.2.2.2/32, 1 successors, FD is 128256, serno 8
        via Connected, Loopback2
P 3.3.3.3/32, 1 successors, FD is 2809856, serno 57
        via 10.0.24.4 (2809856/2297856), Serial0/1
        via 10.0.23.3 (6905856/128256), Serial0/0
P 4.4.4.4/32, 1 successors, FD is 2246656, serno 55
        via 10.0.24.4 (2297856/128256), Serial0/1  
        via 10.0.23.3 (7161856/2041856), Serial0/0 <<-----  Wow there are 2 paths meeting the requirements to become FS

P 10.0.12.0/24, 1 successors, FD is 2169856, serno 1
        via Connected, Serial0/2
P 10.0.24.0/24, 1 successors, FD is 2169856, serno 3
        via Connected, Serial0/1
        via 10.0.23.3 (7545856/2425856), Serial0/0
P 10.0.23.0/24, 1 successors, FD is 6777856, serno 52
        via Connected, Serial0/0
        via 10.0.24.4 (3193856/2681856), Serial0/1
P 10.0.34.0/24, 1 successors, FD is 2681856, serno 58
        via 10.0.24.4 (2681856/2169856), Serial0/1
        via 10.0.23.3 (7033856/1913856), Serial0/0, serno 59


R2#sh ip route 4.4.4.4  
Routing entry for 4.4.4.4/32
  Known via "eigrp 1", distance 90, metric 2297856, type internal
  Redistributing via eigrp 1
  Last update from 10.0.24.4 on Serial0/1, 00:00:33 ago
  Routing Descriptor Blocks:
  * 10.0.24.4, from 10.0.24.4, 00:00:33 ago, via Serial0/1   <<-- Still only one path and NO traffic load-balance

      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1


** Let us meet the requirement again to install to Routes in Routing table so i will change the Delay from 20000 to 10000 on  R2 ( S 0/0 )

R2#sh ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "eigrp 1", distance 90, metric 2297856, type internal
  Redistributing via eigrp 1
  Last update from 10.0.23.3 on Serial0/0, 00:00:03 ago
  Routing Descriptor Blocks:
  * 10.0.24.4, from 10.0.24.4, 00:00:03 ago, via Serial0/1
      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 1
    10.0.23.3, from 10.0.23.3, 00:00:03 ago, via Serial0/0   <-- We made it now we have 2 paths to reach 4.4.4.4

      Route metric is 2297856, traffic share count is 1
      Total delay is 25000 microseconds, minimum bandwidth is 1544 Kbit
      Reliability 255/255, minimum MTU 1500 bytes
      Loading 1/255, Hops 2


R2#sh ip cef exact-route 2.2.2.2 4.4.4.4
2.2.2.2         -> 4.4.4.4        : Serial0/0 (next hop 10.0.23.3)
R2#sh ip cef exact-route 2.2.2.1 4.4.4.4
2.2.2.1         -> 4.4.4.4        : Serial0/1 (next hop 10.0.24.4)
R2#sh ip cef exact-route 2.2.2.3 4.4.4.4
2.2.2.3         -> 4.4.4.4        : Serial0/0 (next hop 10.0.23.3)
R2#sh ip cef exact-route 2.2.2.4 4.4.4.4
2.2.2.4         -> 4.4.4.4        : Serial0/0 (next hop 10.0.23.3)
R2#sh ip cef exact-route 2.2.2.5 4.4.4.4
2.2.2.5         -> 4.4.4.4        : Serial0/0 (next hop 10.0.23.3)
R2#sh ip cef exact-route 2.2.2.6 4.4.4.4
2.2.2.6         -> 4.4.4.4        : Serial0/1 (next hop 10.0.24.4)


** yes , we are done with this. Now the packets are taking 2 paths to reach 4.4.4.4 on R4
Hope you got some thing by this lab and thanks for reading.



Happy Labbing  ^_^