You are not logged in.
Pages: 1
Hi all,
I'm running an up-to-date Arch Linux on my server which has two gigabit Ethernet ports. I have my /etc/iftab as follows:
eth0 mac 00:1d:7d:96:f8:dd
eth1 mac 64:70:02:10:55:41
However, ifconfig -a tells me that the interfaces are the opposite of what I have configured in the iftab - even after rebooting.
% ifconfig -a [0]
eth0: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 64:70:02:10:55:41 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.2 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::21d:7dff:fe96:f8dd prefixlen 64 scopeid 0x20<link>
ether 00:1d:7d:96:f8:dd txqueuelen 1000 (Ethernet)
RX packets 641 bytes 65608 (64.0 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 502 bytes 88518 (86.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
I remember that I had it working correctly at some point, but after a recent update, the system has stopped respecting iftab.
I'm using kernel 3.6.11-1 and netcfg by the way.
Offline
Just use a udev rule. As far as I can tell, netcfg provides a rc.d script for interface renaming but not a systemd unit.
SUBSYSTEM=="net", ATTR{address}=="00:1d:7d:96:f8:dd", NAME="eth0"
SUBSYSTEM=="net", ATTR{address}=="64:70:02:10:55:41", NAME="eth1"
Steven [ web : git ]
GPG: 327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com
Offline
solarwind - if you really want to stick with your iftab method, you should make sure ifrename is being called. That's the tool that uses iftab, after all.
Offline
Thanks everyone, I'll edit the wiki with this info.
netcfg provides /etc/iftab, but doesn't provide nor depend on ifrename (wireless_tools). Interesting. It provides a script in /etc/rc.d to run ifrename (again, which it doesn't depend on), but doesn't provide any systemd config as far as I know. Seems like netcfg needs some cleanup.
Offline
Try some more careful reading:
$ pacman -Si netcfg
...<snip>...
Optional Deps : ...<snip>...
wireless_tools: for interface renaming through net-rename
...<snip>...
As for cleaning up netcfg, you're probably looking for this. Also, given the upcoming deprecation of wireless_tools in favour of iw, you might want to check what they're doing about ifrename, if anything.
Offline
I've created /etc/systemd/system/net-rename.service with the following content:
[Unit]
Description=Rename network interfaces according to /etc/iftab
Before=netcfg.service
[Service]
ExecStart=/usr/sbin/ifrename
[Install]
WantedBy=multi-user.target
and then
% systemctl enable net-rename.service
It works for me.
Offline
Pages: 1