FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 10-13-2008, 12:03 AM
"Pat Brown"
 
Default Release and renew IP

How do I release and/or renew an IP address in a command line?
--
Pat Brown
http://www.pabrown.ca/

L.A. Heat & L.A. Mischief hotter and better



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-13-2008, 12:20 AM
"Anthony M. Rasat"
 
Default Release and renew IP

>How do I release and/or renew an >IP address in a command line?

May I assume that is a DHCP interface of eth0? Here a "shorter" way:

sudo dhclient eth0

And now the "proper" way which also require proper configuration:

sudo /etc/init.d/network restart

--

Regards,

Anthony M. Rasat
Manager - Technical, Network and Support Division
PT. Jawa Pos National Network
Graha Pena Jawa Pos Group Building, 5th floor
Jln. Raya Kebayoran Lama 12, Jakarta Barat 12210
Indonesia.-
Phone 02132185562
Phone 081574217035
Fax 02153651465
Web http://www.jpnn.com

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-13-2008, 12:32 AM
Marius Gedminas
 
Default Release and renew IP

On Mon, Oct 13, 2008 at 12:20:59AM +0000, Anthony M. Rasat wrote:
> >How do I release and/or renew an >IP address in a command line?
>
> May I assume that is a DHCP interface of eth0? Here a "shorter" way:
>
> sudo dhclient eth0

Ah, but should it be dhclient or dhclient3? If you end up with two DHCP
clients on one interface, they will interfere with each other causing
your connection to stop working mysteriously every 5 minutes or so.

> And now the "proper" way which also require proper configuration:
>
> sudo /etc/init.d/network restart

Does that work when you use Network Manager?

Marius Gedminas
--
Eagleson's Law:
Any code of your own that you haven't looked at for six or more
months, might as well have been written by someone else. (Eagleson
is an optimist, the real number is more like three weeks.)
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-13-2008, 12:43 AM
NoOp
 
Default Release and renew IP

On 10/12/2008 05:03 PM, Pat Brown wrote:
> How do I release and/or renew an IP address in a command line?
>
>

I _think_ typically

sudo dhcpclient -r
sudo dhcpclient

will initiate a new lease. However if that doesn't you may have to:

sudo /etc/init.d/networking restart

as well.

Note: I'd give at least 10 sec between 'sudo dhcpclient -r' and 'sudo
dhcpclient' to give your router time to notice the change. Your router
may react faster, but a 10 sec window generally will accomodate even the
slowest of routers/dhcp servers.



--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-13-2008, 12:52 AM
"Anthony M. Rasat"
 
Default Release and renew IP

On Mon, Oct 13, 2008 at 12:20:59AM +0000, Anthony M. Rasat wrote:
>>>How do I release and/or renew >>>an IP address in a command >>>line?
>>
>>May I assume that is a DHCP >>nterface of eth0? Here a >>"shorter" way:
>>
>> sudo dhclient eth0
>>
>Ah, but should it be dhclient or >dhclient3? If you end up with two >DHCP clients on one interface, >they will interfere with each other >causing your connection to stop >working mysteriously every 5 >minutes or so.

File /sbin/dhclient is a symbolic link to /sbin/dhclient3.

>>And now the "proper" way >>which also require proper >>configuration:
>>
>>sudo /etc/init.d/network restart
>Does that work when you use >Network Manager?
>
>Marius Gedminas

If network manager has written to file /etc/network/interfaces every required parameter (eg. iface eth0 inet dhcp), then yes, it should work with network manager. Note that OP wanted to renew, not modify its configuration, of IP address.

--

Regards,

Anthony M. Rasat
Manager - Technical, Network and Support Division
PT. Jawa Pos National Network
Graha Pena Jawa Pos Group Building, 5th floor
Jln. Raya Kebayoran Lama 12, Jakarta Barat 12210
Indonesia.-
Phone 02132185562
Phone 081574217035
Fax 02153651465
Web http://www.jpnn.com
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-13-2008, 01:17 AM
Marius Gedminas
 
Default Release and renew IP

On Mon, Oct 13, 2008 at 12:52:35AM +0000, Anthony M. Rasat wrote:
> On Mon, Oct 13, 2008 at 12:20:59AM +0000, Anthony M. Rasat wrote:
> >>>How do I release and/or renew >>>an IP address in a command >>>line?
> >>
> >>May I assume that is a DHCP >>nterface of eth0? Here a >>"shorter" way:
> >>
> >> sudo dhclient eth0
> >>
> >Ah, but should it be dhclient or >dhclient3? If you end up with two >DHCP clients on one interface, >they will interfere with each other >causing your connection to stop >working mysteriously every 5 >minutes or so.
>
> File /sbin/dhclient is a symbolic link to /sbin/dhclient3.

That's good to know; it was not so in older Ubuntu versions.

> >>And now the "proper" way >>which also require proper >>configuration:
> >>
> >>sudo /etc/init.d/network restart
> >Does that work when you use >Network Manager?
> >
> >Marius Gedminas
>
> If network manager has written to file /etc/network/interfaces every
> required parameter (eg. iface eth0 inet dhcp), then yes, it should
> work with network manager. Note that OP wanted to renew, not modify
> its configuration, of IP address.

AFAIK network-manager doesn't write to /etc/network/interfaces.

Marius Gedminas
--
Committee, n.:
A group of men who individually can do nothing but as a group
decide that nothing can be done.
-- Fred Allen
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 10-14-2008, 06:09 PM
Peter Garrett
 
Default Release and renew IP

On Mon, 13 Oct 2008 03:32:07 +0300
Marius Gedminas <marius@pov.lt> wrote:

In reply to:
> > sudo dhclient eth0

> Ah, but should it be dhclient or dhclient3? If you end up with two DHCP
> clients on one interface, they will interfere with each other causing
> your connection to stop working mysteriously every 5 minutes or so.

$ ls -l /sbin/dhclient
lrwxrwxrwx 1 root root 9 2008-04-04 18:19 /sbin/dhclient -> dhclient3

On Hardy...

I don't think there's a problem.

Peter
--
"INX Is Not X" Live CD based on Ubuntu 8.04 : http://inx.maincontent.net
Screenshots slideshow: http://inx.maincontent.net/album/1.png.html
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org