[opensuse] How to make sure that each vNIC in guest is always associated with a correct VLAN?
Hi, I have six virtual bridges in xen host machine and following virtual machine configuration file section defining the vifs: vif = [ 'bridge=br10', 'bridge=br20', 'bridge=br30', 'bridge=br40', 'bridge=br50', 'bridge=br60' ] This means that in the guest(openSUSE Leap 42.1) I have six vNICs(eth0 - eth5). Can I be sure that eth0 is always connected to br10, eth1 to br20, etc? Or should I specify a MAC address for each vNIC created like this: vif = [ 'bridge=br10, mac=00:14:5E:11:C6:F1', 'bridge=br20, mac=00:14:5E:11:C6:F2', 'bridge=br30, mac=00:14:5E:11:C6:F3', 'bridge=br40, mac=00:14:5E:11:C6:F4', 'bridge=br50, mac=00:14:5E:11:C6:F5', 'bridge=br60, mac=00:14:5E:11:C6:F6' ] .. and then configure udev rules which make sure that interface associated with MAC 00:14:5E:11:C6:F1 and br10 is always named eth0, interface associated with MAC 00:14:5E:11:C6:F2 and br20 is always named eth1, etc? Or maybe there is a better way using /etc/sysconfig/network/ifcfg-* files? thanks, Martin -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
19.12.2019 20:31, Martin T пишет:
Hi,
I have six virtual bridges in xen host machine and following virtual machine configuration file section defining the vifs:
vif = [ 'bridge=br10', 'bridge=br20', 'bridge=br30', 'bridge=br40', 'bridge=br50', 'bridge=br60' ]
This means that in the guest(openSUSE Leap 42.1) I have six vNICs(eth0 - eth5). Can I be sure that eth0 is always connected to br10, eth1 to br20, etc?
I would expect interfaces to be enumerated according to the ordering in guest definition. Do you have evidence that it does not happen?
Or should I specify a MAC address for each vNIC created like this:
vif = [ 'bridge=br10, mac=00:14:5E:11:C6:F1', 'bridge=br20, mac=00:14:5E:11:C6:F2', 'bridge=br30, mac=00:14:5E:11:C6:F3', 'bridge=br40, mac=00:14:5E:11:C6:F4', 'bridge=br50, mac=00:14:5E:11:C6:F5', 'bridge=br60, mac=00:14:5E:11:C6:F6' ]
.. and then configure udev rules which make sure that interface associated with MAC 00:14:5E:11:C6:F1 and br10 is always named eth0, interface associated with MAC 00:14:5E:11:C6:F2 and br20 is always named eth1, etc? Or maybe there is a better way using /etc/sysconfig/network/ifcfg-* files?
thanks, Martin
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Hi Andrei,
I would expect interfaces to be enumerated according to the ordering in guest definition. Do you have evidence that it does not happen?
I would expect the same, but as I have not much experience with xen and openSUSE guests, then I just wanted to be sure that interfaces are indeed always enumerated according to the ordering in guest configuration. Maybe somebody can confirm this? I simply want to avoid the situation where for example, during the host machine maintenance which includes the physical server reboot in the future the guest vNICs end up in wrong VLANs. thanks, Martin -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Dec 19, Martin T wrote:
Or should I specify a MAC address for each vNIC created like this: vif = [ 'bridge=br10, mac=00:14:5E:11:C6:F1', 'bridge=br20,
.. and then configure udev rules which make sure that interface associated with MAC 00:14:5E:11:C6:F1 and br10 is always named eth0, interface associated with MAC 00:14:5E:11:C6:F2 and br20 is always named eth1, etc?
To make sure the frontend can identify a certain network interface at least one identifier must be provided by the backend. According to xl-network-configuration(5) mac= is the only way to specify such identifier. A udev rule must be used to map identifiers to interface names. It is important to use a different namespace for interface names. In other words: do not rename them to ethN in such rules. A rename will happen while the kernel still enumerates the remaining interfaces. This leads to clashes. Olaf
Hi,
A udev rule must be used to map identifiers to interface names. It is important to use a different namespace for interface names. In other words: do not rename them to ethN in such rules. A rename will happen while the kernel still enumerates the remaining interfaces. This leads to clashes.
Thanks for pointing this out. I made the rules in following fashion: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="06:00:11:22:33:44", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="ens0" thanks, Martin -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
The gameplay of slope game at https://slope3.com is remarkably straightforward – a single tap or screen touch controls the ball's movement, guiding it left or right as it careens down the ever-changing path.
participants (4)
-
Andrei Borzenkov
-
Martin T
-
Michael Mitchell
-
Olaf Hering