网络拓扑
实验要求:
1.合理规划IP地址,启用oSPF单区域。
2.R1-R2之间启用PPP的pap单向认证。
3.R2-R3之间启用PPP的chap双向认证。
4.R3-R5-R6之间使用MGRE,R3为hub端,R5 R6为spoke端;要求MGRE接口网络类型为BMA,spoke之间通信必须经过hub端。
5.全网可达。
首先按照拓扑中的IP规划完成路由器配置。
配置R1
r1的接口IP配置。
[r1]int s4/0/0
[r1-Serial4/0/0]ip add 12.1.1.1 24r1和r2之间做PPP的PAP单向认证,r1为主认证方,r2为被认证方。
[r1]aaa
[r1-aaa]local-user aaa password cipher 123
[r1-aaa]local-user aaa service-type ppp
[r1-aaa]int s4/0/0
[r1-Serial4/0/0]ppp authentication-mode pap
[r1-Serial4/0/0]q运行ospf协议。
[r1]ospf 1 rou 1.1.1.1
[r1-ospf-1]are 0
[r1-ospf-1-area-0.0.0.0]network 12.1.1.1 0.0.0.0
配置R2
r2的接口IP配置。
[r2]int s4/0/1
[r2-Serial4/0/1]ip add 12.1.1.2 24[r2-Serial4/0/1]int s4/0/0
[r2-Serial4/0/0]ip add 23.1.1.1 24
r1和r2之间的PAP单向认证。
[r2]int s4/0/1
[r2-Serial4/0/1]ppp pap local-user aaa password cipher 123
r2和r3之间做PPP的CHAP双向认证。
[r2]aaa
[r2-aaa]local-user bbb password cipher 321
[r2-aaa]local-user bbb service-type ppp
[r2-aaa]int s 4/0/0
[r2-Serial4/0/0]ppp authentication-mode chap
运行ospf协议。[r2]ospf 1 rou 2.2.2.2
[r2-ospf-1]are 0
[r2-ospf-1-area-0.0.0.0]network 12.1.1.2 0.0.0.0
[r2-ospf-1-area-0.0.0.0]network 23.1.1.1 0.0.0.0
配置R3
r3的接口IP配置。
[r3]int s4/0/1
[r3-Serial4/0/1]ip add 23.1.1.2 24
[r3-Serial4/0/1]int l0
[r3-LoopBack0]ip add 3.3.3.3 24
[r3-LoopBack0]qr2和r3之间的CHAP双向认证配置。
[r3]int s4/0/1
[r3-Serial4/0/1]ppp chap user bbb
[r3-Serial4/0/1]ppp chap password cipher 321运行ospf协议。
[r3]ospf 1 rou 3.3.3.3
[r3-ospf-1]are 0
[r3-ospf-1-area-0.0.0.0]network 3.3.3.3 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 23.1.1.2 0.0.0.0
[r3-ospf-1-area-0.0.0.0]network 34.1.1.1 0.0.0.0添加缺省
[r3]ip route-static 0.0.0.0 0 34.1.1.2
R3上tunnel配置。
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 10.1.1.1 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source 34.1.1.1
[r3-Tunnel0/0/0]ospf network-type broadcast
[r3-Tunnel0/0/0]ospf dr-priority 10
[r3-Tunnel0/0/0]nhrp network-id 1
[r3-Tunnel0/0/0]nhrp entry multicast dynamic
配置R4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 34.1.1.2 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 45.1.1.2 24
[r4-GigabitEthernet0/0/1]int g0/0/2
[r4-GigabitEthernet0/0/2]ip add 46.1.1.2 24
配置R5
[r5]int g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.1.1.2 24[r5-GigabitEthernet0/0/0]q
tunnel配置
[r5]int t0/0/0
[r5-Tunnel0/0/0]ip add 10.1.1.2 24
[r5-Tunnel0/0/0]tunnel-protocol gre p2mp
[r5-Tunnel0/0/0]source 45.1.1.1
[r5-Tunnel0/0/0]ospf network-type broadcast
[r5-Tunnel0/0/0]ospf dr-priority 0
[r5-Tunnel0/0/0]nhrp network-id 1
[r5-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register添加缺省
[r5]ip route-static 0.0.0.0 0 45.1.1.2
ospf配置
[r5]ospf 1 router-id 5.5.5.5
[r5-ospf-1]are 0
[r5-ospf-1-area-0.0.0.0]network 5.5.5.5 0.0.0.0
[r5-ospf-1-area-0.0.0.0]network 10.1.1.2 0.0.0.0
配置R6
[r6]int g0/0/0
[r6-GigabitEthernet0/0/0]ip add 46.1.1.2 24tunnel配置
[r6]int t0/0/0
[r6-Tunnel0/0/0]ip add 10.1.1.3 24
[r6-Tunnel0/0/0]tunnel-protocol gre p2mp
[r6-Tunnel0/0/0]source 46.1.1.1
[r6-Tunnel0/0/0]ospf dr-priority 0
[r6-Tunnel0/0/0]ospf network-type broadcast
[r6-Tunnel0/0/0]nhrp network-id 1
[r6-Tunnel0/0/0]nhrp entry 10.1.1.1 34.1.1.1 register添加缺省
[r6]ip route-static 0.0.0.0 0 46.1.1.2
[r6]ospf 1 router-id 6.6.6.6
[r6-ospf-1]are 0
[r6-ospf-1-area-0.0.0.0]net 6.6.6.6 0.0.0.0
[r6-ospf-1-area-0.0.0.0]network 10.1.1.3 0.0.0.0
测试全网可达,在r1上ping r6的环回。
。。