多厂商VPN系列之十三:VPN综合实验分享 | 网络之路博客(公众号同名)(其他平台网络之路Blog)
登录
  • 欢迎网络之路博客网站,分享有用的知识点,公众号:网络之路博客,B站:网络之路Blog
  • 如果您觉得本站对您有帮助,那么赶紧使用Ctrl+D 收藏吧,支持我们下
  • 远程技术支持的淘宝店铺已经开张了哦,传送门:需要的朋友可以点击查看

多厂商VPN系列之十三:VPN综合实验分享

【汇总】学习VPN其实很简单

文档帖子汇总学习视频Book与实验手册学习必备软件
    博主也只是业余时间写写技术文档,请大家见谅,大家觉得不错的话,可以推荐给朋友哦,博主会努力推出更好的系列文档的。如果大家有任何疑问或者文中有错误跟疏忽的地方,欢迎大家留言指出,博主看到后会第一时间修改,谢谢大家的支持,更多技术文章尽在网络之路博客,http://ccieh3c.com

一、拓扑

 image001.png

一个小的综合实验,包括路由协议、tunnel、IPSEC等结合在一起。

二、配置

ROUTER 1
————————————————-

int lo0
ip add 1.1.1.1 255.255.255.0
no sh
int s1/0
clock rate 64000
ip add 15.1.1.1 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 15.1.1.0

int tun 1 // vpn隧道1
ip add 12.1.1.1 255.255.255.0
tun sour s1/0
tun dest 25.1.1.2
router eigrp 100 //eigrp 路由协议
no au
net 1.1.1.0 0.0.0.255
net 12.1.1.0

crypto isakmp policy 10 //ipsec策略编号1-1000,号越小,优先级越高
hash md5 // 密钥认证的算法
authentication pre-share // 告诉路由使用预先共享的密钥
exit
crypto isakmp key cisco14 address 47.1.1.4 // 设置密钥cisco14 , 对端ip地址
crypto ipsec transform-set TOR4 esp-des esp-md5-hmac
// 设置test传输模式的名称。ah-md5-hamc esp-des表示传输模式中采用的验证和加密参数
crypto map IPSecVPN 10 ipsec-isakmp
// 设置map的名字,10是策略的编号
set peer 47.1.1.4 // 设置对端的IP 地址
set transform-set TOR4 // IPSec传输模式的名字TOR4
match address 100 //映射匹配acl
exit
interface Serial1/0 //进入应用VPN的接口
crypto map IPSecVPN //IPSecVPN map的名字
exit
access-list 100 permit ip 1.1.1.0 0.0.0.255 4.4.4.0 0.0.0.255 // 定义哪些地址的报文加密或是不加密

int tun 0 // vpn隧道0
ip add 13.1.1.1 255.255.255.0
tun sour s1/0
tun dest 37.1.1.3
router eigrp 100
no au
net 3.3.3.0 0.0.0.255
net 13.1.1.0

crypto isakmp policy 20
hash md5
authentication pre-share
exit
crypto isakmp key cisco13 address 37.1.1.3
crypto ipsec transform-set TOR3 esp-des esp-md5-hmac
crypto map IPSecVPN 20 ipsec-isakmp
set peer 37.1.1.3
set transform-set TOR3
match address 150
exit
interface Serial1/0
crypto map IPSecVPN
exit
access-list 150 permit ip 1.1.1.0 0.0.0.255 3.3.3.0 0.0.0.255

ip route 0.0.0.0 0.0.0.0 5.5.5.5 //默认路由

conf t
wr

ROUTER 2
————————————————-
int lo0
ip add 2.2.2.2 255.255.255.0
no sh
int s1/0
ip add 25.1.1.2 255.255.255.0
clock rate 64000
no sh
int tun 1 // vpn隧道1
ip add 12.1.1.2 255.255.255.0
tun sour s1/0
tun des 15.1.1.1
router rip //rip 路由协议
ver 2
no au
net 25.1.1.0
router eigrp 100 //eigrp 路由协议
no au
net 12.1.1.0
net 2.2.2.0 0.0.0.255

ROUTER 3
————————————————-
int lo0
ip add 3.3.3.3 255.255.255.0
no sh
int s1/0
ip add 37.1.1.3 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 37.1.1.0

int tun 0
ip add 13.1.1.3 255.255.255.0
tun sour s1/0
tun dest 15.1.1.1
exit
router eigrp 100 //eigrp 路由协议
no au
net 3.3.3.0 0.0.0.255
net 13.1.1.0

