I am currently studying for my CCNA and I am at the OSPF part. While on holidays and reading through the OpenBSD man pages I noticed that OpenBSD comes with various routing protocols in the base system.
So I created a VM running OpenBSD 6.1 in QEMU available here to experiment with OSPF using the base installation configuration (no other packages required or installed) to experiment with it.
Here is the topology:
As you can see in the terminal window when R1’s link to OBSDR-1 goes down a path to R1 via R2 is automatically selected. The convergence time was around 10ms! Not too bad at all.
Here are the configuration details for the OBSDR-1 box (OpenBSD QEMU machine):
Please not the the interface em2 is missing a “passive” sub-command.
You can use the ospfctl command to show information on the FIB and RIB:
The Cisco routers have a basic config here is R1 (most content omitted):
interface GigabitEthernet1/0 ip address 10.0.0.1 255.255.255.252 negotiation auto ! interface GigabitEthernet2/0 ip address 10.0.0.5 255.255.255.252 negotiation auto ! interface GigabitEthernet6/0 ip address 10.1.1.100 255.255.255.0 negotiation auto ! router ospf 1 router-id 184.108.40.206 log-adjacency-changes passive-interface GigabitEthernet6/0 network 10.0.0.0 0.0.0.3 area 0 network 10.0.0.4 0.0.0.3 area 0 network 10.1.1.0 0.0.0.255 area 0 !
Here is R2:
interface GigabitEthernet1/0 ip address 10.0.0.9 255.255.255.252 negotiation auto ! interface GigabitEthernet2/0 ip address 10.0.0.6 255.255.255.252 negotiation auto ! interface GigabitEthernet6/0 ip address 10.1.2.100 255.255.255.0 negotiation auto ! router ospf 1 router-id 220.127.116.11 log-adjacency-changes passive-interface GigabitEthernet6/0 network 10.0.0.4 0.0.0.3 area 0 network 10.0.0.8 0.0.0.3 area 0 network 10.1.2.0 0.0.0.255 area 0 !
Simple! I noticed when the timers of the Cisco routers and OpenBSD box were different the ospf daemon wouldn’t start. So I adjusted the hello timer to 10.
Be sure to check /var/log/messages if /etc/rc.d/ospfd won’t start.
A simple ‘halt -p’ on the OpenBSD box followed by a start command for the OpenBSD router inside GNS3 is all that is needed to bring the machine back up after configuring it for the first time.
Here are some links to software/products used: