路由器刷完openwrt无web界面问题解决方案

官方固件刷完后本身不带界面的,导致很多新手进不了WEB界面,以为刷挂。
我也是新手,特发此教程。

刷官方openwrt无web界面openwrt初步配置

 

方法一:

使用工具:telnet软件,如puty

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

关掉landhcp
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

安装luciweb配置界面
opkg install luci

启动uhttpd服务
/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start

这时,在浏览器打开192.168.1.1(如果没修改过)进入web配置界面

 

 

方法二:

 

SHH命令和Telnet命令推介用软件putty,可以多模式切换。

1.先用Telnet  改密码   
命今:passwd root
输二次就修改成功了。

2.再用winscp工具进路由修改/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 'interface' 'lan'
        option 'ifname' 'eth0'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'

config 'interface' 'wan'
        option 'ifname' 'eth1'
        option 'proto' 'pppoe'
        option 'username' '你的ADSL账号'
        option 'password' '
密码'

config 'switch' 'eth0'
        option 'enable_vlan' '1'

config 'switch_vlan'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '0 1 2 3 4'

或接上二级路由上或其它方法。总之让这个路由能上网!!!!!!

3. SHH 命今手动安装界面.
opkg update
opkg install luci

/etc/init.d/uhttpd enable
/etc/init.d/uhttpd start

完成,你就可以看到界面了。

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据