winipcfg or ipconfig /renew equivalent under Linux

i

Wannabe Storage Freak
Joined
Feb 10, 2002
Messages
1,080
I have to say I'm surprised I've never needed to know this before. If I have a Linux system on a network and power it up while the DHCP server is down, how the heck do I later get it to request an IP address once the DHCP server is back up?
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
If an interface is specified as controlled by DHCP, I believe it will continue to make requests until it receives an address.
You could always ifconfig your DHCPless interface to something static and then do "ifconfig eth0 (or whatever) auto-dhcp" when your server is back up and running.
 

i

Wannabe Storage Freak
Joined
Feb 10, 2002
Messages
1,080
Mercutio said:
If an interface is specified as controlled by DHCP, I believe it will continue to make requests until it receives an address.

That would be an intelligent option, and you'd think that's what would happen. But no...
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
Is there anything in /etc/dhclient.conf?
Mine are blank and I can't ever recall putting anything in that file but it's the place to put DHCP client options...
 

i

Wannabe Storage Freak
Joined
Feb 10, 2002
Messages
1,080
Mine has a load of sample configurations, but they're all commented out.

I've since restarted this system of course, so I'm up and running. It's still frustrating me that I don't know the answer to such a simple question. I'll have to play around with dhclient. Presumably there's some way to nudge it into doing something if it's either exited or just sitting there unhelpfully.
 

Mercutio

Fatwah on Western Digital
Joined
Jan 17, 2002
Messages
21,607
Location
I am omnipresent
The dhclient.conf man page says the default time to rebroadcast a DHCP request is five minutes. Should be all magicky and just work.
 

i

Wannabe Storage Freak
Joined
Feb 10, 2002
Messages
1,080
blakerwry said:
ifconfig eth0 down
ifconfig eth0 up

Oh I tried that one. All it did was disable and then reenable the network. It had no effect on DHCP and whether I had an IP address or not. Kind of disappointing really.
 

i

Wannabe Storage Freak
Joined
Feb 10, 2002
Messages
1,080
Well that's it. I'm going to intentionally start my system up tonight without a DHCP server around and see how things play out. I'll post back here with the results.
 
Top