uci set network.lan.ipaddr=[lan ip]
使用pppoe設(shè)置
Shell代碼
uci set network.wan.proto=pppoe //設(shè)置wan口類(lèi)型為pppoe
uci set network.wan.username=[上網(wǎng)帳戶]
uci set network.wan.password=[上網(wǎng)密碼] //這兩行設(shè)置pppoe用戶名和密碼
如果要掛在上級(jí)路由下面,就需要進(jìn)行下面的設(shè)置
Shell代碼
uci set network.wan.proto=none //關(guān)掉wan
uci set network.lan.gateway=[上級(jí)路由ip] //網(wǎng)關(guān)指向上級(jí)路由
uci set network.lan.dns=[上級(jí)路由ip] //dns指向上級(jí)路由
uci set dhcp.lan.ignore=1 //關(guān)掉lan的dhcp
最后對(duì)無(wú)線網(wǎng)絡(luò)進(jìn)行配置
Shell代碼
uci set wireless.@wifi-device[0].disabled=0 //打開(kāi)無(wú)線
uci set wireless.@wifi-device[0].txpower=17 //設(shè)置功率為17dbm 太高會(huì)燒無(wú)線模塊
uci set wireless.@wifi-device[0].channel=6 //設(shè)置無(wú)線信道為6
uci set wireless.@wifi-iface[0].mode=ap //設(shè)置無(wú)線模式為ap
uci set wireless.@wifi-iface[0].ssid=[自己設(shè)置SSID] //設(shè)置無(wú)線SSID
uci set wireless.@wifi-iface[0].network=lan //無(wú)線鏈接到lan上
uci set wireless.@wifi-iface[0].key=[密碼] //設(shè)置無(wú)線密碼
提交應(yīng)用配置
Shell代碼
uci commit //應(yīng)用
/etc/init.d/network restart //重啟網(wǎng)絡(luò)服務(wù)
安裝luci管理界面
Shell代碼
opkg update // 更新軟件列表
opkg list-installed // 查看已安裝軟件
opkg install luci // 安裝LUCI
opkg install luci-i18n-chinese // 支持中文
luci-app-firewall – 0.10.0-1
即可完成LUCI的安裝。
輸入以下命令開(kāi)啟支持web服務(wù)的uhttpd,并設(shè)置其為自啟動(dòng):
Shell代碼
/etc/init.d/uhttpd enable # 開(kāi)機(jī)自啟動(dòng)
/etc/init.d/uhttpd start # 啟動(dòng)uhttpd – Wifidog –sftp安裝 |
|
來(lái)自: 我的技術(shù)大雜燴 > 《OpenWRT》