Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Obtaining a new IP[SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
xafan
n00b
n00b


Joined: 19 Apr 2005
Posts: 13

PostPosted: Fri Jun 03, 2005 1:39 am    Post subject: Obtaining a new IP[SOLVED] Reply with quote

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
View user's profile Send private message
baitken
n00b
n00b


Joined: 28 Jun 2004
Posts: 64
Location: Calgary, Alberta, Canada

PostPosted: Fri Jun 03, 2005 3:43 am    Post subject: Reply with quote

First, edit your /etc/conf.d/net to contain this:
Code:
iface_eth0="dhcp"


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
View user's profile Send private message
rutski89
Guru
Guru


Joined: 14 Mar 2005
Posts: 468
Location: United States N.Y.

PostPosted: Fri Jun 03, 2005 3:46 am    Post subject: Re: Obtaining a new IP Reply with quote

Sure thing, I'll be glad to help :D ... 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
View user's profile Send private message
rutski89
Guru
Guru


Joined: 14 Mar 2005
Posts: 468
Location: United States N.Y.

PostPosted: Fri Jun 03, 2005 3:50 am    Post subject: Reply with quote

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 8) . Check the ifconfig man page for more info.
_________________
<< ^ | ~ >>
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum