H3C MSR系列路由器IPsec典型配置举例(V7)

合集下载

H3C MSR系列路由器 IPSec配置

H3C MSR系列路由器 IPSec配置
..................................................................................................................................... 1-1 1.1 IPSec简介 ......................................................................................................................................... 1-1 1.1.1 IPSec的实现 ........................................................................................................................... 1-1 1.1.2 IPSec基本概念........................................................................................................................ 1-2 1.1.3 加密卡..................................................................................................................................... 1-4 1.1.4 协议规范 ................................................................................................................................. 1-4 1.2 IPSec配置任务简介 ........................................................................................................................... 1-4 1.3 配置访问控制列表 ............................................................................................................................. 1-5 1.4 配置安全提议..................................................................................................................................... 1-5 1.5 配置安全策略..................................................................................................................................... 1-6 1.5.1 手工配置安全策略................................................................................................................... 1-6 1.5.2 配置IKE协商安全策略............................................................................................................. 1-7 1.6 在接口上应用安全策略组 ................................................................................................................ 1-10 1.7 在加密卡接口上绑定安全策略组或者安全策略................................................................................ 1-11 1.8 使能加密引擎功能 ........................................................................................................................... 1-11 1.9 使能主体软件备份功能 .................................................................................................................... 1-12 1.10 配置会话空闲超时时间 .................................................................................................................. 1-12 1.11 使能解封装后IPSec报文的ACL检查功能 ...................................................................................... 1-12 1.12 配置IPSec抗重放功能 ................................................................................................................... 1-13 1.13 配置共享源接口安全策略组........................................................................................................... 1-14 1.14 配置QoS预分类功能...................................................................................................................... 1-14 1.15 IPSec显示和维护........................................................................................................................... 1-15 1.16 IPSec典型配置举例 ....................................................................................................................... 1-15 1.16.1 采用手工方式建立IPSec安全隧道....................................................................................... 1-15 1.16.2 采用IKE方式建立IPSec安全隧道 ........................................................................................ 1-18 1.16.3 使用加密卡进行加/解密和认证............................................................................................ 1-20 1.16.4 配置IPSec接口备份 ............................................................................................................ 1-23

H3C-MSR路由器配置

H3C-MSR路由器配置

H3C-MSR路由器配置路由器作为网络中的重要设备之一,扮演着连接不同网络、实现数据转发的关键角色。

H3C-MSR路由器作为一款功能强大、性能稳定的产品,被广泛应用于各种规模的网络中。

为了使H3C-MSR路由器能够正常工作并满足网络需求,正确的配置是至关重要的。

本文将详细介绍H3C-MSR路由器的配置方法,帮助用户快速上手。

一、基本配置1. 连接路由器首先,使用网线将H3C-MSR路由器的Console接口与计算机的串口相连。

然后,使用串口终端工具,如SecureCRT等,通过串口连接到路由器。

打开终端工具后,选择正确的串口号和波特率,确保与路由器连接成功。

2. 登录路由器成功连接到路由器后,输入登录用户名和密码,即可登录路由器的命令行界面。

默认的用户名为admin,密码为空。

为了提高安全性,建议用户在首次登录后立即修改密码。

3. 设定主机名在路由器命令行界面下,通过以下命令来为路由器设定一个主机名:configure terminalhostname <主机名>exit二、接口配置1. 配置接口IP地址为了使路由器能够与其他设备进行通信,需要为其配置IP地址。

假设要为接口GigabitEthernet 0/0/1配置IP地址为192.168.1.1,子网掩码为255.255.255.0,可以在命令行界面下执行以下命令:interface GigabitEthernet 0/0/1ip address 192.168.1.1 255.255.255.02. 配置接口描述接口描述功能可以使管理员更好地管理和识别各个接口。

为了对接口GigabitEthernet 0/0/1进行描述,可以使用以下命令:interface GigabitEthernet 0/0/1description <描述信息>3. 配置接口速率和双工模式根据网络需求和接口连接设备的性能要求,可以配置接口的速率和双工模式。

H3C v7版本 ipsec over gre配置指导

