配置IP
[Rl]int g 0/0/0R1-GigabitEthernet0/0/0]ip add[R1-GigabitEthernet0/0/0]ip address 12.0.0.1 24Nov 14 2023 19:35:45-08:00 R1 01IFNET/4/LINK STATE(1)[0]:The line protocol IPon the interface GigabitEthernet0/0/0 has entered the Up state.[R1-GigabitEtherneto/0/0]int g 0/0/1
[R1-GigabitEthernet0/0/1]ip add[R1-GigabitEthernet0/0/1]ip address 13.0.0.1 2414 2023 19:35:59-08:00 R1 01IFNET/4/LINK STATE(1)[1]:The line protocol IpNovon the interface GigabitEthernet0/0/1 has entered the Up state.
[R1-GigabitEthernet0/0/1]int l 0
[R1-LoopBack0]ip ad
[R2]int g 0/0/0[R2-GigabitEthernet0/0/0]ip ad[R2-GigabitEthernet0/0/0]ip address 12.0.0.2 24Nov 14 2023 19:36:51-08:00 R2 %%01IFNET/4/LINK STATE(1)[0]:The line protocolIPon the interface GigabitEthernet0/0/0 has entered the Up state[R2-GigabitEthernet0/0/0]int g 0/0/1R2-GigabitEthernet0/0/1]ip add
[R2-GigabitEthernet0/0/1]ip address 24.0.0.1 24Nov 14 2023 19:37:06-08:00
[R2 %%01IFNET/4/LINK STATE(1)[1]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the Up state[R2-GigabitEthernet0/0/1]int 1 0
[R2-LoopBack0]ip add
[R2-LoopBacko]ipaddress 2.2.2.2 24
[R3]int 0/0/0
[R3-GigabitEthernet0/0/0]
[R3-GigabitEthernet0/0/0]ip addR3-GigabitEthernet0/0/0]ip address 34.0.0.1 24Nov 14 2023 19:38:00-08:00 R3 O1IENET/4/LINK STATE(1)[0]:The line protocol IPon 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 13.0.0.2 24Nov 14 2023 19:38:19-08:00 R3 O1IENET/4/LINK STATE(1)[1]:The line protocol IPon the interface GigabitEthernet0/0/1 has entered the Up state.[R3-GigabitEtherneto/0/1]int 1 0
[R3-LoopBack0]ip add[R3-LoopBack0lipaddress 3.3.3.3 24
[R4]int g 0/0/0
[R4-GigabitEthernet0/0/0]ip add
[R4-GigabitEthernet0/0/0]ip address 24.0.0.2 24jov 14 2023 19:39:17-08:00
[R4 O1IENET/4/LINK STATE(1)(0]:The line protocol Ien the interface GigabitEthernet0/0/0 has entered the Up state
[R4-GigabitEthernet0/0/0]int g 0/0/1R4-GiqabitEthernet0/0/1]ip addR4-GigabitEthernet0/0/llip address The lineprotocol IPn the interface GigabitEthernet0/0/1 has entered the up stateR4-GigabitEtherneto/0/1lint 1 0
R4-LoopBack0lip add
R4-LoopBackolipaddress 4.4.4.4 24
启动RIP和OSPF协议
[Rl]rip 1
[Rl-rip-l]version 2
[R1-rip-1]net
[Rl-rip-l]network 1.0.0.0[RI-rip-1]net[Rl-rip-1]network 12.0.0.0
[Rl-rip-1]net[R1-rip-1]network 13sNsuc
双向重发布
[R2]ospf
[R2-ospf-1]im[R2-ospf-1]g[R2]rip[R2-rip-1]im
[R2-ospf-1]import-route rip
[R2-rip-1]import-rout