SOLVED Jail VLAN setup not working; can't obtain IP address although dhclient seems to work.

Status
Not open for further replies.

scus

Cadet
Joined
Aug 27, 2017
Messages
4
Hello there,

I have a jail, which I want to connect to a VLAN. I added two VLANs (id 1 and 2 with interfaces vlan1 and vlan2). I configured FreeNAS to obtain an IP on vlan1. This works without a problem. I left the em0 and vlan2 interfaces unconfigured, except for "up" in the options field. I followed https://forums.freenas.org/index.php?threads/how-to-set-separate-vlan-for-jail.54019/ and inserted "vlan2" into "/mnt/pool0/jails/.newton.meta/iface". In the jail, ifconfig outputs

Code:
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
	options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
	inet6 ::1 prefixlen 128 
	inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1 
	inet 127.0.0.1 netmask 0xff000000 
	nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
	groups: lo 
epair2b: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
	options=8<VLAN_MTU>
	ether 02:ff:ff:00:0c:0b
	inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 
	inet6 fe80::ff:ffff:fe00:c0b%epair2b prefixlen 64 scopeid 0x2 
	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
	media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
	status: active
	groups: epair 


As you see the interface doesn't get an IP address. When I run dhclient epair2b it seems like the interface gets an IP:

Code:
DHCPREQUEST on epair2b to 255.255.255.255 port 67
DHCPACK from 10.1.0.1
bound to 10.1.0.4 -- renewal in 300 seconds.


However, another ifconfig gives the same output as before, i.e. no IP address.

What am I missing?
 

scus

Cadet
Joined
Aug 27, 2017
Messages
4
Second addendum: I can see ICMP echo requests from the router via tcpdump:

Code:
17:06:23.361922 IP 10.1.0.1.60357 > 255.255.255.255.5678: UDP, length 126
17:06:23.361944 IP6 fe80::6e3b:6bff:fe1f:fc43.5678 > ff02::1.5678: UDP, length 126
17:06:42.443070 IP 10.1.0.1 > 10.1.0.15: ICMP echo request, id 39949, seq 0, length 30
17:06:43.462917 IP 10.1.0.1 > 10.1.0.15: ICMP echo request, id 39949, seq 256, length 30
17:06:44.478279 IP 10.1.0.1 > 10.1.0.15: ICMP echo request, id 39949, seq 512, length 30
17:06:45.495651 IP 10.1.0.1 > 10.1.0.15: ICMP echo request, id 39949, seq 768, length 30
17:06:46.514272 IP 10.1.0.1 > 10.1.0.15: ICMP echo request, id 39949, seq 1024, length 30
 
D

dlavigne

Guest
It sounds like the jail's rc.conf isn't setup to look for a lease.

In the FreeNAS GUI, is the IPv4 DHCP checkbox for the jail checked? If so, what is the contents of the jail's /etc/rc.conf?
 

scus

Cadet
Joined
Aug 27, 2017
Messages
4
I double checked everything (on the NAS) and it worked when I inserted another interface in the iface file (so the rc.conf) seemed to be okay.

Finally I found the error today: I made a typo in the configuration of the DHCP server (it's IP was not in the subnet assigned to the clients). *d'oh!* I don't know, why it showed the "correct" IP in the DHCPACK message.

Sorry to bother you!
 
Status
Not open for further replies.
Top