Skip to content

Instantly share code, notes, and snippets.

@kazuyas
Created March 13, 2012 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kazuyas/2028557 to your computer and use it in GitHub Desktop.
Save kazuyas/2028557 to your computer and use it in GitHub Desktop.
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' 'wan'
option 'ifname' 'eth1'
option 'proto' 'static'
option 'ipaddr' '192.168.1.250'
option 'netmask' '255.255.255.0'
config 'switch' 'eth0'
option 'enable' '1'
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '1'
option 'ports' '0t 1'
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '2'
option 'ports' '0t 2'
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '3'
option 'ports' '0t 3'
config 'switch_vlan'
option 'device' 'eth0'
option 'vlan' '4'
option 'ports' '0t 4'
config 'interface'
option 'ifname' 'eth0.1'
option 'proto' 'static'
config 'interface'
option 'ifname' 'eth0.2'
option 'proto' 'static'
config 'interface'
option 'ifname' 'eth0.3'
option 'proto' 'static'
config 'interface'
option 'ifname' 'eth0.4'
option 'proto' 'static'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment