1.合理规划
r1 到r6依次操作
[r1]user-interface console 0
[r1-ui-console0]idle-timeout 0 0
[r1]int lo0
[r1-LoopBack0]ip add 1.1.1.1 24
[r1-LoopBack0]q
[r1]int s4/0/0
[r1-Serial4/0/0]ip add 12.1.1.1 24
[r1-Serial4/0/0]q
[r1]ospf 100
[r1-ospf-100]area 0
[r1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 45.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 46.1.1.0 0.0.0.255
2.1.2 ppp pap 单向认证
[r1]aaa
[r1-aaa]local-user kk password cipher kk
Info: Add a new user.
[r1-aaa]local-user kk service-type ppp
[r1-aaa]int s4/0/0
[r1-Serial4/0/0]ppp authentication-mode pap
[r2]int s4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]dis this
[V200R003C00]
#
interface Serial4/0/0
link-protocol ppp
ppp authentication-mode pap
ip address 12.1.1.1 255.255.255.0
#
3. 2.3 ppp chap 双向认证
[r2]aaa
[r2-aaa]local-user kk password cipher kk
Info: Add a new user.
[r2-aaa]local-user kk service-type ppp
[r2-aaa]int s4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp authentication-mode chap
[r2-Serial4/0/0]ip add 23.1.1.1 255.255.255.0
[r3-Serial4/0/0]dis this
[V200R003C00]
#
interface Serial4/0/0
link-protocol ppp
ppp chap user kk
#
return
4.3.5.6MGRE
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 3.1.1.1 255.255.255.0
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
Sep 3 2022 22:16:05-08:00 r3 %%01IFNET/4/LINK_STATE(l)[17]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
[r3-Tunnel0/0/0]nhrp network-id 3
[r5]int tunnel0/0/0
[r5-Tunnel0/0/0]ip add 4.1.1.1 255.255.255.0
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 45.1.1.2
Sep 3 2022 22:19:52-08:00 r5 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]nhrp network-id 3
[r5-Tunnel0/0/0]nhrp entry 3.1.1.1 34.1.1.1 register
[r5-Tunnel0/0/0]q
[r6]int Tunnel 0/0/0
[r6-Tunnel0/0/0]ip add 6.1.1.1 255.255.255.0
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 46.1.1.2
Sep 3 2022 22:24:25-08:00 r6 %%01IFNET/4/LINK_STATE(l)[8]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r6-Tunnel0/0/0]nhrp network-id 3
[r6-Tunnel0/0/0]nhrp entry 3.1.1.1 34.1.1.1 register
[r6-Tunnel0/0/0]q
5.全网可达
每个路由器使用ospf全网可达
[r1]ospf 100
[r1-ospf-100]area 0
[r1-ospf-100-area-0.0.0.0]network 1.1.1.1 0.0.0.0
[r1-ospf-100-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 23.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 34.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 45.1.1.0 0.0.0.255
[r1-ospf-100-area-0.0.0.0]network 46.1.1.0 0.0.0.255