5

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

  • setting up multiple cloned interfaces

    or

  • 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/24"
ifconfig_lo1_alias1="inet 10.1.1.2/24"

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?

dakini
  • 325
  • 3
  • 13
  • 1
    I'm guessing that using separate interfaces allows for easier management of more advanced networking, as opposed to having to use [setfib(1)](https://www.freebsd.org/cgi/man.cgi?query=setfib&manpath=FreeBSD+11.2-RELEASE+and+Ports) – Matthew Willcockson Nov 05 '18 at 01:17
  • Yeah, that sounds right. I did decide to use cloned interfaces, not aliases, as you suggest.. – dakini Nov 25 '18 at 04:53

0 Answers0