[opensuse] Default ethernet interface
I accidentally chose eth3 as my default ethernet interface. How do I change it to eth0? -- Andy Harrison public key: 0x67518262 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Andy Harrison a écrit :
I accidentally chose eth3 as my default ethernet interface. How do I change it to eth0?
Hello, Edit the file /etc/udev/rules.d/30-net_persistent_names.rules change eth3 to eth0 and restart the network. Take care not to have another eth0 in this file !! Michel. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 8/2/07, Catimimi <catimimi@libertysurf.fr> wrote:
Hello, Edit the file /etc/udev/rules.d/30-net_persistent_names.rules
change eth3 to eth0 and restart the network. Take care not to have another eth0 in this file !!
That seems like a pretty kludgy way to do it. I just don't want KNetworkManager to use eth3 as the default interface on boot. Yes, changing that file would work, though I would probably have to reconfigure all the network settings for eth0 and eth3. Where does it store the setting to use eth3 as the primary interface? -- Andy Harrison public key: 0x67518262 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andy Harrison wrote:
On 8/2/07, Catimimi <catimimi@libertysurf.fr> wrote:
Hello, Edit the file /etc/udev/rules.d/30-net_persistent_names.rules
change eth3 to eth0 and restart the network. Take care not to have another eth0 in this file !!
That seems like a pretty kludgy way to do it. I just don't want KNetworkManager to use eth3 as the default interface on boot. Yes, changing that file would work, though I would probably have to reconfigure all the network settings for eth0 and eth3.
Where does it store the setting to use eth3 as the primary interface?
In the above file :-) The names are generated by udev from another rule set and added to this file... Its a nice idea when it works... (I am afraid for my wireless config it doesnt... I used to get an incrementing network address allocation until I started tweaking this file). - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGsulyasN0sSnLmgIRAvzHAJ4tzgeMA6rIB9CsAlcPZwP/P94HkwCgj8RZ YKNMrrboxBf+hYCPxB8zc4A= =Fj7l -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
G T Smith wrote:
Edit the file /etc/udev/rules.d/30-net_persistent_names.rules
change eth3 to eth0 and restart the network. Take care not to have another eth0 in this file !!
That seems like a pretty kludgy way to do it. I just don't want KNetworkManager to use eth3 as the default interface on boot. Yes, changing that file would work, though I would probably have to reconfigure all the network settings for eth0 and eth3.
Where does it store the setting to use eth3 as the primary interface?
In the above file :-) The names are generated by udev from another rule set and added to this file...
Addendum: This usually happens if one cloned a Linux system from one host to another, or if one exchanged Ethernet cards, or if one changes MAC addresses. Since you worte about "reconfigure", you already had a configuration for eth0, and you could fall under one of these cases. That files holds a record of all previously configured Ethernet devices, and maps MAC addresses to device names. It operates under the assumption that a device name is allocated for a newly seen MAC address and then reserved for it -- which is a reasonable assumption for enterprise environments and not always true for SOHO and private environments. Joachim -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Joachim Schrod Email: jschrod@acm.org Roedermark, Germany -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Joachim Schrod wrote:
G T Smith wrote:
Edit the file /etc/udev/rules.d/30-net_persistent_names.rules
change eth3 to eth0 and restart the network. Take care not to have another eth0 in this file !!
That seems like a pretty kludgy way to do it. I just don't want KNetworkManager to use eth3 as the default interface on boot. Yes, changing that file would work, though I would probably have to reconfigure all the network settings for eth0 and eth3.
Where does it store the setting to use eth3 as the primary interface?
In the above file :-) The names are generated by udev from another rule set and added to this file...
Addendum: This usually happens if one cloned a Linux system from one host to another, or if one exchanged Ethernet cards, or if one changes MAC addresses. Since you worte about "reconfigure", you already had a configuration for eth0, and you could fall under one of these cases.
That files holds a record of all previously configured Ethernet devices, and maps MAC addresses to device names. It operates under the assumption that a device name is allocated for a newly seen MAC address and then reserved for it -- which is a reasonable assumption for enterprise environments and not always true for SOHO and private environments.
Joachim
In my case I am fairly certain it is something eccentric in the hardware. Sony laptops while nice machines are not noted for their usability under linux, and while everything seems to work (I admit I have not tested the sony stick slot), you do have do tweak things in odd ways to get a result. The WiFi driver refuses to load from boot. However, it will load from the command line which I prefer anyway, tried various combinations of manual loading, boot loading all with same result. It adds a new entry to the file after each reboot with same hardware parameters but a new device name. (Under 9.3 the wired and wireless cards used to be randomly assigned eth0 and eth1, at least things are a bit more consistent now). - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGswEvasN0sSnLmgIRAm7fAJ0dDx0/jsln3u9ly6T9cIVxQA5TKgCfeXWO njHUV0L7cToOyf1Ao/pWdKk= =3+L8 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 8/3/07, G T Smith wrote:
In the above file :-) The names are generated by udev from another rule set and added to this file... Its a nice idea when it works... (I am afraid for my wireless config it doesnt... I used to get an incrementing network address allocation until I started tweaking this file).
Strange. Based on the name rules file on my machine, you'd think that it actually would be using eth0 as primary. # This rules are autogenerated from /lib/udev/rename_netiface. # But you can modify them, but make sure that you don't use an interface name # twice. Also add such interface name rules only in this rules file. Otherwise # rename_netiface will create wrong rules for new interfaces. # It is safe to delete a rule, as long as you did not disable automatic rule # generation. Only if all interfaces get a rule the renaming will work # flawlessly. See also /etc/udev/rules.d/31-net_create_names.rules. # # Read /usr/share/doc/packages/sysconfig/README.Persistent_Interface_Names for # further information. # # Use only a-z, A-Z and 0-9 for interface names! # SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:03:ba:f0:ce:50", IMPORT="/lib/udev/rename_netiface %k eth0" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:50:04:d2:73:7d", IMPORT="/lib/udev/rename_netiface %k eth1" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:03:ba:f0:ce:51", IMPORT="/lib/udev/rename_netiface %k eth3" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:50:04:62:0a:00", IMPORT="/lib/udev/rename_netiface %k eth2" - -- Andy Harrison public key: 0x67518262 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGs1BaNTm8fWdRgmIRAm0FAKDZn3Rx8vOKZPfjq9h7Sc4yx7HLBQCg01Iu RouwSANUhuBAKKvXXZec9Ek= =FrAd -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andy Harrison wrote:
On 8/3/07, G T Smith wrote:
In the above file :-) The names are generated by udev from another rule set and added to this file... Its a nice idea when it works... (I am afraid for my wireless config it doesnt... I used to get an incrementing network address allocation until I started tweaking this file).
Strange. Based on the name rules file on my machine, you'd think that it actually would be using eth0 as primary.
# This rules are autogenerated from /lib/udev/rename_netiface. # But you can modify them, but make sure that you don't use an interface name # twice. Also add such interface name rules only in this rules file. Otherwise # rename_netiface will create wrong rules for new interfaces. # It is safe to delete a rule, as long as you did not disable automatic rule # generation. Only if all interfaces get a rule the renaming will work # flawlessly. See also /etc/udev/rules.d/31-net_create_names.rules. # # Read /usr/share/doc/packages/sysconfig/README.Persistent_Interface_Names for # further information. # # Use only a-z, A-Z and 0-9 for interface names! # SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:03:ba:f0:ce:50", IMPORT="/lib/udev/rename_netiface %k eth0" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:50:04:d2:73:7d", IMPORT="/lib/udev/rename_netiface %k eth1" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:03:ba:f0:ce:51", IMPORT="/lib/udev/rename_netiface %k eth3" SUBSYSTEM=="net", ACTION=="add", SYSFS{address}=="00:50:04:62:0a:00", IMPORT="/lib/udev/rename_netiface %k eth2"
This is telling me that you have at one time or another had four different cards with the MAC addresses. 00:03:ba:f0:ce:50 00:50:04:d2:73:7d 00:03:ba:f0:ce:51 00:50:04:62:0a:00 If you have only one remove, all of these references and reboot and things may settle down. (Make a backup copy of file just in case). If you have more than one network interface be a bit more careful and identify which card you want on which interface and edit accordingly. - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGs1+RasN0sSnLmgIRAgnwAKCpnsPxdGiuaurkXFbhhBxigwJkWQCeK78d zatsO/bmtti7thvJm1vfxbo= =/xw4 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 8/3/07, G T Smith wrote:
This is telling me that you have at one time or another had four different cards with the MAC addresses.
00:03:ba:f0:ce:50 00:50:04:d2:73:7d 00:03:ba:f0:ce:51 00:50:04:62:0a:00
If you have only one remove, all of these references and reboot and things may settle down. (Make a backup copy of file just in case). If you have more than one network interface be a bit more careful and identify which card you want on which interface and edit accordingly.
This machine actually does have 4 ethernet interfaces. Two onboard and two pci. I only care about the two onboard and I do actually want eth3 to work, I just don't want it to be primary. The eth3 interface is just connected to a lab network and it won't even have a default gateway or anything. - -- Andy Harrison public key: 0x67518262 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) Comment: http://firegpg.tuxfamily.org iD8DBQFGs25MNTm8fWdRgmIRAg/GAJ9cCn7JQ1JRH9UudC86LXD+s3WRIACbBCsb qvdxVLbnkVkyPXTODil5A0s= =opBM -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Andy Harrison wrote:
On 8/3/07, G T Smith wrote:
This is telling me that you have at one time or another had four different cards with the MAC addresses.
00:03:ba:f0:ce:50 00:50:04:d2:73:7d 00:03:ba:f0:ce:51 00:50:04:62:0a:00
If you have only one remove, all of these references and reboot and things may settle down. (Make a backup copy of file just in case). If you have more than one network interface be a bit more careful and identify which card you want on which interface and edit accordingly.
This machine actually does have 4 ethernet interfaces. Two onboard and two pci. I only care about the two onboard and I do actually want eth3 to work, I just don't want it to be primary. The eth3 interface is just connected to a lab network and it won't even have a default gateway or anything.
The order of the numbering of the devices is really irrelevant has (as far as I know) no impact on the device priority, (it is how you define what gets delivered where that is a bit more critical). You can change the device names as you see fit by editing this file, provided each device name is unique (and you keep to the conventions, designating a network device as hda1 is probably not a good idea :-) ). Most things connect using the IP address of the interface, it is really only the network configuration tools which make use of device names. SuSE store device related IP info and other stuff in files of the form ifcfg-<type>-id-<MAC ADDRESS> in /etc/sysconfig/network ... type may be eth or wlan (dunno about other network device types) so the IP address component is effectively tied to the MAC address of the card. (BTW I would not recommend editing these outside of YaST unless you really know what you are doing). - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFGs4sIasN0sSnLmgIRAg/6AJ4wB5vSRsnodtaoQ49gnTCBcg1mMwCg7EXZ 8q5g1VilyG8W284eqKEgBg8= =hMJS -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Andy Harrison
-
Catimimi
-
G T Smith
-
Joachim Schrod