cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
10642
Views
10
Helpful
8
Replies

Advertising loopbacks in OSPF

limtohsoon
Level 1
Level 1

Hi Sir,

I have the following OSPF config:

!

int loopback 0

ip addr 172.16.1.1 255.255.255.0

!

router ospf 1

netw 172.16.1.1 0.0.0.0 area 0

!

OSPF advertises the loopback as 172.16.1.1/32. To advertise the subnet (i.e. 172.16.1.0/24), I'd configure:

!

int lo0

ip addr 172.16.1.1 255.255.255.0

ip ospf netw point-to-point

!

Are there any other methods, besides the above, to accomplish the same task?

Please advise.

Thank you.

B.Rgds,

Lim TS

8 Replies 8

Redistributing the connected networks into OSPF would cause the loopback to be advertised with the configured mask.

HTH

Sundar

mohammedmahmoud
Level 11
Level 11

Hi,

I believe that in the first configuration the loopback subnet shall be advertised as /24 not /32. (according to the subnet mask under the interface)

The ip-address and wildcard-mask arguments together allow you to define one or multiple interfaces to be associated with a specific OSPF area using a single command. Using the wildcard-mask argument allows you to define one or multiple interfaces to be associated with a specific OSPF area using a single command, the network command doesn't control how the subnet is advertised.

HTH, please rate if it does help,

Mohammed Mahmoud.

Mohammed,

Not exactly. OSPF considers loopbacks as host routes and advertises them as /32.

Here's the quote from RFC2328:

"The interface may be looped back in hardware

or software. The interface will be unavailable for regular

data traffic. However, it may still be desirable to gain

information on the quality of this interface, either through

sending ICMP pings to the interface or through something

like a bit error test. For this reason, IP packets may

still be addressed to an interface in Loopback state. To

facilitate this, such interfaces are advertised in router-

LSAs as single host routes, whose destination is the IP

interface address.[4]"

http://www.faqs.org/rfcs/rfc2328.html

HTH

Sundar

Sundar,

Thanks for the Tip, in this case i'd agree with you, redistributing the connected networks into OSPF would cause the loopback to be advertised with the configured mask.

BR,

Mohammed Mahmoud.

Hi Sundar,

Thanks for the tip too.

If this router is in the backbone or a normal area, "redistribute connected" is possible and OSPF will advertise 172.16.1.0/24 as E2 route (default).

In the case of the router being in a stub or totally stubby area, "redis conn" is not feasible as ASBR is not allowed in a stub area. So, what other config option do we have, besides configuring "ip ospf netw point-to-point"?

Thank you.

B.Rgds,

Lim TS

Lim TS

The other option is under the loopback interface ip ospf network point-to-point. Or accept it being advertised as a /32. Is there a reason why it is problematic to advertise it as a /32?

HTH

Rick

HTH

Rick

I'm in a situation where the /32 is being advertised in OSPF and subsequently redistributed into BGP. The folks on the other side of the BGP connection get crazy when they see such small networks coming across. I know this can be filtered with a route map, but I don't control the BGP router and would rather handle it locally. That being said, would simply adding the "ip ospf network point-to-point" statement fix this even though I have the loopback0 IP with quad 0's as a network statement under OSPF? Thanks.

Joe

Joe

I am not sure that I 100% understand your question. But it seems that you assume that the netmask used in the OSPF network statement controls that OSPF advertises. That is NOT the case. The network statement (and its netmask) are used to identify which interfaces are included into the OSPF process. Once the interface is included into the OSPF process then the advertisement in OSPF is based on the subnet mask of the interface and not on the mask of the network statement.

Based on this I believe that the ip ospf network point-to-point should solve your issue.

I hope that solves your issue. If not then perhaps you can clarify a bit what is your issue.

HTH

Rick

HTH

Rick
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco