要求:
1、R4为ISP,其上只能配置IP地址
R4与其他所有直连设备均为使用公用IP
2、 R3-R5/6/7为MGRE环境,R3为中心站点
3、整个OSPF环境IP基于172.16.0.0/16划分
4、所有设备均可访问R4环回
5、减少LSA的更新量,加快收敛,保障更新安全
6、全网可达
区域一:
R1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip add 172.16.16.1 29
[r1-GigabitEthernet0/0/0]q
[r1]int l0
[r1-LoopBack0]ip add 172.16.17.1 24
[r1]ospf 1 router-id 1.1.1.1
[r1-ospf-1]area 1
[r1-ospf-1-area-0.0.0.1]network 172.16.16.1 0.0.0.0
[r1-ospf-1-area-0.0.0.1]network 172.16.17.1 0.0.0.0
R2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip add 172.16.16.2 29
[r2-GigabitEthernet0/0/0]q
[r2]int l0
[r2-LoopBack0]ip add 172.16.18.1 24
[r2-LoopBack0]q
[r2]ospf 1 router-id 2.2.2.2
[r2-ospf-1]area 1
[r2-ospf-1-area-0.0.0.1]network 172.16.16.2 0.0.0.0
[r2-ospf-1-area-0.0.0.1]network 172.16.18.1 0.0.0.0
R3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip add 172.16.16.3 29
[r3-GigabitEthernet0/0/0]q
[r3]int l0
[r3-LoopBack0]ip add 172.16.19.1 24
[r3-LoopBack0]q
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 1
[r3-ospf-1-area-0.0.0.1]network 172.16.16.3 0.0.0.0
[r3-ospf-1-area-0.0.0.1]network 172.16.19.1 0.0.0.0
区域零:
R3
[r3]int s4/0/0
[r3-Serial4/0/0]ip add 35.0.0.3 24
[r3-Serial4/0/0]q
[r3]ospf 1 route
[r3]ospf 1 router-id 3.3.3.3
[r3-ospf-1]area 0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 35.0.0.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]net
[r3-ospf-1-area-0.0.0.0]network 172.16.0.0 0.0.0.255
R4
[r4-ISP]int s4/0/0
[r4-ISP-Serial4/0/0]ip add 35.0.0.1 24
[r4-ISP]int s4/0/1
[r4-ISP-Serial4/0/1]ip add 55.0.0.1 24
[r4-ISP]int s3/0/0
[r4-ISP-Serial3/0/0]ip add 65.0.0.1 24
[r4-ISP]int g0/0/1
[r4-ISP-GigabitEthernet0/0/1]ip add 75.0.0.1 24
[r4-ISP]ospf 1 router-id 4.4.4.4
[r4-ISP-ospf-1]area 0
[r4-ISP-ospf-1-area-0.0.0.0]network 4.4.4.4 0.0.0.0
R5
[r5]int s4/0/1
[r5-Serial4/0/1]ip add 55.0.0.5 24
[r5-Serial4/0/1]q
[r5]int l0
[r5-LoopBack0]ip add 172.16.1.1 24
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]area 0
[r5-ospf-1-area-0.0.0.0]network 172.16.1.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 55.0.0.5 0.0.0.0
R6
[r6]int s4/0/0
[r6-Serial4/0/0]ip add 65.0.0.6 24
[r6-Serial4/0/0]q
[r6]int l0
[r6-LoopBack0]ip add 172.16.2.1 24
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 0
[r6-ospf-1-area-0.0.0.0]network 172.16.2.1 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 65.0.0.6 0.0.0.0
R7
[r7]int g0/0/0
[r7-GigabitEthernet0/0/0]ip add 75.0.0.7 24
[r7-GigabitEthernet0/0/0]q
[r7]int l0
[r7-LoopBack0]ip add 172.16.3.1 24
[r7]ospf 1 router-id 7.7.7.7
[r7-ospf-1]area 0
[r7-ospf-1-area-0.0.0.0]network 172.16.3.1 0.0.0.0
[r7-ospf-1-area-0.0.0.0]network 75.0.0.7 0.0.0.0
区域二:
R6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 172.16.32.1 30
Nov 27 2023 23:10:10-08:00 r6 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[r6-GigabitEthernet0/0/0]q
[r6]ospf 1 rou
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]area 2
[r6-ospf-1-area-0.0.0.2]netw
[r6-ospf-1-area-0.0.0.2]network 172.16.32.1 0.0.0.0
R11
[Huawei]int g0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 172.16.32.2 30
[Huawei-GigabitEthernet0/0/0]q
[Huawei]int g0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 172.16.32.5 30
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int l0
[Huawei-LoopBack0]ip add 172.16.33.1 24
[Huawei]sys r11
[r11]ospf 1 rou
[r11]ospf 1 router-id 11.11.11.11
[r11-ospf-1]area 2
[r11-ospf-1-area-0.0.0.2]network 172.16.32.2 0.0.0.0
[r11-ospf-1-area-0.0.0.2]network 172.16.33.1 0.0.0.0
[r11-ospf-1-area-0.0.0.2]network 172.16.32.5 0.0.0.0
R12
[r12]int g0/0/0
[r12-GigabitEthernet0/0/0]ip add 172.16.32.6 30