dhcpcd icon indicating copy to clipboard operation
dhcpcd copied to clipboard

[Question] dhcpcd on a virtual nic for alpine

Open daggs1 opened this issue 1 year ago • 4 comments

Greetings,

I have an alpine setup running openrc and dhcpcd. dhcpcd is started on the boot runlevel, on the default runlevel there is a service that boots vms. one of the vms creates a virtual nic which connects the host with that vm. if I run dhcpcd on that nic manually, I get ip, the problem is who to make it automatic. another issue I'm looking to solve is the ip renewal part, it seems that if I leave the system up for the night, the ip lease on that nic expires and I loose network connection between them.

any recommendations how to configure dhcpcd to auto dhcp when the device is created and maintain ip lease if expired?

Thanks

daggs1 avatar Nov 27 '24 16:11 daggs1

@rsmarples any idea how to handle such issue?

daggs1 avatar Dec 17 '24 06:12 daggs1

Sorry for not replying earlier, this slipped off my radar.

So if you add dhcpcd to the boot or default runlevel with it's stock configuation, it will operate on all interfaces, virtual or otherwise. If they are interface types dhcpcd can work with. When leases expire they should renew automatically - some configs are expected to fail renew but then rebind before expiry.

In other words I'm not sure how else to handle your issue. Please provide more detail.

rsmarples avatar Jan 16 '25 09:01 rsmarples

Sorry for not replying earlier, this slipped off my radar.

So if you add dhcpcd to the boot or default runlevel with it's stock configuation, it will operate on all interfaces, virtual or otherwise. If they are interface types dhcpcd can work with. When leases expire they should renew automatically - some configs are expected to fail renew but then rebind before expiry.

In other words I'm not sure how else to handle your issue. Please provide more detail.

sure, which info do you need?

daggs1 avatar Jan 20 '25 06:01 daggs1

Well, lets start with the basics. Which runlevel did you add dhcpcd to?

rsmarples avatar Jan 20 '25 11:01 rsmarples