Eric Hines wrote:
At 12/24/05 18:53, James Knott wrote:
Eric Hines wrote:
Folks,
I'm running SUSE Pro 9.3 on an Intel server board with two NICs built in (a GigE and a 10/100). I've since added a Netgear GigE as a 3d NIC. I'm trying to set this box up as a Samba server for a 2-subnet LAN that will have a mix of XP and SUSE machines. eth0 is supposed to face the Net (on ....1.2); the other two NICs are supposed to connect only to eth0 for access to the Net and to each other.
The problem I'm having (or maybe not; I'm an extreme newbie with networking) is that every time I boot up the SUSE server, the NICs come out assigned differently:
1 boot: eth0 on 192.168.3.1 Intel GigE NIC eth1 on ...2.2 Intel 10/100 eth2 on ...3.1 Netgear
2 boot: eth0 on ...3.1 Intel 10/100 eth1 on ...1.2 Netgear eth2 on ...2.2 Intel GigE
3 boot: eth0 on ...1.2 Netgear eth1 on ...3.1 Intel GigE eth2 on ...2.2 Intel 10/100
and so on. Both IP address assignments to the NICs and which NIC is on a given ethx change, apparently at random.
It would seem that cabling my subnets cannot be done if the NIC assignments keep changing on every boot up.
How can I force the system to keep the NICs on a stable assignment--and one of my choosing? The above changes come whether I change the NIC assignments via YaST or do nothing at all before a reboot.
Take a look at /etc/sysconfig/network/. In there, you'll find the full name for your NICs. For example, on this desktop system, I've got ifcfg-eth-id-00:05:5d:f6:04:ce, which is the config file for my ethernet port. My firewall, which has 3 NICs has 3 such files, each one containing the MAC address of the respective NIC. Find the files for each NIC and make your changes there, or use Yast, which also uses them. Thanks for your quick response.
Each of the files in /etc/sysconfig/network has the lines STARTMODE='auto' (or is this the hostname to send; that's the only AUTO I see under YaST?) and USERCONTROL='no' (and user control is unchecked in YaST--what would it mean if I gave user control?). Are these what I change?
Normally, you'd use auto, when you want the NICs to be up all the time. You'd use user, when you want users to be able to start & stop NICs. However, that's described in Yast and I don't think it applies to your original question about the settings moving around. If you use the ifcfg files, then there's no way to get the NICs mixed up, as they're tied to the MAC address.
Alternatively, how do I use YaST to do this? I've been in YaST|Network Devices|Network Card|<NIC>|Edit and edited the IP address for each. I can't find any place to pin a NIC to a particular ethx, though. And both the addresses and the ethx change on each boot--e.g., eth0 will have on NIC (by MAC address) and one IP address after one bootup, and after another bootup it'll have a different NIC and a different IP address (and both will be completely different--it won't simply be a NIC/IP address pairing from another ethx on the earlier bootup).
I'm not sure what you're getting at here. If you use the ifcfg files, you'll always configure the correct NIC. If you need to refer to the NICs in a script, you use the full name.