API Guide
要删除 IPsec 加密策略,请使用 no ipv6 ospf encryption ipsec spi number 或 no ipv6 ospf encryption null 命
令。
在接口上配置 IPsec 加密
OS10(conf-if-eth1/1/1)# ipv6 ospf encryption ipsec spi 500 esp des 1234567812345678 md5
12345678123456781234567812345678
OS10(conf-if-eth1/1/1)# show configuration
!
interface ethernet1/1/1
ipv6 ospf encryption ipsec spi 500 esp des 1234567812345678 md5
12345678123456781234567812345678
no switchport
no shutdown
ipv6 address 1::1/64
Identifier GUID-C014A8E0-9081-4BD2-9ABB-B6891241AFE9
Version 2
Status Translation approved
配置 OSPFv3 的 IPsec 身份验证区域
前提条件:在为 OSPFv3 区域启用 IPsec 身份验证之前,必须在每个路由器上全局启用 OSPFv3。
• 在路由器 OSPFv3 模式下为区域中的 OSPFv3 数据包启用 IPsec 身份验证。
area area-id authentication ipsec spi number {MD5 | SHA1} key
• area area-id — 输入区域 ID 作为编号或 IPv6 前缀。
• ipsec spi number — 输入一个唯一的安全策略索引 (SPI) 值,从 256 到 4294967295。
• md5 — 启用消息摘要 5 (MD5) 身份验证。
• sha1 — 启用安全哈希算法 1 (SHA1) 身份验证。
• key — 输入在验证类型中使用的文本字符串。该区域中所有 OSPFv3 路由器共享该密钥以交换信息。仅支持非加密密钥。对
于 MD5 身份验证,非加密的密钥必须是 32 位明文十六进制数字。对于 SHA1 身份验证,非加密密钥必须是 40 位十六进制数
字。不支持加密密钥。
要删除 IPsec 身份验证策略,请使用 no area area-id authentication ipsec spi number 命令。
为 OSPfv3 区域配置 IPsec 身份验证
OS10(config-router-ospfv3-100)# area 1 authentication ipsec spi 400 md5
12345678123456781234567812345678
OS10(config-router-ospfv3-100)# show configuration
!
router ospfv3 100
area 0.0.0.1 authentication ipsec spi 400 md5 12345678123456781234567812345678
Identifier
GUID-C5F91911-2EB6-4E6E-94FB-375ED971B767
Version 2
Status Translation approved
OSPV3 区域的 IPsec 加密
前提条件:在为 OSPFv3 区域启用 IPsec 加密之前,必须在每个路由器上全局启用 OSPFv3。
在区域级别配置加密时,同时启用 IPsec 加密和身份验证。如果已使用 area ospf authentication ipsec 命令配置了 IPsec
区域身份验证,则不能配置加密。要配置加密,必须先删除身份验证策略。
• 在路由器 OSPFv3 模式下为区域中的 OSPFv3 数据包启用 IPsec 加密。
area area-id encryption ipsec spi number esp encryption-type key
authentication-type key
• area area-id — 输入区域 ID 作为编号或 IPv6 前缀。
• ipsec spi number — 输入一个唯一的安全策略索引 (SPI) 值,从 256 到 4294967295。
• esp encryption-type — 输入与 ESP(3DES、DES、AES 或 NULL)一起使用的加密算法。对于 AES-CBC,仅支持
AES-128 和 AES-192 密码。
第 3 层 677