Chinaunix首页 | 论坛 | 博客
  • 博客访问: 41071
  • 博文数量: 28
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 440
  • 用 户 组: 普通用户
  • 注册时间: 2013-02-26 20:08
文章分类

全部博文(28)

文章存档

2013年(28)

我的朋友

分类: 网络与安全

2013-02-27 20:59:41

VLAN间通信:

使用路由器实现VLAN间通信(单臂路由);使用三层交换机实现VLAN间通信(SVI)。

路由器实现VLAN间通信:
拓扑图:

路由器实现VLAN间通信(单臂路由)

 

Switch(config)#hos sw1
sw1(config)#vl 10
sw1(config)#vl 20
sw1(config)#int f0/1
sw1(config-if)#switchport access vlan 10
sw1(config)#int f0/23
sw1(config-if)#switchport access vl 20
sw1(config)#int f0/13
sw1(config-if)#switchport mode trunk        //将f0/13端口设置为trunk口
Router(config)#hos r1
r1(config)#int f1/0.10        //进入虚拟子接口f1/0.10
r1(config-subif)#encapsulation dot1Q 10        //封装802.1q,vlan10
r1(config-subif)#ip address 192.168.1.1 255.255.255.0        //配置虚拟子接口ip地址
r1(config)#int f1/0.20

r1(config-subif)#encapsulation dot1Q 20

r1(config-subif)#ip address 192.168.2.1 255.255.255.0

r1(config)#int f1/0
r1(config-if)#no sh        //激活f1/0接口

三层交换机实现VLAN间通信:

见:交换篇--《三层交换机实现VLAN间通信》

命令解释:

r1(config)#int f1/0.10 进入虚拟子接口(virtual subinterface),一个物理接口上划分为多个逻辑接口

 

阅读(500) | 评论(0) | 转发(0) |
0

上一篇:有类路由协议和无类路由协议

下一篇:没有了

给主人留下些什么吧!~~