cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
742
Views
5
Helpful
1
Replies

OSPF: a subnet that a loopback interface is connected is learned as a single IP address on another router.

Difan Zhao
Level 5
Level 5

Hi experts,

I'm setting up a test network and I have two routers connected together through a VPN tunnel and they are running ospf. The "spoke" router has a loopback interface with IP 10.0.2.1/24. However this route is learned by the "hub" router as a single IP instead of a class C subnet... Is it normal for loopback interface? I also have another f0/1 on the "spoke" router and it has IP 172.16.0.1/24 and this network is properly learned by the "hub"...

Spoke#sh run int l0
interface Loopback0
ip address 10.0.2.1 255.255.255.0

Spoke#sh ip protocols

Routing Protocol is "ospf 1"

  Routing for Networks:
    10.0.2.0 0.0.0.255 area 0
    172.16.0.0 0.0.0.255 area 0

Spoke#sh ip route

     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.0.0 is directly connected, FastEthernet0/1
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       10.0.2.0/24 is directly connected, Loopback0

Hub#sh ip route

    172.16.0.0/24 is subnetted, 1 subnets
O       172.16.0.0 [110/34] via 10.255.255.11, 00:00:01, Tunnel0
     10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
O       10.0.2.1/32 [110/34] via 10.255.255.11, 00:00:11, Tunnel0

Thanks!

1 Accepted Solution

Accepted Solutions

Andy Furnas
Level 1
Level 1

Under the loopback interface, enter ip ospf network point-to-point. This will advertise the correct subnet mask as configured.

View solution in original post

1 Reply 1

Andy Furnas
Level 1
Level 1

Under the loopback interface, enter ip ospf network point-to-point. This will advertise the correct subnet mask as configured.