ospf实验

ospf实验

 

 

 

第一步:地址划分

分析得骨干链路需要4段

环回地址需要5段

设备 接口 地址
ar1 lookback0 172.16.1.1 24
ar1 s4/0/0 172.16.0.129 30
ar2 lookback0 172.16.2.1 24
ar2 s4/0/0 172.16.0.130 30
ar2 g0/0/0 172.16.0.1 25
ar3 lookback0 172.16.3.1 24
ar3 g0/0/0 172.16.0.3 25
ar3 s4/0/0 172.16.0.133 30
ar4 lookback0 172.16.4.1 24
ar4 s4/0/0 172.16.0.134 30
ar4 s4/0/1 172.16.0.137 30
ar4 g0/0/0 172.16.0.4 25
ar5 lookback0 172.16.5.1 24
ar5 s4/0/0 172.16.0.138 30
ar5 g0/0/0 172.16.0.5 25

 

第二步:测试连通性

ping r2的左与右

<ar2>ping 172.16.0.1 PING 172.16.0.1: 56 data bytes, press CTRL_C to break Reply from 172.16.0.1: bytes=56 Sequence=1 ttl=255 time=10 ms Reply from 172.16.0.1: bytes=56 Sequence=2 ttl=255 time=1 ms Reply from 172.16.0.1: bytes=56 Sequence=3 ttl=255 time=1 ms Reply from 172.16.0.1: bytes=56 Sequence=4 ttl=255 time=1 ms Reply from 172.16.0.1: bytes=56 Sequence=5 ttl=255 time=1 ms

--- 172.16.0.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 1/2/10 ms

<ar2>ping172.16.0.3 <ar2>ping 172.16.0.3 PING 172.16.0.3: 56 data bytes, press CTRL_C to break Reply from 172.16.0.3: bytes=56 Sequence=1 ttl=255 time=100 ms Reply from 172.16.0.3: bytes=56 Sequence=2 ttl=255 time=40 ms Reply from 172.16.0.3: bytes=56 Sequence=3 ttl=255 time=40 ms Reply from 172.16.0.3: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 172.16.0.3: bytes=56 Sequence=5 ttl=255 time=50 ms

--- 172.16.0.3 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/56/100 ms

<ar2>172.16.0.4 <ar2>ping 172.16.0.4 PING 172.16.0.4: 56 data bytes, press CTRL_C to break Reply from 172.16.0.4: bytes=56 Sequence=1 ttl=255 time=120 ms Reply from 172.16.0.4: bytes=56 Sequence=2 ttl=255 time=50 ms Reply from 172.16.0.4: bytes=56 Sequence=3 ttl=255 time=50 ms Reply from 172.16.0.4: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 172.16.0.4: bytes=56 Sequence=5 ttl=255 time=40 ms

--- 172.16.0.4 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/62/120 ms

<ar2>ping 172.16.0.5 PING 172.16.0.5: 56 data bytes, press CTRL_C to break Reply from 172.16.0.5: bytes=56 Sequence=1 ttl=255 time=80 ms Reply from 172.16.0.5: bytes=56 Sequence=2 ttl=255 time=40 ms Reply from 172.16.0.5: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 172.16.0.5: bytes=56 Sequence=4 ttl=255 time=50 ms Reply from 172.16.0.5: bytes=56 Sequence=5 ttl=255 time=60 ms

--- 172.16.0.5 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 30/52/80 ms

ping r4的上下

<ar4>ping 172.16.0.133 PING 172.16.0.133: 56 data bytes, press CTRL_C to break Reply from 172.16.0.133: bytes=56 Sequence=1 ttl=255 time=30 ms Reply from 172.16.0.133: bytes=56 Sequence=2 ttl=255 time=20 ms Reply from 172.16.0.133: bytes=56 Sequence=3 ttl=255 time=10 ms Reply from 172.16.0.133: bytes=56 Sequence=4 ttl=255 time=10 ms Reply from 172.16.0.133: bytes=56 Sequence=5 ttl=255 time=20 ms

