HCIP----综合实验

 一、以R5为ISP,只能进行IP地址配置;其所有地址均配为公有IP地址

对IP地址进行子网划分:
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环回

二、进行相关的地址的配置:

1、对R1-R5进行地址配置,并且配置缺省路由;

2、对R1和R5之间使用PPP的PAP认证,以R5为主认证方;

3、对R2和R5之间使用PPP的CHAP认证,以R5为主认证方;

4、在R3和R5之间使用HDLC封装;

5、对R1、R2、R3配置MGRE的环境,对R1和R4进行点到点的GRE环境;

6、实现全网可达,使用RIP协议动态路由配置。

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),最终使可以访问R5的环回。

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值