zoukankan      html  css  js  c++  java
  • H3C ipsec ike 协商配置

    1. 分几步设置

    (1)定义ACL

    (2)创建 ipsec 安全建议

    1.选择认证方式

    ah 选择 ah头认证方式 不配置 ipsec不能建立成功

    (3)创建IKE keychain

    可以写多条keychain 与多个路由器进行ipsec 

    (4)创建IKE profile

    可以匹配多条对端地址

    (5)创建一条IKE协商方式的IPsec安全策略

    可以使用模版 建立多条ipsec

    2.配置

    (1)     

    配置

    Device A

    配置各接口的IP地址,具体略。

     

    配置

    ACL 3101,定义要保护由子网10.1.1.0/24去子网10.1.2.0/24的数据流。

    <DeviceA> system-view 

    [DeviceA] acl number 3101 

    [DeviceA-acl-adv-3101] rule permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255

    [DeviceA-acl-adv-3101] quit

    也可以 允许任何ip

     [DeviceA-acl-adv-3101] rule permit ip source any destination any

     

     

    创建IPsec安全提议tran1

    [DeviceA] ipsec transform-set tran1

    配置安全协议对IP报文的封装形式为隧道模式。

    [DeviceA-ipsec-transform-set-tran1] encapsulation-mode tunnel

    配置采用的安全协议为ESP (这里有多种选择 ah ah-esp esp 选择ah-esp ah 一定要对ah 进行配置验证)

    [DeviceA-ipsec-transform-set-tran1] protocol esp

    配置ESP协议采用的加密算法为128比特的AES,认证算法为HMAC-SHA1 (也有多种选择 按自己的需求选择)

    [DeviceA-ipsec-transform-set-tran1] esp encryption-algorithm aes-cbc-128

    [DeviceA-ipsec-transform-set-tran1] esp authentication-algorithm sha1

    [DeviceA-ipsec-transform-set-tran1] quit

     

    附:ah 进行配置验证

    [DeviceA-ipsec-transform-set-tran1] ah authentication-algorithm md5 ah

    [DeviceA-ipsec-transform-set-tran1] quit

     

     

     

    创建IKE keychain,名称为keychain1

    [DeviceA] ike keychain keychain1

    配置与IP地址为2.2.2.2的对端使用的预共享密钥为明文123456TESTplat&!

    [DeviceA-ike-keychain-keychain1] pre-shared-key address 2.2.2.2 255.255.255.0 key simple 123456TESTplat&!

    [DeviceA-ike-keychain-keychain1] quit

    附:可以拥有多条为其他对端 预共享密钥

     

    创建IKE profile,名称为profile1

    [DeviceA] ike profile profile1

    指定引用的IKE keychain为keychain1

    [DeviceA-ike-profile-profile1] keychain keychain1

    配置本端的身份信息为IP地址1.1.1.1 (可以配置也可以不配置 使用模版时 不配置这条)

    [DeviceA-ike-profile-profile1] local-identity address 1.1.1.1

    #配置匹配对端身份的规则为IP地址2.2.2.2/24 (这里可以匹配多个对端身份)

    [DeviceA-ike-profile-profile1] match remote identity address 2.2.2.2 255.255.255.0

    [DeviceA-ike-profile-profile1] quit

    附:匹配多个对端身份 ip地址为 2.2.2.2 到 2.2.2.4

    [DeviceA-ike-profile-profile1] match remote identity address range 2.2.2.2 2.2.2.4

     

     

    创建一条IKE协商方式的IPsec安全策略,名称为map1,顺序号为10

    [DeviceA] ipsec policy map1 10 isakmp

    配置IPsec隧道的对端IP地址为2.2.2.2

    [DeviceA-ipsec-policy-isakmp-map1-10] remote-address 2.2.2.2

    指定引用ACL 3101

    [DeviceA-ipsec-policy-isakmp-map1-10] security acl 3101

    指定引用的安全提议为tran1

    [DeviceA-ipsec-policy-isakmp-map1-10] transform-set tran1

    指定引用的IKE profile为profile1

    [DeviceA-ipsec-policy-isakmp-map1-10] ike-profile profile1

    [DeviceA-ipsec-policy-isakmp-map1-10] quit

     

    在接口GigabitEthernet2/1/1上应用IPsec安全策略map1

    [DeviceA-GigabitEthernet2/1/1] ipsec apply policy map1

    [DeviceA-GigabitEthernet2/1/1] quit

    B 同理

  • 相关阅读:
    [主席树][学习笔记]
    [bzoj2588][ Count on a tree]
    [bzoj3524][Couriers]
    [luogu3834][可持久化线段树 1(主席树)]
    [luogu3810][bzoj3262][陌上花开]
    [树套树][学习笔记]
    [luogu4556][Vani有约会]
    [线段树合并][学习笔记]
    [hdu6183][Color it]
    [动态开点线段树][学习笔记]
  • 原文地址:https://www.cnblogs.com/hywhyme/p/5984138.html
Copyright © 2011-2022 走看看