实现PPP的PAP认证与CHAP认证、MGRE、GRE网络搭建

一.实验要求

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

注意:上示拓扑图中路由器设备均采用AR3260并加装2SA接口模块!

二.实现过程

1.基于要求为R5设备的各个接口配置上相应IP地址,配置过程不再赘述,以Se4/0/0接口为例,配置命令如下:

[ISP]interface Serial 3/0/0
[ISP-Serial3/0/0]ip ad    
[ISP-Serial3/0/0]ip address 15.0.0.2 8

2.实现R1与R5之间的PAP认证。进入R5的AAA密码账号空间,创建本地用户huawei1,密码为123456,并在Se3/0/0端口开启PAP认证,同时进入R1告知账号密码进行认证。配置命令如下:

R5:

[ISP]aaa
[ISP-aaa]local-user huawei1 password cipher 123456
Info: Add a new user.
[ISP-aaa]local-user huawei1 service-type ppp

[ISP-aaa]in se3/0/0
[ISP-Serial3/0/0]link-protocol ppp
[ISP-Serial3/0/0]ppp authentication-mode pap 

R1:

[R1]in se4/0/0
[R1-Serial4/0/0]ppp pap local-user huawei1 password cipher 123456
[R1-Serial4/0/0]q

3.实现R2与R5之间的CHAP认证。进入R5的AAA密码账号空间,创建本地用户huawei2,密码为654321,并在Se3/0/1端口开启CHAP认证,同时进入R2告知账号密码进行认证。配置命令如下:

R1:

[ISP]aaa
[ISP-aaa]local-user huawei2 password cipher 654321
Info: Add a new user.
[ISP-aaa]local-user huawei2 service-type ppp

R2:

[R2]in se4/0/0
[R2-Serial4/0/0]ppp chap user huawei2
[R2-Serial4/0/0]ppp chap password cipher 654321

进行连通性测试:

4.实现R3与R5之间使用HDLC封装。配置命令如下:

R5:

[ISP-Serial3/0/1]in se4/0/0
[ISP-Serial4/0/0]link-protocol hdlc 

R3:

[R3]in se4/0/0
[R3-Serial4/0/0]link-protocol hdlc 

5.实现R1/R2/R3构建一个MGRE环境,R1为中心站点。配置命令如下

R1:

[R1]ip route-static 0.0.0.0 0 15.0.0.2
[R1]interface Tunnel 0/0/0    
[R1-Tunnel0/0/0]ip address 192.168.5.1 24
[R1-Tunnel0/0/0]tunnel-protocol gre p2mp 
[R1-Tunnel0/0/0]source 15.0.0.1
Jul  7 2024 16:19:27-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R1-Tunnel0/0/0]nhrp network-id 100    
[R1]rip
[R1-rip-1]version 2
[R1-rip-1]network 192.168.1.0
[R1-rip-1]network 192.168.5.0
[R1]interface Tunnel 0/0/0    
[R1-Tunnel0/0/0]nhrp entry multicast dynamic     
[R1-Tunnel0/0/0]undo rip split-horizon 

R2/R3(以R2为例):

[R2]ip route-static 0.0.0.0 0 25.0.0.2
[R2]interface Tunnel 0/0/0
[R2-Tunnel0/0/0]ip address 192.168.5.2 24
[R2-Tunnel0/0/0]tunnel-protocol gre p2mp     
[R2-Tunnel0/0/0]source Serial 4/0/0
Jul  7 2024 16:20:34-08:00 R2 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 
[R2-Tunnel0/0/0]nhrp network-id 100    
[R2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

[R2]rip    
[R2-rip-1]version 2
[R2-rip-1]network 192.168.2.0
[R2-rip-1]network 192.168.5.0
[R2-rip-1]q

需注意:上述命令第一条都为建立缺省,为配置MGRE的前提。

5.实现R1、R4间为点到点的GRE。配置命令如下:

R1:

[R1]interface Tunnel 0/0/1
[R1-Tunnel0/0/1]ip address 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
Jul  7 2024 16:54:56-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/1 has entered the UP state. 
[R1-Tunnel0/0/1]q
[R1]rip
[R1-rip-1]version 2
[R1-rip-1]network 192.168.6.0
[R1-rip-1]q

R4:

[R4]interface Tunnel 0/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
[R4]ip route-static 0.0.0.0 0 45.0.0.2
[R4]
Jul  7 2024 16:56:41-08:00 R4 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface Tunnel0/0/0 has entered the UP state. 

[R4]rip
[R4-rip-1]version 2
[R4-rip-1]network 192.168.4.0
[R4-rip-1]network 192.168.6.0
[R4-rip-1]q
[R4]ip route-static 192.168.1.0 24 192.168.6.1

  • 11
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值