鸣涧 发表于 2022-7-19 18:23:39

openwrt有线网卡的停用与开启


openwrt有线网卡的停用与开启





一、有线网卡
1、开启
ifup lan

2、关闭
ifdown lan

二、无线网卡
1、开启
<div>ifup wwan</div><div>wifi up</div>

2、关闭
<div>ifdown wwan</div><div>wifi down</div>


三、外网连接测试

<div>local server="www.baidu.com"</div><div>status=$(ping -q -c 10 -W 1 $server > /dev/null 2>&1 && echo "ok" || echo "fail")</div><div>if [ "$status" = "fail" ]; then</div><div>    echo "************************:server:"$server"network error"> /dev/console</div><div>fi</div>


页: [1]
查看完整版本: openwrt有线网卡的停用与开启