http://www.right.com.cn/forum/thread-78763-1-1.html
telnet 192.168.1.1
一。让设备联网
1.1 pppoe用户:
设置wan口类型为pppoe
uci set network.wan.proto=pppoe
设置pppoe用户名和密码、mtu
uci set network.wan.username=xxxxx
uci set network.wan.password=xxxxxx
uci set network.wan.mtu=1492
1.2二级路由模式(非DHCP获取):
设置lan ip(即访问路由的ip,与一级路由不同网段)
uci set network.lan.ipaddr=192.168.2.1
设置wan口类型为静态
uci set network.wan.proto=static
设置wan ip
uci set network.wan.ipaddr=192.168.1.200
网关指向上级路由
uci set network.wan.gateway=192.168.1.1
dns指向上级路由
uci set network.wan.dns=192.168.1.1
1.3交换机模式(当交换机用,WAN口空置)
关掉wan
uci set network.wan.proto=none
设置lan ip(本路由登陆IP)
uci set network.lan.ipaddr=192.168.1.100
网关指向上级路由
uci set network.lan.gateway=192.168.1.1
dns指向上级路由
uci set network.lan.dns=192.168.1.1
关掉lan的dhcp
uci set dhcp.lan.ignore=1
2.配置无线
打开无线
uci set wireless.@wifi-device[0].disabled=0
设置功率为17dbm 太高会烧无线模块
uci set wireless.@wifi-device[0].txpower=17
设置无线信道为8
uci set wireless.@wifi-device[0].channel=8
以下2行是开启300M
uci set wireless.@wifi-device[0].htmode=HT40-
uci set wireless.@wifi-device[0].noscan=1
设置无线模式为ap
uci set wireless.@wifi-iface[0].mode=ap
设置无线SSID
uci set wireless.@wifi-iface[0].ssid=xxxxxx
无线链接到lan上
uci set wireless.@wifi-iface[0].network=lan
设置加密为WPA2-PSK
uci set wireless.@wifi-iface[0].encryption=psk2
设置无线密码
uci set wireless.@wifi-iface[0].key=xxxxx
3.最后应用配置:
应用
uci commit
重新启动网络
/etc/init.d/network restart
二。安装组件
查看已安装的组件包
opkg list-installed
更新组件包package
opkg update
安装luci的web配置界面
opkg install luci
启动uhttpd服务
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start
这时,在浏览器打开192.168.1.1(如果没修改过)进入web配置界面