# Renew ip-address [solved]

## gmtongar

There's one thing I've been wondering about. Is there a way besides /etc/init.d/net.wlan0 restart to request/renew the IP-address?

Thing is, I often lose connection to the router (or the router needs to be reset for some reason or other), and by restaring the service all related services needs to be restarted as well, which is a problem when I've also mounted an nfs partition (or is there a command which forces an unmount of a network mount?).

gmtongar

----------

## bobspencer123

you can try manual:

```

ifconfig wlan0 down

ifconfig wlan0 up

dhcpcd wlan0

```

you might have to remove lock by doing:

rm /var/run/dhcpcd-wlan0.pid 

before you dhcpcd wlan0

----------

## UberLord

Even easier than that when using dhcpcd  :Smile: 

```
dhcpcd -n wlan0
```

It won't magically fix a flaky wireless connection though.

dhcpcd-4.99 has improved netlink support so that it handles carrier up/down better, which your wireless driver should do.

----------

## gmtongar

Great ! Thanks guys, thanks for your quick respond. 

Thought I'd learned a lesson about the magic of dhcpcd (but forgotten somewhere down the line...)   :Very Happy: 

----------

