Functional tests against OpenBSD and Linux in the following
configurations:
**1. Simple IEEE 802.1Q VLANs**
1.1. Create `vlan2` as VLAN #2 (802.1Q) over Ethernet:
```
ifconfig vlan2 create vlandev em0 vlan 2 inet 10.0.2.1/24
```
1.2. Ping another machine on the same VLAN (eg. 10.0.2.2):
- with default packet size,
- with packet sizes up to 1480
Capture the traffic with tcpdump/wireshark, you shouldn't get any
IP fragmentation (assuming mtu 1500, and VLAN_MTU set on `em0`).
1.3. Make sure you can destroy `vlan2`:
```
ifconfig vlan2 destroy
```
**2. Simple Q-in-Q setup**
2.1. Create `svlan5` (802.1ad) and `vlan42` (802.1q) over `em0`:
```
ifconfig svlan5 create vlandev em0 vlan 5 up
ifconfig vlan42 create vlandev svlan5 vlan 42 inet 10.5.42.1/24
```
2.2. Ping another machine on the same VLAN stack (eg. 10.5.42.2):
- with default packet size,
- with packet sizes up to 1480
Fragmentation should be consistent with the hardware offloading
capabilities enabled on the physical interface.
2.3. Make sure you can destroy `vlan42`, then `svlan5`:
```
ifconfig vlan42 destroy
ifconfig svlan5 destroy
```
**3. Deep Q-in-Q**
3.1. Create `svlan5`, `svlan6` and `vlan42` as follows:
```
ifconfig svlan5 create vlandev em0 vlan 5 up
ifconfig svlan6 create vlandev svlan5 vlan 6 up
ifconfig vlan42 create vlandev svlan6 vlan 42 inet 10.6.42.1/24
```
3.2. Ping another machine on the same VLAN stack (eg. 10.6.42.2):
- with default packet size,
- with packet sizes up to 1480
(fragmentation: same as 2.2.)
3.3. Make sure you can destroy `vlan42`, then `svlan6`, then `svlan5`:
```
ifconfig vlan42 destroy
ifconfig svlan6 destroy
ifconfig svlan5 destroy
```
**4. Nested legacy VLANs (802.1Q over 802.1Q)**
4.1. Create `vlan2` and `vlan3` as follows:
```
ifconfig vlan2 create vlandev em0 vlan 2 up
ifconfig vlan3 create vlandev vlan2 vlan 3 inet 10.2.3.1/24
```
4.2. Ping another machine on the same VLAN stack (eg. 10.2.3.2):
- with default packet size,
- with packet sizes up to 1480
(fragmentation: same as 2.2.)
4.3. Make sure you can destroy both interfaces:
```
ifconfig vlan3 destroy
ifconfig vlan2 destroy
```
**5. Use dot notation to stack an 802.1Q VLAN over an 802.1ad S-VLAN**
5.1. Create `svlan5` and `svlan5.42` as follows:
```
ifconfig svlan5 create vlandev em0 vlan 5 up
ifconfig svlan5.42 create inet 10.5.42.1/24
```
5.2. Ping another machine on the same VLAN stack (eg. 10.5.42.2):
(same conditions as 2.2)
5.3. Make sure you can destroy `svlan5.42`, then `svlan5`:
```
ifconfig svlan5.42 destroy
ifconfig svlan5 destroy
```
**6. Use dot notation to stack an 802.1Q VLAN over another 802.1Q VLAN**
6.1. Create `em0.2` and `em0.2.3` as follows:
```
ifconfig em0.2 create up
ifconfig em0.2.3 create inet 10.2.3.1/24
```
6.2. Ping another machine on the same VLAN stack (eg. 10.2.3.2):
(same conditions as 2.2)
6.3. Make sure you can destroy both interfaces:
```
ifconfig em0.2.3 destroy
ifconfig em0.2 destroy
```