Routing question

Answered Question
Jan 17th, 2008

This questions seems to be so basic, but it is making me confused.

Lets say that I have the following routing in my router :

router ospf 10

network 10.130.0.0 0.0.255.255 area 1

ip route 10.130.142.0 255.255.255.0 10.1.1.2

In the routing table I will have the route which is advertised by static route.

Now imagine that 10.1.1.2 is down because of a reason, in my routing table will I still have a route to network 10.130.142.0 via OSPF???

Thanks for your help,

Mehdi

I have this problem too.
0 votes
Correct Answer by Jon Marshall about 8 years 10 months ago

Mehdi

The statement "network 10.130.0.0 0.0.255.255 area 1" under your ospf config is not a route advertisement. It simly tells the OSPF protocol which interfaces to run OSPF on.

So if you have the static route in your route table and 10.1.1.2 goes down whether or not you have a route to the 10.130.142.0 network depends on the whether you have received a route for that from any OSPF neighbors (or more specifically an LSA for that network).

Jon

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
Jon Marshall Thu, 01/17/2008 - 11:42

Mehdi

The statement "network 10.130.0.0 0.0.255.255 area 1" under your ospf config is not a route advertisement. It simly tells the OSPF protocol which interfaces to run OSPF on.

So if you have the static route in your route table and 10.1.1.2 goes down whether or not you have a route to the 10.130.142.0 network depends on the whether you have received a route for that from any OSPF neighbors (or more specifically an LSA for that network).

Jon

Jon Marshall Thu, 01/17/2008 - 12:00

Mehdi

Apologies but i should have be more specific. What i said about OSPF is still relevant but be aware that if the interface with 10.1.1.2 is down this will not remove the static entry from your route table so you will just black hole traffic.

That is one of the many reasons why it's a good idea to run a dynamic routing protocol.

Jon

persepolis77 Thu, 01/17/2008 - 12:07

Jon,

How my routing table will be if I add the following line (2 static routes with different metric)

ip route 10.130.142.0 255.255.255.0 10.1.1.2

ip route 10.130.142.0 255.255.255.0 10.2.2.2 10

if 10.1.1.2 goes down, the 2nd route will appear in routing table, right?

Jon Marshall Thu, 01/17/2008 - 12:31

Mehdi

No it still won't work because the first route

10.130.142.0 255.255.255.0 10.1.1.2

is not removed from the routing table.

What you can do is have the dynamic routing protocol insert the 10.130.142.0 route. You can then add a static route with an AD distance greater than the routing protocol eg.

OSPF route

10.130.142.0 255.255.255.0 10.10.1.2

then add a static route

ip route 10.130.142.0 255.255.255.0 10.2.2.2 200

The OSPF route will be used but if 10.10.1.2 goes down then the static route would then be used.

Jon

Actions

This Discussion