Users Manual
4G LTE COMPACT INDUSTRIAL CELLULAR ROUTER_M330/M330-W - UM V1.1.8
179
There are two examples to explain how configure VLAN settings.
Example 1: PC-A pings PC-B (Access to Trunk)
For PC-A, add default gateway and LAN's MAC to ARP.
z Load VLAN and create VLAN interface, command as below:
sudo modprobe 8021q
sudo vconfig rem eth1.20
sudo vconfig add eth1.10
z Configure VLAN interface as below:
sudo ifconfig eth1.10 192.168.1.20 netmask 255.255.255.0 up
sudo ifconfig eth1 0.0.0.0
z sudo route add default gw 192.168.1.1 eth1.10
z sudo arp -s 192.168.1.1 LAN's MAC
z eth1 is network interface on PC-A
Therefore, PC-B will receive Tag20 traffic when PC-A sends ICMP packet to PC-B IP
(192.168.2.20) and captures traffic on PC-B.
Example 2: PC-A ping PC-B (Trunk to Access)
For PC-B, add default gateway and LAN's MAC to ARP
z Load VLAN and create VLAN interface, command as below:
sudo modprobe 8021q
sudo vconfig rem eth1.10
sudo vconfig add eth1.20
z Configure VLAN interface as below:
sudo ifconfig eth1.20 192.168.2.20 netmask 255.255.255.0 up
sudo ifconfig eth1 0.0.0.0
z sudo route add default gw 192.168.2.1 eth1.20
z sudo arp -s 192.168.2.1 LAN's MAC
z eth1 is network interface on PC-B
Therefore, PC-A will receive untag traffic when PC-B sends ICMP packet to PC-A IP
(192.168.1.20) and captures traffic on PC-A.