找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 28995|回复: 74

求教HG553 openwrt刷机后VLAN划分

[复制链接]
发表于 2011-4-24 08:55 | 显示全部楼层 |阅读模式
各位大大,本人HG553刷官方trunk版成功,接一级路由正常上网,安装LUCI。但由于HG553仅有4个LAN口,缺少WAN口,需要VLAN后支持。本人对VLAN划分不解,有没有大大可将network配置文件贡献一下?
我的恩山、我的无线 The best wifi forum is right here.
发表于 2011-4-24 13:23 | 显示全部楼层
请问下HG553刷了OPENWRT后能刷回华为的官方固件吗?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 15:07 | 显示全部楼层
回楼上,可以刷回B015,B019.因为是CFE刷,不会死。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 15:09 | 显示全部楼层
做如下VLAN竟然不能正常,奇怪了。。

config switch_vlan
        option device eth1
        option vlan 0
        option ports "1 2 3 5*"
                  
config switch_vlan
        option device eth1
        option vlan 1
        option ports "0 5*"

config switch eth1
        option reset 1
        option enable_vlan 1
                                   
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   eth1.0
        option proto    static
        option ipaddr   192.168.2.10
        option netmask  255.255.255.0
        option nat      1

config interface wan
        option ifname       eth1.1
        option proto        none


进入LUCI再配置PPPOE
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 17:30 | 显示全部楼层
做如下VLAN竟然不能正常,奇怪了。。

config switch_vlan
        option device eth1
        option vlan 0
        option ports "1 2 3 5*"
                  
config switch_vlan
        option dev ...
cncaihua 发表于 2011-4-24 15:09

hg553貌似是ETH0,不是ETH1哦
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 17:51 | 显示全部楼层
hg553貌似是ETH0,不是ETH1哦
huaxie1988 发表于 2011-4-24 17:30

我也是OP新手,现在只做到接上级路由上网,配置文件如下

# Copyright (C) 2008 OpenWrt.org

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   eth1
        option proto    static
        option ipaddr   192.168.2.10
        option netmask  255.255.255.0

config interface wan
        option ifname        eth0
        option proto        none

这个只启用了LAN口在eth1 接口,上级路由192.168.2.1 并且正常使用.所以ETH1似乎没错呀。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 18:05 | 显示全部楼层
本帖最后由 huaxie1988 于 2011-4-24 18:06 编辑

原装固件就是认的ETH0哦,你可以ifconfig就可以看到是ETH0还是1了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 18:13 | 显示全部楼层
你可以安装robocfg,然后robocfg show查看端口映射关系

点评

求教怎么安装呢?  详情 回复 发表于 2017-6-23 12:18
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 18:26 | 显示全部楼层
我把LAN运行在ETH1,WAN运行在ETH0再试试。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 18:36 | 显示全部楼层
我把LAN运行在ETH1,WAN运行在ETH0再试试。。。
cncaihua 发表于 2011-4-24 18:26

这是不行的,hg553只有一个网口连在交换机上,要通过划分VLAN才可以实现WAN
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 18:41 | 显示全部楼层
这是不行的,hg553只有一个网口连在交换机上,要通过划分VLAN才可以实现WAN
huaxie1988 发表于 2011-4-24 18:36

恩,意思就是全部运行在ETH0,然后VLAN划分,这样的话配置文件修改成这样对不?

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

config switch eth0
        option reset 1
        option enable_vlan 1
                                   
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.0
        option proto    static
        option ipaddr   192.168.2.10
        option netmask  255.255.255.0
        option nat      1

config interface wan
        option ifname       eth0.1
        option proto        none
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 18:42 | 显示全部楼层
恩,意思就是全部运行在ETH0,然后VLAN划分,这样的话配置文件修改成这样对不?

config switch_vlan
        option device eth0
        option vlan 0
        option ports "1 2 3 5*"
                  ...
cncaihua 发表于 2011-4-24 18:41

先用robocfg show和插拔网线确定对应关系。。。。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 18:42 | 显示全部楼层
确实只有 ETH0  

刚用原装固件看过

# ifconfig eth0
eth0            Link encap:Ethernet  HWaddr 00:21:63:7C:AB:7E  
                BROADCAST MULTICAST  MTU:1500  Metric:1
                RX packets:563 errors:0 dropped:0 overruns:0 frame:0
                TX packets:653 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000
                RX bytes:67665 (66.0 KiB)  TX bytes:411339 (401.6 KiB)
                Interrupt:25 Base address:0x4800

# ifconfig eth1
ifconfig: eth1: error fetching interface information: Device not found
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2011-4-24 18:44 | 显示全部楼层
先用robocfg show和插拔网线确定对应关系。。。。。。。
huaxie1988 发表于 2011-4-24 18:42


呵呵,不会运气这么差吧,要不我就把3个口全做成WAN。。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2011-4-24 18:48 | 显示全部楼层
呵呵,不会运气这么差吧,要不我就把3个口全做成WAN。。。。
cncaihua 发表于 2011-4-24 18:44

确定了关系才晓得CPU连在哪个口,每个LAN口对应的口,才可以划VLAN,不然你这样划可能会挂,需要重刷
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 01:17

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

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