jails Linux VNET Jail: How to Get DHCP / dhclient Working?

Hi everyone,

I've recently been working on setting up a Linux Jail with a VNET interface and I've managed to get the VNET interface up and running with a static IP by using copies of ifconfig and route from /rescue. However, I'm facing an issue with getting dhclient to work.

I've tried replacing the ifconfig and route binaries in /usr/sbin with the copies from /rescue, but I'm still unable to get dhclient to function properly. Does anyone have any suggestions or insights on how to get dhclient working in a Linux VNET Jail?
 
DHCP isn't done through ifconfig(8), although the regular ifconfig_<int>="DHCP" stanza in /etc/rc.conf might give that impression. That variable is parsed by /etc/rc.d/netif and delegates to /etc/rc.d/dhclient, because it's dhclient(8) that does the actual DHCP request and setting of the interface, gateway address and DNS setttngs (through resolvconf(8)).
 
Umm, so even if I copy /rescue/dhclient, the dhclient will not work as there is no /etc/rc.d in a Linux system. Is that correct?

In the current situation, what I can do is write a new service to bring up the VNET interface and set the IP address.

Also, I have noticed many debug/error messages. Can I ignore them?
Code:
linux: jid 1 pid 38001 (ping): unsupported setsockopt level 255 optname 1
linux: jid 1 pid 21524 (iperf3): unsupported getsockopt level 6 optname 13
linux: jid 1 pid 21524 (iperf3): unsupported TCP socket option TCP_INFO (11)
linux: jid 1 pid 22656 (dmesg): syslog unsupported type 0xa
linux: jid 1 pid 27245 (journalctl): unsupported prctl option 27
linux: jid 1 pid 27245 (journalctl): unsupported prctl option 39
linux: jid 1 pid 27245 (journalctl): unsupported prctl option 47
linux: jid 1 pid 28063 ((pager)): unsupported prctl option 35
 
Back
Top