Hi @Sprout
By default OSPF treats the loopback interface as a
point-to-point network:
<R2>display ospf interface LoopBack 0 verbose
OSPF Process 1 with
Router ID 10.0.2.2
Interfaces
Interface: 10.0.2.2 (LoopBack0)
Cost: 0 State: P-2-P Type: P2P MTU: 1500
Timers: Hello 10 ,
Dead 40 , Poll 120 , Retransmit 5 ,
Transmit Delay 1
IO Statistics
…
OSPF knows that the network segment where Loopback0 resides can have only one IP address, therefore it advertises the subnet mask of the advertised route as 32 bits.
But you can change this if you want (which is especially useful if you're using loopback interfaces in eNSP to simulate other networks) - just configure the network type of the Loopback interface to be
broadcast. Then when OSPF advertises network information for this interface, it will
use a 24-bit mask & the network type will be broadcast:
[R2]interface LoopBack 0
[R2-LoopBack0]ospf
network-type broadcast
<R1>display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations
: 12 Routes : 12
Destination/Mask
Proto Pre Cost
Flags NextHop Interface
10.0.1.0/24 Direct 0
0 D 10.0.1.1 LoopBack0
10.0.1.1/32 Direct 0
0 D 127.0.0.1 LoopBack0
10.0.1.255/32 Direct 0
0 D 127.0.0.1 LoopBack0
10.0.2.0/24 OSPF
10 10 D
10.0.123.2
GigabitEthernet0/0/0
…
<R2>display ospf interface LoopBack 0 verbose
OSPF Process 1 with
Router ID 10.0.2.2
Interfaces
Interface: 10.0.2.2 (LoopBack0)
Cost: 0 State: DR Type: Broadcast MTU: 1500
Priority: 1
Designated Router:
10.0.2.2
Backup Designated
Router: 0.0.0.0
Timers: Hello 10 ,
Dead 40 , Poll 120 , Retransmit 5 ,
Transmit Delay 1
IO Statistics
Type Input Output