MGRE实验

任务&拓扑图如下:

MGRE实验_第1张图片

第一步:配置使用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

MGRE实验_第2张图片

配置R1

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

MGRE实验_第3张图片

补全认证

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    //查看接口状态

MGRE实验_第4张图片

MGRE实验_第5张图片

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

对主认证方配置CHAP认证

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

MGRE实验_第6张图片

MGRE实验_第7张图片

配置R2

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

MGRE实验_第8张图片

补全认证

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    //查看接口状态

MGRE实验_第9张图片

第三步:配置HDLC封装

先对所有设备配置IP

MGRE实验_第10张图片

对ISP

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

MGRE实验_第11张图片

对R3

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

MGRE实验_第12张图片

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

MGRE实验_第13张图片

第四步:构建MGRE环境

将所有设备配置IP

MGRE实验_第14张图片

MGRE实验_第15张图片

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    //检测公网连通性

MGRE实验_第16张图片

对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域

MGRE实验_第17张图片

对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    //更改目标

MGRE实验_第18张图片

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

MGRE实验_第19张图片

你可能感兴趣的:(智能路由器,服务器)