Create a gist now

Instantly share code, notes, and snippets.

@pichuang /network
Last active Jun 1, 2016

What would you like to do?
OpenWrt /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan1'
option ifname 'eth0.1'
option proto 'static'
config interface 'lan2'
option ifname 'eth0.2'
option proto 'static'
config interface 'lan3'
option ifname 'eth0.3'
option proto 'static'
# Console port
config interface 'lan4'
option ifname 'eth0.4'
option proto 'static'
option ipaddr '192.168.1.1'
option netmask '255.255.255.0'
config interface 'lan5'
option ifname 'eth0.5'
option proto 'static'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0t 1'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0t 2'
config switch_vlan
option device 'switch0'
option vlan '3'
option ports '0t 3'
config switch_vlan
option device 'switch0'
option vlan '4'
option ports '0t 4'
config switch_vlan
option device 'switch0'
option vlan '5'
option ports '0t 5'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment