View previous topic :: View next topic |
Author |
Message |
xafan n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 19 Apr 2005 Posts: 13
|
Posted: Fri Jun 03, 2005 1:39 am Post subject: Obtaining a new IP[SOLVED] |
|
|
I need to obtain a new non-specific IP for my eth0. I've tried various commands non of them seem to stick because as soon as I /etc/init.d/net.eth0 restart I just get my old IP back.
Basically I'm asking for the Linux equivalent of ipconfig /release ipconfig /renew
Last edited by xafan on Sat Jun 04, 2005 4:05 am; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
baitken n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Willy.jpg)
Joined: 28 Jun 2004 Posts: 64 Location: Calgary, Alberta, Canada
|
Posted: Fri Jun 03, 2005 3:43 am Post subject: |
|
|
First, edit your /etc/conf.d/net to contain this:
Then you can do a /etc/init.d/net.eth0 restart
If you were previously getting a dhcp address, then you will probobly find that you are still getting the same one. This is because your dhcp server is maintaining your lease for a given period of time. ISPs are usually a couple of hours, but some can be a week or more. If that is the case then you will have to leave your box off for a couple of days before trying to get a new address.
Of course, if you can't wait then you can stick in a new NIC. A new MAC address will definately get you a new IP Address. _________________ Chaos will always prevail over order because chaos is more organized |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rutski89 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/74264610439b156f51c4d.png)
Joined: 14 Mar 2005 Posts: 468 Location: United States N.Y.
|
Posted: Fri Jun 03, 2005 3:46 am Post subject: Re: Obtaining a new IP |
|
|
Sure thing, I'll be glad to help ... hmm... lets see...
xafan wrote: | I need to obtain a new non-specific IP for my eth0. |
Can you be more specific? Can I see your ifconfig? "non-specific", how do you mean? Why do you need a new one?
xafan wrote: | I've tried various commands non of them seem to stick because as soon as I /etc/init.d/net.eth0 restart I just get my old IP back. |
That should restart your DHCP. I find I get the same IP every time as well; I've never did mind though.
xafan wrote: | Basically I'm asking for the Linux equivalent of ipconfig /release ipconfig /renew |
Your router contains your DHCP leases (I think). Your best bet is to:
1) /etc/init.d/net.eth0 stop
2) Go into your router config via a web-browser and click the DHCP Release and then DHCP Rnew buttons.
3) /etc/init.d/net.eth0 start
I'll be glad to help further and will check back in a few.
Peace,
rutski89 _________________ << ^ | ~ >> |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rutski89 Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/74264610439b156f51c4d.png)
Joined: 14 Mar 2005 Posts: 468 Location: United States N.Y.
|
Posted: Fri Jun 03, 2005 3:50 am Post subject: |
|
|
baitken wrote: |
Of course, if you can't wait then you can stick in a new NIC. A new MAC address will definately get you a new IP Address. |
Its spoofing time!
Code: | ifconfig eth0 hw ether 11:12:13:14:15:16 | That code, or something or other, should get yor mac changed . Check the ifconfig man page for more info. _________________ << ^ | ~ >> |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|