H3C v7版本 ipsec over gre配置指导

Ipsec over gre配置RT1和RT3用环回口来模拟私网上的接口。

它们的封装方式是先封装ipsec,然后在进行gre的封装,所以在ipsec的ACL中要匹配的事两端私网的地址。

报文的封装格式:指定Tunnel口源接口地址[H3C-Tunnel0]source 10.1.1.1指定Tunnel口目的端地址[H3C-Tunnel0]destination 20.1.1.2[H3C-Tunnel0] quit创建访问控制列表[H3C]acl advanced 3000[H3C-acl-ipv4-adv-3000]rule 0 permit ip source 192.168.1.1 0.0.0.0 destination 1 92.168.2.1 0.0.0.0[H3C-acl-ipv4-adv-3000]quit创建ipsec安全提议tran1[H3C]ipsec transform-set tran1指定安全协议的工作模式为隧道模式[H3C]ike profile profile1绑定ike keychain[H3C-ike-profile-profile1]keychain ike1配置本地封装的IP地址[H3C-ike-profile-profile1]local-identity address 100.1.1.1配置对端封装的IP地址[H3C-ike-profile-profile1]match remote identity address 100.1.1.2 24 [H3C-ike-profile-profile1]quit创建一条ike协商方式的ipsec安全策略,序列号为1,名字为policy1 [H3C]ipsec policy policy1 1 isakmp指定引用ACL3000[H3C-ipsec-policy-isakmp-policy1-1]security acl 3000[H3C-rip-1]network 10.1.1.1RT2的主要配置:<H3C>system-view[H3C]interface GigabitEthernet 0/0[H3C-GigabitEthernet0/0]ip address 10.1.1.2 24[H3C-GigabitEthernet0/0]quit[H3C]interface GigabitEthernet 0/1[H3C-GigabitEthernet0/1] ip address 20.1.1.1 24 [H3C-GigabitEthernet0/1]quit配置rip路由协议[H3C]rip[H3C-rip-1]version 2[H3C-rip-1]undo summary[H3C-rip-1]network 10.1.1.2指定Tunnel口源接口地址[H3C-Tunnel0]source 20.1.1.2指定Tunnel口目的端地址[H3C-Tunnel0]destination 10.1.1.1[H3C-Tunnel0] quit创建访问控制列表[H3C]acl advanced 3000[H3C-acl-ipv4-adv-3000]rule 0 permit ip source 192.168.2.1 0.0.0.0 destination 192.168.1.1 0.0.0.0[H3C-acl-ipv4-adv-3000]quit创建ipsec安全提议tran1[H3C]ipsec transform-set tran1指定安全协议的工作模式为隧道模式[H3C]ike profile profile1绑定ike keychain[H3C-ike-profile-profile1]keychain ike1配置本地封装的IP地址[H3C-ike-profile-profile1]local-identity address 100.1.1.2配置对端封装的IP地址[H3C-ike-profile-profile1]match remote identity address 100.1.1.1 24[H3C-ike-profile-profile1]quit创建一条ike协商方式的ipsec安全策略,序列号为1,名字为policy1[H3C]ipsec policy policy1 1 isakmp指定引用ACL3000[H3C-ipsec-policy-isakmp-policy1-1]security acl 3000[H3C-rip-1]network 20.1.1.2测试从RT1的环回口来ping RT3的环回口[H3C]ping -a 192.168.1.1 192.168.2.1Ping 192.168.2.1 (192.168.2.1) from 192.168.1.1: 56 data bytes, press CTRL_C to breakRequest time out56 bytes from 192.168.2.1: icmp_seq=1 ttl=255 time=2.000 ms56 bytes from 192.168.2.1: icmp_seq=2 ttl=255 time=2.000 ms 56 bytes from 192.168.2.1: icmp_seq=3 ttl=255 time=2.000 ms 56 bytes from 192.168.2.1: icmp_seq=4 ttl=255 time=1.000 ms 说明VPN建立成功。

HCMSR系列路由器IPsec典型配置举例V

HCMSR系列路由器IPsec典型配置举例V

