dhcpcd-discuss

Re: bridge with dhcpcd

Roy Marples

Thu Nov 26 10:40:53 2015

Hi

On 25/11/2015 11:20, Michel, Matthias wrote:
> I try to setup a bridge with usb and eth0
> My goal:
> if no cable is plugged in:
> Bridge link is down. I need an ipv4all address.
> if a cable is plugged in in eth0:
> Bridge link is up. So I try to get IP immediate from dhpc server or an
> ipv4all address.

I'm not sure how bridging on Linux works.
But it sounds like you only want to run DHCP on eth0 as you refer to the
cable, so why not just run dhcpcd on eth0?

> To get the an IP immediately, I use “release” in dhcpcd.conf.

No, you only need release in dhcpcd.conf when you want to release the
lease. From what you say, it doesn't sound like this is what you want.

> But how to realize the first thing when bridge is down? “nolink” in
> dhcpcd.conf is not an option because to get an IP immediately is not
> working than.

nolink just avoid listening to any LINK UP/DOWN events issued by the
kernel. This is generally used when there is a faulty driver.

> Any ideas how to solve my goals?

You haven't actually stated any goals, just problems :)
To add to the mix, link notification on bridges is problematic, but this
is no fault of dhcpcd.
If this isn't working for you, then you can poke dhcpcd into action by
doing this

dhcpcd --rebind

And it will rebind any existing lease right away.

Roy

References:
bridge with dhcpcdMichel, Matthias
Archive administrator: postmaster@marples.name