IP 环回配置: R1: [r1]interface LoopBack 0 [r1-LoopBack0]ip address 192.168.1.1 24 [r1]interface g0/0/0 [r1-GigabitEthernet0/0/1]ip address 14.1.1.2 24
R2: [r2]interface LoopBack 0 [r2-LoopBack0]ip address 192.168.2.1 24 [r1]interface g0/0/0 [r1-GigabitEthernet0/0/1]ip address 24.1.1.2 24
R3: [r3]interface LoopBack 0 [r3-LoopBack0]ip address 192.168.3.1 24 [r3]interface g0/0/0 [r3-GigabitEthernet0/0/1]ip address 34.1.1.2 24
R4: [r4]interface g0/0/0 [r4-GigabitEthernet0/0/1]ip address 14.1.1.2 24 [r4-GigabitEthernet0/0/1]interface g0/0/1 [r4-GigabitEthernet0/0/2]ip address 24.1.1.2 24 [r4-GigabitEthernet0/0/1]interface g0/0/2 [r4-GigabitEthernet0/0/2]ip address 34.1.1.2 24
Tunnel口 ospf R1: [r1]interface Tunnel 0/0/0 [r1-Tunnel0/0/0]ip address 10.1.1.1 24 [r1-Tunnel0/0/0]tunnel-protocol gre p2mp [r1-Tunnel0/0/0]source 14.1.1.1 [r1-Tunnel0/0/0]nhrp network-id 100 [r1-Tunnel0/0/0]nhrp entry 10.1.1.3 34.1.1.1 register [r1-Tunnel0/0/0]nhrp entry 10.1.1.2 24.1.1.1 register [r1]ospf 1 router-id 1.1.1.1 [r1-ospf-1]area 0 [r1-ospf-1-area-0.0.0.0]network 10.1.1.1 0.0.0.0 [r1-ospf-1-area-0.0.0.0]network 192.168.1.1 0.0.0.0 [r2-Tunnel0/0/0]ospf network-type broadcast
R2: [r2]interface Tunnel 0/0/0 [r2-Tunnel0/0/0]ip address 10.1.1.2 24 [r2-Tunnel0/0/0]tunnel-protocol gre p2mp [r2-Tunnel0/0/0]source 24.1.1.1 [r2-Tunnel0/0/0]nhrp network-id 100 [r2-Tunnel0/0/0]nhrp entry 10.1.1.3 34.1.1.1 register [r2]ospf 1 router-id 2.2.2.2 [r2-ospf-1]area 0 [r2-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0 [r2-ospf-1-area-0.0.0.0]network 192.168.2.1 0.0.0.0 [r2-Tunnel0/0/0]ospf network-type broadcast
R3: [r3]interface Tunnel 0/0/0 [r3-Tunnel0/0/0]ip address 34.1.1.1 24 [r3-Tunnel0/0/0]tunnel-protocol gre p2mp [r3-Tunnel0/0/0]source 34.1.1.1 [r3-Tunnel0/0/0]nhrp network-id 100 [r3]ospf 1 router-id 3.3.3.3 [r3-ospf-1]area 0 [r3-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0 [r3-ospf-1-area-0.0.0.0]network 192.168.3.1 0.0.0.0 [r3-Tunnel0/0/0]ospf network-type broadcast