7 相关资料1 简介本文档介绍IPsec的典型配置举例。

2 配置前提本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。

如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解IPsec特性。

3 使用iNode客户端基于证书认证的L2TP over IPsec功能配置举例3.1 组网需求如图1所示,PPP用户Host与Device建立L2TP隧道,Windows server 2003作为CA服务器,要求:•通过L2TP隧道访问Corporate network。

•用IPsec对L2TP隧道进行数据加密。

•采用RSA证书认证方式建立IPsec隧道。

图1 基于证书认证的L2TP over IPsec配置组网图3.2 配置思路由于使用证书认证方式建立IPsec隧道,所以需要在ike profile中配置local-identity 为dn,指定从本端证书中的主题字段取得本端身份。

3.3 使用版本本举例是在R0106版本上进行配置和验证的。

3.4 配置步骤3.4.1 Device的配置(1) 配置各接口IP地址# 配置接口GigabitEthernet2/0/1的IP地址。

<Device> system-view[Device] interface gigabitethernet 2/0/1[Device-GigabitEthernet2/0/1] ip address 192.168.100.50 24[Device-GigabitEthernet2/0/1] quit# 配置接口GigabitEthernet2/0/2的IP地址。

[Device] interface gigabitethernet 2/0/2[Device-GigabitEthernet2/0/2] ip address 102.168.1.11 24[Device-GigabitEthernet2/0/2] quit# 配置接口GigabitEthernet2/0/3的IP地址。

H3C V7 MSR路由器 拨号上网配置 PPPoE配置示例之欧阳语创编

H3C V7 MSR路由器 拨号上网配置 PPPoE配置示例之欧阳语创编

MSR路由器PPPoE配置示例1.2.配置示例图:3.PPPoE-Server配置:<PPPoE-Server>display current-configuration#version 7.1.075, Alpha 7571#sysnamePPPoE-Server#ip pool pppoe 121.48.47.2 121.48.47.6 //为PPPoE 客户端分配IP地址#dhcp enable#interface Virtual-Template1ppp authentication-mode pap domain system //客户端的验证方式remote address pool pppoe //指定为远端(PPPoE客户端)分配IP地址ip address 121.48.47.1 255.255.255.248dns server 8.8.8.8 //为对端分配DNS地址#interface NULL0#interface GigabitEthernet0/0port link-mode routecombo enable copperpppoe-server bind virtual-template 1 //应用到接口并绑定虚拟木模板1#domain systemauthentication ppp local //PPPoE认证方式为本地址认证#local-user pppoe class network //创建用于PPPoE 认证的本地用户password cipher pppoeservice-typeppp#Return4.PPPoE客户端配置:[PPPoE-Client]display current-configuration#version 7.1.075, Alpha 7571#sysnamePPPoE-Client#dialer-group 1 rule ip permit //定义拨号访问组1以及对应的拨号访问控制条件#dhcp enable#dhcp server ip-pool 1 //为内网用户分配IP地址gateway-list 192.168.100.254network 192.168.100.0 mask 255.255.255.0#interface Dialer 1 //配置拨号pppipcpdns admit-anypppipcpdns requestppp pap local-user pppoe password cipher pppoe dialer bundle enable //接口使能共享DDRdialer-group 1 //将Dialer 1接口与拨号访问组1关联dialer timer idle 0 //配置PPPoE Client 工作在永久在线模式(允许链路闲置的时间)dialer timer autodial 60 //配置DDR自动拨号的间隔时间为60秒ip address ppp-negotiate //配置接口从对端获得IP 地址nat outbound 2000 //配置NAT转换(内网用户通过NAT后才能访问公网)#interface GigabitEthernet0/0 //WAN口port link-mode routecombo enable copperpppoe-client dial-bundle-number 1 //配置PPPoE 会话#interface GigabitEthernet0/1 //LAN口port link-mode routecombo enable copperip address 192.168.100.254 255.255.255.0#ip route-static 0.0.0.0 0 Dialer1 //配置默认路由#acl basic 2000 //配置NAT过滤rule 5 permit#return。

