环境拓扑图

R1配置

接口配置

R1#configure terminal
R1(config)#interface ethernet 1/0
R1(config-if)#no shutdown
R1(config-if)#ip address 30.1.1.2 255.255.255.0
R1(config-if)#exit
R1(config)#interface ethernet 1/1
R1(config-if)#no shutdown
R1(config-if)#ip address 172.16.1.193 255.255.255.0
R1(config-if)#exit

IPSec配置

# ike密钥配置
R1(config)#crypto ikev2 keyring ike_key  # 生成ike密钥名称
R1(config-ikev2-keyring)#peer 20.1.1.1  # 对端IP
R1(config-ikev2-keyring-peer)#address 20.1.1.1  # 添加对端IP
R1(config-ikev2-keyring-peer)#pre-shared-key 123456  # 配置预共享密钥
R1(config-ikev2-keyring-peer)#exit
R1(config-ikev2-keyring)#exit
# IKEv2一阶段配置
R1(config)#crypto ikev2 profile ike_pro  # 生成ike概要名称
R1(config-ikev2-profile)#match identity remote address 20.1.1.1 255.255.255.255  # 配置对端ike IP地址
R1(config-ikev2-profile)#authentication remote pre-share  # 设置对端认证方式为预共享密钥
R1(config-ikev2-profile)#authentication local pre-share  # 设置本端认证方式为预共享密钥
R1(config-ikev2-profile)#keyring local ike_key  # 关联预共享密钥配置
R1(config-ikev2-profile)#exit
# IKEv2二阶段配置
R1(config)#crypto ipsec profile ipsec_pro  # 配置IPSec名称并进入配置
R1(ipsec-profile)#set ikev2-profile ike_pro  # 关联ike配置
R1(ipsec-profile)#set pfs group2  # 设置pfs为2
R1(ipsec-profile)#exit
# tunnel口配置
R1(config)#interface tunnel 0  # 进入tunnel口
R1(config-if)#ip address 30.30.30.2 255.255.255.0  # 关闭tunnel口IP
R1(config-if)#tunnel source ethernet 1/0  # 配置本端为接口
R1(config-if)#tunnel destination 20.1.1.1  # 配置对端为IP
R1(config-if)#tunnel protection ipsec profile ipsec_pro  # 关联IPSec配置
R1(config-if)#exit

路由配置

R1(config)#ip route 20.1.1.0 255.255.255.0 30.1.1.1
R1(config)#ip route 10.1.1.0 255.255.255.0 tunnel 0  # 配置路由进入tunnel口

R2配置

接口配置

R2#configure ter
R2(config)#interface ethernet 1/0
R2(config-if)#ip address 30.1.1.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#interface ethernet 1/1
R2(config-if)#ip address 20.1.1.2 255.255.255.0
R2(config-if)#no shutdown

R3配置

接口配置

R3#configure terminal
R3(config)#interface ethernet 1/1
R3(config-if)#no shutdown
R3(config-if)#ip address 20.1.1.1 255.255.255.0
R3(config-if)#exit
R3(config)#interface ethernet 1/0
R3(config-if)#no shutdown
R3(config-if)#ip address 10.1.1.2 255.255.255.0
R3(config-if)#exit

IPSec配置

# ike密钥配置
R3(config)#crypto ikev2 keyring ike_key  # 生成ike密钥名称
R3(config-ikev2-keyring)#peer 30.1.1.2  # 对端IP
R3(config-ikev2-keyring-peer)#address 30.1.1.2  # 添加对端IP
R3(config-ikev2-keyring-peer)#pre-shared-key 123456  # 配置预共享密钥
R3(config-ikev2-keyring-peer)#exit
R3(config-ikev2-keyring)#exit
# IKEv2一阶段配置
R3(config)#crypto ikev2 profile ike_pro  # 生成ike概要名称
R3(config-ikev2-profile)#match identity remote address 30.1.1.2 255.255.255.255  # 配置对端ike IP地址
R3(config-ikev2-profile)#authentication remote pre-share  # 设置对端认证方式为预共享密钥
R3(config-ikev2-profile)#authentication local pre-share  # 设置本端认证方式为预共享密钥
R3(config-ikev2-profile)#keyring local ike_key  # 关联预共享密钥配置
R3(config-ikev2-profile)#exit
# IKEv2二阶段配置
R3(config)#crypto ipsec profile ipsec_pro  # 配置IPSec名称并进入配置
R3(ipsec-profile)#set ikev2-profile ike_pro  # 关联ike配置
R3(ipsec-profile)#set pfs group2  # 设置pfs为2
R3(ipsec-profile)#exit
# tunnel口配置
R3(config)#interface tunnel 0  # 进入tunnel口
R3(config-if)#ip address 30.30.30.1 255.255.255.0  # 关闭tunnel口IP
R3(config-if)#tunnel source ethernet 1/1  # 配置本端为接口
R3(config-if)#tunnel destination 30.1.1.2  # 配置对端为IP
R3(config-if)#tunnel protection ipsec profile ipsec_pro  # 关联IPSec配置
R3(config-if)#exit

路由配置

