Am 19.10.2012 23:35, schrieb Fernando Cassia: > In my server I have eth0 and eth1 (previously were em16, em17, but I > hated it so I changed to the traditional approach). > > Each NIC port is connected to a different ISP. However, more often > than not while moving things around I get the cables reversed so ETH0 > goes to ISP2 and ETH0 goes to ISP2, or vice versa, ie the cables are > interchanged. > > So... is there a way, in such situation, to manually (say, from a bash > script) bring down both eth ports, and re-arrange those? (so that eth1 > becomes eth0), and do so without a reboot?. > > I´d like to make eth0 and eth1 consistent regardless of mixed cabling > so every time I bring down eth0 I know what isp I´m bringing down. > What IP each port is connected to I can figure out via a query to > www.whatismyip.com, but the question remains if it´s possible to > change the naming of two ethernet ports without a reboot. > > What would be the best way? ethtool? [root@srv-rhsoft:~]$ cat /etc/udev/rules.d/70-persistent-net.rules # PCI device 0x8086:0x1502 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="3c:d9:2b:65:95:9f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0" # PCI device 0x8086:0x10d3 (e1000e) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:c6:91:e4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1" # PCI device 0x168c:0x0024 (ath9k) SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="fc:75:16:5e:cf:e5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
Attachment:
signature.asc
Description: OpenPGP digital signature
-- users mailing list users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org