How can I add virtual interface in SUSE Linux Enterprise Server 11 permanently?
If using a static configuration and without NetworkManager enabled you have to set an IP address and a netmask or prefix length with IPADDR, NETMASK or PREFIXLEN variables in /etc/sysconfig/network/ifcfg-INTERFACE_IDENTIFIER file.
For multiple addresses use these variables multiple times and extend them with different suffixes. For example IPADDR_1=, IPADDR_2=, NETMASK_1=, NETMASK_2= and so on. See section 'Multiple addresses' in ifcfg manpage).
By using the vconfig
command:
# vconfig add eth0 5
This option is good if you use DHCP, if the vlan already on the switch port and is generating DHCP she will automatically get the address:
# ifconfig eth0.5
If vlan will have a static address then use:
# ifconfig eth0.5 192.168.1.100 netmask 255.255.255.0 broadcast 192.168.1.255 up