Rookie question of the day...... What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find. Thanks, Jeff
On Tuesday 10 February 2004 14:47, Jeff Bankston wrote:
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
Try, as root, ifdown-dhcp and ifup-dhcp. -- Homepage http://scott.exti.net XFce desktop environment http://www.xfce.org Goodies for the XFce desktop http://xfce-goodies.berlios.de GPG public key ID: 811B00AB
-----Original Message-----
From: Jeff Bankston
Rookie question of the day......
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
Thanks, Jeff
You can also try rcnetwork restart. If you are using DHCP you most likely will not get a different address. Ken
On Tue, 2004-02-10 at 15:47 -0500, Jeff Bankston wrote:
Rookie question of the day......
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
If you're using dhcpcd (the default dhcp client), then "dhcpcd -k" will kill dhcp, bring down the network interface, and force it to request a new IP address the next time you bring it up.
Anders Johansson wrote:
If you're using dhcpcd (the default dhcp client), then "dhcpcd -k" will kill dhcp, bring down the network interface, and force it to request a new IP address the next time you bring it up. so how do you bring it back? just plain dhcpcd with no args? I have had this same question from time to time but have never learned the way to do it
Damon Register
On Tue, 2004-02-10 at 17:28 -0500, Damon Register wrote:
Anders Johansson wrote:
If you're using dhcpcd (the default dhcp client), then "dhcpcd -k" will kill dhcp, bring down the network interface, and force it to request a new IP address the next time you bring it up. so how do you bring it back? just plain dhcpcd with no args? I have had this same question from time to time but have never learned the way to do it
Yeah, just running "dhcpcd eth0" should do it. "ifup-dhcp eth0" would be the suse way
On Tuesday 10 February 2004 12:51, Anders Johansson wrote:
On Tue, 2004-02-10 at 15:47 -0500, Jeff Bankston wrote:
Rookie question of the day......
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
If you're using dhcpcd (the default dhcp client), then "dhcpcd -k" will kill dhcp, bring down the network interface, and force it to request a new IP address the next time you bring it up.
But it will probably get the same IP anyway regardless of the request, because that is the way most dhcp servers work. If trying to avoid a DOS attack, its often very desirable to get a different IP, and there is a utility called changemac which will temprarily change your mac address so that the dhcp server will give you a different IP. http://galeb.etf.bg.ac.yu/~azdaja/changemac.html -- _____________________________________ John Andersen
On Tuesday 10 February 2004 12:51, Anders Johansson wrote:
On Tue, 2004-02-10 at 15:47 -0500, Jeff Bankston wrote:
Rookie question of the day......
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
If you're using dhcpcd (the default dhcp client), then "dhcpcd -k" will kill dhcp, bring down the network interface, and force it to request a new IP address the next time you bring it up.
But it will probably get the same IP anyway regardless of the request, because that is the way most dhcp servers work.
If trying to avoid a DOS attack, its often very desirable to get a different IP, and there is a utility called changemac which will temprarily change your mac address so that the dhcp server will give you a different IP.
http://galeb.etf.bg.ac.yu/~azdaja/changemac.html
--
THis question came up on the redhat list awhile ago. I read through the DHCP rfc (I think it's rfc 2131) and came up with this theory (untested .. i really should test it sometime). If you read the DHCP rfc, it seems that if you kick your machine so it requests a new address, the DHCP server sends the address, and it's up to your machine to accept or reject . If you can force it to not accept it, then it will make another request to the DHCP server and DHCP server will send a new address. That's the simplified version. One way for it to not accept is if the address is alreayd in use (the client checks this, not the server). My theory was that you bring down your interface on DHCP client(reboot shutdown or whatever), put another machine online with a static address same as the old IP on your DHCP client. When you bring the interface up on your DHCP client, it will make the request as normal . When the DHCP server sends the old IP, the clint SHOULD theroetically (and according to the RFC as I understand it) deny the old address when the DHCP server sends it, thereby forcing the DHCP server to send a different address for your machine to accept. If anyone actuallytries this, i'd be interested in hearing what happens. Ben Yau
On Wednesday 11 February 2004 14:15, Ben Yau wrote:
One way for it to not accept is if the address is alreayd in use (the client checks this, not the server). My theory was that you bring down your interface on DHCP client(reboot shutdown or whatever), put another machine online with a static address same as the old IP on your DHCP client.
Hard way. All you have to do is change your mac address. google changemac -- _____________________________________ John Andersen
Jeff Bankston wrote:
Rookie question of the day......
What option on ifconfig permits me to drop and acquire an IP address without rebooting? I tried the down/up options, no joy. No "plumb" command that I can find.
Thanks, Jeff
man dhcpcd
participants (8)
-
Anders Johansson
-
Ben Yau
-
Damon Register
-
James Knott
-
Jeff Bankston
-
John Andersen
-
Ken Schneider
-
Scott Jones