R3(config)#ip route 30.1.1.0 255.255.255.0 20.1.1.2
R3(config)#ip route 172.16.1.0 255.255.255.0 tunnel 0  # 配置路由进入tunnel口
R3(config)#end

R4配置

接口配置

R4#conf terminal
R4(config)#interface ethernet 1/0
R4(config-if)#ip address 10.1.1.1 255.255.255.0
R4(config-if)#no shutdown
R4(config-if)#exit

路由配置

R4(config)#ip route 0.0.0.0 0.0.0.0 10.1.1.2
R4(config)#end

结果截图

思科cisoc 路由器IKEv2配置ipsec tunnel口隧道相关推荐

  1. 神州数码防火墙与路由器之间配置IPSec

    路由器与路由器之间的可以去看这篇博客 路由器与路由器之间配置IPSec 互联网安全协议(英语:Internet Protocol Security,缩写为IPsec),是一个协议簇,通过对IP协议的分 ...

  2. 配置IPsec Tunnel With TACACS+ User Authentication

    配置IPsec Tunnel With TACACS+ User Authentication 详细配置见附件 转载于:https://blog.51cto.com/xuanbo/122571

  3. 思科交换机路由器综合配置_如何配置思科路由器和交换机密码?

    思科交换机路由器综合配置 Hi, today we will look to configure Cisco routers and switches with a password. It may ...

  4. 思科交换机路由器 连接配置步骤

    我讲CCNA大多使用模拟软件Packet Tracer和GNS3.大家学会了如何在模拟软件下配置思科路由器和交换机,但是在工作中如何使用计算机连接路由器和交换机进行配置,依然是没有概念,当我们买回一台 ...

  5. cisco配置主机计算机连接,思科交换机路由器 连接配置步骤

    我讲CCNA大多使用模拟软件Packet Tracer和GNS3.大家学会了如何在模拟软件下配置思科路由器和交换机,但是在工作中如何使用计算机连接路由器和交换机进行配置,依然是没有概念,当我们买回一台 ...

  6. cisco packet tracer路由器配置_【干货】思科交换机路由器怎么配置密码?

    今天带大家看看如何在思科的交换机路由器当中配置安全特性,也就是密码的配置方式. 在学习配置之前,我们先回顾一下密码相关知识. 密码学是研究信息系统安全保密的科学.人类有记载的通信密码始于公元前400年 ...

  7. 思科交换机配置试题_【干货】思科交换机路由器怎么配置密码?

    今天带大家看看如何在思科的交换机路由器当中配置安全特性,也就是密码的配置方式. 在学习配置之前,我们先回顾一下密码相关知识. 密码学是研究信息系统安全保密的科学.人类有记载的通信密码始于公元前400年 ...

  8. 思科2811路由器的配置命令!

    Access-enable 允许路由器在动态访问列表中创建临时访问列表入口 Access-group 把访问控制列表(ACL)应用到接口上 Access-list 定义一个标准的IP ACL Acce ...

  9. 思科(Cisco)路由器策略路由配置详解

    策略路由是路由优化的常用方法.在做路由牵引时很多情况都要用到策略路由. 网络拓扑 R2的E1\E2口分别与R3的E1\E2口相连. 先配置好静态路由,使192.168.2.X与192.168.1.X互 ...

最新文章

  1. Confluence 6 如何配置快速导航的同时查找数量
  2. 【机器学习基础】用Python画出几种常见机器学习二分类损失函数
  3. linux 上安装ntop
  4. Ajax和Jsonp实践
  5. 最大团问题-分支限界
  6. 交换两个数不是三个数。
  7. [BZOJ1602BZOJ1787BZOJ2144]树上LCA的算法巩固练习
  8. 如何在 Mac 上重置网络设置?
  9. 对我启发最大的数学学习方法(转自知乎)
  10. java的数据类型有哪些_java数据类型有哪些
  11. ASO优化图标篇:App图标优化的几点建议
  12. 来一起学习脚本语言吧,简单,高效,解放双手,感受自由!
  13. 生活污水是怎么处理的
  14. 关于 Delphi 中流的使用(9) 分割与合并文件的函数
  15. E-Learning应用四人谈
  16. WinRAR文件图标问题
  17. 如何实现iOS热更新
  18. linux病毒库离线升级,更新clamav病毒库的方法
  19. 行业案例 | 汽车售后服务升级,AR 应用成为差异化优势
  20. 请使用命令行统计各tcp状态的数量_TCP 连接状态及相关命令学习

热门文章

  1. 有关FLOPS的定义与计算
  2. 201771010137 赵栋《面向对象程序设计(java)》第十六周学习总结
  3. 对薛兆丰经济学思维的研究:价格的教益
  4. 7-7 到底是不是太胖了(10 分)
  5. 精美中文简历LaTex模板集锦
  6. jQuery中的end()方法使用介绍
  7. CV中一些常见的特征点
  8. c#拼图碎片形状_将碎片拼成完整的拼图
  9. 高中信息技术项目化教学开题报告
  10. jenkins + svn + maven +svn 实现当SVN提交代码后自动触发打包部署