In many cases, we need to customize a particular network port for LAN or WAN side on the WRTnode board.
In the OpenWrt after the start, we can find the /etc/config/nework file, edit the file using vi, you can find the following:
config switch_vlan option device 'switch0' option vlan '1' option ports '1 2 3 4 6t' config switch_vlan option device 'switch0' option vlan '2' option ports '0 6t'
So, we can change the vlan 0, 1,2,3,4 according to our needs in order to define a LAN or WAN port (or even all network ports can be set to LAN or WAN, P-) However, the consequences ~ ~).
When done, simply restart the network interface
We can define the network ports and setup on OpenWRT start, we want that firmware compilation phase to complete this by default.
Find the following parameters:
wrtnode) ucidef_set_interfaces_lan_wan "eth0.1" "apcli0" ucidef_add_switch "switch0" "1" "1" ucidef_add_switch_vlan "switch0" "1" "1 2 3 4 6t" ucidef_add_switch_vlan "switch0" "2" "0 6t" ;;
Now you should know how to change the network ports according to your needs :)
Keep on rock！