cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2243
Views
40
Helpful
12
Replies

OSPF Advertise a network that has no link

Pedro Matias
Level 1
Level 1

I have a network like the one in the picture. This network is configured with IPv4 and OSPFv2 for routing, but R5 and R6 have multiprotocol BGP IPv6 connections to other ASes. To allow for communication between the PCs and the outside IPv6 world, I have setup a NAT-PT box in R5 (I realise this is deprecated technology but I have to use it). I have it configured so that the outside IPv6 world corresponds to the subnet 172.17.11.0/24 inside AS92. The NAT-PT conversion itself is functioning correctly, but I had to setup static routes for the subnet 172.17.11.0/24 that lead to R5 from R6, MLS4 and MLS3 (the last two being multi layer switches).

I tried to advertise the subnet in R5 via OSPFv2 like so:

router ospf 1
network 172.17.11.0 0.0.0.255 area 0

However, even though the console outputs no errors, there is no LSA corresponding to this network, and without the static routes the packets with destination in that subnet have nowhere to go. I realise there is no actual link in R5 connected to it, it's just a "dummy subnet". Is this the reason OSPF ignores the network command? Is there a way to make it advertise the network even though there is no link, and thus not have to resort to static routes, or is the appropriate solution to use static routes?

1 Accepted Solution

Accepted Solutions

Hello,

 

OSPF does not advertise subnets with the network command. It enables OSPF on interfaces that fall within the rage of the network command you enter. So if you have an interface in the 172.17.11.0/24 network then it will enable OSPF on that interface. 

Furthermore if the interface IP was something like 172.17.11.1/30 - even then the network command above you entered would only ENABLE OSPF on the interface and advertise the subnet of the link which is a /30. 

 

If you do have the network of 172.17.11.0/24 somewhere in the network then that's where you need to put that network statement in OSPF, on that specific device.

 

This functionality is true for all IGPs.

 

-David

View solution in original post

12 Replies 12

Hello
Not sure i understand "dummy subnet".  however your could create a static route to null 0 and advertise that via static redistribution.
ip route 172.17.11.0 255.255.255.0 null0


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Yeah dummy subnet is not a technical term. I used it to refer to a subnet that exists but has no interfaces attached to it.

Hello,

 

OSPF does not advertise subnets with the network command. It enables OSPF on interfaces that fall within the rage of the network command you enter. So if you have an interface in the 172.17.11.0/24 network then it will enable OSPF on that interface. 

Furthermore if the interface IP was something like 172.17.11.1/30 - even then the network command above you entered would only ENABLE OSPF on the interface and advertise the subnet of the link which is a /30. 

 

If you do have the network of 172.17.11.0/24 somewhere in the network then that's where you need to put that network statement in OSPF, on that specific device.

 

This functionality is true for all IGPs.

 

-David

"It enables OSPF on interfaces that fall within the rage of the network command you enter."

At the time I agreed, but I have since read that OSPFv2 runs on subnets, and that OSPFv3 runs on links. It seems like OSPFv3 runs exactly like you describe, but isn't OSPFv2 different?

Sources for what I have read: https://ipcisco.com/lesson/ospfv3-open-shortest-path-first-version-3-ccnp/ and https://ipwithease.com/ospfv2-vs-ospfv3/

From what I understand now it is more that it enables OSPF on subnets that fall within the range of the network command, and these subnets must be configured on one of the interfaces of the router where we insert the network command.

Is this correct?

Edit- For an unrelated reason I was reading RFC 5340 and therein it says

OSPF now runs on a per-link basis rather
   than on a per-IP-subnet basis.

 Edit Number 2- I found this onhttps://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_ospf/configuration/15-1sg/ip6-route-ospfv3.html

"In OSPFv3, each interface must be enabled using commands in interface configuration mode. This feature is different from OSPF version 2, in which interfaces are indirectly enabled using the device configuration mode. "

So there is definitely some enabling of interfaces associated with the network command in OSPFv2

OSPFv3 uses the link local address in IPv6 to form adjacencies so I assume thats what is meant by "links"

I also assume it says OSPFv2 runs on subnets since the interface subnets need to be the same in order for OSPF to form adjacency. OSPFv2 is activated on a link with the network or interface command but it does not specifically advertise the network of that command. It advertises the network of the link. Below is an example:

Lets say I have 2 routers connected to eachother, R1 and R2 on their G0/0 interfaces

Interfaces are configured as follows:

R1

interface G0/0

ip address 10.10.10.1 255.255.255.252

R2

interface G0/0

ip address 10.10.10.2 255.255.255.252

-Then on both routers I configure OSPF like so:

router ospf 1

network 10.10.10.0 0.0.0.255 area 0

Based on the above configuration a lot of people assume the network command is what's advertised. So in this case the 10.10.10.0/24 network will be advertised into OSPF. This is wrong. All the network statement does is activate OSPF on any links that fall within range of that network statement and wildcard mask. Which means any interface with an IP address within 10.10.10.0-10.10.10.255 will have OSPF activated on it. In this case R1 and R2 G0/0 interface does.

That being said the links themselves are only a /30 - this is what's advertised into OSPF. On the local router it wont show in OSPF since its directly connected and therefore has a lower AD. But it will show as 10.10.10.0/30 in the rest of the OSPF domain. 

After that explanation I hope it clears it up that you cannot just put  a network statement under OSPF hoping it will advertise it. First there has to be an active interface in that range and the network that's advertised is the network configured on the interface that has OSPF activated on it.

-David

 

can check the area range command may be it can help 
Configuring OSPF Route Summarization in Cisco - GeeksforGeeks

 

Hello,

put the corresponding IP addresses in the topology drawing, so we can see what IP addresses actually exist. What are the IP addresses used for the link between R5 (F0/1) and R6 (F0/0) ? Better yet, post the full running configurations of both routers...

The reason I didn't post this is because I found it unnecessary. It's not exactly about this specific network, it's a more theoretical question about advertising in OSPFv2 networks to which a router has no interface attached.

if you run IPv4 I can sure run lab help you but IPv6 I am so weak. 
if want to run IPv4 please inform me.

Hi @MHM Cisco World. The question I have is not one that pertains to any specific laboratory, I'm not trying to achieve any particular network configuration. It is something more fundamental about the functioning of OSPFv2. The question is, why can't a router running OSPFv2 advertise a network to which it has no attached interfaces? As you can read in @David Ruess 's answer, according to him "It enables OSPF on interfaces that fall within the rage of the network command you enter. " Now I have read elsewhere that OSPFv3 does work on interfaces, but not OSPFv2, and I'm trying to clarify that information.

You mention advertise, the routers advertise the network if

Opsf config with net and this net is connect

or

redistrubte static 

Or 

It recieved from other router and advertise to other routers

Which case you have ? 

In this case, none. There was no connection to this network because it didn't exist, so I had to configure a static route.

After configuring a static route, like you said, I could redistribute static.

Review Cisco Networking for a $25 gift card