1

I have an Ubuntu VM in which I deployed images and the rootfs for my U-Boot. In the VirtualBox (Version 5.0.2) Settings I have adjusted a Bridged Adapter. In this image you can see my set-up: Set up

When I give the VM an IP with

sudo ifconfig eth1 192.168.99.1

I can ping the VM with U-Boot. However eth1 interface loses the IP very quickly again and I found no solutions how to prevent this.

I read that this has to do with the ARP-protocol and can't be disabled. Can you help me with possible configurations for how I can access a VM on a host from an board with U-Boot?

PS: The board and the host is only connected through a LAN cable. I read somewhere that a switch between would resolve the losing of the IP. I tried this but nothing seemed to happen.

1 Answer 1

0

I now could eventually receive an IP, which I don't lose. Everyone who has the same issue, namely losing IP after a short time in bridged network can use this solution, too [My Ubuntu is 14.04 LTS].

In the host system nothing has been changed. I still use a Bridged Adapter in Virtual Box.

1. Set up a DHCP Server*:

sudo apt-get install isc-dhcp-server

2. Edit the configuration file for the DHCP daemon: /etc/dhcp/dhcpd.conf:

cat >> /etc/dhcp/dhcpd.conf << EOF
subnet 192.168.2.0 netmask 255.255.255.0 {
        interface eth1;
        range 192.168.2.10 192.168.2.40;
        option domain-name-servers 192.168.2.1;
        option broadcast-address 192.168.2.255;
        option subnet-mask 255.255.255.0;
        option routers 192.168.2.1;
}
EOF

(The parameters can adapted on individual needs of course.)

3. Start the DHCP-Server:

sudo /etc/init.d/isc-dhcp-server start

4. Wait for your IP:

ifconfig eth1 | grep "inet addr"

There might be problems with getting an IP. Disabling the ethernet interface with the command ip link set eth0 down and rebooting and starting the DHCP-Server again might help with this problem.

Take a loo into /var/log/syslog in the case you should encounter errors:

cat /var/log/syslog

*The Guide is in German, however on the bottom of the side there are links to English sites.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .