Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to force Linux to reacquire a new IP address ?

Reply
Thread Tools Display Modes

How to force Linux to reacquire a new IP address ?

 
 
Miem
Guest
Posts: n/a

 
      03-12-2007, 12:09 AM
Hey,

How to force Linux to reacquire a new IP address from the DHCP server?
What is the command in Linux equivalent to Windows' "ipconfig /renew"
command?

Miem

 
Reply With Quote
 
 
 
 
Captain Dondo
Guest
Posts: n/a

 
      03-12-2007, 01:16 AM
V Sun, 11 Mar 2007 18:09:24 -0700, Miem napsal(a):

> Hey,
>
> How to force Linux to reacquire a new IP address from the DHCP server?
> What is the command in Linux equivalent to Windows' "ipconfig /renew"
> command?
>
> Miem



What distro?

ifdown eth0 ; ifup eth0

seems to do the trick for me.

--Yan
 
Reply With Quote
 
Bit Twister
Guest
Posts: n/a

 
      03-12-2007, 01:27 AM
On 11 Mar 2007 18:09:24 -0700, Miem wrote:
> Hey,
>
> How to force Linux to reacquire a new IP address from the DHCP server?
> What is the command in Linux equivalent to Windows' "ipconfig /renew"
> command?


With over 360+ linux distributions you might want to
read http://www.catb.org/~esr/faqs/smart-questions.html

On my mandriva linux release 2007 I do a
service network restart


Depending on your DHCP server, you may get the same ip address.
 
Reply With Quote
 
patrick
Guest
Posts: n/a

 
      03-12-2007, 02:17 AM
In news:(E-Mail Removed) s.com,
Miem <(E-Mail Removed)> wrote:

> How to force Linux to reacquire a new IP address from the DHCP server?
> What is the command in Linux equivalent to Windows' "ipconfig /renew"
> command?


You provide no information about your installation, but if you have "pump"
installed then a simple "pump --renew" will work for you.

"man -k dhcp" should also teach you an important fundamental concept if you
are encumbered by any thought processes.

 
Reply With Quote
 
Miem
Guest
Posts: n/a

 
      03-12-2007, 10:49 AM
On Mar 12, 12:09 pm, "Miem" <MiemC...@gmail.com> wrote:
> Hey,
>
> How to force Linux to reacquire a new IP address from the DHCP server?
> What is the command in Linux equivalent to Windows' "ipconfig /renew"
> command?
>
> Miem


Thank you all!..
I'm using Fedora Core 5. Following your replies I've tested the
following two methods and both worked fine.

1- ifdown eth0 ; ifup eth0
2- service network restart

Regards,

Miem

 
Reply With Quote
 
CptDondo
Guest
Posts: n/a

 
      03-13-2007, 02:49 PM
Miem wrote:
> On Mar 12, 12:09 pm, "Miem" <MiemC...@gmail.com> wrote:
>> Hey,
>>
>> How to force Linux to reacquire a new IP address from the DHCP server?
>> What is the command in Linux equivalent to Windows' "ipconfig /renew"
>> command?
>>
>> Miem

>
> Thank you all!..
> I'm using Fedora Core 5. Following your replies I've tested the
> following two methods and both worked fine.
>
> 1- ifdown eth0 ; ifup eth0


Be careful with that one. It only works when you're connected locally.
trying it via ssh will result in a machine that is off the network
until you can get to the console.

--Yan
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      03-13-2007, 03:27 PM
CptDondo <(E-Mail Removed)> writes:

>Miem wrote:
>> On Mar 12, 12:09 pm, "Miem" <MiemC...@gmail.com> wrote:
>>> Hey,
>>>
>>> How to force Linux to reacquire a new IP address from the DHCP server?
>>> What is the command in Linux equivalent to Windows' "ipconfig /renew"
>>> command?
>>>
>>> Miem

>>
>> Thank you all!..
>> I'm using Fedora Core 5. Following your replies I've tested the
>> following two methods and both worked fine.
>>
>> 1- ifdown eth0 ; ifup eth0


>Be careful with that one. It only works when you're connected locally.
> trying it via ssh will result in a machine that is off the network
>until you can get to the console.


Well, no, not if you actually put those on one line as he has done, it
should work fine. HOwever if you bring it down, you have no connection to
bring it up again if you do not send both commands at once.



>--Yan

 
Reply With Quote
 
CptDondo
Guest
Posts: n/a

 
      03-13-2007, 04:49 PM
Unruh wrote:
> CptDondo <(E-Mail Removed)> writes:
>
>> Miem wrote:
>>> 1- ifdown eth0 ; ifup eth0

>
>> Be careful with that one. It only works when you're connected locally.
>> trying it via ssh will result in a machine that is off the network
>> until you can get to the console.

>
> Well, no, not if you actually put those on one line as he has done, it
> should work fine. HOwever if you bring it down, you have no connection to
> bring it up again if you do not send both commands at once.



Not in my experience, but I relay through several ssh connections. I've
blown away my ssh connection more than once with that one.

I've taken to doing something like

nohup `ifdown eth0 \; ifup eth0` &

to make sure it comes back up.
 
Reply With Quote
 
ether1
Guest
Posts: n/a

 
      03-14-2007, 02:08 PM
On Mar 13, 1:49 pm, CptDondo <y...@NsOeSiPnAeMr.com> wrote:
> Unruh wrote:
> > CptDondo <y...@NsOeSiPnAeMr.com> writes:

>
> >> Miem wrote:
> >>> 1- ifdown eth0 ; ifup eth0

>
> >> Be careful with that one. It only works when you're connected locally.
> >> trying it via ssh will result in a machine that is off the network
> >> until you can get to the console.

>
> > Well, no, not if you actually put those on one line as he has done, it
> > should work fine. HOwever if you bring it down, you have no connection to
> > bring it up again if you do not send both commands at once.

>
> Not in my experience, but I relay through several ssh connections. I've
> blown away my ssh connection more than once with that one.
>
> I've taken to doing something like
>
> nohup `ifdown eth0 \; ifup eth0` &
>
> to make sure it comes back up.


What about trying dhclient eht0 that will request another dhcp address

 
Reply With Quote
 
ether1
Guest
Posts: n/a

 
      03-14-2007, 02:08 PM
On Mar 13, 1:49 pm, CptDondo <y...@NsOeSiPnAeMr.com> wrote:
> Unruh wrote:
> > CptDondo <y...@NsOeSiPnAeMr.com> writes:

>
> >> Miem wrote:
> >>> 1- ifdown eth0 ; ifup eth0

>
> >> Be careful with that one. It only works when you're connected locally.
> >> trying it via ssh will result in a machine that is off the network
> >> until you can get to the console.

>
> > Well, no, not if you actually put those on one line as he has done, it
> > should work fine. HOwever if you bring it down, you have no connection to
> > bring it up again if you do not send both commands at once.

>
> Not in my experience, but I relay through several ssh connections. I've
> blown away my ssh connection more than once with that one.
>
> I've taken to doing something like
>
> nohup `ifdown eth0 \; ifup eth0` &
>
> to make sure it comes back up.


I made a typo dhclient eth0

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nike Air Force Ones,Air Force One Air Force One-1,25th anniversary lky52136@gmail.com Windows Networking 0 01-14-2008 07:45 PM
I need to configure DHCP server to force client to obtain a new ip address upon lease renewal malazc@gmail.com Linux Networking 1 07-20-2006 10:21 PM
How to force dhcpd to ignore MAC address? oleg Linux Networking 6 01-06-2006 01:18 PM
When Linux PC boots, Does it sends RARP packet to get its IP address by embedding its Hardware address? santa19992000@yahoo.com Linux Networking 2 10-16-2005 10:40 PM
get ip address of an interface in linux kernel. Giacomo Linux Networking 2 07-07-2005 07:28 AM



1 2 3 4 5 6 7 8 9 10 11