一、实验拓扑
二、实验需求
1.R5为ISP,只能进行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环回
三、实验思路
1.配置IP
2.认证配置
3.用HDLC封装R3 R5
4.gre配置
5.mgre配置
6.配置rip协议
7.配置ACL
四、实验步骤
1.配置IP
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R1-GigabitEthernet0/0/0]int s4/0/0
[R1-Serial4/0/0]ip add 15.0.0.1 8
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R2-GigabitEthernet0/0/0]int s4/0/0
[R2-Serial4/0/0]ip add 25.0.0.1 8
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R3-GigabitEthernet0/0/0]intg4/0/0
[R3-Serial4/0/0]ip add 35.0.0.1 8
[R4]int g0/0/0
[R4-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[R4-GigabitEthernet0/0/0]int g0/0/1
[R4-GigabitEthernet0/0/1]ip add 45.0.0.1 8
[ISP]int g0/0/0
[ISP-GigabitEthernet0/0/0]ip add 45.0.0.2 8
[ISP-GigabitEthernet0/0/0]int s3/0/0
[ISP-Serial3/0/0]ip add 15.0.0.2 8
[ISP-Serial3/0/0]int s/0/1
[ISP-Serial3/0/1]ip add215.0.0.2 8
[ISP-Serial3/0/1]int s4/0/0
[ISP-Serial4/0/0]ip add 35.0.0.2 8
2.认证配置
R1 pap认证
[ISP]aaa
[ISP-aaa]local-user wang password cipher 12345
[ISP-aaa]local-user wang service-type ppp
[ISP-aaa]int s3/0/0
[ISP-Serial3/0/0]ppp authentication-mode pap
[R1]int s4/0/0
[R1-Serial4/0/0]ppp pap local-user wang password cipher 12345
R2 chap认证
[ISP-Serial3/0/1]ppp authentication-mode chap
[R2]int s4/0/0
[R2-Serial4/0/0]ppp chap user wang
[R2-Serial4/0/0]ppp chap password cipher 12345
3.HDLC
[ISP]int s4/0/0
[ISP-Serial4/0/0]link-protocol hdlc
[R3]int s4/0/0
[R3-Serial4/0/0]link-protocol hdlc
4.R1 R4运行GRE
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip address 192.168.6.1 24
[r1-Tunnel0/0/0]tunnel-protocol gre
[r1-Tunnel0/0/0]source 15.0.0.1
[r1-Tunnel0/0/0]destination 45.0.0.1
[r4]int t0/0/0
[r4-Tunnel0/0/0]ip address 192.168.6.2 24
[r4-Tunnel0/0/0]tunnel-protocol gre
[r4-Tunnel0/0/0]source 45.0.0.1
[r4-Tunnel0/0/0]destination 15.0.0.1
5.R1 R2 R3运行MGRE
[R1]int t0/0/0
[R1-Tunnel0/0/0]ip add 192.168.5.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp
[R1-Tunnel0/0/0]source 15.0.0.1
[R1-Tunnel0/0/0]nhrp network-id 50
[R2]int t0/0/0
[R2-Tunnel0/0/0]ip add 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp
[R2-Tunnel0/0/0]source Serial 4/0/0
[R2-Tunnel0/0/0]nhrp network-id 50
[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 Serial 4/0/0
[R3-Tunnel0/0/0]nhrp network-id 50
[R3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
6.使私网运行rip协议
[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
[R2]rip 1
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
[R3]rip 1
[R3-rip-1]version 2
[R3-rip-1]network 192.168.3.0
[R3-rip-1]network 192.168.5.0
[R4]rip 1
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.6.0
[R1-Tunnel0/0/0]nhrp entry multicast dynamic
[R1-Tunnel0/0/0]undo rip split-horizon
7.配置路由
[R1]ip route-static 0.0.0.0 0 15.0.0.2
[R2]ip route-static 0.0.0.0 0 25.0.0.2
[R3]ip route-static 0.0.0.0 0 15.0.0.2
[R4]ip route-static 0.0.0.0 0 45.0.0.2
8.配置环回
[ISP]int l0
[ISP-LoopBack0]ip add 5.5.5.5 8
9.配置ACL
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2-acl-basic-2000]int s4/0/0
[r2-Serial4/0/0]nat outbound 2000
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]int s4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]int g0/0/1
[r4-GigabitEthernet0/0/1]nat outbound 2000
五、测试
Pap认证
Chap认证