in NDD430

Objective
To configure OSPF using quagga and establishing a connection to everyone else on the bridged network.
Prerequisite: Completion of Check point 4

Step 1: Bridge Your Connection

Bridge the router main interface eth0; Click VM in the menu bar and click Settings.

The Click on the NAT network adapter an click on Bridge: Connected directly to the physical network.

Restart the interface:

[root@router ~]$ ifdown eth0 && ifup eth0

 

Step 2: Assign Static IP

Check current IP assigned by the class router:

 

[root@router ~]$  ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:0c:29:74:fc:5b 
 inet addr:10.40.93.53 Bcast:10.40.93.255 Mask:255.255.255.0
 inet6 addr: fe80::20c:29ff:fe74:fc5b/64 Scope:Link
 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
 RX packets:991 errors:0 dropped:0 overruns:0 frame:0
 TX packets:923 errors:0 dropped:0 overruns:0 carrier:0
 collisions:0 txqueuelen:1000 
 RX bytes:1290994 (1.2 MiB) TX bytes:73100 (71.3 KiB)

Copy the address as it will be assigned statically.

Edit interfaces file to assign static IP to eth0

[root@router ~]$ nano /etc/network/interfaces

Edit as follows:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
iface eth0 inet static
address 10.40.93.53
netowrk 255.255.255.0

...

 

Step 3: Setup quagga

Install quagga:

[root@router ~]$ apt-get install quagga -y

Enable routing protocols:

[root@router ~]$ nano /etc/quagga/daemons

Edit as follows:

zebra=yes
bgpd=no
ospfd=yes
ospf6d=no
ripd=no
ripngd=no
isisd=no
babeld=no

Copy configuration files to quagga folder:

[root@router ~]$ cp /usr/share/doc/quagga/examples/zebra.conf.sample /etc/quagga/zebra.conf
[root@router ~]$ cp /usr/share/doc/quagga/examples/ospfd.conf.sample /etc/quagga/ospfd.conf

Assign appropriate permissions, user and group:

chown quagga.quaggavty /etc/quagga/*.conf
chmod 640 /etc/quagga/*.conf

Edit zebra.conf file:

[root@router ~]$ nano /etc/quagga/zebra.conf

Make changes as follows:

...

interface lo
description loopback
ip address 127.0.0.1/8
ip forwarding 

interface eth0
description Gateway to Other Users
ip address 10.40.93.53/24
ip forwarding

interface eth2
description LinuxServer
ip address 195.165.8.68/30
ip forwarding

interface eth3
description WindowsServer
ip address 195.165.8.64/30
ip forwarding

...

Save and Exit.

Edit ospfd.conf file:

[root@router ~]$ nano /etc/quagga/ospfd.conf

Make changes as follows:

...

interface eth0
interface eth2
interface eth3

router ospf
network 10.40.90.53/30 area 0
network 195.165.8.0/24 area 0

...

Save and Exit.

Start and Enable quagga.

[root@router ~]$ systemctl start quagga
[root@router ~]$ systemctl enable quagga

To see routing enter router shell and run route command:

root@router:~# vtysh

Hello, this is Quagga (version 0.99.23.1).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
router# show ip route




--------------------

Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, A - Babel,
       > - selected route, * - FIB route

O   10.40.93.0/24 [110/10] is directly connected, eth0, 00:00:15
C>* 10.40.93.0/24 is directly connected, eth0
C>* 127.0.0.0/8 is directly connected, lo
K>* 169.254.0.0/16 is directly connected, eth0
O   195.165.8.0/26 [110/10] is directly connected, eth1, 00:00:15
C>* 195.165.8.0/26 is directly connected, eth1
O   195.165.8.64/30 [110/10] is directly connected, eth2, 00:00:15
C>* 195.165.8.64/30 is directly connected, eth2
O   195.165.8.68/30 [110/10] is directly connected, eth3, 00:00:15
C>* 195.165.8.68/30 is directly connected, eth3
O>* 195.165.14.0/26 [110/20] via 10.40.93.36, eth0, 00:00:03
O>* 195.165.14.64/30 [110/20] via 10.40.93.36, eth0, 00:00:03
O>* 195.165.14.68/30 [110/20] via 10.40.93.36, eth0, 00:00:03
O>* 195.165.17.0/26 [110/20] via 10.40.93.169, eth0, 00:00:03
O>* 195.165.17.64/30 [110/20] via 10.40.93.169, eth0, 00:00:03
O>* 195.165.17.68/30 [110/20] via 10.40.93.169, eth0, 00:00:03
O>* 195.165.38.0/26 [110/20] via 10.40.93.50, eth0, 00:00:03
O>* 195.165.38.64/30 [110/20] via 10.40.93.50, eth0, 00:00:03
O>* 195.165.38.68/30 [110/20] via 10.40.93.50, eth0, 00:00:03
(END)

 

Leave a Reply