5.15.2015

Configure VLAN tagging via CLI

1. Create VLAN interface
# ip link add link eth4 name eth4.2030 type vlan id 2030

2. Assign IP
# ifconfig eth4.2030 11.0.20.1 netmask 255.255.240.0

3. Make sure new interface is enabled
# ifconfig eth4.2030 up

4. Check 
# ifconfig eth4.2030
eth4.2030 Link encap:Ethernet  HWaddr 90:E2:BA:6D:B5:95
          inet addr:11.0.20.1  Bcast:11.0.31.255  Mask:255.255.240.0
          inet6 addr: fe80::92e2:baff:fe6d:b595/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1046 (1.0 KiB)  TX bytes:468 (468.0 b)

5. Remove VLAN
# ip link delete eth4.2030