1

I use the /etc/network/interfaces file on Debian to configure my network interfaces with DHCP. The relevant section looks like this:

allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug eth1
iface eth1 inet dhcp

The manpage of interfaces(5) tells me:

The dhcp Method

This  method may be used to obtain an address via DHCP
with any of the tools: dhclient, pump, udhcpc, dhcpcd.
(They  have been listed in their order of precedence.)

My question: is there a way to specify which dhcp client is used for each interface in the interfaces file?

Say I have both dhclient and dhcpcd installed, and I want to use dhcpcd for both interfaces, or I want dhcpcd for one interface and dhclient for another?

2
  • That's an odd thing to do. Any particular reason? Commented May 6, 2016 at 9:49
  • We used to have setups with esoteric routers where one dhcp client did not work but the other did. So, on Slackware, which we've used before, we made it so you could specify which dhcp client would be used. Perhaps on Debian, the fact that they are all tried in succession makes the explicit config unnecessary. Commented May 6, 2016 at 9:59

1 Answer 1

0

To start dhcpcd manually, run the following command:

dhcpcd <interface>

you can edit the /etc/dhcpcd.conf by adding your interface.

A static profile example:

interface ethX
static ip_address=192.168.0.10/24   
static routers=192.168.0.1
static domain_name_servers=192.168.0.1 8.8.8.8

You must log in to answer this question.

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