求帮助。hg556a 刷 openwrt 出现一个问题

2014-08-17 10:19:24 +08:00
 hellov22ex
正常输入,已经手动更改wan口,并且DNS等已经设置完成,但是无法进行opkg update,提示bad address,也无法直接ping通IP,可上网的那个路由器的网关也无法ping通,但是可以在可上网的那个路由器的管理里找到hg556a的网卡mac,并且如果链接能上网的那个路由器的网线插在改的wan口里,电脑就无法telnet到hg556a,现在不知道如何处理了,有了解的请指点下,谢谢
3856 次点击
所在节点    OpenWrt
41 条回复
jasontse
2014-08-17 10:21:20 +08:00
贴出你的 /etc/config/network
zts1993
2014-08-17 10:27:27 +08:00
bad address应该是dns问题?
hellov22ex
2014-08-17 10:28:59 +08:00
@jasontse
下面的就是了,谢谢回答

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 type bridge
option ifname eth0.1
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0

config interface wan
option ifname eth0.1
option proto dhcp

config switch eth0
option enable 1
option reset 1
option enable_vlan 1

config switch_vlan
option device eth0
option vlan 0
option ports "0 1 2 5t"

config switch_vlan
option device eth0
option vlan 1
option ports "3 5t"
hellov22ex
2014-08-17 10:29:31 +08:00
@zts1993 DNS已经设置成了了路由器的,网关也是,但是还是不行
kttde
2014-08-17 10:58:00 +08:00
这是我的/etc/config/network配置文件,可以参考下,我的路由器是rg100a

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 type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option nat '1'
option gateway '10.0.0.1'
option ipaddr '10.0.0.1'
option ifname 'eth1.2'

config interface 'wan'
option ifname 'eth1.1'
option _orig_ifname 'eth1.1'
option _orig_bridge 'false'
option proto 'dhcp'

config switch
option name 'eth1'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'eth1'
option vlan '1'
option ports '3 5t'

config switch_vlan
option device 'eth1'
option vlan '2'
option ports '0 1 2 5t'
goodxxx
2014-08-17 11:01:36 +08:00
你没安装luci 包吗?用这个web界面设置比较方便吧
hellov22ex
2014-08-17 11:07:38 +08:00
@goodxxx 刚刷进去,还无法安装

@kttde 谢,基本参数一样,但是不知道为什么就是不能上网。。。
jasontse
2014-08-17 11:10:59 +08:00
打印
# ifconfig
看看是不是冲突了
hellov22ex
2014-08-17 11:27:08 +08:00
@jasontse
br-lan Link encap:Ethernet HWaddr 34:6B:D3:6F:BD:A2
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::366b:d3ff:fe6f:bda2/64 Scope:Link
inet6 addr: fdc9:46e7:5fa1::1/60 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2347 errors:0 dropped:0 overruns:0 frame:0
TX packets:1343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:163886 (160.0 KiB) TX bytes:132213 (129.1 KiB)

eth0 Link encap:Ethernet HWaddr 34:6B:D3:6F:BD:A2
inet6 addr: fe80::366b:d3ff:fe6f:bda2/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2768 errors:0 dropped:0 overruns:0 frame:0
TX packets:2487 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:265536 (259.3 KiB) TX bytes:553989 (541.0 KiB)
Interrupt:14

eth0.1 Link encap:Ethernet HWaddr 34:6B:D3:6F:BD:A2
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2547 errors:0 dropped:0 overruns:0 frame:0
TX packets:2472 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:195176 (190.6 KiB) TX bytes:542395 (529.6 KiB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:29243 errors:0 dropped:0 overruns:0 frame:0
TX packets:29243 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1988484 (1.8 MiB) TX bytes:1988484 (1.8 MiB)
hellov22ex
2014-08-17 11:30:31 +08:00
@jasontse 不好意思,虽然一些看得懂,但是还是不了解原因
zts1993
2014-08-17 11:34:00 +08:00
@hellov22ex wan 不是dhcp么,那你的dnsmasq工作正常么?
jasontse
2014-08-17 11:37:36 +08:00
@hellov22ex
WAN 没有 DHCP 成功。
hellov22ex
2014-08-17 11:37:51 +08:00
@zts1993 不好意思,Linux菜鸡,dnsmasq提示我53端口在使用,但是正常不正常不知道了
ooxxcc
2014-08-17 11:38:07 +08:00
eth0.1 没获取到IP吧……
jasontse
2014-08-17 11:39:25 +08:00
@hellov22ex
你现在是什么版本? 刷14.07-rc3 吧,预装 LuCI。
hellov22ex
2014-08-17 11:39:38 +08:00
@jasontse 那该如何处理呢?
hellov22ex
2014-08-17 11:41:03 +08:00
@jasontse 现在刷的是官方的那个包,没界面,没wifi驱动的,不知道你说的这个包是否能再hg556a上用

@ooxxcc 请问,那该如何处理?
jasontse
2014-08-17 11:41:36 +08:00
@hellov22ex
确认你连接的 WAN 端口是正确的,并且上游 DHCP 服务配置正常。
kttde
2014-08-17 12:14:11 +08:00
config interface lan
option type bridge
option ifname eth0.1
option proto static
option ipaddr 192.168.1.1
option netmask 255.255.255.0

option ifname eth0.1 这里应该是0.2,因为0.1已经被wan口使用,再被使用会冲突
官方文档http://wiki.openwrt.org/zh-cn/doc/uci/network
csx163
2014-08-17 12:47:21 +08:00
真麻烦,怎么不关掉DHCP,再改个IP直接LAN 对 LAN

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/128341

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX