F19: how to name interface, persistently
Sam Varshavchik
mrsam at courier-mta.com
Tue Dec 31 04:20:37 UTC 2013
Sean Darcy writes:
> On F19 how do I create persistent rules for ethernet interfaces?
>
>> cat /etc/udev/rules.d/70-persistent-net.rules
>> # This file was automatically generated by the /lib/udev/write_net_rules
>> # program, run by the persistent-net-generator.rules rules file.
>> #
>> # You can modify it, as long as you keep each rule on a single
>> # line, and change only the value of the NAME= key.
>>
>> # PCI device 0x14e4:0x1693 (tg3) (custom name provided by external tool)
>> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1d:
>> 72:05:4a:68", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*",
>> NAME="eth0"
>>
>> # USB device 0x0bda:0x8150 (usb)
>> SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:
>> 03:07:ba", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
>
> But they are switched
> :
> ifconfig
> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 10.10.xxx.xxx netmask 255.255.255.0 broadcast 10.10.11.255
> inet6 fe80::2e0:4cff:fe03:7ba prefixlen 64 scopeid 0x20<link>
> ether 00:e0:4c:03:07:ba txqueuelen 1000 (Ethernet)
> .............................
>
> eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
> inet 24.xxx.xxx.xxx netmask 255.255.240.0 broadcast 24.xxx.xxx.xxx
> inet6 fe80::21d:72ff:fe05:4a68 prefixlen 64 scopeid 0x20<link>
> ether 00:1d:72:05:4a:68 txqueuelen 1000 (Ethernet)
You can't give KERNEL device "eth*" the NAME "eth"-something. Won't work.
Or, at least, won't work reliably.
What does work reliably is giving KERNEL device "eth*" the NAME "other"-
something.
If one of your ports in a WAN port, and the other one is a LAN port, why
don't you name them wan0 and lan0? The rules that I have:
… KERNEL=="eth*", NAME="wan0"
and
… KERNEL=="eth*", NAME="lan0"
That worked just as well for my purposes, and actually makes more sense.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.fedoraproject.org/pipermail/users/attachments/20131230/5feb54a5/attachment-0001.sig>
More information about the users
mailing list