HCIA 综合测试

本文详细描述了如何使用172.16.0.0/16划分为五个子网,并采用OSPF协议进行区域规划,确保网络更新安全。实验中展示了邻居状态的变化过程和配置细节,如设置router-id、网络通告、DR/BDR等。同时探讨了如何加快收敛速度和网络访问控制策略。
摘要由CSDN通过智能技术生成

1.使用172.16.0.0/16划分网络

共用五个网段,借三位

172.16.0.0/19

172.16.0.32/19

172.16.0.64/19

172.16.0.96/19

172.16.0.128/19

2.使用ospf协议合理规划区域保证更新安全

实验过程

[r6]ospf 1 router-id 1.1.1.1 
[r6-ospf-1]area 1

ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

[r1]ospf 1 router-id 2.2.2.2
[r1-ospf-1]area 1

【ospf-1-area-0.0.0.1]network 0.0.0.0 255.255.255.255

实验结果

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r1-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r1-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r1-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r1-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r1-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r6-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r6-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r6-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r6-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r6-ospf-1-area-0.0.0.1]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=2.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

实验过程area 0

[r1]ospf 1 router-id 2.2.2.2
[r1-ospf-1]area 0

[ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255

[r2]ospf 1 router-id 3.3.3.3
[r2-ospf-1]area 0

【ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255

[r3]ospf 1 router-id 4.4.4.4
[r3-ospf-1]area 0

[ospf-1-area-0.0.0.0]network 0.0.0.0 255.255.255.255

实验结果

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r2-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r2-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r2-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r2-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r2-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=33.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=34.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r1-ospf-1-area-0.0.0.0]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=35.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

实验过程 area 2

[r2]ospf 1 router-id 3.3.3.3
[r2-ospf-1]area 2

[ospf-1-area-0.0.0.2]network 0.0.0.0 255.255.255.255

[r8]ospf 1 router-id 5.5.5.5
[r8-ospf-1]area 2

[ospf-1-area-0.0.0.2]network 0.0.0.0 255.255.255.255

实验结果

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=66.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r8-ospf-1-area-0.0.0.2]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=67.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

实验过程 area 3

[r4]ospf 1 router-id6.6.6.6
[r4-ospf-1]area 3

[ospf-1-area-0.0.0.3]network 0.0.0.0 255.255.255.255

[r3]ospf 1 router-id 4.4.4.4
[r3-ospf-1]area 3

[ospf-1-area-0.0.0.3]network 0.0.0.0 255.255.255.255

实验结果

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r4-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r4-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r4-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r4-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r4-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) 
[r3-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:52-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) 
[r3-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) 
[r3-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exchan
ge) 
[r3-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loading)
 
[r3-ospf-1-area-0.0.0.3]
Nov 28 2022 18:47:53-08:00 r2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes eve
nt: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, NeighborE
vent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) 

3.加快收敛速度

