Friday, April 25, 2014

OSPF Network type Loopback:

Lessons Learned:

OSPF Network Loopback
Special case for loopback and Looped-back interfaces

Advertises link as /32 stub host route

#ip ospf network point-top-point
Used to disable this behavior
------------------------------------------------------------------

In ospf – a software loopback (loopback interface) can be configured locally with a /24. But when we go to another routers routing table we should see it as a /32


Local Router:
R1#sh run interface lo1

interface Loopback1
 ip address 1.1.1.1 255.255.255.0
end

Adj Router:

R2#sh ip route 1.1.1.1

Routing entry for 1.1.1.1/32
  Known via "ospf 1234", distance 110, metric 2, type intra area
  Last update from 192.168.12.1 on FastEthernet0/0, 00:02:36 ago
  Routing Descriptor Blocks:
  * 192.168.12.1, from 1.1.1.1, 00:02:36 ago, via FastEthernet0/0
      Route metric is 2, traffic share count is 1

The reason for this is if we s hip ospf interface for the local loopback. We will see the Network type is “loopback”. It’s treated as a /32

R1#sh ip ospf interface lo1
Loopback1 is up, line protocol is up
  Internet Address 1.1.1.1/24, Area 0
  Process ID 1234, Router ID 1.1.1.1, Network Type LOOPBACK, Cost: 1
  Loopback interface is treated as a stub Host
R1#

If we do not want it to be treated as a /32, we need to disable the network type at the link level.

Ex:

R1(config)#interface loopback 1
R1(config-if)#ip ospf network point-to-point

Now if we look at the interface again we should see the netwokr tyoe as P2P and the /24 mask

R1#sh ip ospf interface lo1
Loopback1 is up, line protocol is up
  Internet Address 1.1.1.1/24, Area 0
  Process ID 1234, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
  Supports Link-local Signaling (LLS)
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 0, maximum is 0
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 0, Adjacent neighbor count is 0
  Suppress hello for 0 neighbor(s)
R1#

If we look at the routing table from the ADJ router –
We now see it advertised as a /24 prefix, instead of the previous /32

R2#sh ip route 1.1.1.1
Routing entry for 1.1.1.0/24
  Known via "ospf 1234", distance 110, metric 2, type intra area
  Last update from 192.168.12.1 on FastEthernet0/0, 00:01:44 ago
  Routing Descriptor Blocks:
  * 192.168.12.1, from 1.1.1.1, 00:01:44 ago, via FastEthernet0/0

      Route metric is 2, traffic share count is 1

No comments:

Post a Comment