当前位置: 首页 > news >正文

DSVPN综合实验

DSVPN综合实验

一.实验拓扑

在这里插入图片描述

二.实验要求

1,R5为ISP,,只能进行IP地址配置;其所有地址均配为公有IP地址
2,R1和R5间使用ppp的PAP认证,R5为主认证方;
R2于R5之间使用ppp的chap认证,R5为主认证方,
R3于R5之间使用HDLC封装。
3,R1/R2/R3构建一个MGRE环境,R1为中心站点;R1、R4间为点到点的GRE。
4,整个私有网络基于RIP全网可达
5,所有PC设置私有IP为源IP,可以访问R5环回。

三.实验过程

1、配置ip及环回

r1
[r1]int s 4/0/0
[r1-Serial4/0/0]ip add 15.0.0.1 24
[r1-Serial4/0/0]int g 0/0/0
[r1-GigabitEthernet0/0/0]ip add 192.168.1.1 24
[r1-GigabitEthernet0/0/0]q

r2
[r2]int s 4/0/0
[r2-Serial4/0/0]ip add 25.0.0.1 24
[r2-Serial4/0/0]int g 0/0/1
[r2-GigabitEthernet0/0/1]ip add 192.168.2.1 24
[r2-GigabitEthernet0/0/1]q

r3
[r3]int s 4/0/0
[r3-Serial4/0/0]ip add 35.0.0.1 24
[r3-Serial4/0/0]int g 0/0/1
[r3-GigabitEthernet0/0/1]ip add 192.168.3.1 24
[r3-GigabitEthernet0/0/1]q
[r3]

r4
[r4]int g0/0/0
[r4-GigabitEthernet0/0/0]ip add 45.0.0.1 24
[r4-GigabitEthernet0/0/0]int g0/0/1
[r4-GigabitEthernet0/0/1]ip add 192.168.4.1 24
[r4-GigabitEthernet0/0/1]

r5(isp)
[isp]int s 3/0/0
[isp-Serial3/0/0]ip add 15.0.0.2 24
[isp-Serial3/0/0]int s 3/0/1
[isp-Serial3/0/1]ip add 25.0.0.2 24
[isp-Serial3/0/1]int s 4/0/0
[isp-Serial4/0/0]ip add 35.0.0.2 24
[isp-Serial4/0/0]int g 0/0/0
[isp-GigabitEthernet0/0/0]ip add 45.0.0.2 24
[isp-GigabitEthernet0/0/0]int l0
[isp-LoopBack0]ip add 5.5.5.5 24
[isp-LoopBack0]q

2、私网边界路由器配一条缺省指向isp

[r1]ip route-static 0.0.0.0 0 15.0.0.2
[r2]ip route-static 0.0.0.0 0 25.0.0.2
[r3]ip route-static 0.0.0.0 0 35.0.0.2
[r4]ip route-static 0.0.0.0 0 45.0.0.2

3、r1的pap认证,r2的chap认

[isp]aaa
[isp-aaa]local-user r1 password cipher 123456
Info: Add a new user.
[isp-aaa]lo
[isp-aaa]local-user r1 se
[isp-aaa]local-user r1 service-type ppp
[isp-aaa]q
[isp]
[isp]int s 3/0/0
[isp-Serial3/0/0]ppp a
[isp-Serial3/0/0]ppp authentication-mode pap

[r1]int s 4/0/0
[r1-Serial4/0/0]ppp pap local-user r1 password cipher 123456
[r1-Serial4/0/0]

ISP创建一个用户名和密码来提供r2进行ppp的chap认证
[isp]aaa
[isp-aaa]local-user r2 password cipher 123456
Info: Add a new user.
[isp-aaa]local-user r2 service-type ppp
[isp-aaa]q
[isp]int s 3/0/1
[isp-Serial3/0/1]ppp authentication-mode chap
[isp-Serial3/0/1]

[r2]int s 4/0/0
[r2-Serial4/0/0]ppp chap user r2
[r2-Serial4/0/0]ppp chap password cipher 123456
[r2-Serial4/0/0]q
[r2]
[r2-Serial4/0/0]shutdown
[r2-Serial4/0/0]undo shutdown
等待接口重新起来之后在ping25.0.0.2

4、r3和r5之间使用HDLC封装