[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ospf timer hello 5
[r6-GigabitEthernet0/0/0]ospf timer dead 20
[r7]interface g0/0/0
[r7-GigabitEthernet0/0/0]ospf timer hello 5
[r7-GigabitEthernet0/0/0]ospf timer dead 20


[r6]interface g0/0/1
[r6-GigabitEthernet0/0/1]ospf timer hello 5
[r6-GigabitEthernet0/0/1]ospf timer dead 20
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ospf timer hello 5
[r1-GigabitEthernet0/0/0]ospf timer dead 20

[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ospf timer hello 5
[r1-GigabitEthernet0/0/1]ospf timer dead 20
[r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ospf timer hello 5
[r2-GigabitEthernet0/0/0]ospf timer dead 20

[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ospf timer hello 5
[r1-GigabitEthernet0/0/1]ospf timer dead 20
[r3]interface g0/0/0
[r3-GigabitEthernet0/0/0]ospf timer hello 5
[r3-GigabitEthernet0/0/0]ospf timer dead 20

[r2]interface g0/0/1
[r2-GigabitEthernet0/0/1]ospf timer hello 5
[r2-GigabitEthernet0/0/1]ospf timer dead 20
[r8]interface g0/0/0
[r8-GigabitEthernet0/0/0]ospf timer hello 5
[r8-GigabitEthernet0/0/0]ospf timer dead 20

[r3]interface g0/0/1
[r3-GigabitEthernet0/0/1]ospf timer hello 5
[r3-GigabitEthernet0/0/1]ospf timer dead 20
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ospf timer hello 5
[r4-GigabitEthernet0/0/0]ospf timer dead 20

4.router1为dr没有bdr

[r2]interface g0/0/0

[r2-GigabitEthernet0/0/0]ospf dr-priority 0

[r3]interface g0/0/0

[r3-GigabitEthernet0/0/0]ospf dr-priority 0

[r8]interface g0/0/0

[r8-GigabitEthernet0/0/0]ospf dr-priority 0

[r4]interface g0/0/0

[r4-GigabitEthernet0/0/0]ospf dr-priority 0

[r1]display ospf peer 

     OSPF Process 1 with Router ID 1.1.1.1
         Neighbors 

 Area 0.0.0.1 interface 172.16.0.(GigabitEthernet0/0/1)'s neighbors
 Router ID: 2.2.2.2 Address: 172.16.0.2
   State: Full  Mode:Nbr is  Master  Priority: 1
   DR:172.16.1.2 BDR: None   MTU: 0    
   Dead timer due in 31  sec 
   Retrans timer interval: 0 
   Neighbor is up for 00:04:04     
   Authentication Sequence: [ 0 ] 

5.pc2345自动获取ip地址

[Huawei]vlan batch 2 3
[Huawei-Ethernet0/0/2]port link-type access 
[Huawei-Ethernet0/0/2]port default vlan 2
[Huawei-Ethernet0/0/3]port link-type access 
[Huawei-Ethernet0/0/3]port default vlan 3
[Huawei-Ethernet0/0/1]port link-type trunk 
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 2 3
[r8]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r8]ip p    
[r8]ip policy-based-route
[r8]ip pool 1
Info: It's successful to create an IP address pool.
[r8-ip-pool-1]n    
[r8-ip-pool-1]nbns-list
[r8-ip-pool-1]netbios-type
[r8-ip-pool-1]network 192.168.1.0 ma    
[r8-ip-pool-1]network 192.168.1.0 mask 24
[r8-ip-pool-1]g    
[r8-ip-pool-1]gateway-list 
[r8-ip-pool-1]gateway-list 192.168.1.1
[r8-ip-pool-1]dn    
[r8-ip-pool-1]dns-list 8.8.8.8
[r8]dhcp enable 
[r8]ip p    
[r8]ip policy-based-route
[r8]ip pool 2
Info: It's successful to create an IP address pool.
[r8-ip-pool-2]ne    
[r8-ip-pool-2]netbios-type
[r8-ip-pool-2]network 192.168.2.0 ma    
[r8-ip-pool-2]network 192.168.2.0 mask 24
[r8-ip-pool-2]g
[r8-ip-pool-2]gateway-list 192.168.2.1
[r8-ip-pool-2]dn    
[r8-ip-pool-2]dns-list 8.8.8.8
[r8-GigabitEthernet0/0/1.1]dot1q termination vid 2
[r8-GigabitEthernet0/0/1.1]ip ad    
[r8-GigabitEthernet0/0/1.1]ip address 192.168.1.1 24

[r8-GigabitEthernet0/0/1.2]dot1q termination vid 3
[r8-GigabitEthernet0/0/1.2]
[r8-GigabitEthernet0/0/1.2]
[r8-GigabitEthernet0/0/1.2]ip ad    
[r8-GigabitEthernet0/0/1.2]ip address 192.168.2.1 24
[r8-GigabitEthernet0/0/1.1]dhcp select global 
[r8-GigabitEthernet0/0/1.2]dhcp select global 

[Huawei]vlan batch 20 30
[Huawei-Ethernet0/0/2]port link-type access 
[Huawei-Ethernet0/0/2]port default vlan 20
[Huawei-Ethernet0/0/3]port link-type access 
[Huawei-Ethernet0/0/3]port default vlan 30
[Huawei-Ethernet0/0/1]port link-type trunk 
[Huawei-Ethernet0/0/1]port trunk allow-pass vlan 20  30
[r1]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[r4]ip p    
[r4]ip policy-based-route
[r4]ip pool 3
Info: It's successful to create an IP address pool.
[r4-ip-pool-3]n    
[r4-ip-pool-3]nbns-list
[r4-ip-pool-3]netbios-type
[r4-ip-pool-3]network 192.168.3.0 ma    
[r4-ip-pool-3]network 192.168.3.0 mask 24
[r4-ip-pool-3]g    
[r4-ip-pool-3]gateway-list 
[r4-ip-pool-3]gateway-list 192.168.3.1
[r4-ip-pool-3]dn    
[r4-ip-pool-3]dns-list 8.8.8.8
[r4]dhcp enable 
[r4]ip p    
[r4]ip policy-based-route
[r4]ip pool 4
Info: It's successful to create an IP address pool.
[r4-ip-pool-4]ne    
[r4-ip-pool-4]netbios-type
[r4-ip-pool-4]network 192.168.4.0 ma    
[r4-ip-pool-4]network 192.168.4.0 mask 24
[r4-ip-pool-4]g
[r4-ip-pool-4]gateway-list 192.168.4.1
[r4-ip-pool-4]dn    
[r4-ip-pool-4]dns-list 8.8.8.8

[r4-GigabitEthernet0/0/1.1]dot1q termination vid 20
[r4-GigabitEthernet0/0/1.1]ip ad    
[r4-GigabitEthernet0/0/1.1]ip address 192.168.3.1 24

[r4-GigabitEthernet0/0/1.2]dot1q termination vid 30
[r4-GigabitEthernet0/0/1.2]
[r4-GigabitEthernet0/0/1.2]
[r4-GigabitEthernet0/0/1.2]ip ad    
[r4-GigabitEthernet0/0/1.2]ip address 192.168.4.1 24

[r4-GigabitEthernet0/0/1.1]dhcp select global 
[r4-GigabitEthernet0/0/1.2]dhcp select global 

实验结果


 

 

 

 

 

6.router7为运营商只能配置ip地址

[r7-GigabitEthernet0/0/0]ip address 10.1.1.1 24

[r7]ospf 1

[r7-ospf-1]default-route-advertise always

7.pc4可以ping通router6但不能登录router6

实验过程

[r6]acl 3000

[r6-acl-adv-3000]rule deny tcp source192.168.3.2 0.0.0.0 destination

172.16.1.1 0.0.0.0 destination-port eq 172

[r6]interface g0/0/1

[r6-GigabitEthernet0/0/1]traffic-filter inbound acl 3000

实验结果

 

 

8.pc3可以ping通pc5但pc5不能ping通pc3

实验过程

[r4-acl-adv-3000]rule deny icmp source 192.168.4.2 0.0.0.0 destination 192.168.2
.2 0.0.0.0 icmp-type echo
[r4-GigabitEthernet0/0/0]traffic-filter outbound acl 3000

实验结果


 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

电气 薛宇龙

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值