forked from WRTnode/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 2
Network Configuration
Drasko DRASKOVIC edited this page Feb 28, 2016
·
6 revisions
Current network config:
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 globals 'globals'
option ula_prefix 'fd7a:58b4:d454::/48'
config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option macaddr '64:51:7e:80:3e:b2'
option type 'bridge'
option proto 'static'
option ipaddr '192.168.8.1'
option netmask '255.255.255.0'
config interface 'wan'
option ifname 'eth0.2'
option force_link '1'
option macaddr '64:51:7e:80:3e:b3'
option proto 'dhcp'
config interface 'wwan'
option ifname 'apcli0'
option proto 'dhcp'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '0 1 2 3 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
And interfaces:
root@OpenWrt:/# ifconfig -a
apcli0 Link encap:Ethernet HWaddr 66:51:7E:00:3E:B2
inet6 addr: fe80::6451:7eff:fe00:3eb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
apcli1 Link encap:Ethernet HWaddr 66:51:7E:00:3E:B3
BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
br-lan Link encap:Ethernet HWaddr 64:51:7E:80:3E:B2
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
inet6 addr: fe80::6651:7eff:fe80:3eb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12760 (12.4 KiB) TX bytes:5916 (5.7 KiB)
eth0 Link encap:Ethernet HWaddr 64:51:7E:80:3E:B2
inet6 addr: fe80::6651:7eff:fe80:3eb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:290 errors:0 dropped:0 overruns:0 frame:0
TX packets:476 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:77401 (75.5 KiB) TX bytes:151617 (148.0 KiB)
Interrupt:5
eth0.1 Link encap:Ethernet HWaddr 64:51:7E:80:3E:B2
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:290 errors:0 dropped:0 overruns:0 frame:0
TX packets:34 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:72181 (70.4 KiB) TX bytes:4025 (3.9 KiB)
eth0.2 Link encap:Ethernet HWaddr 64:51:7E:80:3E:B3
inet6 addr: fe80::6651:7eff:fe80:3eb3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:426 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:144036 (140.6 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:1824 errors:0 dropped:0 overruns:0 frame:0
TX packets:1824 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:124704 (121.7 KiB) TX bytes:124704 (121.7 KiB)
ra0 Link encap:Ethernet HWaddr 64:51:7E:80:3E:B2
inet6 addr: fe80::6651:7eff:fe80:3eb2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:6
root@OpenWrt:/#
And wireless:
root@OpenWrt:/# cat /etc/config/wireless
config wifi-device ra0
option type ralink
option mode 9
option channel auto
option txpower 100
option ht 20
option country US
# REMOVE THIS LINE TO ENABLE WIFI:
option disabled 0
config wifi-iface
option device ra0
option network lan
option mode ap
option ssid WRTnode2P_3EB2
option encryption psk2
option key 12345678
option ApCliEnable '1'
option ApCliSsid 'aAP'
option ApCliAuthMode 'WPA2PSK'
option ApCliEncrypType 'AES'
option ApCliPassWord '87654321'
root@OpenWrt:/#
According to the WRTNode wiki: http://wiki.wrtnode.com/index.php?title=Starting
root@OpenWrt:~# aps
'aps' is a WRTnode customized command which scans the WiFi SSIDs available in your area.
aps
uses iwpriv
:
root@OpenWrt:/# cat /usr/bin/aps
#[email protected]
#!/bin/sh
clear
echo "WRTnode AP scaner."
echo "Begin scaning APs, pls wait..."
iwpriv ra0 set SiteSurvey=1
sleep 1
echo "Finished."
echo "APs available are..."
iwpriv ra0 get_site_survey
root@OpenWrt:/#
And iwpriv
is described here: https://en.wikipedia.org/wiki/Wireless_tools_for_Linux
iwpriv
It is used to manipulate parameters and setting of the Wireless Extension specific to each driver (as opposed to iwconfig which deals with generic ones).
Without any argument, iwpriv lists the available private commands available on each interface, and the parameters that they require. Using this information, the user may apply those interface specific commands on the specified interface.
WRTNode iwlpriv
:
root@OpenWrt:/# iwpriv
eth0.1 no private ioctls.
lo no private ioctls.
ra0 Available private ioctls :
set (8BE2) : set 1536 char & get 0
show (8BF1) : set 1024 char & get 0
get_site_survey (8BED) : set 0 & get 1024 char
set_wsc_oob (8BF9) : set 1024 char & get 1024 char
get_mac_table (8BEF) : set 1024 char & get 1024 char
e2p (8BE7) : set 1024 char & get 1024 char
bbp (8BE3) : set 1024 char & get 1024 char
mac (8BE5) : set 1024 char & get 1024 char
rf (8BF3) : set 1024 char & get 1024 char
get_ba_table (8BF6) : set 1024 char & get 1024 char
stat (8BE9) : set 1024 char & get 1024 char
apcli1 Available private ioctls :
set (8BE2) : set 1536 char & get 0
show (8BF1) : set 1024 char & get 0
get_site_survey (8BED) : set 0 & get 1024 char
set_wsc_oob (8BF9) : set 1024 char & get 1024 char
get_mac_table (8BEF) : set 1024 char & get 1024 char
e2p (8BE7) : set 1024 char & get 1024 char
bbp (8BE3) : set 1024 char & get 1024 char
mac (8BE5) : set 1024 char & get 1024 char
rf (8BF3) : set 1024 char & get 1024 char
get_ba_table (8BF6) : set 1024 char & get 1024 char
stat (8BE9) : set 1024 char & get 1024 char
eth0 no private ioctls.
apcli0 Available private ioctls :
set (8BE2) : set 1536 char & get 0
show (8BF1) : set 1024 char & get 0
get_site_survey (8BED) : set 0 & get 1024 char
set_wsc_oob (8BF9) : set 1024 char & get 1024 char
get_mac_table (8BEF) : set 1024 char & get 1024 char
e2p (8BE7) : set 1024 char & get 1024 char
bbp (8BE3) : set 1024 char & get 1024 char
mac (8BE5) : set 1024 char & get 1024 char
rf (8BF3) : set 1024 char & get 1024 char
get_ba_table (8BF6) : set 1024 char & get 1024 char
stat (8BE9) : set 1024 char & get 1024 char
br-lan no private ioctls.
eth0.2 no private ioctls.
root@OpenWrt:/#
WRTNode 2P uses mt76x8 proprietary diver module: https://github.com/WRTnode/openwrt/tree/master/package/wrtnode-wifi/ralink-wifi-mt76x8/modules
Here is more info: https://dev.openwrt.org/ticket/21483#comment:8