H3CMSR系列路由器IPsec典型配置举例(V7)

H3CMSR系列路由器IPsec典型配置举例(V7)

7 相关资料1 简介本文档介绍IPsec的典型配置举例。

2 配置前提本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。

如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解IPsec特性。

3 使用iNode客户端基于证书认证的L2TP over IPsec功能配置举例3.1 组网需求如图1所示,PPP用户Host与Device建立L2TP隧道,Windows server 2003作为CA服务器,要求:•通过L2TP隧道访问Corporate network。

•用IPsec对L2TP隧道进行数据加密。

•采用RSA证书认证方式建立IPsec隧道。

图1 基于证书认证的L2TP over IPsec配置组网图3.2 配置思路由于使用证书认证方式建立IPsec隧道,所以需要在ike profile中配置local-identity 为dn,指定从本端证书中的主题字段取得本端身份。

3.3 使用版本本举例是在R0106版本上进行配置和验证的。

3.4 配置步骤3.4.1 Device的配置(1) 配置各接口IP地址# 配置接口GigabitEthernet2/0/1的IP地址。

<Device> system-view[Device] interface gigabitethernet 2/0/1[Device-GigabitEthernet2/0/1] ip address 192.168.100.50 24[Device-GigabitEthernet2/0/1] quit# 配置接口GigabitEthernet2/0/2的IP地址。

[Device] interface gigabitethernet 2/0/2[Device-GigabitEthernet2/0/2] ip address 102.168.1.11 24[Device-GigabitEthernet2/0/2] quit# 配置接口GigabitEthernet2/0/3的IP地址。

H3C V7 ipsec配置

H3C V7 ipsec配置

配置路由器:如图配置各个接口IP地址,具体略基本配置B(isakmp):IPSEC自动协商#RTA的配置#进入系统视图<RouteA>system-view#创建访问控制列表,定义由子网20.x.x.x去子网30.x.x.x的数据流[RouteA]acl number 3000[RouteA-acl-adv-3000]rule permit ip source 20.0.0.0 0.255.255.255 destination 30.0.0.00.255.255.255[H3C-acl-adv-3000]quit# 创IPsec建安全提议tran1。

[RouterA] ipsec transform-set tran1# 配置安全协议对IP报文的封装形式为隧道模式。

[RouterA-ipsec-transform-set-tran1] encapsulation-mode tunnel# 配置采用的安全协议为ESP。

[RouterA-ipsec-transform-set-tran1] protocol esp# 配置ESP协议采用的加密算法为DES,认证算法为HMAC-SHA1。

[RouterA-ipsec-transform-set-tran1] esp encryption-algorithm des-cbc[RouterA-ipsec-transform-set-tran1] esp authentication-algorithm sha1[RouterA-ipsec-transform-set-tran1] quit# 创建并配置IKE keychain,名称为keychain1。

[RouterA] ike keychain keychain1# 配置与IP地址为2.2.3.1的对端使用的预共享密钥为明文abcd。

[RouterA-ike-keychain-keychain1] pre-share-key address 10.1.1.2 255.255.255.0 key simple abcd [RouterA-ike-keychain-keychain1] quit# 创建并配置IKE profile,名称为profile1。

IPSEC野蛮模式互通v7使用模板NAT

IPSEC野蛮模式互通v7使用模板NAT

IPSEC野蛮模式跨越NAT的实验报告(v7)实验组网:实验需求:总部和分部通过ipsec VPN连接,现在分部通过nat上网,要求总部和分部还能建立VPN连接。

实验配置:Msr1上的配置:interface LoopBack0 写loopback地址做模拟内网ip address 192.168.0.1 255.255.255.0#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 1.1.1.1 255.255.255.0 设置公网口的地址为1.1.1.1ipsec apply policy 1 将ipsec应用在出口上#ip route-static 0.0.0.0 0 1.1.1.2 到外网的路由#acl advanced 3000rule 0 permit ip source 192.168.0.0 0.0.0.255 destination 192.168.1.0 0.0.0.255# 感兴趣流匹配192.168.0.0到192.168.1.0ipsec transform-set liuesp encryption-algorithm 3des-cbc 创建安全提议esp authentication-algorithm md5#ipsec policy 1 1 isakmp 创建安全策略transform-set liu 绑定安全提议security acl 3000 绑定兴趣流remote-address 2.2.2.2 设置对端的地址ike-profile 1 引用profile#ike profile 1 配置profilekeychain 1exchange-mode aggressive 选择模式为野蛮模式local-identity fqdn rt1 定义本段的名字#ike keychain 1pre-shared-key address 2.2.2.2 255.255.255.0 key cipher$c$3$Qe9XOAQz1WG1gqfgpF2vhoMwNfA/Sw==MSR2上的配置:interface GigabitEthernet0/0port link-mode routecombo enable copperip address 1.1.1.2 255.255.255.0#interface GigabitEthernet0/1 在0/1口上设置NATport link-mode routecombo enable copperip address 2.2.2.1 255.255.255.0nat outboundMSR3上的配置:interface LoopBack0ip address 192.168.1.1 255.255.255.0 起loopback口模拟内网的地址#interface GigabitEthernet0/0port link-mode routecombo enable copperip address 2.2.2.2 255.255.255.0 在外网口上配置IP地址应用ipsecipsec apply policy 1#ip route-static 0.0.0.0 0 2.2.2.1 写出公网的路由ipsec transform-set liu 写安全提议esp encryption-algorithm 3des-cbcesp authentication-algorithm md5#ipsec policy-template 1 1 模板的方式互联transform-set liu 引用安全提议local-address 2.2.2.2 设置本端的地址ike-profile 1#ipsec policy 1 1 isakmp template 1 引用安全模板#ike profile 1keychain 1exchange-mode aggressivematch remote identity fqdn rt1#ike keychain 1 这里需要注意配置这个地址为nat设备的地址不能是私网的地址pre-shared-key address 2.2.2.1 255.255.255.255 key cipher$c$3$OyYvNspnlpcz0xEthe6KUIeuj+EwGw==实验成功分析[H3C]dis ipsec saInterface: GigabitEthernet0/0IPsec policy: 1Sequence number: 1Mode: ISAKMPTunnel id: 0Encapsulation mode: tunnel 封装模式为tunnelPerfect forward secrecy:Path MTU: 1435 传输单元为1435Tunnel:local address: 1.1.1.1 本端地址remote address: 2.2.2.2 对端地址Flow:sour addr: 192.168.0.0/255.255.255.0 port: 0 protocol: ipdest addr: 192.168.1.0/255.255.255.0 port: 0 protocol: ip [Inbound ESP SAs]SPI: 4286909264 (0xff850b50)Connection ID: 12884901889Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5 一般排查故障的时候可以看两端Sa的加密方式是否一致SA duration (kilobytes/sec): 1843200/3600SA remaining duration (kilobytes/sec): 1843199/3219Max received sequence-number: 4Anti-replay check enable: YAnti-replay window size: 64UDP encapsulation used for NAT traversal: Y nat穿越开启Status: Active[Outbound ESP SAs]SPI: 1462729958 (0x572f7ce6)Connection ID: 21474836480Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5SA duration (kilobytes/sec): 1843200/3600SA remaining duration (kilobytes/sec): 1843199/3219Max sent sequence-number: 4UDP encapsulation used for NAT traversal: YStatus: Active[H3C]dis ike sa verboseConnection ID: 3Outside VPN:Inside VPN:Profile: 1Transmitting entity: InitiatorLocal IP: 1.1.1.1Local ID type: FQDNLocal ID: rt1Remote IP: 2.2.2.2Remote ID type: IPV4_ADDRRemote ID: 2.2.2.2Authentication-method: PRE-SHARED-KEYAuthentication-algorithm: SHA1Encryption-algorithm: DES-CBCLife duration(sec): 86400Remaining key duration(sec): 85991Exchange-mode: AggressiveDiffie-Hellman group: Group 1NAT traversal: Detected在外网的路由器上的sa<H3C>dis ipsec saInterface: GigabitEthernet0/0IPsec policy: 1Sequence number: 1Mode: Template 模式是模板的方式Tunnel id: 0Encapsulation mode: tunnelPerfect forward secrecy:Path MTU: 1435Tunnel:local address: 2.2.2.2remote address: 2.2.2.1 可以看到这边是到对端公网口的地址,而不是内网口的地址Flow:sour addr: 192.168.1.0/255.255.255.0 port: 0 protocol: ipdest addr: 192.168.0.0/255.255.255.0 port: 0 protocol: ip[Inbound ESP SAs]SPI: 1462729958 (0x572f7ce6)Connection ID: 21474836481Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5可是查看此验证是否一致SA duration (kilobytes/sec): 1843200/3600SA remaining duration (kilobytes/sec): 1843199/2936Max received sequence-number: 4Anti-replay check enable: YAnti-replay window size: 64UDP encapsulation used for NAT traversal: Y v7自动开启NAT穿越Status: Active[Outbound ESP SAs]SPI: 4286909264 (0xff850b50)Connection ID: 21474836480Transform set: ESP-ENCRYPT-3DES-CBC ESP-AUTH-MD5SA duration (kilobytes/sec): 1843200/3600SA remaining duration (kilobytes/sec): 1843199/2936Max sent sequence-number: 4UDP encapsulation used for NAT traversal: YStatus: Active<H3C>dis ike sa verbose-----------------------------------------------Connection ID: 8Outside VPN:Inside VPN:Profile: 1Transmitting entity: Responder-----------------------------------------------Local IP: 2.2.2.2Local ID type: IPV4_ADDRLocal ID: 2.2.2.2Remote IP: 2.2.2.1Remote ID type: FQDNRemote ID: rt1Authentication-method: PRE-SHARED-KEYAuthentication-algorithm: SHA1Encryption-algorithm: DES-CBCLife duration(sec): 86400 Remaining key duration(sec): 85712 Exchange-mode: AggressiveDiffie-Hellman group: Group 1 NAT traversal: Detected。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

