Route to a remote Loopback Interface (BGP/OSPF)

Hi folks,

Could you please explain me this routing table?

Italy#sh ip ro | i 192.74.31 is variably subnetted, 2 subnets, 2 masks
O [110/2] via, 02:02:33, FastEthernet0/1
B [200/0] via, 11:06:23

I work in a BGP Course, where BGP network command is used for loopback interfaces.
Why I have these two entries?

Cheers, Hannes

Hello Johann

OSPF will always advertise networks on loopback interfaces as /32 networks, even if you have configured a different subnet mask. BGP on the other hand will advertise based on the network command you use. So apparently here, OSPF is advertising as a /32 address, while BGP is advertising the whole /24 subnet. Since these are different, they are both added in the routing table.

More information about how OSPF advertises loopback addresses can be found in this NetworkLessons note on the topic.

I hope this has been helpful!


1 Like