实验三STP.docx

上传人:b****5 文档编号:6663811 上传时间:2023-01-08 格式:DOCX 页数:14 大小:121.27KB
下载 相关 举报
实验三STP.docx_第1页
第1页 / 共14页
实验三STP.docx_第2页
第2页 / 共14页
实验三STP.docx_第3页
第3页 / 共14页
实验三STP.docx_第4页
第4页 / 共14页
实验三STP.docx_第5页
第5页 / 共14页
点击查看更多>>
下载资源
资源描述

实验三STP.docx

《实验三STP.docx》由会员分享,可在线阅读,更多相关《实验三STP.docx(14页珍藏版)》请在冰豆网上搜索。

实验三STP.docx

实验三STP

实验三:

STP

一:

实验目标

1组网要求:

此阿勇两台核心交换机组网来提高网络可靠性,为防止二层环路,需要全网运行STP:

将SW1部署为根网桥,SW2部署为备份网桥,并将接入PC的接口配置为portfast端口。

2分析STP选举过程(根网桥、根端口、指定端口、阻塞端口)。

二:

拓扑图

三:

预期结果

对于vlan8和vlan10,SW3的FA0/2口是阻塞的,对于vlan11,SW3的FA0/1口是阻塞的。

四:

调试

SW3上STP配置:

SW1上STP配置:

SW2上STP配置:

五:

测试

SW3上showspanning-treebri:

Vlan8:

Vlan10:

Vlan11:

Pc2pingpc1:

 

六:

总结与原理分析

Pc1pingpc2数据流分析:

1Pc1封装icmp包,发现未知目的mac地址且目的IP与自己不在同一个网段,则封装一个arp请求,请求的目的IP为网关IP,目的mac为全F;

2在通过fa0/10口时,arp请求被打上了vlan10的标签;

3进入sw3,sw3查询mac地址表,发现没有pc1的mac地址,便更新mac表;

4由于配置了生成树协议,相对于vlan10,sw3的fa0/2口是阻塞的,所以arp请求被交换机从fa0/1口发送到三层交换机sw1;

5Sw1收到arp请求后,发现目的ip是自身的,然后拆vlan10标,更新mac地址表,便封装一个arp应答,封装时打上vlan10的标,从fa0/3口单播出去;

6Sw3收到arp应答,查询mac地址表后,从fa0/10转发出去,在出口拆掉vlan10的标签;

7Pc1收到arp应答,更新自身的arp缓存表,重新封装icmp包,其目的mac是网关,目的IP是pc2的IP地址,将封装好的icmp包,通过fa0/10口送往SW3;

8Icmp包在fa0/10口被打上vlan10的标签;

9Icmp包进入sw3,sw3查询mac地址表,把icmp包从fa0/1口转发出去;

10SW1收到icmp包,拆vlan10标,发现目的IP地址不是自己的,但是网关却是已知的vlan11,且不知道目的mac地址,便封装一个arp请求,并打上vlan11的标签,洪泛出去;

11由于配置了生成树协议,SW3的fa0/1口相对于vlan11是阻塞的,所以arp请求从sw1的fa0/1口发送到sw2的fa0/1口;

12Sw2收到arp请求后,更新自己的mac地址表,从fa0/3口发送出去,到sw3的fa0/2口;

13Arp请求从sw3的fa0/2进入sw3,sw3更新自己的mac地址表,将arp请求从fa0/11口洪泛出去;

14在通过fa0/11口时,arp请求被拆掉了vlan11的标签,进入到pc2;

15Pc2收到arp请求后,更新自己的arp缓存表,打开arp请求,查看后,发出arp应答;

16Arp应答在经过fa0/11口时,被打上了vlan11的标签;

17Sw3收到arp应答后,更新自身的mac地址表,再查询mac地址表,从fa0/2口转发arp应答给SW2;

18Sw2收到arp应答后,更新自身的mac地址表,再查询mac地址表,从fa0/1口转发给sw1;

19Sw1收到arp应答后,拆掉vlan11的标签,更新mac地址表,重新封装icmp包,并打上vlan11的标签,从fa0/1口转发给sw2;

20Sw2收到icmp包后,查询mac地址表,从fa0/3转发icmp包到sw3;

21Sw3收到icmp包后,查询mac地址表,从fa0/11转发icmp包到pc2;

22Icmp包在经过接口fa0/11时,被拆掉vlan11的标签;

23Pc2收到icmp包后,发现目的IP是自己的,目的mac是自己的,打开icmp包,然后封装一个icmp回应包;

24Icmp回应包在链路中一直被转发其路径是:

PC2—SW3—SW2—SW1—SW3—PC1。

七:

配置showrun

SW1:

!

version12.3

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameSW1

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

memory-sizeiomem5

ipsubnet-zero

!

!

ipcef

noipdhcpusevrfconnected

!

!

noipdomainlookup

noftp-serverwrite-enable

!

!

spanning-treevlan8priority0

spanning-treevlan10priority0

spanning-treevlan11priority4096

!

!

!

interfaceFastEthernet0/0

!

interfaceFastEthernet0/1

switchportmodetrunk

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

switchportmodetrunk

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceVlan1

noipaddress

!

interfaceVlan8

ipaddress192.168.8.129255.255.255.128

!

interfaceVlan10

ipaddress192.168.10.1255.255.255.0

!

interfaceVlan11

ipaddress192.168.11.1255.255.255.0

!

iphttpserver

ipclassless

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

loggingsynchronous

lineaux0

linevty04

!

End

SW2:

!

version12.3

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameSW2

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

memory-sizeiomem5

ipsubnet-zero

!

!

ipcef

noipdhcpusevrfconnected

!

!

noipdomainlookup

noftp-serverwrite-enable

!

!

spanning-treevlan8priority4096

spanning-treevlan10priority4096

spanning-treevlan11priority0

!

!

!

interfaceFastEthernet0/0

!

interfaceFastEthernet0/1

switchportmodetrunk

!

interfaceFastEthernet0/2

!

interfaceFastEthernet0/3

switchportmodetrunk

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

!

interfaceFastEthernet0/11

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceVlan1

noipaddress

!

interfaceVlan8

ipaddress192.168.8.130255.255.255.128

!

ipdefault-gateway192.168.8.129

iphttpserver

ipclassless

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

loggingsynchronous

lineaux0

linevty04

!

End

SW3:

!

version12.3

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameSW3

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

memory-sizeiomem5

ipsubnet-zero

!

!

ipcef

noipdhcpusevrfconnected

!

!

noipdomainlookup

noftp-serverwrite-enable

!

!

!

!

interfaceFastEthernet0/0

!

interfaceFastEthernet0/1

switchportmodetrunk

!

interfaceFastEthernet0/2

switchportmodetrunk

!

interfaceFastEthernet0/3

!

interfaceFastEthernet0/4

!

interfaceFastEthernet0/5

!

interfaceFastEthernet0/6

!

interfaceFastEthernet0/7

!

interfaceFastEthernet0/8

!

interfaceFastEthernet0/9

!

interfaceFastEthernet0/10

switchportaccessvlan10

spanning-treeportfast

!

interfaceFastEthernet0/11

switchportaccessvlan11

spanning-treeportfast

!

interfaceFastEthernet0/12

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceVlan1

noipaddress

!

interfaceVlan8

ipaddress192.168.8.132255.255.255.128

!

ipdefault-gateway192.168.8.129

iphttpserver

ipclassless

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

loggingsynchronous

lineaux0

linevty04

!

end

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 材料科学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1