V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
OpenWrt 是一个专门面向嵌入式设备的 Linux 发行版。你可以将 OpenWrt 支持的型号的嵌入式设备,比如各种路由器上的系统,换成一个有更多可能性可以折腾的 Linux 系统。
OpenWrt 官方网站
hellov22ex
V2EX  ›  OpenWrt

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

  •  
  •   hellov22ex · 2014-08-17 10:19:24 +08:00 · 3821 次点击
    这是一个创建于 3549 天前的主题,其中的信息可能已经有所发展或是发生改变。
    正常输入,已经手动更改wan口,并且DNS等已经设置完成,但是无法进行opkg update,提示bad address,也无法直接ping通IP,可上网的那个路由器的网关也无法ping通,但是可以在可上网的那个路由器的管理里找到hg556a的网卡mac,并且如果链接能上网的那个路由器的网线插在改的wan口里,电脑就无法telnet到hg556a,现在不知道如何处理了,有了解的请指点下,谢谢
    41 条回复    2014-08-17 16:08:56 +08:00
    jasontse
        1
    jasontse  
       2014-08-17 10:21:20 +08:00 via iPad   ❤️ 1
    贴出你的 /etc/config/network
    zts1993
        2
    zts1993  
       2014-08-17 10:27:27 +08:00 via Android   ❤️ 1
    bad address应该是dns问题?
    hellov22ex
        3
    hellov22ex  
    OP
       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
        4
    hellov22ex  
    OP
       2014-08-17 10:29:31 +08:00
    @zts1993 DNS已经设置成了了路由器的,网关也是,但是还是不行
    kttde
        5
    kttde  
       2014-08-17 10:58:00 +08:00   ❤️ 1
    这是我的/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
        6
    goodxxx  
       2014-08-17 11:01:36 +08:00   ❤️ 1
    你没安装luci 包吗?用这个web界面设置比较方便吧
    hellov22ex
        7
    hellov22ex  
    OP
       2014-08-17 11:07:38 +08:00
    @goodxxx 刚刷进去,还无法安装

    @kttde 谢,基本参数一样,但是不知道为什么就是不能上网。。。
    jasontse
        8
    jasontse  
       2014-08-17 11:10:59 +08:00 via iPad   ❤️ 1
    打印
    # ifconfig
    看看是不是冲突了
    hellov22ex
        9
    hellov22ex  
    OP
       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
        10
    hellov22ex  
    OP
       2014-08-17 11:30:31 +08:00
    @jasontse 不好意思,虽然一些看得懂,但是还是不了解原因
    zts1993
        11
    zts1993  
       2014-08-17 11:34:00 +08:00   ❤️ 1
    @hellov22ex wan 不是dhcp么,那你的dnsmasq工作正常么?
    jasontse
        12
    jasontse  
       2014-08-17 11:37:36 +08:00 via iPad   ❤️ 1
    @hellov22ex
    WAN 没有 DHCP 成功。
    hellov22ex
        13
    hellov22ex  
    OP
       2014-08-17 11:37:51 +08:00
    @zts1993 不好意思,Linux菜鸡,dnsmasq提示我53端口在使用,但是正常不正常不知道了
    ooxxcc
        14
    ooxxcc  
       2014-08-17 11:38:07 +08:00   ❤️ 1
    eth0.1 没获取到IP吧……
    jasontse
        15
    jasontse  
       2014-08-17 11:39:25 +08:00 via iPad   ❤️ 1
    @hellov22ex
    你现在是什么版本? 刷14.07-rc3 吧,预装 LuCI。
    hellov22ex
        16
    hellov22ex  
    OP
       2014-08-17 11:39:38 +08:00
    @jasontse 那该如何处理呢?
    hellov22ex
        17
    hellov22ex  
    OP
       2014-08-17 11:41:03 +08:00
    @jasontse 现在刷的是官方的那个包,没界面,没wifi驱动的,不知道你说的这个包是否能再hg556a上用

    @ooxxcc 请问,那该如何处理?
    jasontse
        18
    jasontse  
       2014-08-17 11:41:36 +08:00 via iPad
    @hellov22ex
    确认你连接的 WAN 端口是正确的,并且上游 DHCP 服务配置正常。
    kttde
        19
    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
        20
    csx163  
       2014-08-17 12:47:21 +08:00   ❤️ 1
    真麻烦,怎么不关掉DHCP,再改个IP直接LAN 对 LAN
    hellov22ex
        21
    hellov22ex  
    OP
       2014-08-17 13:30:30 +08:00   ❤️ 1
    @jasontse 确认了

    @kttde 感谢你的指导,路由器已经在上游路由器的dhcp表里稳定出现了,按照这个的话,根据我的配置,不是应该改为eth0.0么?

    但是现在出现个问题,我该如何控制这个家伙?ping不通,tel不上
    hellov22ex
        22
    hellov22ex  
    OP
       2014-08-17 13:35:41 +08:00
    @csx163 这样又什么好处么?我就想把它刷成一个openwrt能拨号的路由器、

    @jasontse
    @kttde
    不好意思,被半小时限制了
    seki
        23
    seki  
       2014-08-17 13:44:33 +08:00   ❤️ 1
    前两天的 rc3 已经带了 luci 界面了

    话说之前没带的时候是挺蛋疼的,shell 下的基本设置建议用 uci 而不要直接改配置文件
    hellov22ex
        24
    hellov22ex  
    OP
       2014-08-17 13:48:31 +08:00
    @seki 不好意思,我不知道rc3是什么,我对openwrt的版本号不太了解,找的是硬件支持里面链接进去的最新的那个,然后其它就什么都不知道了,现在的问题是无法安装luci,按照前面的那个哥们的建议,路由器已经在上游路由器的DHCP里面稳定找到了,但是现在我无法链接或者ping通hg556a,不知道如何处理了
    jasontse
        25
    jasontse  
       2014-08-17 13:52:55 +08:00 via iPhone   ❤️ 1
    hellov22ex
        26
    hellov22ex  
    OP
       2014-08-17 13:54:43 +08:00
    @jasontse 感谢提供支持,我想确认下,HG556A A版本硬件支持吗?
    jasontse
        27
    jasontse  
       2014-08-17 13:55:51 +08:00 via iPhone   ❤️ 1
    @hellov22ex
    你现在刷的固件下载地址是什么
    hellov22ex
        28
    hellov22ex  
    OP
       2014-08-17 13:56:46 +08:00
    @jasontse 不好意思,了解了
    @seki 2B了,感谢回复
    jasontse
        30
    jasontse  
       2014-08-17 14:02:17 +08:00 via iPhone   ❤️ 1
    @hellov22ex
    你给的地址文件名是 553,确定没有刷错?
    hellov22ex
        31
    hellov22ex  
    OP
       2014-08-17 14:04:44 +08:00
    jasontse
        32
    jasontse  
       2014-08-17 14:05:53 +08:00 via iPhone   ❤️ 1
    @hellov22ex
    那就没错了,是我上面发的那个。
    hellov22ex
        33
    hellov22ex  
    OP
       2014-08-17 14:06:40 +08:00
    @jasontse 好的,已经下载完毕,正在准备刷,就是路由器一直不肯进入刷机状态
    hellov22ex
        34
    hellov22ex  
    OP
       2014-08-17 14:12:33 +08:00
    @jasontse 刷了这个版本,是否还需要额外设置?还是可以直接进入web的图形界面进行需要的设置?
    jasontse
        35
    jasontse  
       2014-08-17 14:14:01 +08:00 via iPhone   ❤️ 1
    @hellov22ex
    可以直接访问 http://192.168.1.1
    hellov22ex
        36
    hellov22ex  
    OP
       2014-08-17 14:22:01 +08:00
    @jasontse 恩,已经都配置好了。很好用的版本,谢谢
    hellov22ex
        37
    hellov22ex  
    OP
       2014-08-17 14:23:26 +08:00
    @jasontse 有个疑问,为什么language那只有auto,没有中文选项?我该如何添加或者转变它为中文?
    jasontse
        38
    jasontse  
       2014-08-17 14:27:04 +08:00 via iPad   ❤️ 1
    @hellov22ex
    安装中文包
    # opkg install luci-i18n-chinese
    kttde
        39
    kttde  
       2014-08-17 14:32:30 +08:00   ❤️ 1
    @hellov22ex eth0.0和eth0.1没有区别,你改为0.3,0.4也行
    hellov22ex
        40
    hellov22ex  
    OP
       2014-08-17 15:07:27 +08:00
    @jasontse 不好意思又要问了,现在出现的问题是,无法上网,可以把它当个交换机,但是它自己无法上网,在telnet模式下,无法ping通或者链接网络,上游路由器一切正常,也能看到分配给它的IP,但是无法链接网络
    hellov22ex
        41
    hellov22ex  
    OP
       2014-08-17 16:08:56 +08:00
    好了,搞定了,谢谢楼上的所有人,最后把lan4口弄成了wan就行了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5855 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 01:44 · PVG 09:44 · LAX 18:44 · JFK 21:44
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.