7 相关资料1 简介本文档介绍IPsec的典型配置举例。

2 配置前提本文档适用于使用Comware V7软件版本的MSR系列路由器,如果使用过程中与产品实际情况有差异,请参考相关产品手册,或以设备实际情况为准。

本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。

如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。

本文档假设您已了解IPsec特性。

3 使用iNode客户端基于证书认证的L2TP over IPsec功能配置举例3.1 组网需求如图1所示,PPP用户Host与Device建立L2TP隧道,Windows server 2003作为CA服务器,要求:•通过L2TP隧道访问Corporate network。

•用IPsec对L2TP隧道进行数据加密。

•采用RSA证书认证方式建立IPsec隧道。

图1 基于证书认证的L2TP over IPsec配置组网图3.2 配置思路由于使用证书认证方式建立IPsec隧道,所以需要在ike profile中配置local-identity 为dn,指定从本端证书中的主题字段取得本端身份。

3.3 使用版本本举例是在R0106版本上进行配置和验证的。

3.4 配置步骤3.4.1 Device的配置(1) 配置各接口IP地址# 配置接口GigabitEthernet2/0/1的IP地址。

<Device> system-view[Device] interface gigabitethernet 2/0/1[Device-GigabitEthernet2/0/1] ip address 192.168.100.50 24[Device-GigabitEthernet2/0/1] quit# 配置接口GigabitEthernet2/0/2的IP地址。

[Device] interface gigabitethernet 2/0/2[Device-GigabitEthernet2/0/2] ip address 102.168.1.11 24[Device-GigabitEthernet2/0/2] quit# 配置接口GigabitEthernet2/0/3的IP地址。

[Device] interface gigabitethernet 2/0/3[Device-GigabitEthernet2/0/3] ip address 192.168.1.1 24[Device-GigabitEthernet2/0/3] quit(2) 配置L2TP# 创建本地PPP用户l2tpuser,设置密码为hello。

[Device] local-user l2tpuser class network[Device-luser-network-l2tpuser] password simple hello[Device-luser-network-l2tpuser] service-type ppp[Device-luser-network-l2tpuser] quit# 配置ISP域system对PPP用户采用本地验证。

