Skip to content

Instantly share code, notes, and snippets.

@mxi1
Forked from pklaus/etc_config_network.md
Last active August 29, 2015 14:10
Show Gist options
  • Save mxi1/304a2fca1222b9a099fb to your computer and use it in GitHub Desktop.
Save mxi1/304a2fca1222b9a099fb to your computer and use it in GitHub Desktop.
root@OpenWrt:~# cat /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' 'lan'
option 'ifname' 'eth0.1'
option 'type' 'bridge'
option 'proto' 'static'
option 'netmask' '255.255.255.0'
option 'ipaddr' '192.168.102.1'
option 'defaultroute' '0'
option 'peerdns' '0'
config 'interface' 'wan'
option 'proto' 'dhcp'
option '_ifname' 'eth0.2'
option 'ifname' 'wlan1'
config 'switch'
option 'name' 'rtl8366rb'
option 'reset' '1'
option 'enable_vlan' '1'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '1'
option 'ports' '1 2 3 4 5t'
config 'switch_vlan'
option 'device' 'rtl8366rb'
option 'vlan' '2'
option 'ports' '0 5t'
root@OpenWrt:~# cat /etc/config/wireless
config 'wifi-device' 'radio0'
option 'type' 'mac80211'
option 'macaddr' '54:e6:fc:af:3b:1e'
option 'hwmode' '11ng'
option 'htmode' 'HT20'
list 'ht_capab' 'SHORT-GI-40'
list 'ht_capab' 'DSSS_CCK-40'
option 'disabled' '0'
option 'channel' '2'
config 'wifi-iface'
option 'device' 'radio0'
option 'ssid' 'Telekom'
option 'network' 'wan'
option 'mode' 'sta'
option 'encryption' 'none'
config 'wifi-iface'
option 'device' 'radio0'
option 'ssid' 'Fireburned'
option 'network' 'lan'
option 'mode' 'ap'
option 'encryption' 'psk2'
option 'key' 'sohTai8bei'
root@OpenWrt:~# uci -P/var/state show network
network.loopback=interface
network.loopback.ifname=lo
network.loopback.proto=static
network.loopback.ipaddr=127.0.0.1
network.loopback.netmask=255.0.0.0
network.loopback.device=lo
network.loopback.up=1
network.lan=interface
network.lan.type=bridge
network.lan.proto=static
network.lan.netmask=255.255.255.0
network.lan.ipaddr=192.168.102.1
network.lan.defaultroute=0
network.lan.peerdns=0
network.lan.ifname=br-lan
network.lan.up=1
network.lan.device=eth0.1 wlan0
network.wan=interface
network.wan.proto=dhcp
network.wan._ifname=eth0.2
network.wan.device=
network.wan.ifname=wlan1
network.wan.ipaddr=10.138.65.188
network.wan.broadcast=+
network.wan.netmask=255.255.255.224
network.wan.gateway=10.138.65.190
network.wan.dnsdomain=t-mobile.de
network.wan.dns=10.120.136.116
network.wan.up=1
network.wan.lease_gateway=10.138.65.190
network.wan.lease_server=10.138.65.190
network.wan.lease_acquired=1270519430
network.wan.lease_lifetime=1800
network.@switch[0]=switch
network.@switch[0].name=rtl8366rb
network.@switch[0].reset=1
network.@switch[0].enable_vlan=1
network.@switch_vlan[0]=switch_vlan
network.@switch_vlan[0].device=rtl8366rb
network.@switch_vlan[0].vlan=1
network.@switch_vlan[0].ports=1 2 3 4 5t
network.@switch_vlan[1]=switch_vlan
network.@switch_vlan[1].device=rtl8366rb
network.@switch_vlan[1].vlan=2
network.@switch_vlan[1].ports=0 5t
root@OpenWrt:~# uci -P/var/state show wireless
wireless.radio0=wifi-device
wireless.radio0.type=mac80211
wireless.radio0.macaddr=54:e6:fc:af:3b:1e
wireless.radio0.hwmode=11ng
wireless.radio0.htmode=HT20
wireless.radio0.ht_capab=SHORT-GI-40 DSSS_CCK-40
wireless.radio0.disabled=0
wireless.radio0.channel=2
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device=radio0
wireless.@wifi-iface[0].ssid=Telekom
wireless.@wifi-iface[0].network=wan
wireless.@wifi-iface[0].mode=sta
wireless.@wifi-iface[0].encryption=none
wireless.@wifi-iface[0].up=1
wireless.@wifi-iface[0].ifname=wlan1
wireless.@wifi-iface[1]=wifi-iface
wireless.@wifi-iface[1].device=radio0
wireless.@wifi-iface[1].ssid=Fireburned
wireless.@wifi-iface[1].network=lan
wireless.@wifi-iface[1].mode=ap
wireless.@wifi-iface[1].encryption=psk2
wireless.@wifi-iface[1].key=sohTai8bei
wireless.@wifi-iface[1].up=1
wireless.@wifi-iface[1].ifname=wlan0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment