YaST and how to configure VLANS with "Configuration Name" = eth0.X ?

opensuse12.1

I can add vlans from the YaST, but for this Vlans “Configuration Name” = vlan2.

But I`m need name such:

eth0.2 - this is vlan2
eth0.3 - this is vlan 3

How i can do this from the YaST ?

Serg

On 08/23/2012 06:46 AM, skoltogyan wrote:
>
> opensuse12.1
>
> I can add vlans from the YaST, but for this Vlans “Configuration Name”
> = vlan2.
>
> But I`m need name such:
>
> eth0.2 - this is vlan2
> eth0.3 - this is vlan 3
> …
>
>
> How i can do this from the YaST ?

It is likely that you cannot. This kind of renaming is handled by udev and the
various drivers. Perhaps writing the appropriate udev rule in /etc/udev/rules.d/
would work, but I have no idea on what to use in such a rule.

Thanj your.
Will be configure for this - from the command line :slight_smile:

Serg

I’m not sure what you’re trying to do. You can not call a device ethX.Y, only ethX. There is no eth0.2, eth0.3, but there are eth0, eth1, eth2, etc … You can permanently change the name of a device by editing /etc/udev/rules.d/70-persistent-net.rules, where MAC addresses are mapped to devices. This file is created at installation time with an ‘arbitrary’ mapping - meaning that if you install Linux on a system with several netcards, the numbering of devices may be different each time. Fedora has adopted another method called Consistent Network Device Naming](http://fedoraproject.org/wiki/Features/ConsistentNetworkDeviceNaming). I don’t think it is better. The device names are not arbitrarily attributed by the udev daemon anymore … but somehow by the mainboard manufacturer, because they depend on the PCI bus design.

If you use the Network Manager, you can change the connection name (not to be confused with the device name, although you can name a connection after a device) with the Network manager applet or in Yast. I’m not using the Network Manager under openSUSE, but I guess this is the field “Configuration Name” which is greyed out when you use the ifup method. If you use the ifup method, there is no connection name, because there are no connection profiles, just network interfaces dynamically or statically bound to ips.

I believe he wants to create vlan sub-interfaces like here :
Configuring VLANs Under Fedora/RHEL/CentOS. (tummy.com, ltd. Journal Entry)

I guess it’s similar for openSUSE but I have never done it on openSUSE myself. I don’t think that NetworkManager is recommended for vlan sub-interfaces but I might be wrong.

I believe he wants to create vlan sub-interfaces like here :

Yes, I agree. I occasionally have to connect to switch ports configured this way, and it is necessary to utilise the 8021q kernel module for this. It is also necessary to create a network interface the the network manager can use. The vconfig command is your friend here.

man vconfig

Thank yor.
I`m ask: how from the YaST configure (or add) VLAN with:

VLAN_NAME_TYPE=VLAN_PLUS_VID_NO_PAD

( without manual change configuration files )
?

Serg

I don’t think it’s possible but I’m not 100% sure. Why don’t you manually edit the files ? :slight_smile: It should be much easier than looking for specific stuff in YaST.

Like Greg has already suggested, I’m not sure that it is possible using YaST. I’ve always configured ‘on the fly’ via the command line for this purpose

First you need the vlan package is installed, then the 8021q module needs to be loaded. (Not all NIC drivers are capable of supporting 802.1q as far as I understand).

modprobe 8021q

Now configure by hand. For example

vconfig add eth0 509

Assign an IP address eg

ifconfig eth0.509 192.183.10.1 netmask 255.255.255.248 up

Now you should see the interface present

eth0.509  Link encap:Ethernet  HWaddr 00:1C:C4:CF:63:7A  
          inet addr:192.183.10.1  Bcast:192.183.10.7  Mask:255.255.255.248
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

If you need to make a persistent vlan connection, you can create a config file like this

Call it /etc/sysconfig/network/ifcfg-eth0.509


VLAN=yes
DEVICE=eth0.509
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.183.10.1
NETMASK=255.255.255.248

Then, to activate it

ifup eth0.509

You could also define vlan 510 etc in a similar fashion (all connected to the same physical interface)