--- Comment #5 from Yuri Victorovich <[hidden email]> ---
(In reply to Eugene Grosbein from comment #4)
I am doing this in the context of the containerization application that I am
working on, yet unannounced (https://github.com/yurivict/crate). It is already
functional, but needs networking and configuration management bits to be added
It runs programs and services in jails, and connects them to network
dynamically using firewall rules or bridges.
The main mode of connectivity is the "blend" mode when it blends with the host
IP address using epair(4) and firewall rules. This doesn't involve creation of
IP addresses, and I have it working, except for some minor details.
The secondary mode is the "lan" mode which creates a dedicated LAN IP address
for each container. I asked this question originally for this mode. Your
suggestion about moving the IP address to the bridge makes sense. The process
looks a bit more invasive than I originally thought it would be, because it
would involve altering the network settings, moving the IP to another interface
for the life of container or all containers and then moving it back, as per
your advise. I will try this. This is only needed to find a spare LAN IP to
allocate, and is not needed for subsequent container operation. Also this "lan"
mode isn't strictly necessary because the "blend" mode should satisfy most use
cases. I just came up with it, and thought that it would be interesting to
implement it too.