Re: Switch eth0 and eth1, how?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Frantisek Hanzlik wrote:
> Fernando Cassia wrote:
>> 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?
>>
>> TIA
>> FC
> 
> IMO one possibility is deactivate interfaces, by rmmod unload its drivers,
> change /etc/udev/rules.d/NN-net.rules and modprobe/insmod drivers again
> (and then activate network). udev daemon should create network names with
> new ones.
> Another way could be using 'ifrename' utility from 'wireless-tools'
> package: 'ifrename -i OldInterfaceName -n NewInterfaceName'
> (network perhaps should be down too and it seems as ifrename requires
> '/etc/iftab' file (which may be empty, 'touch /etc/iftab'))
> 
> FH

But there is question if it will be usable in the future, maybe cripled
bastard systemd with udevd functions will crimp it ;)
FH
-- 
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


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux