链路聚合实验(三层交换机)

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

链路聚合实验

【实验目的】

利用三层交换技术来满足高效路由交换,并通过链路聚合技术增加服务带宽和链路冗余。

【实验背景】

你是某学院的网管,学院要求你依据实验室的访问属性将网络划分成能限制无关和广播流量扩散的多个网桥域,并且在必要时支持各域之间可控制的相互访问。具体是在两个实验室分别部署1台FTPServer,利用三层交换机的三层交换机技术实现FTPServer的互访,并且利用交换的端口聚合技术实现链路的冗余备份。拓扑图如下。

【实验任务】

1.在三层交换机上创建VLAN

2.将端口分配到VLAN

3.创建Tag VLAN接口

4.设置路由

5.在二层交换机上创建VLAN

6.安装和配置实验室FTPServer

7.配置测试主机的网卡IP地址

8.测试网络连通性

9.完成实验报告

【试验设备】:

三层交换机S3560-24交换机2台;二层交换机S2960交换机2台。【实验拓扑】:

【实验环境】

服务器布置的位置

PC5是实验室1的FTPServer ip 地址172.16.1.200/24

PC6是实验室2的FTPServer ip 地址172.16.3.200/24

设备测试地址-建议

【实验配置】

步骤1 配置vlan,并把端口分配到vlan

在交换机S1上配置vlan10,并将端口f0/12分配到vlan 10

S3560-24-1#conf t !进入全局配置模式

S3560-24-1(config)#vlan 10 !创建vlan 10

S3560-24-1(config-vlan)#exit !退出到上一级操作模式

S3560-24-1(config)#interface f0/12 !进入f0/12的接口模式,并把它分到vlan10

S3560-24-1(config-if)#switchport access vlan 10

S3560-24-1(config-if)#no shutdown

S3560-24-1(config-if)#exit

S3560-24-1(config)#interface vlan 10 !创建vlan10虚接口,并分配ip地址

S3560-24-1(config-if)#ip address 172.16.1.1 255.255.255.0

S3560-24-1(config-if)#no shutdown

S3560-24-1(config-if)#exit

S3560-24-1(config)#exit

在交换机S1上配置vlan20,并将端口f0/1分配到vlan 20

S3560-24-1#conf t

S3560-24-1(config)#vlan 20

S3560-24-1(config-vlan)#exit

S3560-24-1(config)#interface f0/1

S3560-24-1(config-if)#switchport access vlan 20

S3560-24-1(config-if)#no shutdown

S3560-24-1(config-if)#exit

S3560-24-1(config)#interface vlan 20

S3560-24-1(config-if)#ip address 172.16.2.1 255.255.255.0

S3560-24-1(config-if)#no shutdown

S3560-24-1(config-if)#exit

在交换机S2上配置vlan30,并将端口f0/12分配到vlan 30

S3560-24-2#conf t

S3560-24-2(config)#

S3560-24-2(config)#vlan 30

S3560-24-2(config-vlan)#exit

S3560-24-2(config)#interface f 0/12

S3560-24-2(config-if)#switchport access vlan 30

S3560-24-1(config-if)#no shutdown

S3560-24-2(config-if)#exit

S3560-24-2(config)#interface vlan 30

S3560-24-2(config-if)#ip address 172.16.3.1 255.255.255.0

S3560-24-1(config-if)#no shutdown

S3560-24-2(config-if)#exit

在交换机S2上配置vlan40,并将端口f0/1分配到vlan 40

S3560-24-2(config)#vlan 40

S3560-24-2(config-vlan)#exit

S3560-24-2(config)#interface f 0/1

S3560-24-2(config-if)#switchport access vlan 40

S3560-24-1(config-if)#no shutdown

S3560-24-2(config-if)#exit

S3560-24-2(config)#interface vlan 40

S3560-24-2(config-if)#ip address 172.16.4.1 255.255.255.0

S3560-24-2(config-if)#no shutdown

S3560-24-2(config-if)#exit

步骤2 创建tag vlan接口

在交换机S1上创建Tag VLAN接口

S3560-24-1(config)#interface port-channel 1 !创建聚合端口AG1 S3560-24-1(config-if)#switchport mode trunk !配置AG的模式为trunk

S3560-24-1(config-if)#exit

S3560-24-1(config)#interface range fastEthernet 0/2-3 !进入接口f0/2和f0/3

S3560-24-1(config-if)#exit

S3560-24-1(config-if-range)# channel –group 1 mode on !配置接口f0/2和f0/3属于AG1

S3560-24-1(config-if-range)#end

S3560-24-1(config)#show etherchannel summary

在交换机S2上创建Tag VLAN接口

S3560-24-2(config)#interface port-channel 1

S3560-24-2(config-if)#switchport mode trunk

S3560-24-2(config-if)#exit

S3560-24-2(config)#interface range fastEthernet 0/2-3

S3560-24-2(config-if)#exit

S3560-24-2(config-if-range)# channel –group 1 mode on

S3560-24-2(config-if-range)#end

S3560-24-2(config)#show etherchannel summary

步骤3在交换机上配置路由

在交换机S1上配路由

S3560-24-1(config)#ip routing

S3560-24-1(config)#router rip !开启rip协议进程

S3560-24-1(config-router)#network 172.16.1.0 S3560-24-1(config-router)#network 172.16.2.0

S3560-24-1 (config-router)#version 2

S3560-24-1(config-router)#end

在交换机S2上配路由

S3560-24-2(config)#ip routing

S3560-24-2(config)#router rip

S3560-24-2(config-router)#network 172.16.3.0

S3560-24-2(config-router)#network 172.16.4.0

S3560-24-2 (config-router)#version 2

S3560-24-2(config-router)#end

测试命令:

Show ip interface

Show ip route

配置测试网卡IP地址:

Pc5 172.16.1.100/24

Pc7 172.16.2.100/24

Pc6 172.16.3.100/24

Pc8 172.16.4.100/24

测试:在s1/s2交换机上ping 各自的网关.

在pc上ping各自网关和各pc.

【注意事项】

1.两台交换机之间相连的端口应该设置为tag vlan模式。

2.trunk接口在默认情况下支持所有vlan的传输。

3.只有同类型的端口才能聚合为一个AG端口。

4.pc主机网关一定要指向直连接口ip地址。

5.删除某个VLAN,使用no命令。

6.删除某个VLAN时,应先将属于该VLAN的端口加入到别的VLAN,再删除之。

7.两台交换机之间相连的端口应该设为tag vlan模式。

8.交换机的trunk接口默认情况下支持所有vlan。

9.使用同一vlan里的计算机系统能跨交换机进行相互通信,而在不同vlan里的计算机系统不能进行相互通信(包括同一交换机上的不同vlan)。

相关文档
最新文档