Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Setting a Static IP
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
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Sun Dec 05, 2010 3:05 am    Post subject: Setting a Static IP Reply with quote

I'm having problems trying to get my newly built server to accept the static IP's I assign it, I tried following the gentoo handbook but it hasn't seemed to work and I'm thinking I might have missed something but wanted to get another opinion. Essentially my /etc/conf.d/net looks like this

Code:
config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default via 192.168.0.1" )


In mine of course are the real values, this was just a copy and paste from the gentoo handbook. Am I supposed to be doing something different or changing something? my adapter is net.eth2 (unsure how to rename it to net.eth0)

Thanks in Advance!
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2567

PostPosted: Sun Dec 05, 2010 3:42 am    Post subject: Reply with quote

Did you:

  1. cd /etc/init.d
  2. ln -s net.lo net.eth0
  3. rc-update add net.eth0 default

?
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Sun Dec 05, 2010 3:52 am    Post subject: Reply with quote

I noticed that NetworkManager was still in the default stage on rc-update, removed that and deleted net.eth0 then ran
Code:
ln-s net.lo net.eth0

Now I have no net.eth devices showing up after boot, I was running an older kernel (it was a system that I'm just updating) so I'm going to try and update the kernel and see if I need a module for this NIC. Used this install on an old motherboard that went bad but it booted up fine on this one.
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Sun Dec 05, 2010 4:31 am    Post subject: Reply with quote

So here is what I've discovered so far, I ran "lspci -a" and it showed net.eth2 but no net.eth0 or net.eth1, so I ran the following within /etc/init.d

Code:
ln -s net.lo net.eth2
/etc/init.d/net.eth2 start


Then it instantly turned on and used the configuration under /etc/conf.d/net

So this is progress, however is there a way I can change it from net.eth2 to net.eth0? This was installed on a different motherboard as mentioned previously however that board died and has been replaced, thought it might be easier to use the already in place system and just modify/update it for this new motherboard and so far its taken much less time than actually starting from scratch.
Back to top
View user's profile Send private message
1clue
Advocate
Advocate


Joined: 05 Feb 2006
Posts: 2567

PostPosted: Sun Dec 05, 2010 4:43 am    Post subject: Reply with quote

You're running out of my experience a bit. Every time I've started with a new board I scrape off the drive and start over.

I'm not really an expert here, but what it seems to me is that you have more than one network device, and the others are being recognized first.

Or maybe you have some hard-configured devices from the previous board which no longer exist, and they're being put in first.

Whatever the case, you have something using up eth0 and eth1, or something is specifically loading your module in eth2. In my experience, leaving the configuration bare and just booting generally puts any fully attached card onto the net through DHCP, and it is usually in the order of discovery.

I would try to figure out what modules are loading in association with which cards, which you can get both through lsmod and lspci -k.

Other than what's been said here I would really need to do some digging through the docs.

Maybe somebody else can step in and help.
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Sun Dec 05, 2010 5:01 am    Post subject: Reply with quote

Well for the moment I can get it connected to the internet automatically after a reboot so I'm not too concerned about renaming the device, a name is less important than functionality :-)

Thanks for the help though, I wouldn't have tried the ln -s without your suggestion, much appreciated!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 16043

PostPosted: Sun Dec 05, 2010 5:03 am    Post subject: Reply with quote

Normally, udev remembers your past NICs and reserves their names in case they return. If you know they will not be returning, you can delete the persistent-net rules file to make udev forget them and start fresh from eth0.
Back to top
View user's profile Send private message
ewaller
Apprentice
Apprentice


Joined: 11 Aug 2005
Posts: 264
Location: Pasadena, CA

PostPosted: Sun Dec 05, 2010 5:07 am    Post subject: Reply with quote

can you post your /etc/udev/rules.d/70-persistent-net.rules file?
_________________
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Back to top
View user's profile Send private message
SnackMasterX
Apprentice
Apprentice


Joined: 26 Jan 2006
Posts: 231

PostPosted: Mon Dec 06, 2010 1:40 pm    Post subject: Reply with quote

I did that and it fixed the problem, now I just need to figure out why my ssh connections are being refused :-\

*edit* Actually I bet its the key that my computer stored, that probably needs to be cleared
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