# Forcing a network card to do a DHCP discover



## Johnny2Bad (Feb 3, 2011)

How do you force a network card to do a DHCP discover i.e. request a new IP address?

I've tried restarting the network and routing but it doesn't seem to work.

Thanking you in advance,
Jonathan.


----------



## wblock@ (Feb 3, 2011)

If you have the card set to DHCP in /etc/rc.conf,
`% service netif restart`

Otherwise, just re-run dhclient(8).  I wouldn't be surprised if HUPping it would do it, but the man page doesn't mention that.

Additional: restarting dhclient just gets a new lease, which will probably have the same IP address as the previous one.


----------

