连了一下wifi,其它的两个网口怎么不能用了呢
本帖最后由 mao0504 于 2021-4-22 14:45 编辑root@ok5718-idk:/mnt/nfs/OK5718-SDK-V1.0# ifconfig
<b>eth0 </b> Link encap:EthernetHWaddr 90:9A:77:90:32:10
inet addr:192.168.1.232Bcast:192.168.1.255Mask:255.255.255.0
inet6 addr: fe80::929a:77ff:fe90:3210%763860/64 Scope:Link
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:5079 errors:0 dropped:0 overruns:0 frame:0
TX packets:2364 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:706302 (689.7 KiB)TX bytes:381472 (372.5 KiB)
Interrupt:92
<b>eth1</b> Link encap:EthernetHWaddr 90:9A:77:90:32:11
UP BROADCAST MULTICASTMTU:1500Metric: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)
<b>lo </b> Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
inet6 addr: ::1%763860/128 Scope:Host
UP LOOPBACK RUNNINGMTU:65536Metric:1
RX packets:896 errors:0 dropped:0 overruns:0 frame:0
TX packets:896 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:288124 (281.3 KiB)TX bytes:288124 (281.3 KiB)
<b>wlan0 </b> Link encap:EthernetHWaddr 34:20:03:94:8F:D8
UP BROADCAST MULTICASTMTU:1500Metric: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)
cd /home/forlinx/cmd ; ./wifi.sh-i wlan0 -s MERCURY_XT -p 1234567890;ifconfig;ping 192.168.1.2
root@ok5718-idk:/home/forlinx/cmd# ifconfig
<b>lo</b> Link encap:Local Loopback
inet addr:127.0.0.1Mask:255.0.0.0
inet6 addr: ::1%763860/128 Scope:Host
UP LOOPBACK RUNNINGMTU:65536Metric:1
RX packets:917 errors:0 dropped:0 overruns:0 frame:0
TX packets:917 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:289960 (283.1 KiB)TX bytes:289960 (283.1 KiB)
<b>wlan0 </b> Link encap:EthernetHWaddr 34:20:03:94:8F:D8
inet addr:192.168.1.112Bcast:192.168.1.255Mask:255.255.255.0
UP BROADCAST RUNNING MULTICASTMTU:1500Metric:1
RX packets:31 errors:0 dropped:7 overruns:0 frame:0
TX packets:40 errors:0 dropped:1 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7948 (7.7 KiB)TX bytes:8228 (8.0 KiB)
修改/home/forlinx/cmd/wifi.sh
ifconfig -a|grep eth0 |grep -v grep> /dev/null
if [ $? -eq 0 ]
then
ifconfig eth0 down > /dev/null
fi
ifconfig -a|grep eth1 |grep -v grep> /dev/null
if [ $? -eq 0 ]
then
ifconfig eth1 down > /dev/null
fi
将ifconfig eth0/eth1 down 注释掉
页:
[1]