Create Vlan 802.1Q

Dear All,

Current I have setup OpenNebula for replace old system Proxmox, but i have reading Defining a 802.1Q Network in document but i can’t understand and setup system working.

=============================================================

enp6s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.x.x netmask 255.255.255.0 broadcast 192.168.2.255
inet6 fe80::225:90ff:fe60:8b6c prefixlen 64 scopeid 0x20
ether 00:25:90:60:8b:6c txqueuelen 1000 (Ethernet)
RX packets 39947740 bytes 48314861383 (44.9 GiB)
RX errors 0 dropped 435 overruns 0 frame 0
TX packets 25371324 bytes 28001001119 (26.0 GiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 16 memory 0xfbce0000-fbd00000

enp7s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:25:90:60:8b:6d txqueuelen 1000 (Ethernet)
RX packets 117539 bytes 12524703 (11.9 MiB)
RX errors 0 dropped 7 overruns 0 frame 0
TX packets 63 bytes 4798 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
device interrupt 17 memory 0xfbde0000-fbe00000

onebr4: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::1472:9cff:fe21:319d prefixlen 64 scopeid 0x20
ether 16:72:9c:21:31:9d txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 648 (648.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

onebr5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::b0ef:aff:fefb:c2fc prefixlen 64 scopeid 0x20
ether b2:ef:0a:fb:c2:fc txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 648 (648.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

onebr6: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::f01f:6dff:fe4b:3e3 prefixlen 64 scopeid 0x20
ether f2:1f:6d:4b:03:e3 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 648 (648.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

onebr7: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::fce7:a0ff:fe3d:df79 prefixlen 64 scopeid 0x20
ether fe:e7:a0:3d:df:79 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 648 (648.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.x.x netmask 255.255.255.0 broadcast 192.168.122.255
ether 52:54:00:1e:4b:7f txqueuelen 1000 (Ethernet)
RX packets 4706 bytes 379269 (370.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4203 bytes 442194 (431.8 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I need setup vlan on interface enp6s0. Please give help me resolve this case.

Thanks all.

hello, in that case you have to Add new network, select 802.1q, Select Automatic or Manual VLAN ID (in this example I use ID 101), as Physical device write enp6s0 and add address range. thats all. Opennebula on background when you deploy first VM to that network, creates new interface enp6s0.101, which is tagged vlan 101 and also creates new bridge with that interface. VM interface will be added to that newly created bridge.

update: if your switch supports dynamic vlans, you can add custom ip link params to enable gvrp protocol. In that case vlan will be automatically created on switch. So you can adding new networks just via sunstone.

IP_LINK_CONF gvrp=on

2 Likes