This is a guide to configuring OSPF between Cisco IOS and the open-source Vyatta router platform. I was able to do all of this on my desktop PC, by running Cisco IOS in GNS3 and Vyatta as a virtual machine. I used the guide here to bridge both virtual routers together, so that communication could be established.

The Cisco side was pretty straightforward. I configured the FastEthernet interface and enabled OSPF on it:

R1#(config)interface Fa0/0
R1#(config-int)ip addr
R1#(config-int)no shut
R1#(config)router ospf 1
R1#(config-router)network area 0

The Vyatta side took some doing, though there were more interfaces involved here, so that could be to blame. First, I set up all the interfaces with their respective IP addresses:

[email protected]:~$ configure
[email protected]# set interfaces ethernet eth0 address
[email protected]# set interfaces ethernet eth1 address
[email protected]# set interfaces ethernet eth2 address
[email protected]# set interfaces ethernet eth3 address
[email protected]# set interfaces ethernet eth4 address

Then, I enabled OSPF on the interfaces I configured:

[email protected]# set protocols ospf area 0 network
[email protected]# set protocols ospf area 10 network
[email protected]# set protocols ospf area 10 network
[email protected]# set protocols ospf area 10 network
[email protected]# set protocols ospf area 10 network

I then set the router ID and configured the router to log adjacency changes.

[email protected]# set protocols ospf parameters router-id
[email protected]# set protocols ospf log-adjacency-changes

I want to mention that I created the four ethernet interfaces in the 192.168 networks so that I could demonstrate inter-area route summarization from the Vyatta router. To summarize these four networks in area 10 so that area 0 would only see one route, I entered the following:

[email protected]# set protocols ospf area 10 range

After commiting the changes, I checked to verify that we had established a neighbor relationship with R1.

[email protected]:~$ show ip ospf neighbor

Neighbor ID Pri State           Dead Time Address           1 Full/Backup       32.136s

According to that output, the Vyatta router had established a neighbor relationship with R1, and that R1 was acting as the backup designated router for the network, which means the Vyatta router was the DR proper.

Since we had a valid neighbor relationship, I wanted to see if my summarization configuration worked:

R1#show ip route
Routing entry for, supernet
  Known via "ospf 1", distance 110, metric 20, type inter area
  Last update from on FastEthernet0/0, 00:07:29 ago
  Routing Descriptor Blocks:
  *, from, 00:07:29 ago, via FastEthernet0/0
     Route metric is 20, traffic share count is 1

The routing table lists it as a supernet, a.k.a. a summary route, it is an inter-area route, which is true because the networks are in area 10, and the correct mask is being used, encompassing all our subnets, but no more. Success!

The last thing I wanted to do is practice passing a default route from the Cisco router to the Vyatta router. I first created the static route, then instructed OSPF to originate default information from R1 to other routers, which passes the default static route along with normal route updates.

R1(config)#ip route
R1(config)#router ospf 1
R1(config-router)#default-information originate

After reviewing the routing table on the Vyatta router, we can see that the route has made it across the network, and that all traffic that matches this route should get sent to R1. Great success!

[email protected]:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
O - OSPF, I - ISIS, B - BGP, > - selected route

O>* [110/1] via, eth0, 00:00:12


Matt Oswalt

Matt Oswalt is an all-around technology nerd, currently focusing on networking, software development, and everything in between. He is at his happiest in front of a keyboard, next to a brewing kettle, or wielding his silo-smashing sledgehammer. He spends his days diving deep into the intersection of networking and software, and likes to blog about his experiences when he comes up for air. You can follow him on Twitter or LinkedIN.