[Device] domain system[Device-isp-system] authentication ppp local[Device-isp-system] quit# 启用L2TP服务。

[Device] l2tp enable# 创建接口Virtual-Template0,配置接口的IP地址为172.16.0.1/24。

[Device] interface virtual-template 0[Device-Virtual-Template0] ip address 172.16.0.1 255.255.255.0# 配置PPP认证方式为PAP。

[Device-Virtual-Template0] ppp authentication-mode pap# 配置为PPP用户分配的IP地址为172.16.0.2。

[Device-Virtual-Template0] remote address 172.16.0.2[Device-Virtual-Template0] quit# 创建LNS模式的L2TP组1。

[Device] l2tp-group 1 mode lns# 配置LNS侧本端名称为lns。

[Device-l2tp1] tunnel name lns# 关闭L2TP隧道验证功能。

[Device-l2tp1] undo tunnel authentication# 指定接收呼叫的虚拟模板接口为VT0。

[Device-l2tp1] allow l2tp virtual-template 0[Device-l2tp1] quit(3) 配置PKI证书# 配置PKI实体 security。

[Device] pki entity security[Device-pki-entity-security] common-name device[Device-pki-entity-security] quit# 新建PKI域。

[Device] pki domain headgate[Device-pki-domain-headgate] ca identifier LYQ[Device-pki-domain-headgate] certificate request url http://192.168.1.51/certsrv/mscep/mscep.dll [Device-pki-domain-headgate] certificate request from ra[Device-pki-domain-headgate] certificate request entity security[Device-pki-domain-headgate] undo crl check enable[Device-pki-domain-headgate] public-key rsa general name abc length 1024[Device-pki-domain-headgate] quit# 生成RSA算法的本地密钥对。

[Device] public-key local create rsa name abcThe range of public key modulus is (512 ~ 2048).If the key modulus is greater than 512,it will take a few minutes. Press CTRL+C to abort.Input the modulus length [default = 1024]:Generating Keys.............................++++++.++++++Create the key pair successfully.# 获取CA证书并下载至本地。

[Device] pki retrieve-certificate domain headgate caThe trusted CA's finger print is:MD5 fingerprint:8649 7A4B EAD5 42CF 5031 4C99 BFS3 2A99SHA1 fingerprint:61A9 6034 181E 6502 12FA 5A5F BA12 0EA0 5187 031CIs the finger print correct?(Y/N):yRetrieved the certificates successfully.# 手工申请本地证书。

[Device] pki request-certificate domain headgateStart to request general certificate ...Certificate requested successfully.(4) 配置IPsec隧道# 创建IKE安全提议。

[Device] ike proposal 1[Device-ike-proposal-1] authentication-method rsa-signature[Device-ike-proposal-1] encryption-algorithm 3des-cbc[Device-ike-proposal-1] dh group2[Device-ike-proposal-1] quit# 配置IPsec安全提议。

[Device] ipsec transform-set tran1[Device-ipsec-transform-set-tran1] esp authentication-algorithm sha1[Device-ipsec-transform-set-tran1] esp encryption-algorithm 3des[Device-ipsec-transform-set-tran1] quit# 配置IKE profile。

[Device] ike profile profile1[Device-ike-profile-profile1] local-identity dn[Device-ike-profile-profile1] certificate domain headgate[Device-ike-profile-profile1] proposal 1[Device-ike-profile-profile1] match remote certificate device[Device-ike-profile-profile1] quit# 在采用数字签名认证时,指定总从本端证书中的主题字段取得本端身份。

[Device]ike signature-identity from-certificate# 创建一条IPsec安全策略模板,名称为template1,序列号为1。

[Device] ipsec policy-template template1 1[Device-ipsec-policy-template-template1-1] transform-set tran1[Device-ipsec-policy-template-template1-1] ike-profile profile1[Device-ipsec-policy-template-template1-1] quit# 引用IPsec安全策略模板创建一条IPsec安全策略,名称为policy1,顺序号为1。

相关文档
最新文档