目录
实验要求
1、R5为ISP,只能进行IP地址配置;其所有地址均配为有IP地址
2、R1和R5间使用PPP的PAP认证,R5为主认证方;
R2与R2之间使用PPP的chap认证,R5为主认证方;
R3与R5之间使用HDLC封装。
3、R1、R2、R3构建一个MGRE环境,R1为中心站点;R1,R4间为点到点的GRE。
4、整个私网有网络基于RIP全网可达。
5、所有PC设置私有IP为源IP,可以访问R5环回。
实验思路
1、首先根据拓扑结构合理分配IP地址,并对各个路由器的IP地址和R5环回接口的IP地址进行配置。
2、让私网中的边界路由器对ISP路由器做缺省路由。
3、根据实验要求,对需要配置不同类型认证的路由器进行认证配置,和需要不同封装的协议进行封装配置。
4、 根据实验要求,对R1、R2、R3构建一个MGRE环境,R1,R4间为点到点的GRE。
5、 对私网中的路由器进行RIP的配置。
6、给边界路由器配置NAT协议,使得内网可以访问到外网。
实验内容及步骤
1、对各个设备的IP地址和R5环回接口IP的配置
AR1
[r1]int g0/0/0
[r1-GigabitEthernet0/0/0]ip a 192.168.1.1 24
[r1]int s4/0/0
[r1-Serial4/0/0]ip a 15.0.0.1 24
AR2
[r2]int g0/0/0
[r2-GigabitEthernet0/0/0]ip a 192.168.2.1 24
[r2-GigabitEthernet0/0/0]int s 4/0/0
[r2-Serial4/0/0]ip a 25.0.0.1 24
AR3
[r3]int g0/0/0
[r3-GigabitEthernet0/0/0]ip a 192.168.3.1 24
[r3-GigabitEthernet0/0/0]int s 4/0/0
[r3-Serial4/0/0]ip a 35.0.0.1 24
AR4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip a 45.0.0.1 24
[r4-GigabitEthernet0/0/0]int g0/0/0
[r4-GigabitEthernet0/0/0]ip a 192.168.4.1 24
AR5
[isp]int s 3/0/0
[isp-Serial3/0/0]ip a 15.0.0.2 24
[isp-Serial3/0/0]int s 3/0/1
[isp-Serial3/0/1]ip a 25.0.0.2 24
[isp-Serial3/0/1]int s 4/0/0
[isp-Serial4/0/0]ip a 35.0.0.2 24
[isp-Serial4/0/0]int g0/0/0
[isp-GigabitEthernet0/0/0]ip a 45.0.0.2 24
[isp-GigabitEthernet0/0/0]int lo0
[isp-LoopBack0]ip a 5.5.5.5 24
2、让边界路由器对ISP路由器做缺省配置
AR1
[r1]ip route-static 0.0.0.0 0 15.0.0.2
AR2
[r2]ip route-static 0.0.0.0 0 25.0.0.2
AR3
[r3]ip route-static 0.0.0.0 0 35.0.0.2
AR4
[r4]ip route-static 0.0.0.0 0 45.0.0.2
3、对需要认证的设备进行配置
a、AR1与AR5之间使用PPP的pap认证
AR5(认证方)
[isp]aaa
[isp-aaa]local-user xujalong password cipher 123456
[isp-aaa]local-user xujialong service-type ppp
[isp]int s3/0/0
[isp-Serial3/0/0]ppp authentication-mode pap
AR1(被认证方)
[r1]int s 4/0/0
[r1-Serial4/0/0]ppp pap local-user xujialong password cipher 123456
b、AR2与AR5之间使用PPP的chap认证
AR5(认证方)
[isp]aaa
[isp-aaa]local-user r2 password cipher 123456
[isp-aaa]local-user r2 service-type ppp
[isp-aaa]int s3/0/1
[isp-Serial3/0/1]ppp authentication-mode chap
AR2(被认证方)
[r2]int s 4/0/0
[r2-Serial4/0/0]ppp chap user r2
[r2-Serial4/0/0]ppp chap password cipher 123456
c、R3与R5之间使用HDLC封装
AR3
[r3]int s 4/0/0
[r3-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
AR5
[isp]int s4/0/0
[isp-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y
4、R1、R2、R3构建一个MGRE环境配置
AR1(中心站点)
[r1]int t0/0/0
[r1-Tunnel0/0/0]ip a 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 100
AR2(分支站点)
[r2]int t0/0/0
[r2-Tunnel0/0/0]ip a 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 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
AR3(分支站点)
[r3]int t0/0/0
[r3-Tunnel0/0/0]ip a 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 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register
5、R1,R4构建一个点到点的GRE
AR1
[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip a 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
AR4
[r4]int t0/0/1
[r4-Tunnel0/0/1]ip a 192.168.6.2 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
6、对整个私网进行RIP配置
AR1
[r1]rip
[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
AR2
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]network 192.168.5.0
[r2-rip-1]network 192.168.2.0
AR3
[r3]rip
[r3-rip-1] v 2
[r3-rip-1]network 192.168.3.0
[r3-rip-1]network 192.168.5.0
AR4
[r4]rip 1
[r4-rip-1]v 2
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0
7、对AR1关闭水平接口功能和开启伪广播功能
AR1
[r1]int t 0/0/0
[r1-Tunnel0/0/0]undo rip split-horizon
[r1-Tunnel0/0/0]nhrp entry multicast dynamic
8、给边界路由器做nat配置
AR1
[r1]acl 2000
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
AR2
[r2]acl 2000
[r2-acl-basic-2000]rule permit source 192.168.2.0 0.0.0.255
[r2]int s 4/0/0
[r2-Serial4/0/0]nat outbound 2000
AR3
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3]int s 4/0/0
[r3-Serial4/0/0]nat outbound 2000
AR4
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000
实验结果及验证
1、IP地址及环回接口的查看
AR1
AR2
AR3
AR4
AR5
2、RIP路由的查看
AR1
AR2
AR3
AR4