For the past day, I've been fighting with configuring three jails, their epairs, a bridge and the host network interfaces. Things work now, but I feel it's worthwhile detailing my findings. The upshot is that I found it impossible to configure the network in such a way that upon reboot or
I solved my problem by creating a cleanup service (netif-cleanup) which requires NETWORKING and finishes what netif should have done. I have to say, I really appreciate the service methodology as a means of handling FreeBSD's systems. Putting together the clean up code was very simple.
Anyway, I realize most people just use Devin Teske's
My set up is three jails: one handling DNS and DHCP, and the other two relying on the first jail. Each jail has an associated epair the other end of which goes into a bridge. There are two physical NICs, one for WAN one for a trunked LAN. The latter is also added to the bridge. I'm building a gateway/firewall.
As I said, everything works well once all interfaces are up and connected through the bridge.
The problem I had was that upon reboot or restart, only the LAN interface was in the bridge and some of the epair ends were down. It didn't matter how I ordered the configuration data, something always wasn't right. I should note that I was also renaming the epairs and am unsure about that impact.
I can't tell if netif reasons about when to add an interface to a bridge, if it has some generic buckets for creation, configuration, connection and then whatever happens happens. I'm not sure what more I could have done to get the configuration correct.
service netif restart, everything came up and connected. I could manufacture the network from scratch at the command line and I could coax the network to life after reboot by bringing up devices and adding them to the bridge, but I could not reliably configure the network in /etc/rc.conf or /etc/rc.conf.d/netif.I solved my problem by creating a cleanup service (netif-cleanup) which requires NETWORKING and finishes what netif should have done. I have to say, I really appreciate the service methodology as a means of handling FreeBSD's systems. Putting together the clean up code was very simple.
Anyway, I realize most people just use Devin Teske's
jib, which works well. However, it doesn't work with child jails and has some other side-effects, and I'm in a learning mode and want to use as few tools as possible.My set up is three jails: one handling DNS and DHCP, and the other two relying on the first jail. Each jail has an associated epair the other end of which goes into a bridge. There are two physical NICs, one for WAN one for a trunked LAN. The latter is also added to the bridge. I'm building a gateway/firewall.
As I said, everything works well once all interfaces are up and connected through the bridge.
The problem I had was that upon reboot or restart, only the LAN interface was in the bridge and some of the epair ends were down. It didn't matter how I ordered the configuration data, something always wasn't right. I should note that I was also renaming the epairs and am unsure about that impact.
I can't tell if netif reasons about when to add an interface to a bridge, if it has some generic buckets for creation, configuration, connection and then whatever happens happens. I'm not sure what more I could have done to get the configuration correct.