拓扑图
实验要求:
R1的环回并没有宣告进OSPF网络,需要通过重发布导入到OSPF网络。
保证全网可达,且没有路由回馈以及选路不佳。
实验步骤:
配IP
R1
[r1]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add
[r1-GigabitEthernet0/0/0]ip address 192.168.12.1 24
May 12 2024 23:51:43-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r1-GigabitEthernet0/0/0]int g 0/0/1
[r1-GigabitEthernet0/0/1]ip add
[r1-GigabitEthernet0/0/1]ip address 192.168.13.1 24
May 12 2024 23:52:05-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r1-GigabitEthernet0/0/1]int l 0
[r1-LoopBack0]ip add
[r1-LoopBack0]ip address 1.1.1.1 24
[r1-LoopBack0]q
R2
[r2]int g 0/0/0
[r2-GigabitEthernet0/0/0]ip add
[r2-GigabitEthernet0/0/0]ip address 192.168.12.2 24
May 12 2024 23:48:12-08:00 r2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r2-GigabitEthernet0/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add
[r2-GigabitEthernet0/0/1]ip address 192.168.24.2 24
May 12 2024 23:49:01-08:00 r2 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
R3
[r3]int g 0/0/0
[r3-GigabitEthernet0/0/0]ip add
[r3-GigabitEthernet0/0/0]ip address 192.168.13.3 24
May 12 2024 23:53:22-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r3-GigabitEthernet0/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add
[r3-GigabitEthernet0/0/1]ip address 192.168.34.3 24
May 12 2024 23:55:21-08:00 r3 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r3-GigabitEthernet0/0/1]q
R4
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]ip add
[r4-GigabitEthernet0/0/0]ip address 192.168.24.4 24
May 12 2024 23:56:03-08:00 r4 %%01IFNET/4/LINK_STATE(l)[4]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r4-GigabitEthernet0/0/0]int g 0/0/1
[r4-GigabitEthernet0/0/1]ip add
[r4-GigabitEthernet0/0/1]ip address 192.168.34.4 24
May 12 2024 23:56:49-08:00 r4 %%01IFNET/4/LINK_STATE(l)[5]:The line protocol IP
on the interface GigabitEthernet0/0/1 has entered the UP state.
[r4-GigabitEthernet0/0/1]q
配rip、ospf
R1
[r1]rip 1
[r1-rip-1]v 2
[r1-rip-1]ne
[r1-rip-1]network 192.168.0.0
[r1-rip-1]ospf net
[r1-rip-1]q
[r1]int l 0
[r1-LoopBack0]ospf net
[r1-LoopBack0]ospf network-type bro
[r1-LoopBack0]ospf network-type broadcast
[r1-LoopBack0]q
[r1]ip ip-p
[r1]ip ip-prefix aa p
[r1]ip ip-prefix aa permit 192.168.12.2 24
[r1]ip ip-prefix bb permit 192.168.13.2 24
R2
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]net
[r2-rip-1]network 192.168.0.0
[r2-rip-1]q
[r2]are
[r2]ospf 1
[r2-ospf-1]area 0
[r2-ospf-1-area-0.0.0.0]net
[r2-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.255.255
[r2-ospf-1-area-0.0.0.0]q
R3
[r3]rip 1
[r3-rip-1]v 2
[r3-rip-1]net
[r3-rip-1]network 192.168.0.0
[r3-rip-1]ospf 1
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.255.255
[r3-ospf-1-area-0.0.0.0]q
R4
[r4]ospf 1
[r4-ospf-1]ar
[r4-ospf-1]area 0
[r4-ospf-1-area-0.0.0.0]net
[r4-ospf-1-area-0.0.0.0]network 192.168.0.0 0.0.255.255