[systemd-devel] Network Interface Names: solution for a desktop OS

Reindl Harald h.reindl at thelounge.net
Sat Apr 16 00:14:00 UTC 2016



Am 15.04.2016 um 21:06 schrieb Xen:
> If you cannot give me a default mapping automatically, why not allow me
> to generate one easily? Is there a tool that can take the current device
> and produce the list I proposed?

just use network.service aka /etc/init.d/network, enter the MAC and you 
are done - so what is the problem you can't solve for hundret network 
devices in the time you wrote a lot of mails?

[root at srv-rhsoft:/etc/sysconfig/network-scripts]$ cat ifcfg-lan-guest
DEVICE=lan-guest
HWADDR=ac:16:2d:a1:74:ec
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
ARPCHECK=no
NM_CONTROLLED=no
USERCTL=no
IPV6INIT=no

[root at srv-rhsoft:/etc/sysconfig/network-scripts]$ cat ifcfg-lan-phone
DEVICE=lan-phone
HWADDR=ac:16:2d:a1:74:ef
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
ARPCHECK=no
NM_CONTROLLED=no
USERCTL=no
IPV6INIT=no

[root at srv-rhsoft:/etc/sysconfig/network-scripts]$ cat ifcfg-lan-tv
DEVICE=lan-tv
HWADDR=ac:16:2d:a1:74:ee
TYPE=Ethernet
BOOTPROTO=static
ONBOOT=yes
ARPCHECK=no
NM_CONTROLLED=no
USERCTL=no
IPV6INIT=no

[root at srv-rhsoft:~]$ ifconfig
br-guest: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         inet 192.168.10.1  netmask 255.255.255.0  broadcast 192.168.10.255
         ether 28:92:4a:2b:5d:45  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

br-lan: flags=4675<UP,BROADCAST,RUNNING,ALLMULTI,MULTICAST>  mtu 1500
         inet 192.168.2.2  netmask 255.255.255.0  broadcast 192.168.2.255
         ether 28:92:4a:2b:5d:44  txqueuelen 1000  (Ethernet)
         RX packets 200795  bytes 13539651 (12.9 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 361993  bytes 348652911 (332.5 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br-wan: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         inet 62.178.103.85  netmask 255.255.255.0  broadcast 
255.255.255.255
         ether 00:50:8d:b5:cc:de  txqueuelen 1000  (Ethernet)
         RX packets 19907295  bytes 13469242158 (12.5 GiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 8931216  bytes 2759476933 (2.5 GiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lan-guest: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
         ether ac:16:2d:a1:74:ec  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
         device memory 0xf7980000-f79fffff

lan-phone: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         ether ac:16:2d:a1:74:ef  txqueuelen 1000  (Ethernet)
         RX packets 18846  bytes 4093274 (3.9 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 50325  bytes 6833909 (6.5 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 3
         device memory 0xf7800000-f787ffff

lan-spare: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
         ether ac:16:2d:a1:74:ed  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
         device memory 0xf7900000-f797ffff

lan-tv: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
         ether ac:16:2d:a1:74:ee  txqueuelen 1000  (Ethernet)
         RX packets 1604  bytes 389611 (380.4 KiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 7863  bytes 1345947 (1.2 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
         device memory 0xf7880000-f78fffff

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
         inet 127.0.0.1  netmask 255.0.0.0
         loop  txqueuelen 1  (Lokale Schleife)
         RX packets 677749  bytes 137663241 (131.2 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 677749  bytes 137663241 (131.2 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vmnet1: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         ether 00:50:56:c0:00:01  txqueuelen 1000  (Ethernet)
         RX packets 24579  bytes 0 (0.0 B)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 7133198  bytes 0 (0.0 B)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vmnet8: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         inet 192.168.196.2  netmask 255.255.255.0  broadcast 
192.168.196.255
         ether 00:50:56:c0:00:08  txqueuelen 1000  (Ethernet)
         RX packets 3896512  bytes 0 (0.0 B)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 7861144  bytes 0 (0.0 B)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vpn-client: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1472
         inet 10.0.0.241  netmask 255.255.255.0  broadcast 10.0.0.255
         ether 86:34:12:f1:90:ba  txqueuelen 100  (Ethernet)
         RX packets 8755070  bytes 10502866980 (9.7 GiB)
         RX errors 0  dropped 17506  overruns 0  frame 0
         TX packets 4827075  bytes 301197431 (287.2 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vpn-server: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
         inet 192.168.11.1  netmask 255.255.255.255  destination 
192.168.11.2
         unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 
txqueuelen 100  (UNSPEC)
         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

wan: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         ether 24:be:05:1a:c0:27  txqueuelen 100  (Ethernet)
         RX packets 20038677  bytes 13912402143 (12.9 GiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 9094940  bytes 2809726495 (2.6 GiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
         device interrupt 20  memory 0xf7c00000-f7c20000

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
         ether 28:92:4a:2b:5d:44  txqueuelen 50  (Ethernet)
         RX packets 180338  bytes 11868038 (11.3 MiB)
         RX errors 0  dropped 0  overruns 0  frame 0
         TX packets 356265  bytes 354501056 (338.0 MiB)
         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan1: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
         ether 28:92:4a:2b:5d:45  txqueuelen 50  (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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20160416/969fa7dc/attachment.sig>


More information about the systemd-devel mailing list