This configuration has been tested in a home environment with a home router provided by Virgin Media
The Linux host I am using is CentOS 6.5
- Install the routing packages
yum install quagga - Edit the configuration file /etc/quagga/zebra.conf to look like as belowhostname vhostpassword vhostenable password vhostinterface lomulticastinterface eth0multicastinterface virbr0multicastinterface virbr0-nicmulticast log file /var/log/quagga/zebra.conf The interfaces highlighted in yellow are my virtual interfaces created by my virtualisation software, in this case it is virt-manager. These are the interfaces that bridge network connectivity between your virtual switch and your physical lab network
- Edit the configuration file /etc/quagga/ospfd.conf to look like as belowhostname vhostpassword vhostenable password vhost
router ospfrouter-id 192.168.0.25network 192.168.0.25/24 area 0network 192.168. 0100./24 area 0
log file /var/log/quagga/ospfd.log
The IP address in yellow needs to be changed to the IP of your host's network card that is connected to the physical network
The network addresses in blue need to be set to the networks you want to route together. Note, these MUST be network addresses otherwise routing will not work -
Create the 2 log files and allow for write access to them
sudo touch /var/log/quagga/zebra.conf sudo touch /var/log/quagga/ospfd.conf sudo chmod 777 /var/log/quagga/zebra.conf sudo chmod 777 /var/log/quagga/ospfd.conf
Note, the use of 777 should only be used in a testing environment, in a real live environment you may want to filter permissions a bit more as this allows all uses and processes to read, write and execute these files which can lead to a security hole. - Edit the line in /etc/sysctl.conf to read net.ipv4.ip_forward = 1
- Edit the Linux firewall to be trusted on all ports and to allow masquerading on all ports. Add any ports created by the virtualisation host. Use system-config-firewall for this. This can be done from a GUI session or a pure command line session
- Restart the Zebra, OSPFD and network services service zebra restart service ospfd restart service network restart
- Make the services start on start-up using chkconfig chkconfig zebra on chkconfig ospfd on
- Test the configuration by trying to ping an IP such as 8.8.8.8
No comments:
Post a Comment