MGRE实验

一、实验拓扑及实验需求

二、实验操作

1、合理配置IP 

2、进行ppp封装

R2和R3之间进行ppp认证

对主认证方R2:

[isp]aaa	
[isp-aaa]local-user a password cipher 123456//账户为a,密码为123456
[isp-aaa]local-user a service-type ppp
[isp-aaa]q
[isp]int s3/0/1
[isp-Serial3/0/1]ppp authentication-mode pap

 对R3:

[r3-Serial4/0/0]ppp pap local-user a password cipher 123456

运行结果:

 

R2和R4之间进行chap认证

对主认证方R2:

[isp]aaa	
[isp-aaa]local-user a password cipher 123456
[isp-aaa]local-user a service-type ppp
[isp-aaa]q
[isp]int s4/0/0
[isp-Serial4/0/0]ppp authentication-mode chap

 对R4:

[r4]int s4/0/1	
[r4-Serial4/0/1]ppp chap  password  cipher 123456

运行结果:

3、构建MGRE环境

R1上配置:

[r1]int Tunnel 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.4.1 24 //在r1上创建地址为192.168.4.1的接口
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp //定义该隧道为多点gre隧道且为多对多
 
[r1-Tunnel0/0/0]source 14.1.1.1	 //该隧道加封装的报头源ip地址
[r1-Tunnel0/0/0]nhrp entry multicast dynamic //本地成为NHRP服务端
 
[r1-Tunnel0/0/0]nhrp network-id 99 //NHRP的工作编号,该网段所有设备必须在同一id

 R2上配置:

[r2]int Tunnel 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.4.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r2-Tunnel0/0/0]source s4/0/0
[r2-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register 	
[r2-Tunnel0/0/0]nhrp network-id 99

R3上配置:

[r3]int Tunnel 0/0/0
[r3-Tunnel0/0/0]ip add 192.168.4.2 24
[r3-Tunnel0/0/0]tunnel-protocol gre p2mp 
[r3-Tunnel0/0/0]source s4/0/1
[r3-Tunnel0/0/0]nhrp entry 192.168.4.1 14.1.1.1 register 	
[r3-Tunnel0/0/0]nhrp network-id 99

运行结果:

4、RIP获取路由

[r1]rip
[r1-rip-1]vers 2
[r1-rip-1]network 192.168.1.0 
[r1-rip-1]network 192.168.4.0
 
[r2]rip
[r2-rip-1]vers 2
[r2-rip-1]network 192.168.2.0 
[r2-rip-1]network 192.168.4.0
 
[r3]rip
[r3-rip-1]vers 2
[r3-rip-1]network 192.168.3.0 
[r3-rip-1]network 192.168.4.0

关闭R1的水平分割

[r1-Tunnel0/0/0]undo rip split-horizon 

运行结果

5、使PC机可以访问ISP环回

在边界路由器接口上进行nat配置

对R1为例:

[r1]acl 2000	
[r1-acl-basic-2000]rule permit source 192.168.1.0 0.0.0.255
[r1-acl-basic-2000]q
[r1]int s4/0/0
[r1-Serial4/0/0]nat outbound 2000
[r1-Serial4/0/0]q

运行结果:

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值