1

In dhcpcd, there is an option -T which is declared that:"Test case, when dhcpcd goes through the DHCP negotiation sequence but doesn't actually configure the interface."

I would like to do the same behavior with dhclient. Does anyone knows if there is any way to do that with dhclient?

1

The documentation is not 100% clear, but the dhclient -n option may do what you want (from dhclient(8)):

-n Do not configure any interfaces. Most useful combined with the -w option.

If that doesn't work, I can't see any other option than using dhcpcd for testing.

  • I had tried using -n option : dhclient -n eth0 , however it doesn't work. It just print out the usage. Thanks for you answer. – nick Jul 14 '15 at 10:12
  • @nick Which version of dhclient are you using? – mjturner Jul 14 '15 at 10:13
  • This is my dhclient version: Internet Systems Consortium DHCP Client 4.2.6 – nick Jul 14 '15 at 10:17
  • Actually, -n option can only work without any interface specified. Looks like no thing equivalence for the command 'dhcpcd -T eth0' :( – nick Jul 14 '15 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.