MGRE实验

任务&拓扑图如下:

第一步:配置使用PPP的PAP认证

配置主认证方

aaa
local-user hi password cipher 123456    //创建一个本地用户名&密码

local-user hi service-type ppp    //定义本地用户的用途——服务于PPP

interface Serial 3/0/0    //进入Serial 3/0/0接口
link-protocol ppp    //设置链路协议
ppp authentication-mode pap    //改变认证方式为PAP
shutdown    //重启配置
undo shutdown

配置R1

display ip interface brief    //在R1查看接口协议状态

补全认证

interface Serial 4/0/0    //进入Serial 4/0/0接口
ppp pap local-user hi password cipher 123456    //使用PAP认证,输入本地用户名&密码
shutdown
undo shutdown    //重启接口
display ip interface brief    //查看接口状态

第二步:配置使用PPP的CHAP认证

对主认证方配置CHAP认证

interface Serial 3/0/1    //进入Serial 3/0/1接口
ppp authentication-mode chap    //设置CHAP认证
shutdown
undo shutdown    //重启配置

配置R2

display ip interface brief    //在R2查看接口协议状态

补全认证

interface Serial 4/0/0    //进入Serial 4/0/0接口
ppp chap hi    //使用PAP认证,输入本地用户名
ppp chap password cipher 123456    //输入密码
shutdown
undo shutdown    //重启接口
display ip interface brief    //查看接口状态

第三步:配置HDLC封装

先对所有设备配置IP

对ISP

interface Serial 4/0/0    //进入Serial 4/0/0接口
link-protocol hdlc    //更改接口类型

对R3

display ip interface brief    //检查接口状态

interface  Serial 4/0/0    //进入Serial 4/0/0接口
link-protocol hdlc    //更改链路类型为HDLC
display ip interface brief    //检查接口状态

第四步:构建MGRE环境

将所有设备配置IP

ip route-static 0.0.0.0 0 15.0.0.2
ip route-static 0.0.0.0 0 25.0.0.2
ip route-static 0.0.0.0 0 35.0.0.2
ip route-static 0.0.0.0 0 45.0.0.2    //对R1~R4补全缺省路由

ping -a 15.0.0.1 25.0.0.1
ping -a 15.0.0.1 35.0.0.1
ping -a 15.0.0.1 45.0.0.1    //检测公网连通性

对R1

interface Tunnel 0/0/0    //创建隧道接口
ip address 192.168.5.1 24    //配IP
tunnel-protocol gre p2mp    //改变接口的封装方式
source 15.0.0.1    //更改隧道的源端口
nhrp network-id 50    //创建nhrp域

对R2

interface Tunnel 0/0/0    //创建隧道接口
ip address 192.168.5.2 24    //配IP
tunnel-protocol gre p2mp    //更改接口的封装方式
source Serial 4/0/0    //选择源端口
nhrp network-id 50    //加入域
nhrp entry 192.168.5.1 15.0.0.1 register    //找中心注册

R3同上

对R1、R4建立点到点的GRE

在R1

interface Tunnel 0/0/1    //创建新的虚拟隧道接口
ip address 192.168.6.1 24    //给接口配IP
tunnel-protocol gre    //定义封装协议
source 15.0.0.1    //更改源端口
destination 45.0.0.1    //更改目标

在R4

interface Tunnel 0/0/0    //创建虚拟隧道接口
ip address 192.168.6.4 24    //配IP
tunnel-protocol gre    //封装隧道协议
source 45.0.0.1    //选择源端口
destination 15.0.0.1    //选择目标端口

第五步:配置基于RIP的全网可达

对R4

rip 1
version 2    //创建RIP协议
network 192.168.4.0
network 192.168.6.0    //宣告网段

R1~R3同理

在R1

interface Tunnel 0/0/0    //进入Tunnel 0/0/0隧道
nhrp entry multicast dynamic    //开启微广播
undo rip split-horizon    //关闭水平分割

第六步:使所有PC可以访问R5环回

对R5

interface LookBsck 0    //创建一个环回
ip address 100.100.100.100 24    //设置环回地址

对R1配置NAT

acl 2000    //创建基础ACL
rule permit source 192.168.1.0 0.0.0.255    //写规则
interface Serial 4/0/0
nat outbound 2000

R2~R4同理

用PC1pingR5环回

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值