Odroid C2 sometimes not obtaining an IP via DHCP

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
djjerdog

Odroid C2 sometimes not obtaining an IP via DHCP

Post by djjerdog »

Having an issue with the Odroid C2, about half the time I power on the C2 it doesn't obtain an IP (via DHCP) during bootup. Also, if I connect the ethernet after the initial startup it doesn't obtain an IP.

To work around this I either need to force a reboot and then on the next boot it will usually obtain an IP or I have to connect a keyboard and do a "dhclient eth0".

Any ideas why it doesn't always like to grab an IP on initial boot and any suggestions on how I can get it to request an IP on a plug event for eth0?
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Odroid C2 sometimes not obtaining an IP via DHCP

Post by k-plan »

Hi,
djjerdog wrote:... any suggestions on how I can get it to request an IP on a plug event for eth0?
you can install netplug and test if it will work for you.

Code: Select all

:~# apt-get install netplug

https://github.com/Fourdee/DietPi/issue ... -215974863

But I think your DHCP Server in your network have/is a problem or something filters dhcp broadcast (a managed L2 switch?)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
djjerdog

Re: Odroid C2 sometimes not obtaining an IP via DHCP

Post by djjerdog »

Hi K-plan,
Thanks for the reply and suggestion.

I tried netplug first but still experienced the same issue. I then tried ifplugd, and so far I've been able to get an IP every time, even when plugging the network cable in after boot.

I'm surprised it doesn't request an IP automatically on a plug event by default. Hopefully this will at least allow me to work around the issue.

FWIW - The network switch is a managed layer2/3 and pfsense for DHCP server. No other devices on my network have issues obtaining IP, except for the couple C2's I have running diet-pi. I'll double check to make sure there are no filters on the switch or router that could be interfering. Thanks again@
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Odroid C2 sometimes not obtaining an IP via DHCP

Post by k-plan »

Hi,
djjerdog wrote:The network switch is a managed layer2/3
Is it a Cisco or HP switch (or something similar professional Network equipment)?

Is "spanning tree" enable?

Have you configure "portfast" on the access ports?

If not, you can get DHCP timeout errors .

https://www.nlogic.co/spanning-tree-portfast/

Code: Select all

## HP:
spanning-tree <port_num> admin-edge-port

## Cisco:
interface FastEthernet0/1
 switchport mode access
 spanning-tree portfast


djjerdog wrote:I tried netplug first but still experienced the same issue. I then tried ifplugd, and so far I've been able to get an IP every time, even when plugging the network cable in after boot.
Yes ifplug is more inert as netplug. And you can configure a delay and action as well.
https://github.com/Fourdee/DietPi/issue ... -216051241

And where are some additional packages for it like ifupdown-extra
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Post Reply