[yast-devel] Tips for usage of <net-udev> in <networking> in autoyast.xml
![](https://seccdn.libravatar.org/avatar/fd6eaa655db172f99e3101d3eedb482b.jpg?s=120&d=mm&r=g)
Hi, I would need some help in usage of <net-udev> section of <networking> section of autoyast control file. This normall consists of something like: <net-udev config:type="list"> <rule> <name>eth0</name> <rule>ATTR{address}</rule> <value>08:00:27:d8:4c:56</value> </rule> </net-udev> This unfortunately depends on knowdlege of MAC address. What I would like to have as a result is that the network interface is renamed to "eth0" regardless of the name kernel decides for network. In my case an virtually booted image comes up either with "eth0" or "eth1" as kernel network interface names depending on exact state of virtualization environemnt. Of course network setup fails sometimes as the image has either /etc/sysconfig/network/ifcfg-eth0 or /etc/sysconfig/network/ifcfg-eth1 and network setup fails when the other network name is provides by kernel. Any suggestions how to reach that with <net-udev> entries? Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/63855b26379ec0b62cfdc28b6fb601ad.jpg?s=120&d=mm&r=g)
I would need some help in usage of <net-udev> section of <networking> section of autoyast control file.
This normall consists of something like:
<net-udev config:type="list"> <rule> <name>eth0</name> <rule>ATTR{address}</rule>
another option is to use BUS ID: <rule>KERNELS</rule> <value>--a pci id--</value> Nothing else is supported in yast2-network Michal Filka -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/fd6eaa655db172f99e3101d3eedb482b.jpg?s=120&d=mm&r=g)
Hi Michal, On Thu, Jan 23, Michal Filka wrote:
I would need some help in usage of <net-udev> section of <networking> section of autoyast control file.
This normall consists of something like:
<net-udev config:type="list"> <rule> <name>eth0</name> <rule>ATTR{address}</rule>
another option is to use BUS ID: <rule>KERNELS</rule> <value>--a pci id--</value>
Nothing else is supported in yast2-network
Thanks, that could possibly help. Need to check if the pci-id is the same for both cases. Nevertheless I had hopend for a more general mechanism for renaming to be available. Like: rename anything matching "eth*" to "eth0". Since I definitely know there is only one network device present this would be exactly what I need. Bye, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/9435667f7160374bc34a8600b686aecd.jpg?s=120&d=mm&r=g)
В Thu, 23 Jan 2014 20:52:59 +0100 Thomas Fehr <fehr@suse.de> пишет:
Hi Michal,
On Thu, Jan 23, Michal Filka wrote:
I would need some help in usage of <net-udev> section of <networking> section of autoyast control file.
This normall consists of something like:
<net-udev config:type="list"> <rule> <name>eth0</name> <rule>ATTR{address}</rule>
another option is to use BUS ID: <rule>KERNELS</rule> <value>--a pci id--</value>
Nothing else is supported in yast2-network
Thanks, that could possibly help. Need to check if the pci-id is the same for both cases.
Nevertheless I had hopend for a more general mechanism for renaming to be available. Like: rename anything matching "eth*" to "eth0".
Since I definitely know there is only one network device present this would be exactly what I need.
If there is only one interface, it will be named eth0 by default (if you disable new persistent interface names of course). If you get something else it implies you have more than one interface. I wonder what the actual problem here is. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/fd6eaa655db172f99e3101d3eedb482b.jpg?s=120&d=mm&r=g)
On Fri, Jan 24, Andrey Borzenkov wrote:
Thanks, that could possibly help. Need to check if the pci-id is the same for both cases.
Nevertheless I had hopend for a more general mechanism for renaming to be available. Like: rename anything matching "eth*" to "eth0".
Since I definitely know there is only one network device present this would be exactly what I need.
If there is only one interface, it will be named eth0 by default (if you disable new persistent interface names of course). If you get something else it implies you have more than one interface. I wonder what the actual problem here is.
This would be reasonable, but unfortunately it is not true in general. My Development machine e.g. has only one network device but the kernel names it eth1, not eth0: 19: PCI 19.0: 0200 Ethernet controller [Created at pci.319] Unique ID: JNkJ.qqbXdPh0W+4 SysFS ID: /devices/pci0000:00/0000:00:19.0 SysFS BusID: 0000:00:19.0 Hardware Class: network Model: "Intel 82578DM Gigabit Network Connection" Vendor: pci 0x8086 "Intel Corporation" Device: pci 0x10ef "82578DM Gigabit Network Connection" SubVendor: pci 0x1028 "Dell" SubDevice: pci 0x02da Revision: 0x05 Driver: "e1000e" Driver Modules: "e1000e" Device File: eth1 Memory Range: 0xf7fe0000-0xf7ffffff (rw,non-prefetchable) Memory Range: 0xf7fdc000-0xf7fdcfff (rw,non-prefetchable) I/O Ports: 0xecc0-0xecdf (rw) IRQ: 47 (17143463 events) HW Address: 84:2b:2b:9a:b4:35 Link detected: yes Module Alias: "pci:v00008086d000010EFsv00001028sd000002DAbc02sc00i00" Driver Info #0: Driver Status: e1000e is active Driver Activation Cmd: "modprobe e1000e" Config Status: cfg=no, avail=yes, need=no, active=unknown Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/2f25bc7e1639d4bfcd0d1d8dc4c9eff3.jpg?s=120&d=mm&r=g)
Op vrijdag 24 januari 2014 09:51:04 schreef Thomas Fehr:
This would be reasonable, but unfortunately it is not true in general. My Development machine e.g. has only one network device but the kernel names it eth1, not eth0:
It looks like you are using a VM. I had the same problem when moving a virtual disk to another VM on another machine, but the same would be true if you are using a new VM on the same machine. The new VM will have a new MAC address defined on the host. This MAC address will be compared in the VM with the MAC address already in the configuration of eth0, when they differ a new device will be created, named eth1. The configuration of eth0 will still be there, but does not have an interface assigned. In case you are certain that these two VMs will not be active at the same time on the same network, you can give, on the host, the network device the same MAC address as it used earlier. In that case eth0 will be the active interface. -- fr.gr. Freek de Kruijf -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
![](https://seccdn.libravatar.org/avatar/fd6eaa655db172f99e3101d3eedb482b.jpg?s=120&d=mm&r=g)
On Fri, Jan 24, Freek de Kruijf wrote:
Op vrijdag 24 januari 2014 09:51:04 schreef Thomas Fehr:
This would be reasonable, but unfortunately it is not true in general. My Development machine e.g. has only one network device but the kernel names it eth1, not eth0:
It looks like you are using a VM. I had the same problem when moving a virtual disk to another VM on another machine, but the same would be true if you are using a new VM on the same machine. The new VM will have a new MAC address defined on the host. This MAC address will be compared in the VM with the MAC address already in the configuration of eth0, when they differ a new device will be created, named eth1. The configuration of eth0 will still be there, but does not have an interface assigned. In case you are certain that these two VMs will not be active at the same time on the same network, you can give, on the host, the network device the same MAC address as it used earlier. In that case eth0 will be the active interface.
Thanks very much for the explanation. The original problem occurs indeed when dealing with multiple VMs started on the same machine. Will check how to make sure different machines get different mac addresses. Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (4)
-
Andrey Borzenkov
-
Freek de Kruijf
-
Michal Filka
-
Thomas Fehr