Network Setup
"Marc Boris Dürner" <[email protected]>
| Newsgroups | gmane.linux.arklinux.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I was thinking about the network scripts again and how we can prevent that changes of the hardware affect the network settings for a card. In summary the problem is this: Example: a laptop with a built in mini-pci nic and a pcmcia nic. The driver for the pci nic doesnt get loaded, because its only installed as an alias. the driver for the pcmcia nic is going to be modprobed. That leads to a situation where the pcmcia nic is eth0 and the pci nic aliases as eth0. Then the user wants to configure the card and configures eth0. on the next boot, the alias will kick in and load the pci nic as eth0 and suddenly the users pcmcia card will stop working, because its eth1 now. There are many more examples like this thinkable. So one approach would be to have a value in the ifcfg-ethX file that can binds it to a particular card. on boot up we simply verify that ethX is still the same card and if not we can readjust the device. When the nic was eth1 before and now the nic uses eth0 we simply rename the ifcfg-ethX file. Possible values are to achieve node/device binding are: - A System Id The concept of a system ID is to give each device a unique identifier. One concept uses the bustype follwed by the device number: PCI:BusNo:DeviceNo:FunctionNo USB:BusNo:DeviceNo PCMCIA:Socketno Serial:DeviceNo PS2:DeviceNo etc... Problem with this is that is very unflexible and only moving a pci card one slot would require reconfiguration of the binding. - Mac address. Every ethernet nic should have one. plipo has one, dummy0 has one, usbnet(usbX) has one. Token Ring I dont know. Advantage is that even with multiple cards of the same manufacturers this is going to work. - the vendor/device ID We could bind eth0 to a card by using the vendor/device ID. This is very elegant, because the concept can be reused for other cases of numbered system nodes. In case of multiple cards of the same model it should still work, because we only want to know if ethX uses a different card now. If you swap two cards of the same model all is fine. If you remove one we will see it anyway, because an ethX is missing --- Proposal --- 1) Add two values to the ifcfg-XXX files like: VENDOR=<vendor id> DEVICE=<device id> 2) Write a tool for nic verification on boot up: networkmgr HardwareKit is already capable of being a backend for this. We can evaluate to make this a demon in the future and let it react to hotplug network events (linux2.6) regards, Marc -- +++ GMX - die erste Adresse für Mail, Message, More +++ Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net