实验四HSRP.docx

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

实验四HSRP.docx

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

实验四HSRP.docx

实验四HSRP

实验四:

HSRP

一:

实验目标

(1)组网需求:

企业总部局域网采用两台核心交换机,为防止二层环路,需全网运行STP:

将SW1部署为根网桥,SW2部署为备份根网桥,并将接入PC的接口配置为portfast端口;同时部署HSRP为内部vlan提供网关冗余。

本局域网有4个vlan,生产业务vlan10,办公业务vlan11,服务器vlan12,二层交换机网管vlan8,将SW1部署为vlan8/10/12主网关,将sw2部署为vlan11的主网关,要求vlan10、11的主网关跟踪上行链路。

(2)测试HSRP主备网关倒换。

(3)分析pc1pingpc2的三层通信过程和二层通信过程。

二:

拓扑图

三:

预期结果

当vlan10或vlan11的上行链路shutdown时,HSRP组的主备网关会倒换。

四:

调试

二层接口配置:

SW3:

showipintbri:

三层接口配置:

SW1:

showipintbri:

SW2:

showipintbri:

STP配置:

SW1:

SW2:

SW3:

HSRP配置:

SW1中:

VLAN8:

VLAN10:

VLAN11:

VLAN12:

SW2中:

Vlan8:

Vlan10:

Vlan11:

Vlan12:

Sw1中vlan10的上行链路跟踪:

Sw2中vlan11的上行链路跟踪:

五:

测试

SW1中Showipintbri:

SW2中Showipintbri:

未将sw1的上行链路showdown时:

Sw1中:

Showstandbybri:

Sw2中:

Showstandbybri:

将sw1上行链路接口fa0/12shutdown后:

Sw1中:

Showstandbybri:

Sw2中:

Showstandbybri:

重新将SW1中的fa0/12口打开:

Pc1pingpc2:

六:

总结与原理分析

PC1pingPC2的数据流分析:

PC1—SW3—SW1—SW3—PC2

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

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/2口相对于vlan11是阻塞的,所以ARP请求从fa0/3口发送到SW3;

12SW3收到了arp请求后将其洪泛,arp请求从fa0/11口出去,在通过fa0/11口时被拆掉vlan11的标签;

13Pc2收到arp请求,更新自己的arp缓存表后,封装一个arp应答;

14Arp应答从fa0/11口进入SW3时被打vlan11的标签;

15SW3收到arp应答后,更新mac地址表,然后从fa0/1口转发给SW1;

16SW1收到arp应答后,拆除arp应答的vlan11的标签,更新mac地址表,重新封装icmp包,将ICMP转发给SW3;

17SW3收到ICMP包后,将ICMP包转发给PC2,在通过sw3的fa0/11口时,icmp包的vlan11标签被拆除;

18Pc2收到icmp包后,发现目的IP地址,mac地址均为自己的后,封装一个icmp回应包,通过SW3的fa0/11口时被打上vlan11的标签,之后进入SW3;

19Icmp回应包进入SW3后被SW3通过fa0/1口转发到SW1;

20由于配置了HSRP,且SW1是vlan11的备份路由,所以SW1需通过查路由表,将icmp回应包转发给SW2;

21SW2收到icmp回应包后,拆掉vlan11的标签,更新mac地址表和路由表,发现icmp包的目的IP是自己网段内的IP地址,重新封装一个icmp回应包,并打上vlan10的标签,SW2的端口Fa0/3连接的SW3的Fa0/2相对于vlan10是阻塞的,所以打了vlan10标签的数据流将被发送到SW1;

22SW1收到icmp回应包后,更新自己的mac地址表和路由表,并查询mac地址表后,将其转发到SW3;

23SW3收到icmp回应包后,查询mac地址表,将其通过fa0/10口转发,icmp包在通过fa0/10口时,被拆除vlan10的标签;

24Pc1收到icmp回应包。

七:

配置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-treevlan11priority0

spanning-treevlan12priority0

!

!

!

!

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

noswitchport

ipaddress192.168.9.1255.255.255.252

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceVlan1

noipaddress

!

interfaceVlan8

ipaddress192.168.8.130255.255.255.128

standby8ip192.168.8.129

standby8priority120

standby8preempt

!

interfaceVlan10

ipaddress192.168.10.2255.255.255.0

standby10ip192.168.10.1

standby10priority120

standby10preempt

standby10trackFastEthernet0/1230

!

interfaceVlan11

ipaddress192.168.11.2255.255.255.0

standby11ip192.168.11.1

standby11preempt

!

interfaceVlan12

ipaddress192.168.12.2255.255.255.0

standby12ip192.168.12.1

standby12priority120

standby12preempt

!

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-treevlan11priority4096

spanning-treevlan12priority4096

!

!

!

!

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

noswitchport

ipaddress192.168.9.5255.255.255.252

!

interfaceFastEthernet0/13

!

interfaceFastEthernet0/14

!

interfaceFastEthernet0/15

!

interfaceVlan1

noipaddress

!

interfaceVlan8

ipaddress192.168.8.131255.255.255.128

standby8ip192.168.8.129

standby8preempt

!

interfaceVlan10

ipaddress192.168.10.3255.255.255.0

standby10ip192.168.10.1

standby10preempt

!

interfaceVlan11

ipaddress192.168.11.3255.255.255.0

standby11ip192.168.11.1

standby11priority120

standby11preempt

standby11trackFastEthernet0/1230

!

interfaceVlan12

ipaddress192.168.12.3255.255.255.0

standby12ip192.168.12.1

standby12preempt

!

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

RT5:

!

version12.3

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameRT5

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

memory-sizeiomem5

ipsubnet-zero

!

!

ipcef

noipdhcpusevrfconnected

!

!

noipdomainlookup

noftp-serverwrite-enable

!

!

!

!

interfaceEthernet0/0

ipaddress192.168.9.2255.255.255.252

full-duplex

!

interfaceEthernet0/1

noipaddress

shutdown

half-duplex

!

interfaceEthernet0/2

noipaddress

shutdown

half-duplex

!

interfaceEthernet0/3

noipaddress

shutdown

half-duplex

!

interfaceSerial1/0

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/1

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/2

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/3

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

iphttpserver

ipclassless

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

loggingsynchronous

lineaux0

linevty04

!

end

RT6:

!

version12.3

servicetimestampsdebugdatetimemsec

servicetimestampslogdatetimemsec

noservicepassword-encryption

!

hostnameRT6

!

boot-start-marker

boot-end-marker

!

!

noaaanew-model

!

resourcepolicy

!

memory-sizeiomem5

ipsubnet-zero

!

!

ipcef

noipdhcpusevrfconnected

!

!

noipdomainlookup

noftp-serverwrite-enable

!

!

!

!

interfaceEthernet0/0

ipaddress192.168.9.6255.255.255.252

full-duplex

!

interfaceEthernet0/1

noipaddress

shutdown

half-duplex

!

interfaceEthernet0/2

noipaddress

shutdown

half-duplex

!

interfaceEthernet0/3

noipaddress

shutdown

half-duplex

!

interfaceSerial1/0

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/1

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/2

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

interfaceSerial1/3

noipaddress

shutdown

serialrestart-delay0

nodce-terminal-timing-enable

!

iphttpserver

ipclassless

!

!

!

!

!

control-plane

!

!

linecon0

exec-timeout00

loggingsynchronous

lineaux0

linevty04

!

end

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

当前位置:首页 > 经管营销 > 经济市场

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

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