View previous topic :: View next topic |
Author |
Message |
SnackMasterX Apprentice
Joined: 26 Jan 2006 Posts: 231
|
Posted: Sun Dec 05, 2010 3:05 am Post subject: Setting a Static IP |
|
|
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 |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Sun Dec 05, 2010 3:42 am Post subject: |
|
|
Did you:
- cd /etc/init.d
- ln -s net.lo net.eth0
- rc-update add net.eth0 default
? |
|
Back to top |
|
|
SnackMasterX Apprentice
Joined: 26 Jan 2006 Posts: 231
|
Posted: Sun Dec 05, 2010 3:52 am Post subject: |
|
|
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 |
|
|
SnackMasterX Apprentice
Joined: 26 Jan 2006 Posts: 231
|
Posted: Sun Dec 05, 2010 4:31 am Post subject: |
|
|
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 |
|
|
1clue Advocate
Joined: 05 Feb 2006 Posts: 2569
|
Posted: Sun Dec 05, 2010 4:43 am Post subject: |
|
|
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 |
|
|
SnackMasterX Apprentice
Joined: 26 Jan 2006 Posts: 231
|
Posted: Sun Dec 05, 2010 5:01 am Post subject: |
|
|
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 |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 21715
|
Posted: Sun Dec 05, 2010 5:03 am Post subject: |
|
|
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 |
|
|
ewaller Apprentice
Joined: 11 Aug 2005 Posts: 264 Location: Pasadena, CA
|
Posted: Sun Dec 05, 2010 5:07 am Post subject: |
|
|
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 |
|
|
SnackMasterX Apprentice
Joined: 26 Jan 2006 Posts: 231
|
Posted: Mon Dec 06, 2010 1:40 pm Post subject: |
|
|
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 |
|
|
|