实验大纲
二层聚合端口配置
1.构建网络拓扑结构图
2.修改交换机名字
3.创建聚合组进入聚合接口模式
4.将端口绑定到聚合端口(接口模式)
5.聚合接口下端口配置(聚合接口模式)
6.具体配置
7.验证端口通道1的状态
8.配置ip
9.测试连通性
使用desirable模式实现网络互通
1.交换机S1的配置
2.交换机S2的配置
工作原理
将连接多个物理链路的端口捆绑在一起形成一个逻辑端口,这个逻辑端口成为聚合端口(AP)。聚合端口AP的功能遵循IEEE802.3ad标准,目标是扩展链路带宽,提高链路可靠性。
端口聚合条件: 一般交换机最多支持8个物理端口组成一个聚合端口,同时要满足以下条件:
1、物理端口速度相同;
2、物理端口介质相同;
3、物理端口层次一致;
4、AP成员端口必须属于同一个VLAN。
端口聚合又称链路捆绑,分为二层端口聚合和三层端口聚合。二层端口聚合针对二层交换机,交换机接口只能是二层性质的,接口链路类型可以设置为trunk和access,形成的链路不带IP地址功能。三层聚合端口也称为路由聚合端口,针对三层交换机,形成的链路带IP地址功能,则不能设置链路类型为trunk 和access。
二层聚合端口配置
1.构建网络拓扑结构图
2.修改交换机名字
Switch(config)#hostname S1
3.创建聚合组进入聚合接口模式
S1(config)#interface port-channel 1
4.将端口绑定到聚合端口(接口模式)
S1(config)#int range f0/1-3
S1(config-if-range)#channel-group 1 mode on
5.聚合接口下端口配置(聚合接口模式)
S1(config)#int port-channel 1
S1(config-if)#switchport mode trunk
6.具体配置
交换机S1的配置
S1>en
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#interface range fastEthernet 0/1-2
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#exit
S1(config)#interface range f0/1-2
S1(config-if-range)#shutdown
S1(config-if-range)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
S1(config-if-range)#channel-group 1 mode on
S1(config-if-range)#no shutdown
S1(config-if-range)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
S1(config-if-range)#
交换机S2的配置
S2>en
S2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#interface range fastEthernet 0/1-2
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#exit
S2(config)#interface range f0/1-2
S2(config-if-range)#shutdown
S2(config-if-range)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to administratively down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
S2(config-if-range)#channel-group 1 mode on
S2(config-if-range)#no shutdown
S2(config-if-range)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
S2(config-if-range)#
7.验证端口通道1的状态
S1#show etherchannel summary
8.配置ip
9.测试连通性
使用desirable模式实现网络互通
1.交换机S1的配置
S1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S1(config)#interface range f0/1-2
S1(config-if-range)#switchport mode trunk
S1(config-if-range)#exit
S1(config)#interface range f0/1-2
S1(config-if-range)#shutdown
S1(config-if-range)#channel-group 1 mode desirable
S1(config-if-range)#no shutdown
2.交换机S2的配置
S2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
S2(config)#interface range f0/1-2
S2(config-if-range)#switchport mode trunk
S2(config-if-range)#exit
S2(config)#interface range f0/1-2
S2(config-if-range)#shutdown
S2(config-if-range)#channel-group 1 mode desirable
S2(config-if-range)#no shutdown