Question

Issues configuring OSPF

  • 9 December 2018
  • 1 reply
  • 333 views

Hey peeps,

When trying to configure a basic OSPF network, the routes to not seem to get advertised and there is no connectivity between subnets.

Here are the router configs:
https://pastebin.com/r1SKa2Tn

the ospf deamon is turned on on both VMs.
I am using vmware workstation, and swp1-9 are in a host-only network.

If anyone knows how I could fix this issue and get OSPF to work that would be amazing.

Thanks in advance!

1 reply

It appears you're using the wrong network statements in ospf. Since you're using a /32 mask on your network statements, they need to match the interface addresses exactly (that or change the mask on the network statements.)

In other words, your interfaces in /etc/network/interfaces are these on R1:

auto swp1
iface swp1
address 10.2.1.1/32

#Link to C2-2
auto swp2
iface swp2
address 10.2.2.1/32

But the network statements are these:

router ospf
ospf router-id 10.2.1.1
network 10.2.1.0/32 area 0.0.0.0
network 10.2.2.0/32 area 0.0.0.0
network 10.4.1.0/24 area 0.0.0.0

Note the network statements under ospf end with .0 instead of .1 like the actual interfaces.

Either make the network statements exactly match the interface addresses or make the mask wider on network statement.

Give that a try and see if it works better for you.

Reply