
实验目标: 1. R5为ISP, R3R4实施HSRP for Head-End IPsec Routers (IPSEC VPN的冗余备份) 的工作及配置过程.
2. 当冗余链路或设备DOWN后, 使用使用状态切换SSO特性(不需要keepalive机制). 查看状态信息等.
配置基本接口IP 并确定所有的链路层都起来的。
R2(config)#router ospf 100
R2(config-router)#net 192.168.1.2 0.0.0.0 a 0
R2(config-router)#net 22.22.22.0 0.0.0.255 a 0
R3(config)#router ospf 100
R3(config-router)#net 192.168.1.3 0.0.0.0 a 0
R3(config-router)#redistribute static subnets
R4(config)#router ospf 100
R4(config-router)#net 192.168.1.4 0.0.0.0 a 0
R3(config-router)#redistribute static subnets
R3(config)# ip route 0.0.0.0 0.0.0.0 100.1.1.5
R4(config)# ip route 0.0.0.0 0.0.0.0 100.1.1.5
R6(config)# ip route 0.0.0.0 0.0.0.0 56.1.1.5
R3(config)#int f2/1
R3(config-if)#standby 1 name Sta-1 / 定义stanby组1的名称为Sta-1.
R3(config-if)#standby 1 ip 100.1.1.254
R3(config-if)#standby 1 priority 110
R3(config-if)#standby 1 preempt / 在IPsec环境下不推荐做抢占
R3(config-if)#stanby 1 track f2/0 / 监测上行接口状态. 还可以配合内网做HSRP同步.
R4(config)#int f2/1
R4(config-if)#standby 1 name Sta-1
R4(config-if)#standby 1 ip 100.1.1.254
R4(config-if)#standby 1 priority 120
R4(config-if)#standby 1 preempt
R4(config-if)#stanby 1 track f2/0
R4#show standby brief
P indicates configured to preempt.|
Interface Grp Prio P State Active Standby Virtual IP
Fa2/1 1 120 P Active local 100.1.1.3 100.1.1.254
R6(config)#crypto isakmp policy 10
R6(config-isakmp)#encryption 3des
R6(config-isakmp)#authentication pre-share
R6(config-isakmp)#hash md5
R6(config)#crypto isakmp key 6 PASS add 100.1.1.254 / 应该指向中心远端HSRP虚拟出来的IP.
R6(config)#crypto ipsec transform-set Tra-name esp-md5-hmac esp-3des
R6(config)#crypto map Map-name 10 ipsec-isakmp / 定义加密图, 优先级是10.
R6(config-crypto-map)#set peer 100.1.1.254 / 指定Peer对等体
R6(config-crypto-map)#match add R6toR34 / 将ACL应用到加密图
R6(config-crypto-map)#set transform-set Tra-name / 将传输集映射到加密图
R6(config)#int f1/1
R6(config-if)#crypto map Map-name
R6(config)#ip access-list extended R6toR34
R6(config-ext-nacl)#permit ip 66.66.66.0 0.0.0.255 22.22.22.0 0.0.0.255
R3(config)#crypto isakmp policy 10
R3(config-isakmp)#encryption 3des
R3(config-isakmp)#authentication pre-share
R3(config-isakmp)#hash md5
R3(config)#crypto isakmp key 6 PASS add 56.1.1.6 / 应该指向远端的IP.
R3(config)#crypto ipsec transform-set Tra-name esp-md5-hmac esp-3des
R3(config)#crypto map Map-name 10 ipsec-isakmp / 定义加密图, 优先级是10.
R3(config-crypto-map)#set peer 56.1.1.6 / 指定Peer对等体
R3(config-crypto-map)#match add R34toR6 / 将ACL应用到加密图
R3(config-crypto-map)#set transform-set Tra-name / 将传输集映射到加密图
R3(config-crypto-map)#reverse-route static / 反向注入静态态路由.
R3(config)#ip access-list extended R34toR6
R3(config-ext-nacl)#permit ip 22.22.22.0 0.0.0.255 66.66.66.0 0.0.0.255
R4(config)#crypto isakmp policy 10
R4(config-isakmp)#encryption 3des
R4(config-isakmp)#authentication pre-share
R4(config-isakmp)#hash md5
R4(config)#crypto isakmp key 6 PASS add 56.1.1.6 / 应该指向远端的IP.
R4(config)#crypto ipsec transform-set Tra-name esp-md5-hmac esp-3des
R4(config)#crypto map Map-name 10 ipsec-isakmp / 定义加密图, 优先级是10.
R4(config-crypto-map)#set peer 56.1.1.6 / 指定Peer对等体
R4(config-crypto-map)#match add R34toR6 / 将ACL应用到加密图
R4(config-crypto-map)#set transform-set Tra-name / 将传输集映射到加密图
R4(config-crypto-map)#reverse-route static / 反向注入静态态路由.
R4(config)#ip access-list extended R34toR6
R4(config-ext-nacl)#permit ip 22.22.22.0 0.0.0.255 66.66.66.0 0.0.0.255
---- 启用SSO功能 ----
R3(config)#redundancy inter-device / 启用SSO功能
R3(config-red-interdevice)#scheme standby Sta-1 / 调用名为Sta-1的热备组, SSO与HSRP关联.
R3(config)#ipc zone default / 配置SSO设备间的通信协议和进程间的通信
R3(config-ipczone)#association 1 / 可理解为通信进程号为1, 两台SSO的进程号必须一样.
R3(config-ipczone-assoc)#no shut / 激活IPC进程, 必须的
R3(config-ipczone-assoc)#protocol sctp / 指定流控制传输协议SCTP协议, SCTP用来传输SSO消息.
R3(config-ipc-protocol-sctp)#local-port 5000 / 指定本地使用哪个端口
R3(config-ipc-local-sctp)#local-ip 100.1.1.3 / 指定本地使用的IP
R3(config-ipc-protocol-sctp)#remote-port 5000 / 指定远端使用哪个端口
R3(config-ipc-remote-sctp)#remote-ip 100.1.1.4 / 指定远端使用的IP
R3(config)#int f2/1
R3(config-if)#crypto map Map-name redundancy Sta-1 stateful / 因为远端指的是HSRP的虚地址, 所以必须在MAP
// 中调用, stanby组来映射出实地址. 才能产生反向注入的静态路由. stateful参数关联SSO
R3(config-if)#stanby delay reload 50 / 延迟重启路由器, 因为模拟器不支持重启. 启用SSO后, 当Active转为
// Backup状态后, 会强制重启一次路由器来同步ISAKMP和IPSEC信息.
R4(config)#redundancy inter-device
R4(config-red-interdevice)#scheme standby Sta-1
R4(config)#ipc zone default
R4(config-ipczone)#association 1
R4(config-ipczone-assoc)#no shut
R4(config-ipczone-assoc)#protocol sctp
R4(config-ipc-protocol-sctp)#local-port 5000
R4(config-ipc-local-sctp)#local-ip 100.1.1.4
R4(config-ipc-protocol-sctp)#remote-port 5000
R4(config-ipc-remote-sctp)#remote-ip 100.1.1.3
R4(config)#int f2/1
R4(config-if)#crypto map Map-name redundancy Sta-1 stateful
R4(config-if)#standby delay reload 50
R4#show redundancy states / 查看SSO状态.
my state = 13 -ACTIVE / 自己的状态为active
peer state = 1 -DISABLED / 对等体状态应该为standby hot才是正确建立SSO.
Mode = Simplex
Unit ID = 0
Split Mode = Disabled
Manual Swact = Disabled Reason: Simplex mode
Communications = Down Reason: Simplex mode
client count = 8
client_notification_TMR = 30000 milliseconds
RF debug mask = 0x0
R6#ping 22.22.22.2 source 66.66.66.6 repeat 10000 / 在测试ping后, R6只有和R4建立IPsecSA / ISAKMP sa, 而R3没有ISAKMP副本.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
到此就卡住了, SSO检测不到对方. 不知道是我配置的问题还是IOS版本的问题
分别测试过的IOS有:
c3745-adventerprisek9-mz.124-12.bin
c7200-advsecurityk9-mz.124-11.t.bin
c7200-jk9o3s-mz.124-17.bin
c7200-js-mz.124-18.bin
c7200-spservicesk9-mz.152-4.S2.bin
|
|