MGRE及实验
tunnel 隧道:一种的简单的VPN技术; 普通的tunnel为点到点网络类型;
生成隧道接口,流量通过路由查询后,若通过隧道接口转发时,需要在原有的三层报头前,再添加一个公有地址间的报头;
将两个仅可以通过WAN通讯的LAN,合成一个;
r1(config)#interface tunnel 0
r1(config-if)#ip address 10.1.1.1 255.255.255.0
r1(config-if)#tunnel source 12.1.1.1
r1(config-if)#tunnel destination 23.1.1.2
切记:建立tunnel,还需要编辑路由表,来将流量引向隧道接口;
MGRE 多点GRE--NBMA网路类型
若需要将多个网络VPN为一个,普通的tunnel将成指数配置接口和路由;
MGRE可以将多个网络通过一条tunnel来实现;
优点:1、每个站点仅需配置一个tunnel接口;所有分支站点ip地址可以动态变化;
2、所有分支节点仅和中心节点建立tunnel,但也可以直接和其他分支站点直接通讯;
原理:1、中心站点,固定的公有ip地址;建议定义为NHRP的server为中心站点;
2、tunnel配置完成,所有的分支站点将自己当下的信息发送到NHRP的server处,生成映射列表;
3、此时中心站点可以直接和所有的分支站点进行GRE通讯;分支站点间直接GRE 通讯时,需要先到NHRP的server处下载映射列表,之后再进行GRE通讯;
中心站点:
r1(config)#interface tunnel 0
r1(config-if)#ip address 10.1.1.1 255.255.255.0
r1(config-if)#tunnel source serial 1/2
r1(config-if)#tunnel mode gre multipoint
r1(config-if)#ip nhrp map multicast dynamic 本地成为NHRP的server;
r1(config-if)#ip nhrp network-id 100 所有站点必须处于同一ID内;
multicast 让本设备在目标地址为组播或广播时,将流量基于表中所有的目标单独发送一次;
分支站点:
r2(config)#interface tunnel 0
r2(config-if)#ip address 10.1.1.2 255.255.255.0
r2(config-if)#tunnel source serial 1/2
r2(config-if)#tunnel mode gre multipoint
r2(config-if)#ip nhrp nhs 10.1.1.1 定义NHRP的server,此处必须为tunnel口地址
r2(config-if)#ip nhrp map 10.1.1.1 15.1.1.1 映射tunnel的公网地址
r2(config-if)#ip nhrp network-id 100
注:以上配置完成后,构建NBMA网络成功;
NBMA是在同一个网段内节点数量不做限制,但是当目标ip地址为组播或广播地址时,流量必须逐一发送到每个节点;
若希望分支节点可以以组播或广播地址为目标ip,那么需要定义流量的具体目标
r2(config-if)#ip nhrp map multicast 15.1.1.1
若在MGRE中运行EIGRP协议,若邻居关系不是全部建立,那么可能由于水平分割导致无法正常共享路由条目;
r1(config)#interface tunnel 0
r1(config-if)#no ip split-horizon eigrp 90
R1:静态配置
R1(config)#int s2/0
R1(config-if)#ip address 14.1.1.2 255.255.255.0
R1(config-if)#no shutdown
R1(config)#int s2/1
R1(config-if)#ip address 15.1.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#int lo 1
R1(config-if)#ip address 172.16.1.1 255.255.255.0
R1(config)#ip route 0.0.0.0 0.0.0.0 15.1.1.2
R2:静态配置
R2(config)#int s2/2
R2(config-if)#ip address 25.1.1.1 255.255.0
R2(config-if)#no shutdown
R2(config-if)#int lo 1
R2(config-if)#ip address 172.16.2.1 255.255.255.0
R2(config)#ip route 0.0.0.0 0.0.0.0 25.1.1.2
R3:静态配置
:R3(config)#int s2/3
R3(config-if)#ip address 35.1.1.1 255.255.255.0
R3(config-if)#no shutdown
R3(config-if)#int lo 1
R3(config-if)#ip address 172.16.3.1 255.255.255.0
R3(config)#ip route 0.0.0.0 0.0.0.0 35.1.1.2
R5(ISP):静态配置
R5(config)#int s2/1
R5(config-if)#ip address 15.1.1.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#int s2/2
R5(config-if)#ip address 25.1.1.2 255.255.255.0
R5(config-if)#no shutdown
R5(config-if)#int s2/3
R5(config-if)#ip address 35.1.1.2 255.255.255.0
R5(config-if)#no shutdown
R3(config-if)#int lo 1
R3(config-if)#ip address 172.16.5.1 255.255.255.0
R4:静态配置
R4(config)#int s2/0
R4(config-if)#ip address 14.1.1.1 255.255.255.0
R4(config-if)#int lo 1
R4(config-if)#ip address 172.16.4.1 255.255.255.0
MGRE环境配置:
R1(中心站点):
R1(config)#int tun 1
R1(config-if)#ip address 10.1.1.1 255.255.255.0
R1(config-if)#tunnel source s2/1
R1(config-if)#tunnel mode gre multipoint
R1(config-if)#ip nhrp map multicast dynamic
R1(config-if)#ip nhrp network-id 100
R2(分支站点):
R2(config)#int tun 1
R2(config-if)#ip address 10.1.1.2 255.255.255.0
R2(config-if)#tunnel source s2/2
R2(config-if)#tunnel mode gre multipoint
R2(config-if)#ip nhrp nhs 10.1.1.1
R2(config-if)#ip nhrp map 10.1.1.1 15.1.1.1
R2(config-if)#ip nhrp network-id 100
R3(分支站点):
R2(config)#int tun 1
R2(config-if)#ip address 10.1.1.3 255.255.255.0
R2(config-if)#tunnel source s2/3
R2(config-if)#tunnel mode gre multipoint
R2(config-if)#ip nhrp nhs 10.1.1.1
R2(config-if)#ip nhrp map 10.1.1.1 15.1.1.1
R2(config-if)#ip nhrp network-id 100
分支站点R2,R3开启伪广播
R2(config)#int tun 1
R2(config-if)#ip nhrp map multicast 15.1.1.1
R3(config)#int tun 1
R3(config-if)#ip nhrp map multicast 15.1.1.1
关闭水平分割
R1(config)#int tun 1
R1(config-if)#no ip split-horizon ei
R1(config-if)#no ip split-horizon eigrp 100
运行EIGRP协议:
R1(config)#router eigrp 100
R1(config-router)#no auto-summary
R1(config-router)#network 172.16.1.0
R1(config-router)#network 10.0.0.0
R2(config)#router eigrp 100
R2(config-router)#no auto-summary
R2(config-router)#network 172.16.2.0
R2(config-router)#network 10.0.0.0
R3(config)#router eigrp 100
R3(config-router)#no auto-summary
R3(config-router)#network 172.16.3.0
R3(config-router)#network 10.0.0.0
R4(config)#router eigrp 100
R4(config-router)#no auto-summary
R4(config-router)#network 14.1.1.0
R4(config-router)#network 172.16.4.0
R1上做NAT:
R1(config)#access-list 1 permit 14.0.0.0 0.255.255.255
R1(config)#ip nat inside source list 1 int s2/1 overload
R1(config)#int s2/0
R1(config-if)#ip nat inside
R1(config-if)#int s2/1
R1(config-if)#ip nat outside
1、认证
1)接口认证
【1】接口明文
r1(config)#interface s1/1 连接邻居的接口上配置
r1(config-if)#ip ospf authentication 开启接口明文认证需要,开启后本地hello包中认证类型字段被修改,若邻居间不一致,将无法建立邻居关系
r1(config-if)#ip ospf authentication-key cisco 定义明文认证的秘钥
【2】接口密文
r2(config)#interface s1/1
r2(config-if)#ip ospf authentication message-digest 开启密文认证需要
r2(config-if)#ip ospf message-digest-key 1 md5 cisco123 配置秘钥及编号
2)区域认证---例:在R1上开启关于区域0的明文或密文认证;实际就是在R1上所有的区域0接口配置了明文或密文的认证需求,修改了认证类型字段而已
接口的秘钥还需要到各个接口上逐一匹配
r2(config)#router ospf 1
r2(config-router)#area 1 authentication 区域明文
r2(config-router)#area 1 authentication message-digest 区域密文
3)虚链路认证
r2(config-router)#area 1 virtual-link 4.4.4.4 authentication 先开启明文认证需求
r2(config-router)#area 1 virtual-link 4.4.4.4 authentication-key cisco 在配明文认证密码
密文认证
r2(config-router)#area 1 virtual-link 4.4.4.4 authentication message-digest
r2(config-router)#area 1 virtual-link 4.4.4.4 message-digest-key 1 md5 cisco123
chap认证
R5(主认证方):
R5(config)#int s2/1
R5(config-if)#encapsulation ppp
R5(config-if)#ppp authentication chap
R5(config)#username bt password 123
R1(被认证方):
R1(config)#int s2/1
R1(config-if)#encapsulation ppp
R1(config-if)#ppp chap hostname LN
R1(config-if)#ppp chap password 5486
MGRE及实验的更多相关文章
- MGRE综合实验
实验要求: 实验拓扑: 一. R1-2-3构建星型结构的MGRE结构,R1为中心站点,假设R1的共有IP为固定地址 1. 配置IP地址 2. 配置缺省 3. 配置MGRE环境 在中心站点上: 在分支站 ...
- MGRE实验--内网为OSPF
实验要求: R2为ISP,只能配置IP地址 R1.R3.R4之间构建MGRE环境,仅R1IP地址固定 内网使用OSPF获取路由,全网可达 拓扑: 1.配置IP地址 2.配置缺省 3.配置MGRE环境 ...
- 华为---MGRE实验--内网为RIP
数据链路层封装技术总结: 实验要求与拓扑: 1. 配置IP地址 公网IP地址:12.1.1.0/24.23.1.1.0/24.24.1.1.0/24 tunnel地址:1.1.1.1/24.1.1.1 ...
- OSPF综合实验
实验要求: 1.R4为ISP,其上只能配置IP地址,R4与其他所有直连设备间使用共有IP 2.R3--R5/6/7为MGRE环境,R3为中心站点 3.整个OSPF环境IP地址为172.16.0.0/1 ...
- CCNP之OSPF实验报告
OSPF实验报告 一.实验要求 1.R4为ISP,其上只能配置IP地址:R4与其它所有直连设备间使用公有IP2.R3--R5/6/7为MGRE环境,R3为中心站点3.整个OSPF环境IP地址为172. ...
- CCNP之MERG实验报告
MGRE实验报告 一.实验要求: 1.R5为ISP,只能配置IP地址 2.R1--R3间建立MGRE环境,且使用EIGRP来学习各自环回 3.R4可以正常访问R5的环回 4.R1与R5进行chap认证 ...
- [原] 利用 OVS 建立 VxLAN 虚拟网络实验
OVS 配置 VxLAN HOST A ------------------------------------------ | zh-veth0(10.1.1.1) VM A | | ---|--- ...
- Android中Activity的四大启动模式实验简述
作为Android四大组件之一,Activity可以说是最基本也是最常见的组件,它提供了一个显示界面,从而实现与用户的交互,作为初学者,必须熟练掌握.今天我们就来通过实验演示,来帮助大家理解Activ ...
- SEED实验系列文章目录
美国雪城大学SEEDLabs实验列表 SEEDLabs是一套完整的信息安全实验,涵盖本科信息安全教学中的大部分基本原理.项目组2002年由杜文亮教授创建,目前开发了30个实验,几百所大学已采用.实验楼 ...
随机推荐
- 按钮改变和控制div的形状的html,JavaScript代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- koa-graphql express-graphql 中如何 定义每一个字段resolver执行函数
第一种方式: 首先来看一下,官方给出的koa-graphql的例子, ```js var express = require('express'); var {graphqlHTTP} = requ ...
- HTTP系列之跨域资源共享机制(CORS)介绍
前言 本文将继续解析详解HTTP系列1中的请求/ 响应报文的首部字段,今天带来的跨域资源共享(CORS)机制,具体内容包括CORS的原理.流程.实战,希望能给大家带来收获! CORS简介 跨域资源共享 ...
- elementUI table怎么实现点击上移下移
其实炒鸡简单... <el-table :data='tableData' > ... ... <el-table-column label="操作" al ...
- flutter 设置状态栏的背景与颜色
flutter 设置状态栏的背景与颜色 导包 import 'dart:io'; import 'package:flutter/services.dart'; 在main()函数中添加以下函数, v ...
- Android开发必有功能,更新版本提示,检测是否有新版本更新。下载完成后进行安装。
作者:程序员小冰,CSDN博客:http://blog.csdn.net/qq_21376985,转载请说明出处. 给大家介绍个东西,MarkDown真的超级超级好用.哈哈.好了, 正题内容如下: 先 ...
- Fitness - 05.08
倒计时237天 运动34分钟,共计8组,3.4公里.拉伸10分钟. 每组跑步2分钟(6.6KM/h),走路2分钟(6KM/h). 最近掉了几斤,所以今天状态感觉特别好. 虽然每天在拼命学习Unity, ...
- AOP理论
目录 AOP理论 什么是AOP 那Spring AOP,AspectJ又是啥呢? 为什么说AOP是OOP的补充和完善呢? 应用场景举例 AOP的优点 AOP的术语整理 AOP理论 什么是AOP AOP ...
- 手写mybatis框架
前言 很久没有更新mybatis的源码解析了,因为最近在将自己所理解的mybatis思想转为实践. 在学习mybatis的源码过程中,根据mybatis的思想自己构建了一个ORM框架 .整个代码都是自 ...
- SSM整合+WebUpload使用(spring+springmvc+mybatis+maven)
SSM框架整合以及webupload的集成与使用 在项目中最近用到了webupload.js,也方方面面遇到了不少问题,比如上传文件前对表单参数校验,当校验失败不予提交,及在文件上传成功后,选择同 ...