交换机配置—— 结合以太通道的VLAN配置
一、实验目的:建立以太通道使相同VLAN下主机互通
二、拓扑图如下
三、具体步骤如下
(1)S1三层交换机配置
Switch>enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S1
S1(config)#interface port-channel 5
S1(config-if)#switchport trunk encapsulation dot1q
S1(config-if)#switchport mode trunk
S1(config-if)#exit
S1(config)#interface range f0/10-11
S1(config-if-range)#channel-group 5 mode on
S1(config-if-range)#exit
S1(config)#vlan 5
S1(config-vlan)#vlan 6
S1(config-vlan)#interface f0/1
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 5
S1(config-if)#interface f0/2
S1(config-if)#switchport mode access
S1(config-if)#switchport access vlan 6
S1(config-if)#end
S1#copy running-config startup-config
%LINK-5-CHANGED: Interface Port-channel 5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up
%SYS-5-CONFIG_I: Configured from console by console
Destination filename [startup-config]?
Building configuration...
[OK]
(2)S2三层交换机配置
Switch>enable
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname S2
S2(config)#interface port-channel 5
S2(config-if)#switchport trunk encapsulation dot1q
S2(config-if)#switchport mode trunk
S2(config-if)#exit
S2(config)#interface range f0/10-11
S2(config-if-range)#channel-group 5 mode on
S2(config-if-range)#exit
S2(config)#vlan 5
S2(config-vlan)#vlan 6
S2(config-vlan)#interface f0/1
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 5
S2(config-if)#interface f0/2
S2(config-if)#switchport mode access
S2(config-if)#switchport access vlan 6
S2(config-if)#end
%LINK-5-CHANGED: Interface Port-channel 5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 5, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/10, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up
S2#
%SYS-5-CONFIG_I: Configured from console by console
四、验证,相同VLAN下的主机是否互通
(1)vlan 5 下的PC1和PC3
(2)vlan 6 下的PC2和PC4
最新文章
- 提高代码质量系列之二:重构小技巧——if篇
- 1007. Maximum Subsequence Sum (25)
- abort终止正在进行中的的ajax请求
- hdu 5875 ACM/ICPC Dalian Online 1008 Function
- C# Reflection BindingFlags
- cf Round 601
- mysql的主从复制原理
- [ABP实战开源项目]--YoYoCms目录
- Mysql update指定区间的数据
- Python全栈开发记录_第五篇(装饰器)
- 转:JSP之include动态包含与静态包含
- spark 中如何查看单个RDD分区的内容(创建分区,查看分区数)
- js取一个对象中的另一个对象
- oracle中INSTR函数的用法
- passwd讲解
- Ajax做日期选择
- POI Excel 插入新的行,下面的行动态移动
- Ruby JSON操作
- 「LuoguP1144」 最短路计数(dijkstra
- vue v-show与v-for同时配合v-bind使用并在href中传递多个参数的使用方法
热门文章
- k-means算法处理聚类标签不足的异常
- ThreadLocal的原理与使用
- react——使用this.setState({ })修改state状态值
- 1 c# 获取当前正在运行的类的程序集
- OSCP-Kioptrix2014-2 漏洞利用
- 简单聊聊服务发现(redis, zk,etcd, consul)(转载)
- vue项目中关于微信分享的坑,以及安卓和ios获取location.href不同的处理
- 分享一个百万数量级的测试学习用的mysql数据集
- tp5.1 nginx配置
- 【转】Qt 资源图片删除后,错误 needed by `debug/qrc_image.cpp'. Stop. 的终极解决办法