Ubuntu 16.04 Virtual Machine gets no DHCP assignment

Dennis Lovelady

Dabbler
Joined
Apr 6, 2016
Messages
31
*** Notice: Because Copy/Paste from the terminal running under VNC doesn't work, I am retyping a lot of details here. Without networking, this is the best I can do for now. Please forgive minor typos, which I will hope to avoid here. ***

I have configured a new UBUNTU 16.04 Virtual Machine on my FreeNAS 11.3-U2 system. (This is my first Virtual Machine on this platform). The network interface is attached to the host's igb1 interface, emulating Intel e82545 (e1000). For consistency with other systems (operational laziness if you like) in the network, I have created /etc/udev/rules.d/70-persistent-net-rules with a single line: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:a0:98:29:02:07", ATTR{dev_id}=="0x0", ATTR{type}=="1", NAME="eth0"
(Above (names the specified interface to eth0 in UBUNTU16.04.)

This is on a network 10.158.54.x/24. FreeNAS shows an IP address of 10.158.54.10 on that (igb1) interface

If I do ip addr command, I see lo is up, with a 127.0.0.1 address, and the following:
````
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:a0:98:29:02:07 brd ff:ff:ff:ff:ff:ff
inet 169.254.3.119/16 brd 169.254.255.255 scope link eth0:avahi
valid_lift forever preferred_lift forever
inet6 fe80::2a0:98ff:fe29:207/64 scope link
valid_lift forever preferred_lift forever
````

in /etc/network/interfaces I have:
````
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
````
ifconfig shows that there is no ip4 (inet) address.

I have tried switching to VirtIO adapter type, no joy. Since the name eth0 shows up in both "ip addr" and "ifconfig" commands (and I've done this on other platforms) I trust that the rename is safe. Everything shows as active but DHCP server doesn't see any request.

Any ideas what I can do to troubleshoot this connection? Thanks.
 
Last edited:

RegularJoe

Patron
Joined
Aug 19, 2013
Messages
330
Hi Dennis,

Did you figure it out? Could it be your NIC on your freenas box is not a good one? I would try to disable any of the fancy off load features on your nic to see if that helps. Is your FreeNAS box getting an address from DHCP or a static IP address? I would try a static to see if that allows the broadcast to get to and from your physical to the vitual.

Thanks,
Joe
 

Dennis Lovelady

Dabbler
Joined
Apr 6, 2016
Messages
31
Thanks for your reply @RegularJoe

I never did figure it out. Since this was a fresh install and nothing had been done with it, I dumped the idea and installed Ubuntu 20.04, which runs reliably. Something to do with the way I installed Ubunutu 16.04 LTS, I'm sure, but the better choice was to use the latest anyway. What I hoped to do, was port another system to this VM, and that is progressing. With every improvement comes a little pain, right? :)

Thanks again, I appreciate it.
 
Top