Renew IP in linux?

Open discussion about any topic, as long as you abide by the rules of course!
Post Reply
Iccy (temp)
Posts: 412
Joined: Mon May 16, 2005 1:32 am

Renew IP in linux?

Post by Iccy (temp) »

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 search 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.
" I thought i could handle the power, Ive alway been a kind and gentle person.

But once i was finaly able to split the atom
i built me some bombs and droped them on every mother fucker that got in my way."
JulesWinnfield
Posts: 625
Joined: Tue Feb 08, 2005 12:09 pm

Post by JulesWinnfield »

sudo /etc/init.d/network restart

everytime network is initialized it requests a new lease w/ DHCP server
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

your google not working?
Iccy (temp)
Posts: 412
Joined: Mon May 16, 2005 1:32 am

Post by Iccy (temp) »

yea bud, try and google that and get back to me. Google is not the answer to everything
:dork:
" I thought i could handle the power, Ive alway been a kind and gentle person.

But once i was finaly able to split the atom
i built me some bombs and droped them on every mother fucker that got in my way."
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

Iccy (temp) wrote:yea bud, try and google that and get back to me. Google is not the answer to everything
:dork:
if not google ,"buddy", then a Linux forum. you got extremely lucky that someone on this board knew the answer. :dork:
+JuggerNaut+
Posts: 22175
Joined: Sun Oct 14, 2001 7:00 am

Post by +JuggerNaut+ »

Iccy (temp)
Posts: 412
Joined: Mon May 16, 2005 1:32 am

Post by Iccy (temp) »

Yea man, i exhausted more options then you know


And no i didnt get lucky here. I know the caliber of people lurking here that dont post daily, i been here a while. But thats ok, you just lack the understanding of my search methods. Trust me, this isnt the only place i looked and incidently it was the last and someone here apperently has sufficent understanding to answer. Even if it didnt help, well not fully.

So thnx Jules, it pointed me in the right direction atleast.



cya
" I thought i could handle the power, Ive alway been a kind and gentle person.

But once i was finaly able to split the atom
i built me some bombs and droped them on every mother fucker that got in my way."
JulesWinnfield
Posts: 625
Joined: Tue Feb 08, 2005 12:09 pm

Post by JulesWinnfield »

Hrm.. check port 53 (TCP and UDP) on your firewall. Maybe dns traffice is getting blocked in some sneaky underhanded way. Check your router as well..

Also, check your /etc/resolv.conf (or thereabouts) and make sure your DNS server ips are valid.

If you want, try doing an nslookup http://www.google.com and copy/paste the results.

Is the name server messing up a new thing or has it always worked?
Underpants?
Posts: 4755
Joined: Mon Oct 22, 2001 7:00 am

Post by Underpants? »

pump
command not found...
apt-get install pump and shut the fuck up. :icon14:
Iccy (temp)
Posts: 412
Joined: Mon May 16, 2005 1:32 am

Post by Iccy (temp) »

JulesWinnfield wrote:Hrm.. check port 53 (TCP and UDP) on your firewall. Maybe dns traffice is getting blocked in some sneaky underhanded way. Check your router as well..

Also, check your /etc/resolv.conf (or thereabouts) and make sure your DNS server ips are valid.

If you want, try doing an nslookup http://www.google.com and copy/paste the results.

Is the name server messing up a new thing or has it always worked?

Im sorry i wasnt clear, i got it resolved bro, just a different way, that command you suggested pointed me in the right direction. Thing is im running knoppix so some of the basic stuff is missing, i found a network-setup command that reloads everything and also /etc/init.d/networking restart works, just a lil different from your suggested command.


Thnx again bro. All is well.
" I thought i could handle the power, Ive alway been a kind and gentle person.

But once i was finaly able to split the atom
i built me some bombs and droped them on every mother fucker that got in my way."
Post Reply