免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1138 | 回复: 0
打印 上一主题 下一主题

linux网桥模式vlantrunk透传 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-12-19 13:56 |只看该作者 |倒序浏览
简介: 首先使用vconfig创建vlan虚拟接口,并分别在两个接口上增加vlan100\vlan200\vlan300vconfig add eth0 100vconfig add eth0 100 vconfig add eth0 300vconfig add eth1 100vconfig add ...

首先使用vconfig创建vlan虚拟接口,并分别在两个接口上增加vlan100\vlan200\vlan300
vconfig add eth0 100
vconfig add eth0 100
vconfig add eth0 300
vconfig add eth1 100
vconfig add eth1 200
vconfig add eth1 300

启用vlan端口
ifconfig eth0.100 up
ifconfig eth0.200 up
ifconfig eth0.300 up
ifconfig eth1.100 up
ifconfig eth1.200 up
ifconfig eth1.300 up

创建网桥(名称为br0)
brctl addbr br0


//加入端口(分别将两个Vlan加入网桥中)
切记:不是将eth0和eth1添加到网桥中
brctl addif br0 eth0.100
brctl addif br0 eth0.200
brctl addif br0 eth0.300
brctl addif br0 eth1.100
brctl addif br0 eth1.200
brctl addif br0 eth1.300


注: 一般情况所有Vlan使用一个网桥即可。如果vlan很少,也可以一个vlan使用一个网桥,但这也有局限性,因为linux2.6最多只允许增加30个网桥,但这对小型的网络来说已经足够用了)

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

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP