单臂路由

时间:2021-01-30 11:56:50   收藏:0   阅读:0

用于不同VLAN间的单播通信,同时把广播局限在同一VLAN内部。如图:  //因为路由不转发广播

 技术图片

 

 

 

配置思路

1)在f0/0接口上启用两个虚拟接口f0/0.1、f0/0.2

2)分别划入VLAN10、VLAN20并配置ip做为网关  //no sh启用端口0.1、0.2、0

3)在sw1中把f0/4设置为trunk线路让各VLAN数据能通过此接口到达路由

4)在sw1中启用VLAN10与VLAN20并把f0/1、f0/2分别划分到10与20

5)在sw1中把f0/3设置为trunk使sw1与sw2数据可互通

6)在sw2中重复4-5步骤

7)配置pc的ip与网关

使用命令

int f/0.1  //进入0.1子端口
en do 10  //使用dot1q封装vlan标签并把此端口划分为VLAN10
ip add 10.1.1.254 255.255.255.0
no sh

  

conf t
vlan 10  //创建VLAN10
exit
vlan 20
exit

  

int f
sw m t   //设置为trunk

  

int f
sw a v 10  //划分此端口到VLAN10

 

检查

do sh ip int b  //查看端口
do sh vlan b  //查看VLAN

  

 

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!