实验大纲
配置三层聚合端口的过程:
a、创建聚合端口,并将类型设置为三层端口(路由端口),并为其配置IP地址。
b、将需要加入的物理端口类型设置为三层端口。
c、将需要加入的物理端口加入到聚合端口。
d、如有不同网段的信息通信,需要开启路由,并做路由配置。
1.构建网络拓扑结构图
2.创建聚合组进入聚合接口模式(全局模式)
MS1(config)#interface port-channel 1
3.将端口绑定到聚合端口(接口模式)
MS1(config-if)#int range f0/1-3
MS1(config-if-range)#channel-group mode on
4.聚合接口下端口配置(聚合接口模式)
MS1(config)#int port-channel 1
MS1(config-if)#switchport mode trunk
5.全局模式下开启路由功能
MS1(config)#ip routing
MS1(config)#ip route 192.168.1.0 255.255.255.0 192.168.12.1
6.具体配置
交换机S1
MS1(config)#int vlan 1
MS1(config-if)#ip add 192.168.1.1 255.255.255.0
MS1(config-if)#no shutdown
MS1(config-if)#exit
MS1(config)#int port-channel 1
MS1(config-if)#no switchport
% Incomplete command.
MS1(config-if)#ip add 192.168.12.1 255.255.255.0
MS1(config-if)#exit
MS1(config)#int range f0/1-3
MS1(config-if-range)#no switchport
MS1(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
MS1(config-if-range)#channel-group 1 mode on
MS1(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
MS1(config-if-range)#exit
MS1(config)#ip routing
MS1(config)#ip route 192.168.2.0 255.255.255.0 192.168.12.2
交换机S2
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#int vlan 2
Switch(config-if)#ip add 192.168.2.1 255.255.255.0
Switch(config-if)#no shutdown
Switch(config-if)#int f0/4
Switch(config-if)#sw acc vlan 2
% Access VLAN does not exist. Creating vlan 2
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan2, changed state to up
exit
Switch(config)#int port-channel 1
Switch(config-if)#no switchport
% Incomplete command.
Switch(config-if)#ip add 192.168.12.2 255.255.255.0
Switch(config-if)#int range f0/1-3
Switch(config-if-range)#no switchport
Switch(config-if-range)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/3, changed state to up
Switch(config-if-range)#channel-group 1 mode on
Switch(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
Switch(config-if-range)#exit
Switch(config)#ip routing
Switch(config)#ip route 192.168.1.0 255.255.255.0 192.168.12.1
Switch(config)#end
show ip route