Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

OSPF - LAN interface down.

Hi Friends,

router 1 is connected to a host and router 2. OSPF neighborship has been established between router 1 and router 2.

If the interface connected to host of router 1 goes down. Will it be known by router 2 through ospf?

10 REPLIES
Cisco Employee

Re: OSPF - LAN interface down.

Hello,

If the interface connected to the host network on R1 goes down, the R1 will inform the R2 that the network is no longer reachable. As a result, that network will disappear also from R2.

A routing protocol is responsible for providing exact and accurate information about existing networks. If a network exists, it is the job of a routing protocol to tell every router about this network and to find the shortest path to it. If the network later disappears, again, the routing protocol must inform every router that this network is no longer accessible.

Best regards,

Peter

New Member

Re: OSPF - LAN interface down.

Hi Peter,

R1 is not generating any messages about the network being unreachable.

Not even OSPF is conveying network down messages to R2.

The only change is that show ip route now doesn't have the network information of the host.

is there any command to force ospf for generating network down messages for LAN interface?

Cisco Employee

Re: OSPF - LAN interface down.

Hello,

Allow me a question: are you telling me that even after you disconnect the interface on the R1, the R2 still believes that the network exists and points to R1?

If this is the case, can you kindly post the configuration of the both routers here? This behavior of OSPF is generally illegal and I suspect something fishy going on.

There is actually no command to force OSPF to generate "network down" messages. The OSPF is event-driven and whenever a change to router's links happens, it originates a new information about the router (we call it LSA - Link State Advertisement). You do not need to enter any command for this to happen - it is built into the OSPF by its design.

Those configurations will be most helpful. Also please include the output of the show ip route and show ip int brief commands after you disconnect that network from R1.

Best regards,

Peter

New Member

Re: OSPF - LAN interface down.

Hi Peter,

Below are the configs on R1 and R2.

R1#

interface FastEthernet0/0

ip address 10.10.10.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 20.20.20.1 255.255.255.0

duplex auto

speed auto

!

interface Vlan1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 10.10.10.0 0.0.0.255 area 0

network 20.20.20.0 0.0.0.255 area 0

!

ip classless

R2#

interface FastEthernet0/0

ip address 20.20.20.2 255.255.255.0

duplex auto

speed auto

!

interface FastEthernet0/1

ip address 30.30.30.1 255.255.255.0

duplex auto

speed auto

!

interface Vlan1

no ip address

shutdown

!

router ospf 1

log-adjacency-changes

network 20.20.20.0 0.0.0.255 area 0

network 30.30.30.0 0.0.0.255 area 0

!

ip classless

interface FastEthernet0/0 of R1 is connected to a host with IP address 10.10.10.1.

R2#sh ip route

20.0.0.0/24 is subnetted, 1 subnets

C 20.20.20.0 is directly connected, FastEthernet0/0.

When I disconnect the lan interface, sh ip route doesn't shows the route u can see above.

My concern in that ospf generate messages when a neighbor goes down. If I had disconnected fa0/1 connected to wan interface of R2, OSPF would have generated a message of 'neighbor down'.

It is not happening when LAN interface goes down.

Regards,

Faizan

Cisco Employee

Re: OSPF - LAN interface down.

Faizan,

I think I am beginning to understand you now. Your OSPF is working flawlessly, isn't it? When the network 10.10.10.0/24 is connected, you can see it also on R2. When you disconnect it from R1, it also disappears from R2, is that so? But you want your OSPF to display a logging message on your console whenever a network discovered by OSPF goes down, right? You want your R2 to display a console message saying "Network 10.10.10.0/24 just went down". Do I get it correctly?

If that is so then I am afraid I will have to disappoint you. There is no such logging facility in OSPF. The console message informing you about losing or detecting a new OSPF neighbor is there because it informs you about a fundamental issue in your network. You cannot start exchanging routing information until you see your neighbors. However, it is not a job of OSPF to display a logging message whenever a network goes up or down. That would under circumstances create excessive amount of logging messages and possibly hinder the operation of a router.

There are certain debugging options that would, among myriads of other messages, allow you to see that a particular network went down. However, running a debug should be done only for diagnostic purposes when trying to solve a problem and it should be turned off in all other cases, as it increases the CPU load.

Best regards,

Peter

Super Bronze

Re: OSPF - LAN interface down.

"If the interface connected to host of router 1 goes down. Will it be known by router 2 through ospf? "

That depends. Besides what Peter has already described, we would need to know whether the interface that connects between R1 and the host is "known" to OSPF on R1 and also what's the OSPF configuration of R1. Interfaces are not automatically known to an OSPF process, and the fact that R1 and R2 are OSPF neighbors doesn't always mean that they share all explict subnets. For example, there could be two different OSPF processes on R1, or R1 might be a ABR or ASBR and not advertize the interface's explicit subnet to R2.

([edit]) NB: the above information was written only after seeing Peter's 1st reply, not all the follow-up posts.

In these later posts, you're comparing the optional neighbor logging up/down with networks being advertized or not. This is a bit like comparing apples and oranges.

If you need to monitor a route, you might be able to monitor it on a router, and log a message, using scripting in the later IOS images.)

New Member

Re: OSPF - LAN interface down.

Hi Peter,

Thanx for your reply.

You got me right and I understood the problem. There is no way that OSPF could generate a 'Network Down' message for LAN interface.

But, is there anyway that I can have the LAN interface as the neighbor of R2?

Super Bronze

Re: OSPF - LAN interface down.

Faizan, unsure whether this question is meant for Peter, since you address him by name, or to me, since I think it's a reply to my post.

Personally, nothing comes to mind to allow an Interface up/down on one router that's not connected to a second router reflect into OSPF on the second router as a OSPF neighbor being up or down. However, the second router might be able to use a reoccuring (EEM?) script to check the status (e.g. ping it) of an R1 interface (or have R1 check it [again with a reoccuring script] and syslog it).

Cisco Employee

Re: OSPF - LAN interface down.

Joseph,

Your reply is most welcome. Thank you!

Faizan, as for your question: you cannot have the LAN interface of R1 appear as OSPF neighbor to R2. Only routers can be neighbors, not individual interfaces. Of course, two routers have a neighborship through a pair of interfaces but those interfaces must be physically connected. If the LAN interface of the R1 is not physically connected to R2, the R2 cannot detect a loss of neighborship with R1 on that interface - because there isn't any.

Best regards,

Peter

New Member

Re: OSPF - LAN interface down.

Peter and Joseph,

Thank you for your replies!

All my doubts have been cleared.

Regards,

Faizan

325
Views
0
Helpful
10
Replies
CreatePlease to create content