MGRE实验
-
实验拓扑
-
实验需求
- R5为ISP,只能进行IP地址配置,其所有地址均配为公有IP地址。
- 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环回。
-
实验步骤
-
1.配置接口IP地址
[r1]interface Serial4/0/0
[r1-Serial4/0/0] ip address 15.0.0.1 24
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[r2]interface Serial4/0/0
[r2-Serial4/0/0] ip address 25.0.0.1 24
[r2-GigabitEthernet0/0/0]ip add 192.168.2.1 24
[r3]interface Serial4/0/0
[r3-Serial4/0/0] ip address 35.0.0.1 24
[r3-GigabitEthernet0/0/0]ip add 192.168.3.1 24
[r4]interface g0/0/0
[r4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[r4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[r5]interface Serial4/0/0
[r5-Serial4/0/0] ip address 15.0.0.2 24
[r5]interface Serial3/0/0
[r5-Serial3/0/0] ip address 25.0.0.2 24
[r5]interface Serial3/0/1
[r5-Serial3/0/1] ip address 35.0.0.2 24
[r5]interface g0/0/0
[r5-GigabitEthernet0/0/0]ip add 45.0.0.2 24
2. 配置R1和R5间PPP的PAP认证,R5为主认证方;
[isp-aaa]local-user xzp password cipher 123456
[isp-aaa]local-user xzp service-type ppp
[isp-Serial4/0/0]ppp authentication-mode pap
[r1-Serial4/0/0]ppp pap local-user xzp password cipher 123456
3.R2于R5之间使用PPP的chap认证,R5为主认证方
[isp-aaa]local-user xzp password cipher 123456
[isp-aaa]local-user xzp service-type ppp
[isp-Serial3/0/0]ppp authentication-mode chap
4.配置R3和R5之间的HDLC封装。
[isp-Serial3/0/1]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
[r3-Serial4/0/0]link-protocol hdlc
5. 配置R1/R2/R3MGRE环境
R1为中心
[r1]int t0/0/0
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]ip address 192.168.5.1 24
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
[r1-Tunnel0/0/0]undo rip split-horizon
R2R3为分支
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
[r2-Tunnel0/0/0]source Serial 4/0/0
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip add 192.168.5.3 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp
[r3-Tunnel0/0/0]source s4/0/0
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
[r3-Tunnel0/0/0]
6.配置R1、R4间为点到点的GRE
[r1]int t0/0/1
[r1-Tunnel0/0/1]ip add 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]description 45.0.0.1
[r4]int t0/0/1
[r4-Tunnel0/0/1]ip add 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]description 15.0.0.1
7.配置RIP
[r1]rip 1
[r1-rip-1]v 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]ip route-static 0.0.0.0 0 15.0.0.2
[r2]rip 1
[r2-rip-1]v 2
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
[r2]ip route-static 0.0.0.0 0 25.0.0.2
[r3]rip 1
[r3-rip-1]v 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
[r3]ip route-static 0.0.0.0 0 35.0.0.2
[r4]rip 1
[r4-rip-1]v 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
[r4]ip route-static 0.0.0.0 0 45.0.0.2
8.配置Easy IP
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-Serial4/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r2-Serial4/0/0]nat outbound 2000
[r3-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r3-Serial4/0/0]nat outbound 2000
[r4]acl 2000
[r4-acl-basic-2000] rule permit source 192.168.1.0 0.0.0.255
[r4-GigabitEthernet0/0/0]nat outbound 2000
-
测试
-
1.测试R1和R5间PPP的PAP认证
配置完PAP认证之后可以ping通
把接口PAP认证配置删除掉
删除之后任然可以ping 通,这是因为PAP的会话是一次性会话,关闭接口再打开接口
删除配置后再重启接口现在则无法ping 通。
重新配置,再重启接口
2.测试R2和R5之间的CHAP认证
首先在R5上配置了CHAP认证之后R2任然可以Ping通
重启接口之后则无法ping 通
配置之后也无法ping 通。再重启接口。
可以ping 通了,再次证明PPP的会话是一次性的。
-
3.测试R3和R5配置HDLC
R5配置成HDLC之后R3则无法Ping通R5
R3修改成HDLC之后,则可以通信
-
4.测试私网可达
-
5.测试访问公网环回