While setting up multiple jails on a FreeBSD machine, I also (naturally) need to set up the networking for each jail. It seems to me there are two ways of achieving the same goal - 1) setting up multiple cloned interfaces, or 2) setting up multiple aliases of one clone.

Under the first approach, I do (in /etc/rc.conf)

cloned_interfaces="lo1 lo2 ..."

ifconfig_lo1="inet 10.1.1.1 netmask 255.255.255.0"  
ifconfig_lo2="inet 10.1.1.2 netmask 255.255.255.0"
...

In the second approach, I can do something like

cloned_interfaces="lo1"

ifconfig_lo1_alias0="inet 10.1.1.1/8"
ifconfig_lo1_alias1="inet 10.1.1.2/8"

I currently use the first and it works, and I have it on some authority that (something similar to) the second also does.

The question is what's the fundamental difference between using cloned interfaces and aliases, particularly in this scenario, and which is a better approach?

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.