LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Renew IP in linux? (https://www.linuxquestions.org/questions/linux-software-2/renew-ip-in-linux-360367/)

iccanui 09-05-2005 08:13 AM

Renew IP in linux?
 
Im looking for a simple command to renew the ip from a console.

I have tried

dhclient -r eth0
dhclient eth0

from another thread and it would apear that dhclient is not a functional command.

I have tried ifconfig eth0 up/down and will this seems to disable the network link, when i use the eth0 up command it brings back the IP, the ability to ping by ip to the router, but i can no longer ping by domain name, rebooting resolves the issue. Been through the sreach here and yahoo and google.com/linux and i cant seem to find anything.


If you can help it would be much appreciated, thank you.

logicalfuzz 09-05-2005 08:32 AM

dhclient -r is obsolete you mean ???
dont think so. i use it on my latest WS4.

what error you get after you restart your network and ping?
did you try restarting named service (dont feel you need to though..)?

dr_zayus69 09-05-2005 08:48 AM

Re: Renew IP in linux?
 
Quote:

Originally posted by iccanui
Im looking for a simple command to renew the ip from a console.

I have tried

dhclient -r eth0
dhclient eth0

from another thread and it would apear that dhclient is not a functional command.

I have tried ifconfig eth0 up/down and will this seems to disable the network link, when i use the eth0 up command it brings back the IP, the ability to ping by ip to the router, but i can no longer ping by domain name, rebooting resolves the issue. Been through the sreach here and yahoo and google.com/linux and i cant seem to find anything.


If you can help it would be much appreciated, thank you.

try this command find / -name dhclient 2> /dev/null

chances are it is a valid command just might be in /sbin/ so that it isn't in the search path for commands for security reasons.

iccanui 09-05-2005 09:44 AM

Quote:

Originally posted by logicalfuzz
dhclient -r is obsolete you mean ???
dont think so. i use it on my latest WS4.

what error you get after you restart your network and ping?
did you try restarting named service (dont feel you need to though..)?


No i mean when i type dhclient it says command not found.


When i ifconfig eth0 up it pulls a ip, i can ping my router 192.168.1.1 and oddly enough www.routerlogin.com which is the domain login for configuration of the router, but i cant ping www.google.com or anything beyond the router. Its not the router cause i have 3 other machines running off it from wireless to wired and their connection is fine and when i reboot this machine is online fully again.

I am running knoppix live cd at the moment. 3.8 i believe.

iccanui 09-05-2005 09:46 AM

Re: Re: Renew IP in linux?
 
Quote:

Originally posted by dr_zayus69
try this command find / -name dhclient 2> /dev/null

chances are it is a valid command just might be in /sbin/ so that it isn't in the search path for commands for security reasons.

when i try that command exactly as you typed, it hangs for a second, like its thinking, then just kicks me back to the prompt.

dr_zayus69 09-05-2005 09:53 AM

then that means you don't have it. I have the command but it is in /sbin/. So take a look in there. If it is in there you have to invoke it by doing /sbin/dhclient

iccanui 09-05-2005 10:00 AM

Well i kinda figured it out i guess.

root@1[knoppix]# network-setup [enter]

while not a true resolution this runs a gui client that invokes a dhcp client broadcast of eth0. I believe that since this is a livecd of knoppix that i simply am missing components so that it fit on the CD.

This is a satisfactory solution till my HD comes in and i can load a distro fully.


Thank you for your help.

Saquel 09-05-2005 10:31 AM

Try this:

/etc/init.d/networking restart

that way i do it in my debian box


All times are GMT -5. The time now is 07:24 PM.