Bootstrap

ospf实验

ospf实验

实验1.实验拓扑图

2.为设备配置IP

3.各路由器配置LoopBack 0环回接口,用于表示Rid

4.宣告网段

5.在R4上查看路由表,是否通过OSPF学习到了对端PC2的网段

6.在R5上查看路由表,是否通过OSPF学习到了对端PC2的网段

7.在PC1上携带源地址测试ping对端R5的环回口地址

8.在PC1上携带源地址测试ping对端R5的环回口地址


ospf实验

1.实验拓扑图

2.为设备配置IP

R1

[H3C]
[H3C]sysna R1
[R1]int g0/0
[R1-GigabitEthernet0/0]ip ad
[R1-GigabitEthernet0/0]ip address 192.168.2.1 24
[R1-GigabitEthernet0/0]int g0/1
[R1-GigabitEthernet0/1]ip ad
[R1-GigabitEthernet0/1]ip address 100.1.1.1 24
[R1-GigabitEthernet0/1]qu
[R1]

R2

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]
[H3C]sysna R2
[R2]
[R2]
[R2]
[R2]int g0/0
[R2-GigabitEthernet0/0]ip ad
[R2-GigabitEthernet0/0]ip address 100.1.1.2 24
[R2-GigabitEthernet0/0]int g0/1
[R2-GigabitEthernet0/1]ip address 100.2.2.2 24
[R2-GigabitEthernet0/1]
[R2-GigabitEthernet0/1]
[R2-GigabitEthernet0/1]qu
[R2]

R3

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysna R3
[R3]int g0/0
[R3-GigabitEthernet0/0]ipad
[R3-GigabitEthernet0/0]ip ad
[R3-GigabitEthernet0/0]ip address 100.2.2.3 24
[R3-GigabitEthernet0/0]int g0/1
[R3-GigabitEthernet0/1]ip ad
[R3-GigabitEthernet0/1]ip address 192.168.3.3 24
[R3-GigabitEthernet0/1]qu
[R3]

R4

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysna R4
[R4]
[R4]int g0/0
[R4-GigabitEthernet0/0]ip ad
[R4-GigabitEthernet0/0]ip address 192.168.1.254 24
[R4-GigabitEthernet0/0]int g0/1
[R4-GigabitEthernet0/1]ip address 192.168.2.254 24
[R4-GigabitEthernet0/1]qu
[R4]

R5

<H3C>sys
System View: return to User View with Ctrl+Z.
[H3C]sysna R5
[R5]
[R5]int g0/0
[R5-GigabitEthernet0/0]ip ad
[R5-GigabitEthernet0/0]ip address 192.168.3.254 24
[R5-GigabitEthernet0/0]int g0/1
[R5-GigabitEthernet0/1]ip address 192.168.4.254 24
[R5-GigabitEthernet0/1]qu
[R5]

PC-1

PC-2

3.各路由器配置LoopBack 0环回接口,用于表示Rid

R1

[R1]int loop
[R1]int LoopBack 0
[R1-LoopBack0]ip ad
[R1-LoopBack0]ip address 1.1.1.1 32
[R1-LoopBack0]

R2

[R2]
[R2]int lo
[R2]int LoopBack 0
[R2-LoopBack0]ip ad
[R2-LoopBack0]ip address 2.2.2.2 32
[R2-LoopBack0]

R3

<R3>sys
System View: return to User View with Ctrl+Z.
[R3]int lo
[R3]int LoopBack 0
[R3-LoopBack0]ip ad
[R3-LoopBack0]ip address 3.3.3.3 32
[R3-LoopBack0]

R4

[R4]
[R4]int lo
[R4]int LoopBack 0
[R4-LoopBack0]ip ad
[R4-LoopBack0]ip address 4.4.4.4 32
[R4-LoopBack0]

R5

[R5]
[R5]int lo
[R5]int LoopBack 0
[R5-LoopBack0]ip ad
[R5-LoopBack0]ip address 5.5.5.5 32
[R5-LoopBack0]qu 
[R5]

4.宣告网段

R1

[R1]
[R1]ospf ro
[R1]ospf router-id 1.1.1.1
[R1-ospf-1]ar
[R1-ospf-1]area 0
[R1-ospf-1-area-0.0.0.0]ne
[R1-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[R1-ospf-1-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[R1-ospf-1-area-0.0.0.0]area 1
[R1-ospf-1-area-0.0.0.1]inet
[R1-ospf-1-area-0.0.0.1]net
[R1-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
[R1-ospf-1-area-0.0.0.1]

R2

[R2]ospf ro
[R2]ospf router-id 2.2.2.2
[R2-ospf-1]ar 0
[R2-ospf-1-area-0.0.0.0]net
[R2-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]network 2.2.2.2 0.0.0.0
[R2-ospf-1-area-0.0.0.0]network 100.1.1.0 0.0.0.25%Nov  4 16:02:15:404 2024 R2 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 100.1.1.1(GigabitEthernet0/0) changed from LOADING to FULL.
network 100.2.2.0 0.0.0.255
[R2-ospf-1-area-0.0.0.0]qu

R3

[R3]
[R3]ospf 
[R3-ospf-1]ar 0
[R3-ospf-1-area-0.0.0.0]network 100.2.2.0 0.0.0.255
[R3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[R3-ospf-1-area-0.0.0.1]ar 0%Nov  4 16:05:24:870 2024 R3 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 100.2.2.2(GigabitEthernet0/0) changed from LOADING to FULL.
ar 2
[R3-ospf-1-area-0.0.0.2]network 192.168.3.0 0.0.0.255
[R3-ospf-1-area-0.0.0.2]%Nov  4 16:07:36:644 2024 R3 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 192.168.3.254(GigabitEthernet0/1) changed from LOADING to FULL.


[R3-ospf-1-area-0.0.0.2]
[R3-ospf-1-area-0.0.0.2]qu
[R3-ospf-1]
[R3-ospf-1]qu

R4

[R4]
[R4]ospf
[R4-ospf-1]ar 1
[R4-ospf-1-area-0.0.0.1]ne
[R4-ospf-1-area-0.0.0.1]network 192.168.2.0 0.0.0.255
[R4-ospf-1-area-0.0.0.1]network 4.4.4.4 0.0.0.0
[R4-ospf-1-area-0.0.0.1]%Nov  4 16:06:28:144 2024 R4 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 192.168.2.1(GigabitEthernet0/1) changed from LOADING to FULL.
network 192.168.1.0 0.0.0.255
[R4-ospf-1-area-0.0.0.1]

R5

[R5]
[R5]ospf
[R5-ospf-1]ar 2
[R5-ospf-1-area-0.0.0.2]net 192.168.3.0 0.0.0.255
[R5-ospf-1-area-0.0.0.2]%Nov  4 16:07:40:935 2024 R5 OSPF/5/OSPF_NBR_CHG: OSPF 1 Neighbor 192.168.3.3(GigabitEthernet0/0) changed from LOADING to FULL.
[R5-ospf-1-area-0.0.0.2]network 5.5.5.5 0.0.0.0
[R5-ospf-1-area-0.0.0.2]net 192.168.4.0 0.0.0.255
[R5-ospf-1-area-0.0.0.2]

5.在R4上查看路由表,是否通过OSPF学习到了对端PC2的网段

6.在R5上查看路由表,是否通过OSPF学习到了对端PC2的网段

7.在PC1上携带源地址测试ping对端R5的环回口地址

8.在PC1上携带源地址测试ping对端pc2的IP

悦读

道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。

;