Child Pages
Contents
常用命令
network
重载网络配置
/etc/init.d/network reload
/etc/init.d/network restart
uci查看network配置
root@NHX6018-0-NPN-256M32-D4:~# uci show networknetwork.loopback=interfacenetwork.loopback.ifname='lo'network.loopback.proto='static'network.loopback.ipaddr='127.0.0.1'network.loopback.netmask='255.0.0.0'network.globals=globalsnetwork.globals.ula_prefix='fdc2:2e4a:3ba5::/48'network.@switch[0]=switchnetwork.@switch[0].name='switch0'network.lan=interfacenetwork.lan.ifname='eth0 eth1 eth2 eth3'network.lan.def_ifname='eth0 eth1 eth2 eth3'network.lan.force_link='1'network.lan.type='bridge'network.lan.proto='static'network.lan.ipaddr='192.168.1.1'network.lan.netmask='255.255.255.0'network.lan.ip6assign='60'network.lan.macaddr='5C:B1:5F:9A:39:BE'network.lan.ieee1905managed='1'network.lan.peerdns='0'network.lan.disabled='0'network.lan.mtu='1500'network.wan=interfacenetwork.wan.ifname='eth4'network.wan.def_ifname='eth4'network.wan.proto='dhcp'network.wan6=interfacenetwork.wan6.ifname='eth4'network.wan6.def_ifname='eth4'network.wan6.proto='dhcpv6'network.wwan0=interfacenetwork.wwan0.ifname='ath5'network.wwan0.proto='dhcp'network.wwan0.disabled='1'network.wwan1=interfacenetwork.wwan1.ifname='ath15'network.wwan1.proto='dhcp'network.wwan1.peerdns='0'network.wwan1.mtu='1500'network.wwan1.disabled='0'root@NHX6018-0-NPN-256M32-D4:~#
查看或修改 network配置
root@NHX6018-0-NPN-256M32-D4:~# 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 'fdc2:2e4a:3ba5::/48'
config switch option name 'switch0'
config interface 'lan' option ifname 'eth0 eth1 eth2 eth3' option def_ifname 'eth0 eth1 eth2 eth3' option force_link '1' option type 'bridge' option proto 'static' option ipaddr '192.168.1.1' option netmask '255.255.255.0' option ip6assign '60' option macaddr '5C:B1:5F:9A:39:BE' option ieee1905managed '1' option peerdns '0' option disabled '0' option mtu '1500'
config interface 'wan' option ifname 'eth4' option def_ifname 'eth4' option proto 'dhcp'
config interface 'wan6' option ifname 'eth4' option def_ifname 'eth4' option proto 'dhcpv6'
config interface 'wwan0' option ifname 'ath5' option proto 'dhcp' option disabled '1'
config interface 'wwan1' option ifname 'ath15' option proto 'dhcp' option peerdns '0' option mtu '1500' option disabled '0'
root@NHX6018-0-NPN-256M32-D4:~# vim /etc/config/network
适用于所有协议类型的选项
Name | Type | Required | Default | Description |
---|---|---|---|---|
ifname | interface name(s) | yes(*) | (none) | Physical interface name such as eth0.1 , eth2 , tun0 to assign to this section, or list of interfaces if type bridge is set.![]() network option in wireless configuration. This option may be empty or missing if only a wireless interface references this network or if the protocol type is pptp , pppoa or 6in4 |
type | string | no | (none) | If set to bridge , creates a bridge containing the given ifname and wireless interfaces assigned using the network option in wireless configuration |
macaddr | mac address | no | (none) | Override MAC address of this interface, e.g. 62:11:22:aa:bb:cc |
mtu | number | no | (none) | Override the default MTU on this interface |
auto | boolean | no | 0 for proto none , else 1 | Specifies whether to bring up interface on boot |
ipv6 | boolean | no | 1 | Specifies whether to enable (1) or disable (0) IPv6 on this interface (Barrier Breaker and later only) |
accept_ra | 1 for protocol dhcp , else 0 | |||
send_rs | 1 for protocol static , else 0 | |||
force_link | boolean | no | 1 for protocol static , else 0 | Specifies whether ip address, route, and optionally gateway are assigned to the interface regardless of the link being active ('1') or only after the link has become active ('0'); when set to '1', carrier sense events do not invoke hotplug handlers |
disabled | boolean | no | 0 | enable or disable the interface section |
ip4table | string | no | (none) | IPv4 routing table for routes of this interface, see ip rule show; ip route show table <ip4table> |
ip6table | string | no | (none) | IPv6 routing table for routes of this interface, see ip -6 rule show; ip -6 route show table <ip6table> |
查看分配的DHCP客户端IP
root@NHX6018-0-NPN-256M32-D4:~# cat /tmp/dhcp.leasesduid 00:01:00:01:2b:ad:db:6e:5c:b1:5f:9a:39:c11681921188 3 fdc2:2e4a:3ba5::4956 * 00:01:00:01:23:48:e0:88:78:4f:43:5f:96:27root@NHX6018-0-NPN-256M32-D4:~#
查看路由
root@NHX6018-0-NPN-256M32-D4:~# routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Ifacedefault oraybox.com 0.0.0.0 UG 0 0 0 eth410.168.1.0 * 255.255.255.0 U 0 0 0 eth410.168.1.1 * 255.255.255.255 UH 0 0 0 eth4192.168.1.0 * 255.255.255.0 U 0 0 0 br-lanroot@NHX6018-0-NPN-256M32-D4:~#
查看ARP表
root@NHX6018-0-NPN-256M32-D4:~# arpIP address HW type Flags HW address Mask Device192.168.1.110 0x1 0x0 22:ee:ad:6f:23:59 * br-lan192.168.1.135 0x1 0x0 d2:c5:ba:55:fc:8b * br-lan192.168.1.242 0x1 0x2 a2:42:17:1d:d2:90 * br-lan192.168.1.232 0x1 0x0 32:47:c9:9b:fc:96 * br-lan192.168.1.211 0x1 0x0 0e:64:97:56:32:4e * br-lan192.168.1.186 0x1 0x0 c2:81:85:0f:7b:48 * br-lan192.168.1.165 0x1 0x0 d2:a4:c0:15:5e:6a * br-lan192.168.1.119 0x1 0x0 22:13:d5:a7:99:a7 * br-lan192.168.1.222 0x1 0x0 02:e4:f6:16:87:45 * br-lan192.168.1.144 0x1 0x0 b2:6c:9e:8f:37:46 * br-lan192.168.1.155 0x1 0x0 e2:dd:e8:55:06:d5 * br-lan192.168.1.109 0x1 0x0 82:7b:58:c2:2f:39 * br-lan192.168.1.241 0x1 0x0 52:1b:90:0e:74:4c * br-lan192.168.1.231 0x1 0x0 c2:54:02:9e:96:93 * br-lan192.168.1.185 0x1 0x0 22:3e:30:b0:78:8b * br-lan192.168.1.210 0x1 0x0 32:c9:48:b0:b8:0d * br-lan192.168.1.221 0x1 0x0 1a:6c:ad:ec:eb:b7 * br-lan192.168.1.175 0x1 0x0 02:c3:00:73:76:c1 * br-lanroot@NHX6018-0-NPN-256M32-D4:~#
通过IP address和Device 对应关系判断终端网络属性
wifi
设置txpower 发射功率
uci set wireless.wifi0.txpower=15uci set wireless.wifi1.txpower=15uci commitwifi
重新加载wifi驱动
wifi
查看wifi 运行状态
root@NHX6018-0-NPN-256M32-D4:~# iwconfiggre0 no wireless extensions.
ath13 IEEE 802.11axa ESSID:"OpenWrt" Mode:Master Frequency:5.5 GHz Access Point: 62:B1:5F:9A:39:BF Bit Rate:1.201 Gb/s Tx-Power:24 dBm RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=0/94 Signal level=-94 dBm Noise level=-94 dBm (BDF averaged NF value in dBm) Rx invalid nwid:28808 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ath10 IEEE 802.11axa ESSID:"OpenWrt" Mode:Master Frequency:5.5 GHz Access Point: 5C:B1:5F:9A:39:BF Bit Rate:1.201 Gb/s Tx-Power:24 dBm RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=0/94 Signal level=-94 dBm Noise level=-94 dBm (BDF averaged NF value in dBm) Rx invalid nwid:28808 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
wifi0 no wireless extensions.
ip6gre0 no wireless extensions.
sit0 no wireless extensions.
gretap0 no wireless extensions.
ath0 IEEE 802.11axg ESSID:"OpenWrt" Mode:Master Frequency:2.437 GHz Access Point: 5C:B1:5F:9A:39:C0 Bit Rate:286.8 Mb/s Tx-Power:27 dBm RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=0/94 Signal level=-94 dBm Noise level=-94 dBm (BDF averaged NF value in dBm) Rx invalid nwid:3637507 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
lo no wireless extensions.
ath3 IEEE 802.11axg ESSID:"OpenWrt" Mode:Master Frequency:2.437 GHz Access Point: 62:B1:5F:9A:39:C0 Bit Rate:286.8 Mb/s Tx-Power:27 dBm RTS thr:off Fragment thr:off Encryption key:off Power Management:off Link Quality=0/94 Signal level=-94 dBm Noise level=-94 dBm (BDF averaged NF value in dBm) Rx invalid nwid:3637507 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0
ipsecdummy no wireless extensions.
eth0 no wireless extensions.
eth1 no wireless extensions.
eth2 no wireless extensions.
ip6tnl0 no wireless extensions.
miireg no wireless extensions.
eth3 no wireless extensions.
br-lan no wireless extensions.
wifi1 no wireless extensions.
bond0 no wireless extensions.
eth4 no wireless extensions.
ifb0 no wireless extensions.
soc0 no wireless extensions.
teql0 no wireless extensions.
ifb1 no wireless extensions.
root@NHX6018-0-NPN-256M32-D4:~#
查看或修改 wireless配置
root@NHX6018-0-NPN-256M32-D4:~# cat /etc/config/wirelessconfig wifi-device wifi0 option type qcawificfg80211 option channel auto option macaddr 5C:B1:5F:9a:39:bf option hwmode 11axa option def_hwmode 11axa option country US option htmode auto option freq 5G
config wifi-iface wlan10 option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath10 option disablecoext '1'
config wifi-iface wlan11 option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath11 option disablecoext '1'
option disabled '1'
config wifi-iface wlan12 option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath12 option disablecoext '1'
option disabled '1'
config wifi-iface wlan13 option device wifi0 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath13 option disablecoext '1'
config wifi-iface son0 option device wifi0 option network lan option mode ap option ssid nhx-son-backhaul option encryption none option ifname ath14 option disablecoext '1' option cactimeout '0' option hidden '1' option mcastenhance 2 option wnm 1 option qwrap_ap 0 option blockdfschan 0 option rrm 1 option extap 0 option wds 1 option backhaul 1 option mesh_ver 1 option disabled 1
config wifi-iface sta1 option device wifi0 option network lan option mode sta option ssid OpenWrt-Sta option encryption none option ifname ath15 option extap '0' option vap_ind '1' option athnewind '1' option wds '1' option disabled '1' option staDFSEn '0'
config wifi-device wifi1 option type qcawificfg80211 option channel auto option macaddr 5C:B1:5F:9a:39:c0 option hwmode 11axg option def_hwmode 11axg option country US option htmode auto option freq 2.4G
config wifi-iface wlan0 option device wifi1 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath0 option disablecoext '1'
config wifi-iface wlan1 option device wifi1 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath1 option disablecoext '1'
option disabled '1'
config wifi-iface wlan2 option device wifi1 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath2 option disablecoext '1'
option disabled '1'
config wifi-iface wlan3 option device wifi1 option network lan option mode ap option ssid OpenWrt option encryption none option wnm '1' option rrm '1' option ieee80211ai '1' option ifname ath3 option disablecoext '1'
config wifi-iface son1 option device wifi1 option network lan option mode ap option ssid nhx-son-backhaul option encryption none option ifname ath4 option disablecoext '1' option cactimeout '0' option hidden '1' option mcastenhance 2 option wnm 1 option qwrap_ap 0 option blockdfschan 0 option rrm 1 option extap 0 option wds 1 option backhaul 1 option mesh_ver 1 option disabled 1
config wifi-iface sta0 option device wifi1 option network lan option mode sta option ssid OpenWrt-Sta option encryption none option ifname ath5 option extap '0' option vap_ind '1' option athnewind '1' option wds '1' option disabled '1' option staDFSEn '0'
root@NHX6018-0-NPN-256M32-D4:~# vim /etc/config/wireless
wifi-iface部分的通用配置选项
The common configuration option for wifi-iface sections are listed below.
Name | Type | Required | Default | Description |
---|---|---|---|---|
ifname | string | no | (driver default) | Specifies a custom name for the Wi-Fi interface, which is otherwise automatically named. Maximum length: 15 characters (See Network Basics for more info) |
device | string | yes | (first device id) | Specifies the used wireless adapter, must refer to one of the defined wifi-device sections |
network | string | yes | lan | Specifies the network interface to attach the wireless to. |
mode | string | yes | ap | Selects the operation mode of the wireless network interface controller. Possible values are ap, sta, adhoc, wds, monitor, mesh |
disabled | boolean | no | 0 | When set to 1, wireless network is disabled. |
ssid | string | yes | OpenWrt | The broadcasted SSID of the wireless network and for for managed mode the SSID of the network you’re connecting to |
bssid | BSSID address | no | (driver default) | Override the BSSID of the network, only applicable in adhoc or sta mode. In wds mode specifies the BSSID of another AP to create WDS with. |
mesh_id | Mesh ID | no | none | The Mesh ID as defined in IEEE 802.11s. If set, the wireless interface will join this mesh network when brought up. If not, it is necessary to invoke iw <iface> mesh join <mesh_id> to join a mesh after the interface is brought up. |
hidden | boolean | no | 0 | Disables the broadcasting of beacon frames if set to 1 and, in doing so, hides the ESSID. Where the ESSID is hidden, clients may fail to roam and airtime efficiency may be significantly reduced. |
isolate | boolean | no | 0 | Isolates wireless clients from each other, only applicable in ap mode. See this post for details. |
doth | boolean | no | 0 | Enables 802.11h support. |
wmm | boolean | no | 1 | Enables WMM. Where Wi-Fi Multimedia (WMM) Mode QoS is disabled, clients may be limited to 802.11a/802.11g rates. Required for 802.11n/802.11ac/802.11ax. |
encryption | string | no | none | Wireless encryption method. Possible values are: none, wep, psk, psk2. For WEP station mode the default is “open system” authentication. Use wep+shared or wep+open to force a specific mode. |
key | integer or string | no | (none) | In any WPA-PSK mode, this is a string that specifies the pre-shared passphrase from which the pre-shared key will be derived. The clear text key has to be 8-63 characters long. If a 64-character hexadecimal string is supplied, it will be used directly as the pre-shared key instead. In WEP mode, this can be an integer specifying which key index to use (key1, key2, key3, or key4.) Alternatively, it can be a string specifying a passphrase or key directly, as in key1. In any WPA-Enterprise AP mode, this option has a different interpretation. |
key1 | string | no | (none) | WEP passphrase or key #1 (selected by the index in key). This string is treated as a passphrase from which the WEP key will be derived. If a 10- or 26-character hexadecimal string is supplied, it will be used directly as the WEP key instead. |
key2 | string | no | (none) | WEP passphrase or key #2 (selected by the index in key), as in key1. |
key3 | string | no | (none) | WEP passphrase or key #3 (selected by the index in key), as in key1. |
key4 | string | no | (none) | WEP passphrase or key #4 (selected by the index in key), as in key1. |
macfilter | string | no | disable | Specifies the mac filter policy, disable to disable the filter, allow to treat it as whitelist or deny to treat it as blacklist. |
maclist | list of MAC addresses | no | (none) | List of MAC addresses (divided by spaces) to put into the mac filter. |
iapp_interface | string | no | (none) | Specifies a network interface to be used for 802.11f (IAPP) - only enabled when defined. |
rsn_preauth | boolean | no | 0 | Allow preauthentication for WPA2-EAP networks (and advertise it in WLAN beacons). Only works if the specified network interface is a bridge. |
ieee80211w | integer | no | 0 | Enables MFP (802.11w) support (0 = disabled, 1 = optional, 2 = required). Requires the 'full' version of wpad/hostapd and support from the Wi-Fi driver |
ieee80211w_max_timeout | integer | no | (hostapd default) | Specifies the 802.11w Association SA Query maximum timeout. |
ieee80211w_retry_timeout | integer | no | (hostapd default) | Specifies the 802.11w Association SA Query retry timeout. |
maxassoc | integer | no | (hostapd/driver default) | Specifies the maximum number of clients to connect. |
macaddr | mac address | no | (hostapd/driver default) | Overrides the MAC address used for the Wi-Fi interface. Warning: if the MAC address specified is a multicast address, this override will fail silently. To avoid this problem, ensure that the mac address specified is a valid unicast mac address. |
dtim_period | integer | no | 2 (hostapd default) | Set the DTIM (delivery traffic information message) period. There will be one DTIM per this many beacon frames. This may be set between 1 and 255. This option only has an effect on ap wifi-ifaces. |
short_preamble | boolean | no | 1 | Set optional use of short preamble |
max_listen_int | integer | no | 65535 (hostapd default) | Set the maximum allowed STA (client) listen interval. Association will be refused if a STA attempts to associate with a listen interval greater than this value. This option only has an effect on ap wifi-ifaces. |
mcast_rate | integer | no | (driver default) | Sets the fixed multicast rate, measured in kb/s. Only supported in adhoc and mesh modes |
wds | boolean | no | 0 | This sets 4-address mode |
owe_transition_ssid | string | no | none | Opportunistic Wireless Encryption (OWE) Transition SSID (only for OPEN and OWE networks) |
owe_transition_bssid | BSSID address | no | none | Opportunistic Wireless Encryption (OWE) Transition BSSID (only for OPEN and OWE networks) |
扫描ap热点
root@NHX6018-0-NPN-256M32-D4:~# iwinfo ath0 scanCell 01 - Address: 5C:B1:5F:8A:32:81 ESSID: "OpenWrt" Mode: Master Channel: 6 Signal: -41 dBm Quality: 94/94 Encryption: none
Cell 02 - Address: 5C:B1:5F:71:00:01 ESSID: "OpenWrt" Mode: Master Channel: 6 Signal: -22 dBm Quality: 94/94 Encryption: none
Cell 03 - Address: 48:A7:3C:40:43:81 ESSID: "ChinaNet-uMe2" Mode: Master Channel: 9 Signal: -79 dBm Quality: 37/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 04 - Address: FC:83:C6:05:2E:88 ESSID: "OrayBox-2E88" Mode: Master Channel: 11 Signal: -19 dBm Quality: 94/94 Encryption: WPA2 PSK (CCMP)
Cell 05 - Address: 5C:B1:5F:8A:39:10 ESSID: "bitswrt-2g" Mode: Master Channel: 1 Signal: -56 dBm Quality: 91/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 06 - Address: 98:97:CC:55:6D:D1 ESSID: "Coilart" Mode: Master Channel: 1 Signal: -55 dBm Quality: 92/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 07 - Address: 9A:97:CC:25:6D:D1 ESSID: unknown Mode: Master Channel: 1 Signal: -56 dBm Quality: 91/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 08 - Address: F0:92:B4:28:9C:11 ESSID: "ChinaNet-9SzL" Mode: Master Channel: 10 Signal: -71 dBm Quality: 63/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 09 - Address: 74:B7:B3:AF:F9:D4 ESSID: "ChinaNet-4Cp2" Mode: Master Channel: 11 Signal: -77 dBm Quality: 43/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 10 - Address: 04:F9:F8:52:02:14 ESSID: "gaosheng" Mode: Master Channel: 11 Signal: -65 dBm Quality: 82/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 11 - Address: 0E:F9:F8:52:02:14 ESSID: unknown Mode: Master Channel: 11 Signal: -68 dBm Quality: 72/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 12 - Address: 08:6B:D1:42:DF:A0 ESSID: "ChinaNet-wSPT" Mode: Master Channel: 1 Signal: -78 dBm Quality: 40/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 13 - Address: F4:6A:92:E8:9E:A9 ESSID: "客家装饰" Mode: Master Channel: 11 Signal: -64 dBm Quality: 85/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 14 - Address: 48:0E:EC:35:3D:F1 ESSID: "中启水泥制品(深圳)" Mode: Master Channel: 1 Signal: -69 dBm Quality: 69/94 Encryption: mixed WPA/WPA2 PSK (CCMP)
Cell 15 - Address: 74:B7:B3:B0:9C:72 ESSID: "ChinaNet-YnbV" Mode: Master Channel: 11 Signal: -72 dBm Quality: 59/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
Cell 16 - Address: 56:F8:2A:00:50:75 ESSID: "Audi_MMI_0849" Mode: Master Channel: 6 Signal: -70 dBm Quality: 66/94 Encryption: WPA2 PSK (CCMP)
Cell 17 - Address: CC:90:E8:38:9D:F9 ESSID: "ChinaNet-eG7n" Mode: Master Channel: 7 Signal: -77 dBm Quality: 43/94 Encryption: mixed WPA/WPA2 PSK (TKIP, CCMP)
root@NHX6018-0-NPN-256M32-D4:~#
查看无线客户端连接状态
root@NHX6018-0-NPN-256M32-D4:~# wlanconfig ath0 list staADDR AID CHAN TXRATE RXRATE RSSI MINRSSI MAXRSSI IDLE TXSEQ RXSEQ CAPS XCAPS ACAPS ERP STATE MAXRATE(DOT11) HTCAPS VHTCAPS ASSOCTIME IEs MODE RXNSS TXNSS PSMODE70:9c:d1:21:a6:88 1 149 960M 816M -51 -61 -41 2 0 65535 EPsR EBQO NULL 0 b 1201000 AWPSM gGTRs 66:06:23 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 0 NR BRP BRA BRT RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 45 Operating band : 5GHz Current Operating class : 128 Supported Operating classes : 81 83 84 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE8002:4b:fb:70:47:d3 3 149 433M 6M -52 -75 -50 0 0 65535 EPs BOI NULL 0 b 433300 AWPS gGR 02:23:02 RSN WME IEEE80211_MODE_11AC_VHT80 1 1 1
RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 44 Operating band : 5GHz Current Operating class : 0 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AC_VHT8034:2e:b7:b6:bf:11 5 149 1080M 6M -46 -61 -41 33 0 65535 EPsR EBQO NULL 0 b 1201000 AWPSM gGTRs 02:16:59 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 1 NR BRP BRA BRT RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 50 Operating band : 5GHz Current Operating class : 128 Supported Operating classes : 81 83 84 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE806c:a1:00:5c:3f:48 6 149 1201M 1020M -42 -60 -39 0 0 65535 EPsR EBQO NULL 0 b 1201000 AWPSM gGTRs 01:58:30 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 0 NR BRP BRA BRT RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 54 Operating band : 5GHz Current Operating class : 128 Supported Operating classes : 81 83 84 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE80ce:f7:3a:4f:b7:17 7 149 6M 130M -62 -66 -50 19 0 65535 EP BOI NULL 0 b 1201000 AWPS gG 01:08:59 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 1
RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : No SNR : 34 Operating band : 5GHz Current Operating class : 0 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE80e2:fa:f4:b3:25:ae 4 149 234M 117M -72 -76 -39 77 0 65535 EPR cBOR NULL 0 b 433300 WPGS 2LgGRS 00:53:08 RSN WME IEEE80211_MODE_11AC_VHT80 1 1 1 LM NR BRP BRA BRT RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 24 Operating band : 5GHz Current Operating class : 124 Supported Operating classes : 81 83 84 115 116 117 118 119 120 124 125 126 127 128 130 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AC_VHT80e2:80:f0:93:fb:fb 8 149 1080M 680M -51 -62 -49 0 0 65535 EP BOI NULL 0 b 1201000 AWPS gG 00:01:30 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 1
RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : No SNR : 45 Operating band : 5GHz Current Operating class : 0 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE80ADDR AID CHAN TXRATE RXRATE RSSI MINRSSI MAXRSSI IDLE TXSEQ RXSEQ CAPS XCAPS ACAPS ERP STATE MAXRATE(DOT11) HTCAPS VHTCAPS ASSOCTIME IEs MODE RXNSS TXNSS PSMODE54:13:79:75:37:af 2 149 780M 650M -61 -64 -55 0 0 65535 EPs cEBO NULL 0 b 866700 AWPSM gGTRsS 00:01:17 RSN WME IEEE80211_MODE_11AC_VHT80 2 2 0
RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 35 Operating band : 5GHz Current Operating class : 0 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AC_VHT806c:a1:00:65:bf:ac 9 149 1080M 907M -49 -51 -47 0 0 65535 EPsR EBQO NULL 0 b 1201000 AWPSM gGTRs 00:00:57 RSN WME IEEE80211_MODE_11AXA_HE80 2 2 0 NR BRP BRA BRT RSSI is combined over chains in dBm Minimum Tx Power : 0 Maximum Tx Power : 0 HT Capability : Yes VHT Capability : Yes MU capable : Yes SNR : 47 Operating band : 5GHz Current Operating class : 128 Supported Operating classes : 81 83 84 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 Supported Rates : 12 18 24 36 48 72 96 108 Max STA phymode : IEEE80211_MODE_11AXA_HE80root@NHX6018-0-NPN-256M32-D4:~#
system
查看分区信息
root@NHX6018-0-NPN-256M32-D4:~# cat /proc/mtddev: size erasesize namemtd0: 000c0000 00010000 "0:SBL1"mtd1: 00010000 00010000 "0:MIBIB"mtd2: 00020000 00010000 "0:BOOTCONFIG"mtd3: 00020000 00010000 "0:BOOTCONFIG1"mtd4: 001a0000 00010000 "0:QSEE"mtd5: 001a0000 00010000 "0:QSEE_1"mtd6: 00010000 00010000 "0:DEVCFG"mtd7: 00010000 00010000 "0:DEVCFG_1"mtd8: 00040000 00010000 "0:RPM"mtd9: 00040000 00010000 "0:RPM_1"mtd10: 00010000 00010000 "0:CDT"mtd11: 00010000 00010000 "0:CDT_1"mtd12: 00010000 00010000 "0:APPSBLENV"mtd13: 000a0000 00010000 "0:APPSBL"mtd14: 000a0000 00010000 "0:APPSBL_1"mtd15: 00040000 00010000 "0:ART"mtd16: 00040000 00010000 "0:userpart"mtd17: 03200000 00020000 "rootfs"mtd18: 03200000 00020000 "rootfs_1"mtd19: 00040000 00020000 "kpanic"mtd20: 01bc0000 00020000 "opt"mtd21: 00461694 0001f000 "kernel"mtd22: 003b5000 0001f000 "wifi_fw"mtd23: 01249000 0001f000 "ubi_rootfs"mtd24: 01113000 0001f000 "rootfs_data"root@NHX6018-0-NPN-256M32-D4:~#
显示内核信息
dmesg
恢复出厂
firstboot && reboot -f
重启
reboot
查看固件版本
root@NHX6018-0-NPN-256M32-D4:~# cat /etc/nhx_git_version4dd7d1525c355c91c3ba47b4aa540596dba9cc12root@NHX6018-0-NPN-256M32-D4:~#
查看固件编译时间
root@NHX6018-0-NPN-256M32-D4:~# cat /etc/openwrt_build4dd7d1525+r49254-20230322-152925root@NHX6018-0-NPN-256M32-D4:~#
device
查看pcie设备id
lspcidmesg | grep pci
查看usb设备id
lsusb
硬件狗
查看硬件狗运行状态
root@NHX6018-0-NPN-256M32-D4:/# ubus call system watchdog{ "status": "running", "timeout": 30, "frequency": 5}root@NHX6018-0-NPN-256M32-D4:/#
To stop watchdog
ubus call system watchdog '{ "stop": true }'
To start watchdog
ubus call system watchdog '{ "stop": false }'
To configure watchdog timeout as 20 seconds (default is 30 seconds)
ubus call system watchdog '{ "timeout": 20}'
Currently, the bark timeout is default to be the bite timeout subtract 1. Therefore the bark timeout is 19 seconds in this case.
FAQ
-
Q:已更改配置并使用uci commit,为什么配置未生效?
A:uci commit只是保存config文件配置。要使配置生效,还需要将相关进程重启一遍。例如:修改network配置后需要执行/etc/init.d/network restart;修改wireless后需要执行wifi