HCIP ---MGRE实验详细配置

实验要求

1,R5为I5P,只能进行IP地址配置;其所有地址均配为公有地址

2,R1和R间使用PPP的PAP认证,RS为主认证方

R2于r5之间使用PPP的chap认证,R5为主认证方;

R3于r5之间使用HDLC封装

3,R1/R2/3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的gre

4,整个私有网络基于RIP全可达

5,所有PC设置私有IP为源IP,可以访问R5环回。

实验分析与配置

(1).路由器串口和接口配置

[Huawei]int s 4/0/0       #进入串口是4/0/0
[Huawei-Serial4/0/0]ip add 15.0.0.1 24    #串口IP配置
[Huawei-Serial4/0/0]int g0/0/1       #进入接口g0/0/1接口
[Huawei-GigabitEthernet0/0/1]ip add 10.0.0.2 24  #接口IP配置

其他串口,接口均按照上图安排,以上配置语句完成相关配置
(2).路由器环回配置

[r5-isp]int l0    创建 环回
[r5-isp-LoopBack0]ip add 5.5.5.5 24    #环回地址配置

(3).缺省路由配置

[Huawei]ip route-static 0.0.0.0 0 15.0.0.2

 

(4).R1和R5间使用PPP的PAP认证,RS为主认证方

 

[r5-isp]aaa    #进入aaa模式
[r5-isp-aaa]local-user r1 password cipher 123456 #设置认证用户名和密码
Info: Add a new user.    
[r5-isp-aaa]local-user r1 service-type ppp   #选择类型为ppp
 

[Huawei]int s 4/0/0         
[Huawei-Serial4/0/0]ppp pap local-user r1 password cipher 123456   #进行用户名密码认证
 

[Huawei-Serial4/0/0]shutdown    #关掉串口

[Huawei-Serial4/0/0]undo shutdown  #重启串口

关闭重启接口后再次通信检验是否成功

 (5).R2于之间使用PPP的chap认证,R5为主认证方

[r5-isp-aaa]int s 3/0/1  #进入串口    
[r5-isp-Serial3/0/1]ppp authentication-mode chap     #选择ppp的chap认证

[r2]int s 4/0/0    
[r2-Serial4/0/0]ppp chap password cipher 123456   #在r2上进行chap认证

[r2-Serial4/0/0]shutdown

[r2-Serial4/0/0]undo shutdown    #重启串口检验认证是否成功

ppp的chap认证成功

 

(6).R3于r5之间使用HDLC封装

[r5-isp-Serial3/0/1]int s 4/0/0     #进入串口    
[r5-isp-Serial4/0/0]link-protocol hdlc   #选择hdlc封装

Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

[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
 

(7)R1/R2/3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的gre

[Huawei]int t 0/0/0
[Huawei-Tunnel0/0/0]ip add 192.168.5.1 24   
[Huawei-Tunnel0/0/0]tunnel-protocol gre p2mp     
[Huawei-Tunnel0/0/0]source 15.0.0.1
[Huawei-Tunnel0/0/0]  
[Huawei-Tunnel0/0/0]nhrp network-id 100  
[Huawei-Tunnel0/0/0]nhrp entry multicast dynamic 
 

[r2]int t 0/0/1
[r2-Tunnel0/0/1]ip add 192.168.5.2 24 
[r2-Tunnel0/0/1]tunnel-protocol gre p2mp    
[r2-Tunnel0/0/1]source Serial 4/0/0
[r2-Tunnel0/0/1]   
[r2-Tunnel0/0/1]nhrp network-id 100   
[r2-Tunnel0/0/1]nhrp entry 192.168.5.1 15.0.0.1 register 
 

[r3]int t 0/0/0
[r3-Tunnel0/0/0]i  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]    
[r3-Tunnel0/0/0]nhrp network-id 100
[r3-Tunnel0/0/1]nhrp entry 192.168.6.1 25.0.0.1 register 

(9)R1、R4间为点到点的gre

[Huawei]int t 0/0/1
[Huawei-Tunnel0/0/1]ip add 192.168.6.1 24
[Huawei-Tunnel0/0/1]tunnel-protocol gre      
[Huawei-Tunnel0/0/1]source 15.0.0.1
[Huawei-Tunnel0/0/1]destination 45.0.0.1


[r4]int t 0/0/0
[r4-Tunnel0/0/0]ip add 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]description
 

(10).整个私有网络基于RIP全可达

[Huawei]rip 
[Huawei-rip-1]v 2   
[Huawei-rip-1]network 10.0.0.0         #rip宣告
[Huawei-rip-1]network 192.168.5.0
[Huawei-rip-1]network 192.168.6.0

其他路由器类似命令即可宣告

(11)所有PC设置私有IP为源IP,可以访问R5环回

[r2]acl 2000   
[r2-acl-basic-2000]rule permit source 11.0.0.0 0.0.0.255
[r2]int s 4/0/0   
[r2-Serial4/0/0]nat outbound 2000

 访问r5环回成功

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值