以太网通道

拓扑图如下:

 1、在两台三层交换机上创建通道端口:命令相同(注意:配置前取消两条链路的链接

Switch(config)#int port-channel  1  //创建通道端口

Switch(config-if)#exit

Switch(config)#int range g0/1-2 

Switch(config-if-range)#switchport trunk  encapsulation dot1q

Switch(config-if-range)#switchport  mode trunk

Switch(config-if-range)#channel-group  1  mode on  //把端口划入通道端口并手动开启

 2、通过vtp域实现vlan的同步以第一台switch0为对象配置:

Switch(config)#vtp domain tt        //tt为域名

Changing VTP domain name from NULL to tt

Switch(config)#vlan 10

Switch(config-vlan)#exit

Switch(config)#vlan 20

Switch(config-vlan)#exit

 3、分配端口到vlan

switch0的配置:

Switch(config)#int f0/3

Switch(config-if)#sw access vlan 10

switch1的配置:

Switch(config)#int f0/3

Switch(config-if)#sw access vlan 20

 4、任选一台三层交换机实现vlan间的路由

switch0为对象配置:

Switch(config)#ip routing

Switch(config)#int vlan 10

Switch(config-if)#ip address 10.0.0.100 255.0.0.0

Switch(config-if)#exit

Switch(config)#int vlan 20

Switch(config-if)#ip address  20.0.0.100  255.0.0.0

 5、测试、查看配置结果

两台主机能ping通

 查看以太网通道

Switch#show etherchannel summary

 

猜你喜欢

转载自blog.csdn.net/qq_62732552/article/details/121033462