找回密码
 注册

QQ登录

只需一步,快速开始

查看: 10994|回复: 8

最新的openwrt为什么switch好像不能用呢?

[复制链接]
发表于 2009-12-22 16:55:31 | 显示全部楼层 |阅读模式
Openwrt版本18883,设备rg100a-aa.

network设置如下

  1. # Copyright (C) 2008 OpenWrt.org

  2. config switch eth1
  3.         option vlan0 '0 1 2 5*'
  4.         option vlan1 '3 5*'
  5.         
  6. config interface loopback
  7.         option ifname   lo
  8.         option proto    static
  9.         option ipaddr   127.0.0.1
  10.         option netmask  255.0.0.0

  11. config interface lan
  12.         option type     bridge
  13.         option ifname   eth1.0
  14.         option proto    static
  15.         option ipaddr   192.168.1.1
  16.         option netmask  255.255.255.0
  17.         option nat      1
  18. '00:1F:A3:43:7E:45'

  19. config interface wan
  20.         option ifname        'eth1.1'
  21.         option proto        dhcp
复制代码


但是没有作用

我在openwrt上安装了robocfg这个switch的配置工具后运行
  1. robocfg show
复制代码

显示network里面的的switch设置并没有生效
之后我用robocfg工具手动配置了一下就可以用了
  1. robocfg switch disable
  2. robocfg vlans enable reset
  3. robocfg vlan 0 ports "0 1 2 5t"
  4. robocfg vlan 1 ports "3 5t"
  5. robocfg switch enable
复制代码


但是每次重启之后switch又失效了,虽然可以通过把以上命令加入启动脚本来解决 不过总归不是根本上解决问题 哪位高手帮忙看看有没有什么根本的解决办法呢
 楼主| 发表于 2009-12-22 17:10:05 | 显示全部楼层
本帖最后由 ringz 于 2009-12-22 18:16 编辑

如果你的rg100a-aa设置switch之后无法ping通了,可以用ttl线进入telnet,然后运行
  1. rm /etc/config/network
复制代码

然后重启就恢复默认的network配置了
发表于 2009-12-22 17:32:26 | 显示全部楼层
Openwrt新版本的VLAN是有问题的,我用18405是可以正常使用vlan的。
发表于 2009-12-22 18:00:59 | 显示全部楼层
ccbcfan你好,在2cna看过你的帖子,你刷的也是18405 luci那个版本吧,我刷的也是那个版本。network的配置大致和你是一样的,但是电脑上不了网,在interface里看wan已经有公网地址了,ping网关是通的,但是ping DNS又提示到网关不通,不知道怎么回事。下面是我network的配置,麻烦帮我看下是什么问题

config 'switch' 'eth1'
        option 'vlan0' '0 1 2 5*'
        option 'vlan1' '3 5*'

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' 'eth1.0'
        option 'proto' 'static'
        option 'netmask' '255.255.255.0'
        option 'nat' '1'
#        option 'defaultroute' '0'
#        option 'peerdns' '0'
        option 'type' 'bridge'
        option 'ipaddr' '192.168.1.1'


config 'interface' 'wan'
        option 'ifname' 'eth1.1'
        option 'defaultroute' '0'
        option 'proto' 'pppoe'
        option 'keepalive' '10'
        option 'username' '*******'
        option 'password' '*******'
#        option 'peerdns' '0'
发表于 2009-12-23 08:56:02 | 显示全部楼层
config 'interface' 'lan'
        option 'type' 'bridge'
        option 'proto' 'static'
        option 'ipaddr' '192.168.1.1'
        option 'netmask' '255.255.255.0'
        option 'nat' '1'
        option 'ifname' 'eth1.0'
        option 'defaultroute' '0'
        option 'peerdns' '0'

config 'interface' 'wan'
        option 'proto' 'static'
        option 'ifname' 'eth1.1'
        option 'ipaddr' '10.14.164.61'
        option 'netmask' '255.255.255.0'
        option 'gateway' '10.14.164.254'
        option 'defaultroute' '0'
        option 'peerdns' '0'
        option 'dns' '202.106.196.115'
        option 'type' 'bridge'
        option 'stp' '1'

你看看我的配置,建议把注释的#号去掉看看
发表于 2009-12-23 12:35:32 | 显示全部楼层
之前试过去掉的,也是不行,不知道是怎么回事
发表于 2009-12-28 00:49:04 | 显示全部楼层
回复 1# ringz


    楼主哪有新版本RG100A的openwrt固件下载啊,麻烦给个链接
发表于 2009-12-28 10:50:39 | 显示全部楼层
证明
最近的18932,18876都试过,存在这个问题
今天试试18955,
我是在为opkg install core dump头疼
 楼主| 发表于 2010-3-30 11:34:10 | 显示全部楼层
刷最新版的已经解决了 是vlan的定义方式改了 大家可以去openwrt的wiki详细看看
*滑块验证:
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|小黑屋|宽带技术网 |网站地图 粤公网安备44152102000001号

GMT+8, 2025-5-19 03:22 , Processed in 0.041344 second(s), 3 queries , Redis On.

Powered by Discuz! X3.5 Licensed

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表