HCIP(DSVPN)实验
一,实验要求:
1、r5为isp,只能进行ip地址的配置,其所有ip地址均为共有ip地址
2、r1和r5使用ppp的PAP认证,r5为主认证方
r2和r5之间使用ppp的chap认证,r5为主认证方
r3和r5之间使用HDLC封装
3、r1 r2 r3构建一个MGRE环境,r1为中心站点,r1 r4间为点到点的gre
4、整个私有网络基于rip全网可达
5、所有pc设置私有ip为源ip,可以访问r5环回
二,拓扑图
三,需求分析
给各个路由器配置地址。配置缺省路由。开启R1/R5间PPP的CHAP协议。对R3/R4/R5进行HDLC封装。R1/R2/R3构造mgre环境。配置R1/R4之间GRE。
四,配置
-
R1
[r1]int g 0/0/0 [r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24 [r1-GigabitEthernet0/0/0]Q [r1]int g 0/0/1 [r1-GigabitEthernet0/0/1]ip address 15.0.0.1 24[r1]ip route-static 0.0.0.0 0 15.0.0.2[r1]int G 0/0/1 [r1-GigabitEthernet0/0/1]ppp pap local-user huawei1 password cipher 123456[r1]int Tunnel 0/0/0 [r1-Tunnel0/0/0]ip address 192.168.5.1 24 [r1-Tunnel0/0/0]tunnel-protocol gre p2mp [r1-Tunnel0/0/0]source 15.0.0.1开启shoutcut模式下的重定向 [r1-Tunnel0/0/0]nhrp redirect 在中心开启伪广播功能 [r1-Tunnel0/0/0]nhrp entry multicast dynamic[r1]int Tunnel 0/0/1 [r1-Tunnel0/0/1]ip address 192.168.6.1 24 [r1-Tunnel0/0/1]tunnel-protocol gre [r1-Tunnel0/0/1]source 15.0.0.1 [r1-Tunnel0/0/1]destination 45.0.0.1[r1]rip 1 [r1-rip-1]version 2 [r1-rip-1]network 192.168.1.0 [r1-rip-1]network 192.168.5.0 [r1-rip-1]network 192.168.6.0 [r1-rip-1]q [r1]int Tunnel 0/0/0 [r1-Tunnel0/0/0]rip summary-address 192.168.0.0 255.255.0.0[r1]acl 2000 [r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255 [r1-acl-basic-2000]q [r1]int G 0/0/1 [r1-GigabitEthernet0/0/1]nat outbound 2000
-
R2
[r2]int g 0/0/0 [r2-GigabitEthernet0/0/0]ip address 192.168.2.1 24 [r2-GigabitEthernet0/0/0]q [r2]int g 0/0/1 [r2-GigabitEthernet0/0/1]ip address 25.0.0.1 24[r2]ip route-static 0.0.0.0 0 25.0.0.2[r2]int g 0/0/1 [r2-GigabitEthernet0/0/1]ppp chap user huawei2 [r2-GigabitEthernet0/0/1]ppp chap password cipher 123456[r2]int Tunnel 0/0/0 [r2-Tunnel0/0/0]ip address 192.168.5.2 24 [r2-Tunnel0/0/0]tunnel-protocol gre p2mp响应shortcut,重定向 [r2-Tunnel0/0/0]nhrp shortcut[r2]rip 1 [r2-rip-1]version 2 [r2-rip-1]network 192.168.2.0 [r2-rip-1]network 192.168.5.0[r2]acl 2000 [r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255 [r2-acl-basic-2000]int g 0/0/1 [r2-GigabitEthernet0/0/1]nat outbound 2000
-
R3
[r3]int g0/0/0 [r3-GigabitEthernet0/0/0]ip address 192.168.3.1 24 [r3]int g 0/0/1 [r3-GigabitEthernet0/0/1]ip address 35.0.0.1 24[r3]ip route-static 0.0.0.0 0 35.0.0.2[r3]int g 0/0/1 [r3-GigabitEthernet0/0/1]link-protocol hdlc[r3]int Tunnel 0/0/0 [r3-Tunnel0/0/0]ip address 192.168.5.3 24 [r3-Tunnel0/0/0]tunnel-protocol gre p2mp相应shortcut,开启重定向 [r3-Tunnel0/0/0]nhrp shortcut[r3]rip 1 [r3-rip-1]version 2 [r3-rip-1]network 192.168.3.0 [r3-rip-1]network 192.168.5.0[r3]acl 2000 [r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255 [r3]int g 0/0/1 [r3-GigabitEthernet0/0/1]nat outbound 2000
-
R4
[r4]int g0/0/0 [r4-GigabitEthernet0/0/0]ip address 192.168.4.1 24 [r4-GigabitEthernet0/0/0]q [r4] int g 0/0/1 [r4-GigabitEthernet0/0/1]ip address 45.0.0.1 24[r4]ip route-static 0.0.0.0 0 45.0.0.2[r4]int Tunnel 0/0/1 [r4-Tunnel0/0/1]ip address 192.168.6.4 24 [r4-Tunnel0/0/1]tunnel-protocol gre [r4-Tunnel0/0/1]source 45.0.0.1 [r4-Tunnel0/0/1]destination 15.0.0.1[r4]rip 1 [r4-rip-1]version 2 [r4-rip-1]network 192.168.4.0 [r4-rip-1]network 192.168.6.0 [r4-rip-1]q[r4]acl 2000 [r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255 [r4-acl-basic-2000]q [r4]int g0/0/1 [r4-GigabitEthernet0/0/1]nat outbound 2000
-
R5
[r5]int g0/0/0 [r5-GigabitEthernet0/0/0]ip address 45.0.0.2 24 [r5-GigabitEthernet0/0/0]q [r5]int g 4/0/0 [r5-GigabitEthernet4/0/0]ip address 15.0.0.2 24 [r5-GigabitEthernet4/0/0]q [r5]int g 0/0/2 [r5-GigabitEthernet0/0/2]ip address 25.0.0.2 24 [r5-GigabitEthernet0/0/2]q [r5]int g 0/0/1 [r5-GigabitEthernet0/0/1]ip address 35.0.0.2 24 [r5-LoopBack0]ip add [r5-LoopBack0]ip address 5.5.5.5 24[r5]aaa [r5-aaa]local-user huawei1 password cipher 123456 Info: Add a new user. [r5-aaa]local-user huawei1 service-type ppp [r5-aaa]int g 4/0/0 [r5-GigabitEthernet4/0/0]ppp authentication-mode pap[r5]aaa [r5-aaa]local-user huawei2 password cipher 1234567 Info: Add a new user. [r5-aaa]local-user huawei2 service-type ppp [r5-aaa]int g 0/0/2 [r5-GigabitEthernet0/0/2]ppp authentication-mode chap[r5]int g 0/0/1 [r5-GigabitEthernet0/0/1]link-protocol hdlc
四,测试