--- 172.16.0.133 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 10/18/30 ms

<ar4>ping 172.16.0.138 PING 172.16.0.138: 56 data bytes, press CTRL_C to break Reply from 172.16.0.138: bytes=56 Sequence=1 ttl=255 time=20 ms Reply from 172.16.0.138: bytes=56 Sequence=2 ttl=255 time=20 ms Reply from 172.16.0.138: bytes=56 Sequence=3 ttl=255 time=30 ms Reply from 172.16.0.138: bytes=56 Sequence=4 ttl=255 time=20 ms Reply from 172.16.0.138: bytes=56 Sequence=5 ttl=255 time=20 ms

--- 172.16.0.138 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 20/22/30 ms

第三步:配置路由

ar1的路由

[ar1]ospf 1 router-id 1.1.1.1 Info: The configuration su***eeded. You need to restart the OSPF process to valid ate the new router ID. [ar1-ospf-1]area 1 [ar1-ospf-1-area-0.0.0.1]*** [ar1-ospf-1-area-0.0.0.1]***work 172.16.0.0 0.0.255.255 [ar1-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:46-08:00 ar1 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, Neig hborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)

[ar1-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:55-08:00 ar1 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, Neig hborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart ) [ar1-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:55-08:00 ar1 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, Neig hborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=E xchange) [ar1-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:55-08:00 ar1 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, Neig hborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loa ding) [ar1-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:55-08:00 ar1 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=130.0.16.172, Neig hborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

ar2的路由

[ar2]ospf router-id 2.2.2.2 [ar2-ospf-1]area 1 [ar2-ospf-1-area-0.0.0.1]*** [ar2-ospf-1-area-0.0.0.1]***work 172.16.0.130 0.0.0.0 [ar2-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:56-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, Neig hborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)

[ar2-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:56-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, Neig hborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart ) [ar2-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:56-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, Neig hborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=E xchange) [ar2-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:56-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, Neig hborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loa ding) [ar2-ospf-1-area-0.0.0.1] Dec 8 2024 19:32:56-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=129.0.16.172, Neig hborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

[ar2-ospf-1-area-0.0.0.1]*** [ar2-ospf-1-area-0.0.0.1]***work 172.16.2.1 0.0.0.0 [ar2]ospf router-id 2.2.2.2 [ar2-ospf-1-area-0.0.0.0]***work 172.16.0.1 0.0.0.0 [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:05-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:05-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)

[ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:05-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc hange) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:05-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi ng) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:05-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:36:45-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:36:54-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)

[ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:36:54-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Ex change) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:36:54-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Load ing) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:36:54-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

[ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:38:32-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[15]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:38:42-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[16]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)

[ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:38:42-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[17]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Ex change) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:38:42-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[18]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Load ing) [ar2-ospf-1-area-0.0.0.0] Dec 8 2024 19:38:42-08:00 ar2 %%01OSPF/4/NBR_CHANGE_E(l)[19]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

ar3的路由 [ar3-ospf-1-area-0.0.0.0]***work 172.16.0.3 0.0.0.0 Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar3-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) [ar3-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) [ar3-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc hange) [ar3-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi ng) [ar3-ospf-1-area-0.0.0.0] Dec 8 2024 19:35:04-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) [ar3-ospf-1-area-0.0.0.0]q [ar3-ospf-1]ar [ar3-ospf-1]area 2 [ar3-ospf-1-area-0.0.0.2]ne [ar3-ospf-1-area-0.0.0.2]***work 172.16.3.1 0.0.0.0 [ar3-ospf-1-area-0.0.0.2]*** [ar3-ospf-1-area-0.0.0.2]***work 172.16.0.133 0.0.0.0 [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:36:44-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:36:45-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)

[ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:36:45-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc hange) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:36:45-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi ng) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:36:45-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

[ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:37:33-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=134.0.16.172, Nei ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)

[ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:37:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=134.0.16.172, Nei ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar t) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:37:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=134.0.16.172, Nei ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState= Exchange) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:37:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=134.0.16.172, Nei ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo ading) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:37:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[15]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=134.0.16.172, Nei ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full ) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:32-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[16]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[17]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStart)

[ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[18]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Ex change) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[19]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Load ing) [ar3-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:35-08:00 ar3 %%01OSPF/4/NBR_CHANGE_E(l)[20]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

ar4的路由

[ar4-ospf-1-area-0.0.0.2]***work 172.16.2.1 0.0.0.0 [ar4-ospf-1-area-0.0.0.2]***work 172.16.0.134 0.0.0.0 Dec 8 2024 19:37:35-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=133.0.16.172, Nei ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) Dec 8 2024 19:37:35-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=133.0.16.172, Nei ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar t) [ar4-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:37:35-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=133.0.16.172, Nei ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState= Exchange) [ar4-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:37:35-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[15]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=133.0.16.172, Nei ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo ading) [ar4-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:37:35-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[16]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=133.0.16.172, Nei ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full ) [ar4-ospf-1-area-0.0.0.2]***work 172.16.0.137 0.0.0.0 [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:32-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[17]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:41-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[18]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:38:41-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[19]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=5.0.16.172, Neigh borEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=2Way) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:15-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[20]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=138.0.16.172, Nei ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)

[ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[21]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=138.0.16.172, Nei ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar t) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[22]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=138.0.16.172, Nei ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState= Exchange) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[23]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=138.0.16.172, Nei ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo ading) [ar4-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar4 %%01OSPF/4/NBR_CHANGE_E(l)[24]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=138.0.16.172, Nei ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full )

ar5的路由

[ar5]ospf router-id 5.5.5.5 [ar5-ospf-1]area 0 [ar5-ospf-1-area-0.0.0.0]***work 172.16.0.5 0.0.0.0 [ar5-ospf-1-area-0.0.0.0]q [ar5-ospf-1] Dec 8 2024 19:38:34-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[0]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar5-ospf-1] Dec 8 2024 19:38:34-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[1]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[2]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[3]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[4]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[5]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neighb orEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=2Way) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[6]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Exc hange) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[7]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Loadi ng) [ar5-ospf-1] Dec 8 2024 19:38:35-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[8]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=3.0.16.172, Neighb orEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full) [ar5-ospf-1]area 2 [ar5-ospf-1-area-0.0.0.2]*** [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[9]:Neighbor changes ev ent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neighb orEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[10]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neigh borEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=2Way) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[11]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neigh borEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=ExStart) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[12]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=4.0.16.172, Neigh borEvent=AdjOk?, NeighborPreviousState=2Way, NeighborCurrentState=2Way) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[13]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neigh borEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState=Ex change) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[14]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neigh borEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Load ing) [ar5-ospf-1-area-0.0.0.2]***work Dec 8 2024 19:38:42-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[15]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=1.0.16.172, Neigh borEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full)

[ar5-ospf-1-area-0.0.0.2]***work 172.16.5.1 0.0.0.0 [ar5-ospf-1-area-0.0.0.2]***work 172.16.0.138 0.0.0.0 [ar5-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[16]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=137.0.16.172, Nei ghborEvent=HelloReceived, NeighborPreviousState=Down, NeighborCurrentState=Init)

[ar5-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[17]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=137.0.16.172, Nei ghborEvent=2WayReceived, NeighborPreviousState=Init, NeighborCurrentState=ExStar t) [ar5-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[18]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=137.0.16.172, Nei ghborEvent=NegotiationDone, NeighborPreviousState=ExStart, NeighborCurrentState= Exchange) [ar5-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[19]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=137.0.16.172, Nei ghborEvent=ExchangeDone, NeighborPreviousState=Exchange, NeighborCurrentState=Lo ading) [ar5-ospf-1-area-0.0.0.2] Dec 8 2024 19:39:16-08:00 ar5 %%01OSPF/4/NBR_CHANGE_E(l)[20]:Neighbor changes e vent: neighbor status changed. (ProcessId=256, NeighborAddress=137.0.16.172, Nei ghborEvent=LoadingDone, NeighborPreviousState=Loading, NeighborCurrentState=Full )

