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、全网可达
在ensp搭建拓扑
给路由器配置环回与IP地址
以R3为中心建立MGRE环境
TUNNEL0/0/0
R3
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 172.16.1.1 24
[r3-Tunnel0/0/0]tu
[r3-Tunnel0/0/0]tunnel-protocol gre
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]nh
^
Error:Incomplete command found at '^' position.
[r3-Tunnel0/0/0]source 12.1.1.1
Jul 11 2021 18:22:23-08:00 r3 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp en
[r3-Tunnel0/0/0]nhrp entry mul
[r3-Tunnel0/0/0]nhrp entry multicast dy
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]ospf d
^
Error:Incomplete command found at '^' position.
[r3-Tunnel0/0/0]ospf d
[r3-Tunnel0/0/0]ospf dr-priority 255
[r3-Tunnel0/0/0]ospf network-type br
[r3-Tunnel0/0/0]ospf network-type broadcast
[r3-Tunnel0/0/0]
R5
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 172.16.1.2 24
[r5-Tunnel0/0/0]tun
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 22.1.1.2
Jul 11 2021 18:25:43-08:00 r5 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 r
[r5-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 register
[r5-Tunnel0/0/0]ospf dr
[r5-Tunnel0/0/0]ospf dr-priority 0
[r5-Tunnel0/0/0]ospf n
[r5-Tunnel0/0/0]ospf network-type b
[r5-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 172.16.1.3 24
[r6-Tunnel0/0/0]tun
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 32.1.1.0 22
^
Error:Too many parameters found at '^' position.
[r6-Tunnel0/0/0]source 32.1.1.0 2
^
Error:Too many parameters found at '^' position.
[r6-Tunnel0/0/0]source 32.1.1.2
Jul 11 2021 18:29:48-08:00 r6 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r6-Tunnel0/0/0]
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp 172.16.1.1 12.1.1.1 r
[r6-Tunnel0/0/0]nhrp 172.16.1.1 12.1.1.1 re
[r6-Tunnel0/0/0]nhrp entry
[r6-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 re
[r6-Tunnel0/0/0]nhrp entry 172.16.1.1 12.1.1.1 register
[r6-Tunnel0/0/0]ospf dr
[r6-Tunnel0/0/0]ospf dr-priority 0
[r6-Tunnel0/0/0]ospf network
[r6-Tunnel0/0/0]ospf network-type br
[r6-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]
area 0 OSPF宣告
[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.2.1 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 172.16.1.2 0.0.0.0
[r5-ospf-1-area-0.0.0.0]
area 1宣告
[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.35.1 0.0.0.0
[r2-ospf-1-area-0.0.0.1]network 172.16.33.2 0.0.0.0
[r2-ospf-1-area-0.0.0.1]