assignment of eth* devices

Felipe Alfaro Solana lkml at mac.com
Mon Feb 7 23:19:41 UTC 2005


On 7 Feb 2005, at 20:25, Rick Stevens wrote:

>>>>> Would anyone know how to force the system to assign a specific
>>>>> network card a specific eth device. Is there a file/ setting that 
>>>>> can be
>>>>> adjusted to force this operation.?
>>>>>
>>>>
>>>> I had this problem with my system. I wanted to use my 100-base-T
>>>> connection for the link to the router, but wanted my Gigabit 
>>>> connection for
>>>> the LAN side. But when I did the install, they were reversed.
>>>
>>> I really think for that example that swapping the cables would be the
>>> easiest solution.
>>>
>> I hope that was meant to be humerous.
>> Swapping cables is one thing, but what about having to go into any of
>> a dozen places in your system and swapping eth0 with eth1?
>> Some of us have developed pretty elaborate firewall rules, not to
>> mention many other configurations that point to particular interfaces.
>> Maybe if this was a brand new installation that might work, but not in
>> all cases.
>
> Have you tried using the "HWADDR=" bit in the ifcfg-ethx scripts?

Also, if both cards use different chipsets/drivers, and they are built 
as modules, you can add something like this to /etc/modprobe.conf

alias eth0 3c59x
alias eth1 8139too

eth0 is aliased to my 3Com Etherlink XL, and eth1 is aliased to my 
RTL8139.
During startup, eth0 is probed first and, since the module for the 
3c59x is loaded first, it becomes eth0. Remember: the first network 
driver loaded gets is assigned eth0, the second eth1 and so on.




More information about the fedora-list mailing list