一:实验拓扑
二、实验要求
1.R5只进行IP地址配置,其所有地址均配为公有IP地址;
2.R1和R5间使用PPP的PAP认证,R5为主认证方;
3.R2与R5之间使用ppp的CHAP认证,R5为主认证方;
4.R3与R5之间使用HDLC封装;
5.R1、R2、R3构建一个MGRE环境,R1为中心站点,R1、R4间为点到点的GRE;
6.整个私有网络基本RIP全网可达,所有Pc设置私有IP为源IP,可以访问R5环回。
实验思路
1.配置IP。
2.为各AP之间使用ppp验证。
3.用HDLC协议封装AR3与AR5。
4.配置AR1、2、3、4的封装环境。
5.配置RIP。
6.配置ACL。
三、实验步骤
1、AR1
[AR 2220 NO.1]int g0/0/0
[AR 2220 NO.1-GigabitEthernet0/0/0]ip add 192.168.1.254 24
[AR 2220 NO.1-GigabitEthernet0/0/0]int s4/0/0
[AR 2220 NO.1-Serial4/0/0]ip add 15.1.1.1 24
AR2
[AR 2220 NO.2]int g0/0/0
[AR 2220 NO.2-GigabitEthernet0/0/0]ip add 192.168.2.254 24
[AR 2220 NO.2-GigabitEthernet0/0/0]int s4/0/0
[AR 2220 NO.2-Serial4/0/0]ip add 25.1.1.2 24
AR3
[AR 2220 NO.3]int g0/0/0
[AR 2220 NO.3-GigabitEthernet0/0/0]ip add 192.168.3.254 24
[AR 2220 NO.3-GigabitEthernet0/0/0]int s4/0/0
[AR 2220 NO.3-Serial4/0/0]ip add 35.1.1.3 24
AR4
[AR 2220 NO.4]int g0/0/0
[AR 2220 NO.4-GigabitEthernet0/0/0]ip add 45.1.1.4 24
[AR 2220 NO.4-GigabitEthernet0/0/0]int g0/0/1
[AR 2220 NO.4-GigabitEthernet0/0/1]ip add 192.168.4.254 24
AR5
[AR 2220 NO.5]int s4/0/1
[AR 2220 NO.5-Serial4/0/1]ip add 15.1.1.5 24
[AR 2220 NO.5-Serial4/0/1]int s3/0/1
[AR 2220 NO.5-Serial3/0/1]ip add 25.1.1.5 24
[AR 2220 NO.5-Serial3/0/1]int s4/0/0
[AR 2220 NO.5-Serial4/0/0]ip add 35.1.1.5 24
[AR 2220 NO.5-Serial4/0/0]int g0/0/0
[AR 2220 NO.5-GigabitEthernet0/0/0]ip add 45.1.1.5 24
[AR 2220 NO.5-GigabitEthernet0/0/0]int l0
[AR 2220 NO.5-LoopBack0]ip add 5.5.5.5 24
2、AR1、5之间
AR5
[AR 2220 NO.5]aaa
[AR 2220 NO.5-aaa]local-user test password cipher 123
[AR 2220 NO.5-aaa]local-user test service-type ppp
[AR 2220 NO.5-aaa]quit
[AR 2220 NO.5]int s4/0/1
[AR 2220 NO.5-Serial4/0/1]ppp authentication-mode pap
AR1
[AR 2220 NO.1]int s4/0/0
[AR 2220 NO.1-Serial4/0/0]ppp pap local-user test password cipher 123
AR2、5之间
AR5
[AR 2220 NO.5]int s3/0/1
AR 2220 NO.5-Serial3/0/1]ppp authentication-mode chap
AR2
[AR 2220 NO.2]int s4/0/0
[AR 2220 NO.2-Serial4/0/0]ppp chap password cipher 123
3、AR5
[AR 2220 NO.5]int s4/0/0
[AR 2220 NO.5-Serial4/0/0]link-protocol hdlc
AR3
[AR 2220 NO.3]int s4/0/0
[AR 2220 NO.3-Serial4/0/0]link-protocol hdlc
4、AR1
[AR 2220 NO.1]ip route-static 0.0.0.0 0 15.1.1.5
[AR 2220 NO.1]int tunnel 0/0/0
[AR 2220 NO.1-Tunnel0/0/0]ip add 10.1.1.1 24
[AR 2220 NO.1-Tunnel0/0/0]tunnel-protocol gre p2mp
AR 2220 NO.1-Tunnel0/0/0]source 15.1.1.1
[AR 2220 NO.1-Tunnel0/0/0]nhrp network-id 100
[AR 2220 NO.1-Tunnel0/0/0]int Tunnel 0/0/1
[AR 2220 NO.1-Tunnel0/0/1]ip add 10.1.2.1 24
[AR 2220 NO.1-Tunnel0/0/1]tunnel-protocol gre
[AR 2220 NO.1-Tunnel0/0/1]source 15.1.1.1
[AR 2220 NO.1-Tunnel0/0/1]destination 45.1.1.4
AR2
[AR 2220 NO.2]ip route-static 0.0.0.0 0 25.1.1.5
[AR 2220 NO.2]int Tunnel 0/0/0
[AR 2220 NO.2-Tunnel0/0/0]ip add 10.1.1.2 24
[AR 2220 NO.2-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR 2220 NO.2-Tunnel0/0/0]source Serial 4/0/0
[AR 2220 NO.2-Tunnel0/0/0]nhrp network-id 100
[AR 2220 NO.2-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
AR3
[AR 2220 NO.3]ip route-static 0.0.0.0 0 35.1.1.5
[AR 2220 NO.3]int Tunnel 0/0/0
[AR 2220 NO.3-Tunnel0/0/0]ip add 10.1.1.3 24
[AR 2220 NO.3-Tunnel0/0/0]tunnel-protocol gre p2mp
[AR 2220 NO.3-Tunnel0/0/0]source Serial 4/0/0
[AR 2220 NO.3-Tunnel0/0/0]nhrp network-id 100
[AR 2220 NO.3-Tunnel0/0/0]nhrp entry 10.1.1.1 15.1.1.1 register
AR4
[AR 2220 NO.4]ip route-static 0.0.0.0 0 45.1.1.5
[AR 2220 NO.4]int Tunnel 0/0/1
[AR 2220 NO.4-Tunnel0/0/1]ip add 10.1.2.4 24
[AR 2220 NO.4-Tunnel0/0/1]tunnel-protocol gre
[AR 2220 NO.4-Tunnel0/0/1]source 45.1.1.4
[AR 2220 NO.4-Tunnel0/0/1]destination 15.1.1.1
5、AR1
[AR 2220 NO.1]rip 1
[AR 2220 NO.1-rip-1]v 2
[AR 2220 NO.1-rip-1]undo summary
[AR 2220 NO.1-rip-1]net 192.168.1.0
[AR 2220 NO.1-rip-1]net 10.0.0.0
[AR 2220 NO.1-rip-1]int tunnel 0/0/0
[AR 2220 NO.1-Tunnel0/0/0]nhrp entry multicast dynamic
[AR 2220 NO.1-Tunnel0/0/0]undo rip split-horizon
AR2
[AR 2220 NO.2]rip 1
[AR 2220 NO.2-rip-1]v 2
[AR 2220 NO.2-rip-1]undo summary
[AR 2220 NO.2-rip-1]net 192.168.2.0
[AR 2220 NO.2-rip-1]net 10.0.0.0
[AR 2220 NO.2-rip-1]int tunnel 0/0/0
[AR 2220 NO.2-Tunnel0/0/0]undo rip split-horizon
AR3
[AR 2220 NO.3]rip 1
[AR 2220 NO.3-rip-1]v 2
[AR 2220 NO.3-rip-1]undo summary
[AR 2220 NO.3-rip-1]net 192.168.3.0
[AR 2220 NO.3-rip-1]net 10.0.0.0
[AR 2220 NO.3-rip-1]int tunnel 0/0/0
[AR 2220 NO.3-Tunnel0/0/0]undo rip split-horizon
AR4
[AR 2220 NO.4]rip 1
[AR 2220 NO.4-rip-1]v 2
[AR 2220 NO.4-rip-1]undo summary
[AR 2220 NO.4-rip-1]net 192.168.4.0
[AR 2220 NO.4-rip-1]net 10.0.0.0
[AR 2220 NO.4-rip-1]int tunnel 0/0/0
[AR 2220 NO.4-Tunnel0/0/0]undo rip split-horizon
6、AR1
[AR 2220 NO.1]acl 2000
[AR 2220 NO.1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[AR 2220 NO.1-acl-basic-2000]int s4/0/0
[AR 2220 NO.1-Serial4/0/0]nat outbound 2000
AR2
[AR 2220 NO.2]acl 2000
[AR 2220 NO.2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[AR 2220 NO.2-acl-basic-2000]int s4/0/0
[AR 2220 NO.2-Serial4/0/0]nat outbound 2000
AR3
[AR 2220 NO.3]acl 2000
[AR 2220 NO.3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[AR 2220 NO.3-acl-basic-2000]int s4/0/0
[AR 2220 NO.3-Serial4/0/0]nat outbound 2000
AR4
[AR 2220 NO.4]acl 2000
[AR 2220 NO.4-acl-basic-2000]rule
[AR 2220 NO.4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[AR 2220 NO.4-acl-basic-2000]int g0/0/0
[AR 2220 NO.4-GigabitEthernet0/0/0]nat outbound 2000
以抽取AR与PC来ping其他的设备,全部能够ping通,最后实现全网通。