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

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Why this basic OSPF config doesn't work ?

Sorry for this is stupid, but I am wondering why this OSPF basic config between RouterA and RouterB doesn't work. Doing 'show ip route' I can see that routers are connected via serial and ping each other successfully. However the routing protocol in use is not OSPF. This is a strict point-to-point connection.

Can you shed some light on this ?

(2) Cisco 2610's, connected via serial cable.

RouterA config

interface Serial0/0

ip address 192.1.1.1 255.255.255.0

ip ospf cost 66

ip ospf hello-interval 20

ip ospf dead-interval 120

no fair-queue

!

router ospf 64

log-adjacency-changes

network 192.1.1.0 0.0.0.255 area 0

!

...

RouterB

interface Serial0/0

ip address 192.1.1.2 255.255.255.0

ip ospf hello-interval 20

ip ospf dead-interval 120

clockrate 500000

no fair-queue

!

interface Serial0/1

no ip address

shutdown

router ospf 64

log-adjacency-changes

network 0.0.0.0 255.255.255.255 area 0

!

ip http server

no ip classless

!

!

!

line con 0

exec-timeout 0 0

line aux 0

line vty 0 4

8 REPLIES
Silver

Re: Why this basic OSPF config doesn't work ?

Because the local connected interface is more preferred than the route in OSPF. If you use "show ip ospf database" to verify is the 192.1.1.0 shown in ospf database.

If you want the routingt table show OSPF, you have to learn the route from remote. Say, you configure a loopback address at both ends, then include it in the OSPF then you can view the remote loopback is marked as "O" for OSPF route. But the local loopback interface is still connected only.

Hope this helps.

New Member

Re: Why this basic OSPF config doesn't work ?

How did you know that the "protocol in use is not OSPF"? Did you determine that from loooking at the routing table? The best way of determining what routing protocol(s) running on a router (or multilayer switch, for that matter) is "show ip protocol".

New Member

Re: Why this basic OSPF config doesn't work ?

I thought that by looking at "show ip route", the routing table would show me "O" in case it was OSPF. In this case the routing table shows only "C".

Let me try the 'show ip protocol' command.

Hall of Fame Super Silver

Re: Why this basic OSPF config doesn't work ?

Ronaldo

If the routers were advertising anything to each other more than the connected interfaces then you should see some O routes in the routing table. But the config that you posted only put the connected interfaces into OSPF. So there is not anything for OSPF to advertise to its neighbor other than the connected interface.

In building the routing table a connected route (a C route) is more attractive than an OSPF route (an O route) and the connected route will be what appears in the routing table.

The show ip protcocol command is a good command to verify that OSPF is running. Perhaps even better would be show ip ospf neighbor. This will verify not only that OSPF is running but whether the OSPF routers have established a neighbor relationship.

HTH

Rick

New Member

Re: Why this basic OSPF config doesn't work ?

Try using "show ip ospf neighbor" see if the routers are forming an djacency in between. I would assume they are and there is no problem except that you are not advertising routes, that's all.

Just create on both routers a new loopback interface and advertise it on OSPF.. something like,

RouterA:

Interface lo9

ip address 192.168.251.1 255.255.255.255

router ospf 64

net 192.168.251.0 0.0.0.0 area 0

----------

and Router B:

Interface lo9

ip address 192.168.252.1 255.255.255.255

----------

Now, check your routing table on both routers, you should see the routes being advertised.

New Member

Re: Why this basic OSPF config doesn't work ?

This forum is amazing. Thanks much.

That's the part that I was trying to understand:

Earlier I added the loopback interface configuration OK but I didn't quite understand why I needed them in order to see the advertised OSPF tables. The explanation is because the serial interfaces are the only connection, and that point OSPF is "not needed" there ?

Can you explain this to me:

Imagine I am setting up OSPF in a production environment between a RouterA area 0 and T1 connection, RouterB on the remote site. I guess if I had my respective Ethernet interfaces e0 and e1 for example, configured on the respective RouterA and RouterB, I could see 'show ip route' displaying routing tables built with OSPF, is that right ?

I guess the "loopback" virtual interfaces are being used just to simulate interfaces in a production environment that would be taken by 'ethernet' interfaces, for example ? Is that correct ?

New Member

Re: Why this basic OSPF config doesn't work ?

Essentially, if you only have two routers connected back-to-back via serial, and you don't have any other interfaces on either routers that are active, then you don't need to have any routing protocols for both routers to "talk" to each other via the serial connection, 'cuz they're directly connected.

And, yes, you're right about your scenario. PROVIDED you also include your Ethernet interfaces in the OSPF routing process, otherwise, their subnets will not be advertised, hence you won't be able to see them in the routing table (therefore, they'll be unreachable).

As for Loopback interfaces, they're also quite often used as "Router ID" to easily identify each router. Imagine trying to determine which router is which when you have dozens, or hundreds, of routers. Would you know each router's physical IP addresses? And by the way, if you use loopback interfaces as Router ID, you don't have to include it in the OSPF routing process. And if you have multiple Loopback interfaces, you can manually tell OSPF which one to use as Router ID with the "router-id" OSPF configuration command.0

If you need a good OSPF reference, try searching for "OSPF Design Guide" on Cisco.com. It was written by Sam Halabi (he also wrote a very good BGP book titled "Internet Routing Architecture") around 10 years ago, but is still very much relevant today, since OSPFv2 has not changed since its inception.

HTH

Cheers

Silver

Re: Why this basic OSPF config doesn't work ?

Agreed w/ Michael that you can read the OSPF design guide to understand the OSPF operation and also read some article about IP routing.

What I proposed to use loopback interface that is because I assume you have no extra interface / router, so I use loopback interface to act as a logical interface and prove the routing protocol is working.

Please feel free to ask if there is any question then we will try to ans. it.

Hope this helps.

447
Views
0
Helpful
8
Replies