把ospf跑起来
R1-R2之间启用PPP的PAP单向认证。
R1为主认证方
[r1]aaa
[r1-aaa]local-user jack password cipher 123456
Info: Add a new user.
[r1-aaa]local-user jack service-type ppp
[r1-aaa]q
[r1]int s4/0/0
[r1-Serial4/0/0]ppp auth
[r1-Serial4/0/0]ppp authentication-mode pap
R2被认证方: 提供账号密码
[r2-ospf-100]int s 4/0/1
[r2-Serial4/0/1]ppp pap local-user jack password cipher 123456
R2-R3之间启用PPP的chap双向认证
先是R2作为主认证方
[r2]aaa
[r2-aaa]local-user tony password cipher 123456
Info: Add a new user.
[r2-aaa]local-user tony service-type ppp
[r2-aaa]int s 4/0/0
[r2-Serial4/0/0]ppp authentication-mode chap
R3被认证方配置
[r3]int s 4/0/1
[r3-Serial4/0/1]link-protocol ppp
[r3-Serial4/0/1]ppp chap user tony
[r3-Serial4/0/1]ppp chap password cipher 123456
再是R3作为主认证方
[r3]aaa
[r3-aaa]local-user wenwen password cipher 123456
Info: Add a new user.
[r3-aaa]local-user wenwen service-type ppp
[r3-aaa]int s4/0/1
[r3-Serial4/0/1]ppp authentication-mode chap
R2被认证方
[r2]int s 4/0/0
[r2-Serial4/0/0]link-protocol ppp
[r2-Serial4/0/0]ppp chap user wenwen
[r2-Serial4/0/0]ppp chap password cipher 123456
R3-R5-R6之间使用MGRE,R3为hub端,R5 R6为spoke端;要求MGRE接口网络类型为BMA,spoke之间通信必须经过hub端
R3为hub端
[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip address 10.1.1.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
Jul 6 2023 10:34:47-08:00 r3 %%01IFNET/4/LINK_STATE(l)[12]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
R5 R6为spoke端
R5
[r5]int Tunnel 0/0/0
[r5-Tunnel0/0/0]ip add 10.1.1.5 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 45.1.1.2
Jul 6 2023 10:41:35-08:00 r5 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r5-Tunnel0/0/0]nhrp network-id 100
[r5-Tunnel0/0/0]nhrp entry 10.1.1.3 34.1.1.1 register
R6
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 10.1.1.6 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 46.1.1.2
Jul 6 2023 10:46:30-08:00 r6 %%01IFNET/4/LINK_STATE(l)[7]:The line protocol IP
on the interface Tunnel0/0/0 has entered the UP state.
[r6-Tunnel0/0/0]nhrp network-id 100
[r6-Tunnel0/0/0]nhrp entry 10.1.1.3 34.1.1.1 register
在R3上可以看到 R5 R6
R5只能看见R3
R6只能看见R3