更改串线协议,注意r3和r5都要更改,否则协议对不上,导致失败
[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
[isp]int s 4/0/0
[isp-Serial4/0/0]link
[isp-Serial4/0/0]link-protocol h
[isp-Serial4/0/0]link-protocol hdlc
Warning: The encapsulation protocol of the link will be changed. Continue? [Y/N]
:y

5、搭建MGRE环境基于192.168.5.0网段,在r1上创建中心站点,开启伪广播,其他路由器当作分支站点,加入r1中心域,配置Tunnel接口的隧道协议为GRE、配置Tunnel的源地址,目的地址

r1创建虚拟接口
[r1]int t 0/0/0
[r1-Tunnel0/0/0]ip add 192.168.5.1 24
[r1-Tunnel0/0/0]
[r1-Tunnel0/0/0]

选择封装类型
[r1-Tunnel0/0/0]tun
[r1-Tunnel0/0/0]tunnel-protocol gre p2mp
[r1-Tunnel0/0/0]source 15.0.0.1

通过nhrp协议获取目标IP
[r1-Tunnel0/0/0]nhrp n
[r1-Tunnel0/0/0]nhrp network-id 100
[r1-Tunnel0/0/0]nhrp entry multicast dynamic

r2分支站点
[r2]int t 0/0/0
[r2-Tunnel0/0/0]ip add 192.168.5.2 24
[r2-Tunnel0/0/0]tunnel-protocol gre p2mp

分支允许出接口发生变化
[r2-Tunnel0/0/0]source Serial 4/0/0

加入r1中心域
[r2-Tunnel0/0/0]nhrp network-id 100
[r2-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

r3重复r2配置
[r3]int t 0/0/0
[r3-Tunnel0/0/0]ip add 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]nhrp network-id 100
[r3-Tunnel0/0/0]nhrp entry 192.168.5.1 15.0.0.1 register

r1进行测试,r2,r3添加成功
r1,r4做点到点的GRE

[r1]int t 0/0/1
[r1-Tunnel0/0/1]ip add 192.168.6.1 24
[r1-Tunnel0/0/1]tunnel-protocol gre
[r1-Tunnel0/0/1]source 15.0.0.1
[r1-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]destination 15.0.0.1

6、r1~r4配置ripv2

r1进行宣告
[r1]rip
[r1-rip-1]v 2
[r1-rip-1]
[r1-rip-1]net
[r1-rip-1]network 192.168.1.0
[r1-rip-1]network 192.168.5.0
[r1-rip-1]network 192.168.6.0

r2进行宣告
[r2]rip
[r2-rip-1]v 2
[r2-rip-1]ne
[r2-rip-1]network 192.168.2.0
[r2-rip-1]network 192.168.5.0
[r2-rip-1]

r3进行宣告
[r3]rip
[r3-rip-1]
[r3-rip-1]v 2
[r3-rip-1]
[r3-rip-1]net
[r3-rip-1]network 192.168.5.0
[r3-rip-1]network 192.168.3.0
[r3-rip-1]

r4进行宣告
[r4]rip
[r4-rip-1]v 2
[r4-rip-1]ne
[r4-rip-1]network 192.168.4.0
[r4-rip-1]network 192.168.6.0

7、pc配地址,并且r1~r4做nat

pc端设置私有IP

在边界设备做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 s 4/0/0
[r1-Serial4/0/0]nat outbound 2000

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

r3
[r3]acl 2000
[r3-acl-basic-2000]rule permit source 192.168.3.0 0.0.0.255
[r3-acl-basic-2000]q
[r3]int s 4/0/0
[r3-Serial4/0/0]nat outbound 2000
[r3-Serial4/0/0]q

r4
[r4]acl 2000
[r4-acl-basic-2000]rule permit source 192.168.4.0 0.0.0.255
[r4-acl-basic-2000]q
[r4]int g 0/0/0
[r4-GigabitEthernet0/0/0]nat outbound 2000

相关文章:

  • 【JAVA基础之网络编程】UDP和TCP协议以及三次握手和四次挥手的过程
  • 【游戏引擎】Unity脚本基础 开启游戏开发之旅
  • Linux完整版命令大全(九)
  • Leecode热题100---55:跳跃游戏(贪心算法)
  • C++的模板(七):左值强制类型转换
  • ​Java基础复习笔记 第16章:网络编程
  • Ansible自动化运维中的Setup收集模块应用详解
  • 码蹄集部分题目(2024OJ赛16期;单调栈集训+差分集训)
  • 数据结构——栈(详细分析)
  • 渗透测试 一个很奇怪的支付漏洞
  • Day17学习Java
  • 1小时从0开始搭建自己的直播平台(详细步骤)
  • BGP策略实验
  • 向传音手机学习产品市场定位与产品需求定义
  • 数字签名:确保信息完整性和身份验证的关键技术
  • Consul Config 使用Git做版本控制的实现
  • docker python 配置
  • eclipse(luna)创建web工程
  • github指令
  • Magento 1.x 中文订单打印乱码
  • Redash本地开发环境搭建
  • supervisor 永不挂掉的进程 安装以及使用
  • Travix是如何部署应用程序到Kubernetes上的
  • VuePress 静态网站生成
  • XForms - 更强大的Form
  • 初识MongoDB分片
  • 构建二叉树进行数值数组的去重及优化
  • 回顾2016
  • 你真的知道 == 和 equals 的区别吗?
  • 普通函数和构造函数的区别
  • 如何合理的规划jvm性能调优
  • 深度学习中的信息论知识详解
  • 数据科学 第 3 章 11 字符串处理
  • 微信小程序实战练习(仿五洲到家微信版)
  • 项目实战-Api的解决方案
  • 译米田引理
  • 用简单代码看卷积组块发展
  • 06-01 点餐小程序前台界面搭建
  • 国内开源镜像站点
  • 国内唯一,阿里云入选全球区块链云服务报告,领先AWS、Google ...
  • ​HTTP与HTTPS:网络通信的安全卫士
  • ​七周四次课(5月9日)iptables filter表案例、iptables nat表应用
  • ​香农与信息论三大定律
  • ​字​节​一​面​
  • ‌分布式计算技术与复杂算法优化:‌现代数据处理的基石
  • #每天一道面试题# 什么是MySQL的回表查询
  • (2)空速传感器
  • (html转换)StringEscapeUtils类的转义与反转义方法
  • (MonoGame从入门到放弃-1) MonoGame环境搭建
  • (Python) SOAP Web Service (HTTP POST)
  • (STM32笔记)九、RCC时钟树与时钟 第一部分
  • (力扣记录)1448. 统计二叉树中好节点的数目
  • (六)c52学习之旅-独立按键
  • (企业 / 公司项目)前端使用pingyin-pro将汉字转成拼音
  • (全部习题答案)研究生英语读写教程基础级教师用书PDF|| 研究生英语读写教程提高级教师用书PDF