第四步:查看路由表

<ar1>display ip routing-table protocol ospf

Route Flags: R - relay, D - download to fib

Public routing table : OSPF Destinations : 7 Routes : 7

OSPF routing table status : <Active> Destinations : 7 Routes : 7

Destination/Mask Proto Pre Cost Flags NextHop Interface

 172.16.0.0/25  OSPF    10   49          D   172.16.0.130    Serial4/0/0

172.16.0.132/30 OSPF 10 97 D 172.16.0.130 Serial4/0/0 172.16.0.136/30 OSPF 10 97 D 172.16.0.130 Serial4/0/0 172.16.2.1/32 OSPF 10 48 D 172.16.0.130 Serial4/0/0 172.16.3.1/32 OSPF 10 49 D 172.16.0.130 Serial4/0/0 172.16.4.1/32 OSPF 10 49 D 172.16.0.130 Serial4/0/0 172.16.5.1/32 OSPF 10 49 D 172.16.0.130 Serial4/0/0

OSPF routing table status : <Inactive> Destinations : 0 Routes : 0

第五步:测试连通性

<ar1>ping 172.16.4.1 PING 172.16.4.1: 56 data bytes, press CTRL_C to break Reply from 172.16.4.1: bytes=56 Sequence=1 ttl=254 time=80 ms Reply from 172.16.4.1: bytes=56 Sequence=2 ttl=254 time=50 ms Reply from 172.16.4.1: bytes=56 Sequence=3 ttl=254 time=40 ms Reply from 172.16.4.1: bytes=56 Sequence=4 ttl=254 time=60 ms Reply from 172.16.4.1: bytes=56 Sequence=5 ttl=254 time=50 ms

--- 172.16.4.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/56/80 ms

<ar1>ping 172.16.5.1 PING 172.16.5.1: 56 data bytes, press CTRL_C to break Reply from 172.16.5.1: bytes=56 Sequence=1 ttl=254 time=40 ms Reply from 172.16.5.1: bytes=56 Sequence=2 ttl=254 time=40 ms Reply from 172.16.5.1: bytes=56 Sequence=3 ttl=254 time=50 ms Reply from 172.16.5.1: bytes=56 Sequence=4 ttl=254 time=60 ms Reply from 172.16.5.1: bytes=56 Sequence=5 ttl=254 time=50 ms

--- 172.16.5.1 ping statistics --- 5 packet(s) transmitted 5 packet(s) received 0.00% packet loss round-trip min/avg/max = 40/48/60 ms

第六步:改变dr与bdr的进选

 

 

 

第七步:认证

r3与r4之间明文认证

[Huawei-Serial4/0/0]ospf authentication-mode simple cipher sb

[Huawei-Serial4/0/0]ospf authentication-mode simple cipher sb

r4与r5密文认证

[Huawei-Serial4/0/1]ospf authentication-mode md5 1 123456 [Huawei-Serial4/0/0]ospf authentication-mode md5 1 123456

第八步:设置r3的环回

[R3jinterface LoopBack 100[R3-LoopBack100]ip add[R3-LoopBack100]q R3110 rou [R3-LoopBack1001ip address 100.1.1.1 24 [R3]ip route [R3]ip route-static 0.0.0.0 0 10 R3 Jip route-static 0.0.0.0 0 LoopBack 100 [R3lospf 1 rou [R3-ospf-1]de[R3-ospf-1]default[R3-ospf-1]■ [R3-ospf-11default-route-advertise

本次实验结束

 

转载请说明出处内容投诉
CSS教程网 » ospf实验

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买