crypto isakmp policy 20
hash md5
authentication pre-share
exit
crypto isakmp key cisco13 address 15.1.1.1
crypto ipsec transform-set TOR1 esp-des esp-md5-hmac
crypto map IPSecVPN 20 ipsec-isakmp
set peer 15.1.1.1
set transform-set TOR1
match address 150
exit
interface Serial1/0
crypto map IPSecVPN
exit
access-list 150 permit ip 1.1.1.0 0.0.0.255 3.3.3.0 0.0.0.255

ROUTER 4
————————————————-
int lo0
ip add 4.4.4.4 255.255.255.0
no sh
int s1/0
ip add 47.1.1.4 255.255.255.0
no sh
router rip //rip 路由协议
ver 2
no au
net 47.1.1.0

ip route 0.0.0.0 0.0.0.0 7.7.7.7 //默认路由

crypto isakmp policy 10
hash md5
authentication pre-share
exit
crypto isakmp key cisco14 address 15.1.1.1
crypto ipsec transform-set TOR1 esp-des esp-md5-hmac
crypto map IPSecVPN 10 ipsec-isakmp
set peer 15.1.1.1
set transform-set TOR1
match address 100
exit
interface Serial1/0
crypto map IPSecVPN
exit
access-list 100 permit ip 1.1.1.0 0.0.0.255 4.4.4.0 0.0.0.255

ROUTER 5
————————————————-
interface Loopback0
ip address 5.5.5.5 255.255.255.0
int s1/0
ip add 15.1.1.5 255.255.255.0
no sh
int s1/1
ip add 25.1.1.5 255.255.255.0
no sh
int s1/2
ip add 56.1.1.5 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 15.1.1.0
net 25.1.1.0
net 56.1.1.0

ip route 0.0.0.0 0.0.0.0 1.1.1.1 //默认路由
ip route 0.0.0.0 0.0.0.0 6.6.6.6

ROUTER 6
————————————————-

interface Loopback0
ip address 6.6.6.6 255.255.255.0
int s1/0
ip add 56.1.1.6 255.255.255.0
no sh
int s1/1
ip add 67.1.1.6 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 56.1.1.0
net 67.1.1.0

ip route 0.0.0.0 0.0.0.0 5.5.5.5 //默认路由
ip route 0.0.0.0 0.0.0.0 7.7.7.7

ROUTER 7
————————————————-
interface Loopback0
ip address 7.7.7.7 255.255.255.0
int s1/0
ip add 67.1.1.7 255.255.255.0
no sh
int s1/1
ip add 37.1.1.7 255.255.255.0
clock rate 64000
no sh
int s1/2
ip add 47.1.1.7 255.255.255.0
clock rate 64000
no sh
router rip //rip 路由协议
ver 2
no au
net 67.1.1.0
net 37.1.1.0
net 47.1.1.0
ip route 0.0.0.0 0.0.0.0 6.6.6.6 //默认路由
ip route 0.0.0.0 0.0.0.0 4.4.4.4

三、验证

 image002.jpg
 image003.jpg
 image004.jpg
 image005.jpg

下载对应文档

百度盘下载博客资源汇总与学习思路
如果下载地址失效,请联系博主或者在下面留言,谢谢。下面也有其他您需要的资源推荐哦

关于博客资源下载说明

首先,感谢大家对网络之路博客的支持,本站所有资源都是开放下载,不做任何限制,资源都是上传在百度盘,分为两种类型:
(1)第一种是书籍PDF与视频类,全部放在博客分享,觉得对大家学习有帮助的博主会收集好、然后以博主的经验整理分类后排序好分享出来。
(2)第二种是技术性文章与视频,全部放在公众号(网络之路博客)/B站(网络之路Blog)发布,以博主原创为主,主要分享系列为主,由浅入深的带大家了解工作中常用到的一些网络技术,当然也会分享一些比较经典的案例。
(3)分享资源有涉及到您的利益以及版权问题,请联系博主,24小时候内删除。
想第一时间收到最新更新内容吗,点击获取~~~

点击查看详情

(广告)博主自主原创最新实战课程

点击查看详情


(广告)远程技术支持(设备调试),有搞不定的找我,价格实惠,为您解决实际工作上的问题

远程技术调试与技术支持,点击查看详情


原创与收集的内容,允许转载,转载时请务必以超链接形式标明文章原始出处,博客地址http://ccieh3c.com。

喜欢 (1)
[]
分享 (0)
公众号:网络之路博客(其他平台网络之路Blog)
分享一些自己懂的技术知识点,希望对大家有帮助。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址