Box-to-box High Availability (HA) support in Public Key Infrastructure (PKI) provides redundancy for the Cisco IOS® Certificate Authority (CA) server and the client-side PKI.
PKI high availability for the PKI CA server uses the Stateful Switch-Over (SSO) redundancy feature in Cisco IOS Software to synchronize the configurations of the active and standby CA routers to maintain state synchronization between the active and standby systems. In this scenario, if the active CA server becomes unavailable, the standby Cisco IOS CA server will be ready to take over. The active CA server will synchronize the server configuration, certificate revocation list (CRL), serial file, CA certificate, and keys with the standby CA server if the two servers are configured with the redundancy keyword.
To use client-side PKI in a high-availability environment, the customer needs to specify the redundancy keyword in the trustpoint configurations.
For this configuration, Cisco IOS Software Release 15.1 (3)T and later is recommended.
Configuring PKI High Availability for Client-Side PKI
Configure redundancy as specified in the section "Sample Configuration for PKI High Availability" (steps 2 to 4) and include the keyword redundancy in the trustpoint configuration. This process will synchronize the trustpoint configuration with the standby system, and it will also synchronize the CA certificate and the router certificate associated with that trustpoint with the standby system.
Configuring PKI High Availability for Cisco IOS CA Servers
Note: These configurations refer to box-to-box or interdevice redundancy for PKI high availability.
Recommendations
• Ping the virtual IP address to be sure it is accessible from both routers.
• Do not start configuring PKI until the redundant CA servers are in the active-standby hot state.
• Start the PKI configuration from the active CA server.
• Configure the PKI server normally. After the PKI server configuration is complete, specify the keyword redundancy to synchronize all the configurations with the standby system.
• Start the PKI CA server with the following command: crypto pki server-name start
Note: If the Cisco IOS command database level complete is configured, the server-issued client certificate (.crt files) will not be synchronized with the standby system. To address this situation, use the network storage and have both PKI CA servers point to that storage using the command database url.
Debugging Tips
• Turn on debugging to help ensure that no errors occur during the synchronization process. The debugging commands are:
debug crypto pki transaction
debug crypto pki message
debug crypto pki api
• Use the following show command to verify the state of the CA server on both the active and standby systems: show crypto pki server <name>
Sample Configuration for PKI High Availability
Use the steps presented here to set up PKI high availability.
Step 1. Enable HTTP service on both CA servers. This configuration is required so that the CA server can accept incoming HTTP connections from the client during enrollment. This command must be manually configured on both the active and standby CA servers
CA-server-1#conf t
Enter configuration commands, one per line. End with Ctrl+Z.
CA-server-1(config)#ip http server
CA-server-1(config)#end
Step 2. Configure the local interface that will be used for the Stream Control Transmission Protocol (SCTP) communication between the active and standby systems.
On the first CA server (CA-server-1), specify the following:
interface GigabitEthernet0/0
ip address 10.1.32.83 255.255.255.0
duplex auto
speed auto
media-type rj45
standby delay minimum 30 reload 60
standby 0 ip 10.1.32.86
standby 0 priority 50
standby 0 name SB
On the second CA server (CA-server-2), specify the following:
interface GigabitEthernet0/0
ip address 10.1.32.84 255.255.255.0
duplex auto
speed auto
media-type rj45
standby delay minimum 30 reload 60
standby 0 ip 10.1.32.86
standby 0 priority 50
standby 0 name SB
Check that both interfaces are and that the line protocol is on both CA servers:
CA-server-1#sh int gigabitEthernet 0/0
GigabitEthernet0/0 is up, line protocol is up
Hardware is BCM1125 Internal MAC, address is 0013.19ca.6350 (bia 0013.19ca.6350)
Internet address is 10.1.32.83/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
<snip..................>
CA-server-1#sh int gigabitEthernet 0/0
GigabitEthernet0/0 is up, line protocol is up
Hardware is BCM1125 Internal MAC, address is 0013.19ca.6350 (bia 0013.19ca.6350)
Internet address is 10.1.32.83/24
MTU 1500 bytes, BW 1000000 Kbit/sec, DLY 10 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
<snip.........>
Check the connectivity for the remote IP addresses from one CA server to the other-for example, from CA-server-1 to the local address of CA-server-2:
CA-server-1#ping 10.1.32.84
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.32.84, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms
CA-server-1#
Check that the virtual IP address (VIP) is reachable from both CA servers-for example, from CA-server-2:
CA-server-2#ping 10.1.32.86
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.32.86, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms
CA-server-2#
Step 3. Configure SCTP on both certificate servers:
On CA-server-1, specify the following:
ipc zone default
association 1
no shutdown
protocol sctp
local-port 5000
local-ip 10.1.32.83
remote-port 5000
remote-ip 10.1.32.84
On CA-server-2, specify the following:
ipc zone default
association 1
no shutdown
protocol sctp
local-port 5000
local-ip 10.1.32.84
remote-port 5000
remote-ip 10.1.32.83
Step 4. Configure the redundancy as inter-device, and configure the redundancy scheme as standby. The name of the group must match the standby name specified in the standby name interface configuration command (standby 0 name SB). Also, the standby name must be the same on both routers.
redundancy inter-device
scheme standby SB
On the active CA server, you will see the following syslog message when the server becomes active :
*Jun 3 01:41:02.791: %HSRP-5-STATECHANGE: GigabitEthernet0/0 Grp 0 state Standby -> Active
Similarly, the syslog message on the standby CA server is:
Manual Swact = cannot be initiated from this the standby unit
Communications = Up
client count = 14
client_notification_TMR = 30000 milliseconds
RF debug mask = 0x100
Note: If the CA servers do not achieve the standby and active states, you may see the following:
CA-server-1#sh redundancy state
my state = 13 -ACTIVE
peer state = 1 -DISABLED
Mode = Simplex
Unit ID = 0
Maintenance Mode = Disabled
Manual Swact = disabled (system is simplex (no peer unit))
Communications = Down Reason: Simplex mode
client count = 14
client_notification_TMR = 30000 milliseconds
RF debug mask = 0x0
To correct the states, reload one or both routers after specifying the preceding redundancy configurations. If this process does not work, toggle the server association between the two devices as shown here:
ipc zone default
association 1
no shutdown
Step 5. After the CA servers achieve the active and standby states as discussed in step 4, configure the PKI CA server first and specify the keyword redundancy to synchronize the configuration with the standby CA server.
Note: This command should be run only on the active CA server.
CA-server-2(config)#crypto pki server PKI-HA
CA-server-2(cs-server)#redundancy
Start the PKI CA server on the active server:
crypto pki server-name start
This process will synchronize the CA certificate, RSA keys, serial file, and CRL with the standby CA server.
Note:
• Do not start configuring PKI until the CA routers achieve the active-standby hot state.
• Verify that the clock is the same on both CA servers.
• Specify the following debugging commands to help sequence the steps and to display the data that is being synchronized between the two CA servers:
debug crypto pki transaction
debug crypto pki message
debug crypto pki api
Some examples of debugging information generated during the synchronization of the data from the active CA server to the standby CA server are shown here.
On the active CA server (CA-server-2), the following debugging information may be generated:
CA-server-2(cs-server)#
*Jun 3 04:01:15.735: PKI: pki_send_ha_peer_request: "+crypto pki server PKI-HA"
Verify that the CA server is working correctly on both CA servers:
On the active CA server (CA-server-2), check the following:
CA-server-2#sh crypto pki server PKI-HA
Certificate Server PKI-HA:
Status: enabled
State: enabled
Server's configuration is locked (enter "shut" to unlock it)
Issuer name: CN=PKI-HA
CA cert fingerprint: FDB38019 E426C13A FDAC4B1E C324CB6A
Granting mode is: manual
Last certificate issued serial number (hex): 1
CA certificate expiration timer: 06:32:59 UTC Jun 2 2013
CRL NextUpdate timer: 12:33:00 UTC Jun 3 2010
Current primary storage dir: nvram:
Database Level: Minimum - no cert data written to storage
Redundancy configured. This is active.
CA-server-2#sh crypto pki certificates
CA Certificate
Status: Available
Certificate Serial Number (hex): 01
Certificate Usage: Signature
Issuer:
cn=PKI-HA
Subject:
cn=PKI-HA
Validity Date:
start date: 04:01:37 UTC Jun 3 2010
end date: 04:01:37 UTC Jun 2 2013
Associated Trustpoints: PKI-HA
Storage: nvram:PKI-HA#1CA.cer
On the standby CA server (CA-server-1), check the following:
CA-server-1#sh crypto pki server PKI-HA
Certificate Server PKI-HA:
Status: enabled
State: enabled
Server's configuration is locked (enter "shut" to unlock it)
Issuer name: CN=PKI-HA
CA cert fingerprint: FDB38019 E426C13A FDAC4B1E C324CB6A
Granting mode is: manual
Last certificate issued serial number (hex): 1
CA certificate expiration timer: 06:32:59 UTC Jun 2 2013
CRL NextUpdate timer: 12:33:00 UTC Jun 3 2010
Current primary storage dir: nvram:
Database Level: Minimum - no cert data written to storage
Redundancy configured. This is standby.
CA-server-1#sh crypto pki certificates
CA Certificate
Status: Available
Certificate Serial Number (hex): 01
Certificate Usage: Signature
Issuer:
cn=PKI-HA
Subject:
cn=PKI-HA
Validity Date:
start date: 06:32:59 UTC Jun 3 2010
end date: 06:32:59 UTC Jun 2 2013
Associated Trustpoints: PKI-HA
Storage: nvram:PKI-HA#1CA.cer
Step 6. The RSA keys are generated automatically when the CA server is started. The redundancy keyword indicates that the keys are non-exportable and that they will be synchronized with the standby CA server during redundancy synchronization.
Verify that the RSA keys have been generated on the active server:
CA-server-2#show crypto key mypubkey rsa
% Key pair was generated at: 03:41:07 UTC Jun 3 2010
Verify the clock settings to see that they match on the active and standby routers. Use the clock set command to set the time on the standby server to match that on the active CA server:
CA-server-1#clock set 06:53:44 Jun 3 2010
CA-server-1#end
*Jun 3 06:53:44.000: %SYS-6-CLOCKUPDATE: System clock has been updated from 14:12:07 UTC Wed Jun 2 2010 to 06:53:44 UTC Thu Jun 3 2010, configured from console by console.
After the clock settings match, the following log messages may be reported on the standby CA server if debugging is turned on:
Jun 3 06:53:44.000: CRYPTO_CS: input signal enqueued: time set
Jun 3 06:53:44.000: CRYPTO_CS: enter FSM: input state check failed, input signal time set
Jun 3 06:53:44.000: CRYPTO_CS: SCEP server stopped
Jun 3 06:53:44.000: CRYPTO_CS: starting enabling checks
Jun 3 06:53:44.000: CRYPTO_CS: nvram filesystem
Jun 3 06:53:44.223: CRYPTO_CS: file opened: nvram:PKI-HA.ser
Jun 3 06:53:44.223: CRYPTO_CS: closed ser file
Jun 3 06:53:44.223: CRYPTO_CS: found existing serial file.
Jun 3 06:53:44.227: CRYPTO_PKI_API:cachekey: RSA Public Session Keys: expired key: 30819F30 0D06092A 864886F7 0D010101...
Jun 3 06:53:44.227: CRYPTO_PKI_API:cachekey: RSA Public Session Keys: added key: 30819F30 0D06092A 864886F7 0D010101...
Jun 3 06:53:44.227: CRYPTO_CS: started CA cert timer, expiration time is 06:32:59 UTC
Jun 3 06:53:44.227: CRYPTO_CS: Using existing trustpoint 'PKI-HA' and CA certificate
Jun 3 06:53:44.459: CRYPTO_CS: file opened: nvram:PKI-HA.ser
Jun 3 06:53:44.463: CRYPTO_CS: DB version 1
Jun 3 06:53:44.463: CRYPTO_CS: last issued serial number is 0x0
Jun 3 06:53:44.463: CRYPTO_CS: closed ser file
Jun 3 06:53:44.687: CRYPTO_CS: file opened: nvram:PKI-HA.crl
Jun 3 06:53:44.687: CRYPTO_CS: CRL file PKI-HA.crl exists.
Jun 3 06:53:44.687: CRYPTO_CS: Read 216 bytes from crl file.
Jun 3 06:53:44.687: CRYPTO_CS: closed crl file
Jun 3 06:53:44.691: CRYPTO_PKI_API:cachekey: RSA Public Session Keys: expired key: 30819F30 0D06092A 864886F7 0D010101...
Jun 3 06:53:44.691: CRYPTO_PKI_API:cachekey: RSA Public Session Keys: added key: 30819F30 0D06092A 864886F7 0D010101...
Jun 3 06:53:44.691: CRYPTO_CS: set crl update timer.
Jun 3 06:53:44.691: CRYPTO_CS: shadow not configured; look for shadow cert
Jun 3 06:53:44.691: CRYPTO_CS: failed to find shadow cert in the db
Jun 3 06:53:44.691: CRYPTO_CS: SCEP server started
Jun 3 06:53:44.691: %PKI-6-CS_ENABLED: Certificate server now enabled.
Jun 3 06:53:44.691: CRYPTO_CS: exit FSM: new state enabled
Jun 3 06:53:44.691: CRYPTO_CS: cs config has been locked
Now verify the status of the CA server on the standby. It should be the same as that on the active CA server.
On the standby CA server, verify the status as follows:
CA-server-1#sh crypto pki server PKI-HA
Certificate Server PKI-HA:
Status: enabled
State: enabled
Server's configuration is locked (enter "shut" to unlock it)
Issuer name: CN=PKI-HA
CA cert fingerprint: FDB38019 E426C13A FDAC4B1E C324CB6A
Granting mode is: manual
Last certificate issued serial number (hex): 1
CA certificate expiration timer: 06:32:59 UTC Jun 2 2013
CRL NextUpdate timer: 12:33:00 UTC Jun 3 2010
Current primary storage dir: nvram:
Database Level: Minimum - no cert data written to storage
Redundancy configured. This is standby.
On the active CA server, verify the status as follows:
CA-server-2#sh crypto pki server PKI-HA
Certificate Server PKI-HA:
Status: enabled
State: enabled
Server's configuration is locked (enter "shut" to unlock it)
Issuer name: CN=PKI-HA
CA cert fingerprint: FDB38019 E426C13A FDAC4B1E C324CB6A
Granting mode is: manual
Last certificate issued serial number (hex): 1
CA certificate expiration timer: 06:32:59 UTC Jun 2 2013
CRL NextUpdate timer: 12:33:00 UTC Jun 3 2010
Current primary storage dir: nvram:
Database Level: Minimum - no cert data written to storage
Redundancy configured. This is active.
If RSA Keys Do Not Become Redundant
If the RSA keys do not become redundant (that is, they are not synchronized with the standby CA server), the CA server may have been started (no shutdown) before redundancy was configured. If this is the case, re-do the PKI high-availability part of the configuration.
If Keys Are Not Synchronized
Sometimes keys are not synchronized with the standby CA server. In this case, the following message may appear: disabled, Server key not found, waiting for (offline) key. Check the configuration and be sure to follow the steps in the recommended order.
This message also will appear if the CA server is started before the redundancy keyword is specified. In this case, the keys do not synchronize with the standby CA server.