华为模拟器eNSP – HCIP – GRE、MGRE、PAP、CHAP综合实验

拓扑图:

请添加图片描述

实验要求:

  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环回。

思路:

数广播域,子网划分,配置路由器接口IP地址,配置GRE,配置静态缺省路由,配置RIP,配置nat

子网划分:
192.168.1.0/24 -- R1内网网段
192.168.2.0/24 -- R2内网网段
192.168.3.0/24 -- R3内网网段
192.168.4.0/24 -- R4内网网段
192.168.5.0/24 -- MGRE/GRE中R1,R2,R3网段
192.168.6.0/24 -- GRE中R1,R4网段
15.0.0.0/24 -- R1~R5链路
25.0.0.0/24 -- R2~R5链路
35.0.0.0/24 -- R3~R5链路
45.0.0.0/24 -- R4~R5链路
5.5.5.5/24 -- R5环回

配置命令:

R1:

sys 
sys r1
//acl抓取内网流量
acl 2000
rule permit source 192.168.1.0 0.0.0.255
//配置接口IP地址
int g0/0/0
ip add 192.168.1.1 24
int s4/0/0
nat outbound 2000
ip add 15.0.0.1 24
int t0/0/0
ip add 192.168.5.1 24
int t0/0/1
ip add 192.168.6.1 24
//配置PAP被认证方
int s4/0/0
ppp pap local-user admin_pap password cipher 123456
//配置MGRE
int t0/0/0
tunnel-protocol gre p2mp
source 15.0.0.1
nhrp network-id 100
int t0/0/0
nhrp entry multicast dynamic
undo rip split-horizon
//配置GRE
int t0/0/1
tunnel-protocol gre
source 15.0.0.1
destination 45.0.0.1
//配置RIP
rip 1
v 2
net 192.168.1.0 
net 192.168.5.0
net 192.168.6.0
//静态缺省路由
ip route-s 0.0.0.0 0 15.0.0.2
ip route-s 192.168.4.0 24 192.168.5.4 

R2:

sys 
sys r2
//acl抓取内网流量
acl 2000
rule permit source 192.168.2.0 0.0.0.255
//配置接口IP地址
int g0/0/0
ip add 192.168.2.1 24
int s4/0/0
ip add 25.0.0.1 24
nat outbound 2000
int t0/0/0
ip add 192.168.5.2 24
//配置CHAP被认证方
int s4/0/0
ppp chap user admin_chap
ppp chap password cipher 123456
//配置MGRE
int t0/0/0
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
//配置RIP
rip 1
v 2
net 192.168.2.0 
net 192.168.5.0
//静态缺省路由
ip route-s 0.0.0.0 0 25.0.0.2

R3:

sys 
sys r3
//acl抓取内网流量
acl 2000
rule permit source 192.168.3.0 0.0.0.255
//配置接口ip地址
int g0/0/0
ip add 192.168.3.1 24
int s4/0/0
ip add 35.0.0.1 24
nat outbound 2000
int t0/0/0
ip add 192.168.5.3 24
//配置MGRE
int t0/0/0
tunnel-protocol gre p2mp
source s4/0/0
nhrp network-id 100
nhrp entry 192.168.5.1 15.0.0.1 register
//配置RIP
rip 1
v 2
net 192.168.3.0 
net 192.168.5.0
//静态缺省路由
ip route-s 0.0.0.0 0 35.0.0.2
//配置HDLC
int s4/0/0
link-protocol hdlc
 

R4:

sys 
sys r4
//acl抓取内网流量
acl 2000
rule permit source 192.168.4.0 0.0.0.255
//配置接口ip地址
int g0/0/1
ip add 192.168.4.1 24
nat outbound 2000
int g0/0/0
ip add 45.0.0.1 24
int t0/0/0
ip add 192.168.6.2 24
//配置GRE
int t0/0/0
tunnel-protocol gre
source 45.0.0.1
destination 15.0.0.1
//配置RIP
rip 1
v 2
net 192.168.4.0 
net 192.168.5.0
net 192.168.6.0
//静态缺省路由
ip route-s 0.0.0.0 0 45.0.0.2 
ip route-s 192.168.1.0 24 192.168.5.1 
 

R5:

sys 
sys ISP
//配置接口ip地址
int s3/0/0
ip add 15.0.0.2 24
int s3/0/1
ip add 25.0.0.2 24
int s4/0/0
ip add 35.0.0.2 24
int g0/0/0
ip add 45.0.0.2 24
int lo0
ip add 5.5.5.5 24
//配置PAP认证
aaa
local-user admin_pap password cipher 123456
local-user admin_pap service-type ppp
int s3/0/0
ppp authentication-mode pap
//配置CHAP认证
aaa
local-user admin_chap password cipher 123456
local-user admin_chap service-type ppp
int s3/0/1
ppp authentication-mode chap
//配置HDLC
int s3/0/1
link-protocol hdlc
 

验证:

PC1(192.168.1.2)ping 外网5.5.5.5 和PC2(192.168.2.2)

请添加图片描述

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
THE END
分享
二维码
< <上一篇

)">
下一篇>>