ringz 发表于 2009-12-22 16:55:31

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

Openwrt版本18883,设备rg100a-aa.

network设置如下

# Copyright (C) 2008 OpenWrt.org

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 netmask255.0.0.0

config interface lan
      option type   bridge
      option ifname   eth1.0
      option proto    static
      option ipaddr   192.168.1.1
      option netmask255.255.255.0
      option nat      1
'00:1F:A3:43:7E:45'

config interface wan
      option ifname      'eth1.1'
      option proto      dhcp

但是没有作用

我在openwrt上安装了robocfg这个switch的配置工具后运行
robocfg show
显示network里面的的switch设置并没有生效
之后我用robocfg工具手动配置了一下就可以用了
robocfg switch disable
robocfg vlans enable reset
robocfg vlan 0 ports "0 1 2 5t"
robocfg vlan 1 ports "3 5t"
robocfg switch enable

但是每次重启之后switch又失效了,虽然可以通过把以上命令加入启动脚本来解决 不过总归不是根本上解决问题 哪位高手帮忙看看有没有什么根本的解决办法呢

ringz 发表于 2009-12-22 17:10:05

本帖最后由 ringz 于 2009-12-22 18:16 编辑

如果你的rg100a-aa设置switch之后无法ping通了,可以用ttl线进入telnet,然后运行
rm /etc/config/network
然后重启就恢复默认的network配置了

ccbcfan 发表于 2009-12-22 17:32:26

Openwrt新版本的VLAN是有问题的,我用18405是可以正常使用vlan的。

qzy0101 发表于 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'

sniper99999 发表于 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'

你看看我的配置,建议把注释的#号去掉看看

qzy0101 发表于 2009-12-23 12:35:32

之前试过去掉的,也是不行,不知道是怎么回事

flaringrain 发表于 2009-12-28 00:49:04

回复 1# ringz


    楼主哪有新版本RG100A的openwrt固件下载啊,麻烦给个链接

neighbour 发表于 2009-12-28 10:50:39

证明
最近的18932,18876都试过,存在这个问题
今天试试18955,
我是在为opkg install core dump头疼

ringz 发表于 2010-3-30 11:34:10

刷最新版的已经解决了 是vlan的定义方式改了 大家可以去openwrt的wiki详细看看
页: [1]
查看完整版本: 最新的openwrt为什么switch好像不能用呢?