划分网段因为有六个区域所以划分八个网段
172.168.0.0/19
172.168.32.0/19
172.168.64.0/19
172.168.96.0/19
172.168.128.0/19
172.168. 160.0/19
172.168.192.0/19
172.168.224.0/19
一,配置ip
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 172.168.33.1 29
May 3 2024 13:17:26-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]interface LoopBack 0
[r1-LoopBack0]ip address 172.168.34.1 24
r2]interface g0/0/0
[r2-GigabitEthernet0/0/0]ip ad 172.168.33.2 29
May 3 2024 13:24:02-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]interface LoopBack 0
[r2-LoopBack0]ip address 172.168.35.1 24
[r3-GigabitEthernet0/0/0]ip address 172.168.33.3 29
May 3 2024 13:25:44-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]interface LoopBack 0
[r3-LoopBack0]ip ad
[r3-LoopBack0]ip address 172.168.36.1 24
[r3]interface s 3/0/0
[r3-Serial3/0/0]ip address 34.0.0.1 24
[r4-Serial3/0/0]ip address 34.0.0.2 24
[r4]interface s3/0/1
[r4-Serial3/0/1]ip address 45.0.0.1 24
[r4]interface s2/0/0
[r4-Serial2/0/0]ip address 46.0.0.1 24
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip address 47.0.0.1 24
[r4-GigabitEthernet0/0/0]
[r5]interface s3/0/0
[r5-Serial3/0/0]ip address 45.0.0.2 24
[r5]interface LoopBack 0
[r5-LoopBack0]ip address 172.168.3.5 24
[r6]interface s4/0/0
[r6-Serial4/0/0]ip address 46.0.0.2 24
[r6]interface g0/0/0
[r6-GigabitEthernet0/0/0]ip address 172.168.65.1 24
[r6]interface LoopBack 0
[r6-LoopBack0]ip ad
[r6-LoopBack0]ip address 172.168.4.6 24
[r7]interface g0/0/0
[r7-GigabitEthernet0/0/0]ip address 47.0.0.2 24
[r7]interface g0/0/1
[r7-GigabitEthernet0/0/1]ip address 172.168.97.1 30
[r7]interface LoopBack 0
[r7-LoopBack0]ip address 172.168.5.7 24
[r8]interface g0/0/0
[r8-GigabitEthernet0/0/0]ip address 172.168.97.2 30
[r8]interface g0/0/1
[r8-GigabitEthernet0/0/1]ip address 172.168.97.5 30
[r8]interface LoopBack 0
[r8-LoopBack0]ip ad
[r8-LoopBack0]ip address 172.168.98.8 24
[r9]interface g0/0/0
[r9-GigabitEthernet0/0/0]ip address 172.168.97.6 30
[r9]interface g0/0/1
[r9-GigabitEthernet0/0/1]ip address 172.168.127.1 30
[r9]interface LoopBack 0
[r9-LoopBack0]ip ad
[r9-LoopBack0]ip address 172.168.130.9 24
[r10]interface g0/0/0
[r10-GigabitEthernet0/0/0]ip address 172.168.129.2 30
[r10]interface LoopBack 0
[r10-LoopBack0]ip ad
[r10-LoopBack0]ip address 172.168.131.10 24
[r11]interface g0/0/0
[r11-GigabitEthernet0/0/0]ip address 172.168.65.2 24
[r11]interface g0/0/1
[r11-GigabitEthernet0/0/1]ip address 172.168.65.5 30
[r11]interface LoopBack 0
[r11-LoopBack0]ip ad
[r11-LoopBack0]ip address 172.168.66.11 24
[r12]interface g0/0/0
[r12-GigabitEthernet0/0/0]ip address 172.168.65.6 30
[r12]interface LoopBack 0
[r12-LoopBack0]ip address 172.168.169.12 24
[r12]interface LoopBack 1
[r12-LoopBack1]ip address 172.168.161.12 24
缺省路由
[r3]ip route-static 0.0.0.0 0 34.0.0.1
[r6]ip route-static 0.0.0.0 0 46.0.0.1
[r7]ip route-static 0.0.0.0 0 47.0.0.1
rip
[r1]ospf 1 router-id 1.1.1.1
Info: The configuration succeeded. You need to restart the OSPF process to valid
ate the new router ID.
[r1-ospf-1]ar
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]ne
[r1-ospf-1-area-0.0.0.1]network 172.168.33.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]network 172.168.34.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]
其他设备上类似
r12上
[r12]rip 1
[r12-rip-1]version 2
[r12-rip-1]undo summary
[r12-rip-1]network 172.168.0.0
[r12]ospf 1
[r12-ospf-1]import-route rip 1
配置mgre
r3上,中心节点
[r3]interface t0/0/0
[r3-Tunnel0/0/0]ip address 172.168.6.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source Serial 3/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]ospf network-type broadcast
r5
[r5]interface t0/0/0
[r5-Tunnel0/0/0]ip address 172.168.6.5 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source Serial 3/0/0
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.168.6.3 34.0.0.3 register
[r5-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]ospf dr-priority 0
r6
[r6]interface t0/0/0
[r6-Tunnel0/0/0]ip address 172.168.6.6 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mps
[r6-Tunnel0/0/0]source Serial 4/0/0
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 172.168.6.3 34.0.0.3 register
[r6-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]ospf dr-priority 0
r7
[r7]interface Tunnel 0/0/0
[r7-Tunnel0/0/0]ip address 172.168.6.7 24
[r7-Tunnel0/0/0]tunnel-protocol gre p2mp
[r7-Tunnel0/0/0]source g0/0/0
[r7-Tunnel0/0/0]nhrp network-id 100
[r7-Tunnel0/0/0]nhrp entry 172.168.6.3 34.0.0.3 register
[r7-Tunnel0/0/0]ospf network-type broadcast
[r7-Tunnel0/0/0]ospf dr-priority 0
abr聚合
asbr聚合
加快收敛,保证更新安全
以r1为例
[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]os
[r1-GigabitEthernet0/0/0]ospf ti
[r1-GigabitEthernet0/0/0]ospf timer hello 8
[r1]ospf 1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]authentication-mode md5 1 cipher xx