2

I'm new to the Quagga and I'm wondering if it is possible to run a different OSPFd daemon per linux network namespace. My goal is to present a different logical OSPF router to external routers per network namespace.

For example, if I have two network namespaces; red and blue. Eth0=nsred and Eth1=nsblue. Eth0/nsred would be connected to external router1 and eth1/nsblue would be connected to external router2.

Can anyone point me towards documentation on how to do this or know of a better way? Thanks in advance!

2 Answers 2

2

You can run anything in a network namespace with "ip netns exec".

So it should just be a matter of writing some scripts to launch your routing daemon in different network namespaces and with different configuration/data files.

2
  • Creating the scripts to launch Quagga in a per namespace with the appropriate config files is the part I'm looking for assistance with. Have you ever done something similar that could point me in the right direction? Feb 24, 2017 at 18:33
  • I don't have experiance with Quagga but I assume you have an init script, systemd unit or something like that which starts it. I would suggest making a copy of that and using it as a starting point passing a different configuration file and using ip netns exec to run the actual daemon. Feb 27, 2017 at 18:36
0

I was able to get a per namespace instance of quagga running by specifying namespace specific options per daemon. For example,

Zebra:
/usr/lib/quagga/blue/zebra -d -f /etc/quagga/zebrab.conf -A 127.0.0.1 -P 2000 -i /var/run/quagga/blue/zebra.pid -z /var/run/quagga/blue/zserv.api

OSPFd:
/usr/lib/quagga/red/ospfd -d -f /etc/quagga/ospfdb.conf -A 127.0.0.1 -P 2001 -i /var/run/quagga/blue/ospfd.pid -z /var/run/quagga/blue/zserv.api

I'm sure there is a better way but this makes it functional. I need to do some work on the VTY options but using telnet to make the ospfd configurations works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.