The key pairs are stored in different branches of the /etc/isakmpd/{private,pubkeys}/ structure. For FQDNs, as in this example, the public keys are stored in /etc/isakmpd/pubkeys/fqdn/ and the private key used locally is stored in /etc/isakmpd/private/. The public key filenames should be the FQDNs of the participating systems. I have always called the private key file local.key.

Using IP addresses is similar, but the key files are stored in a different branch of the /etc/isakmpd tree. For IPv4 addresses, store the public keys in /etc/isakmpd/pubkeys/ipv4/, and their filenames should be their applicable ipv4 addresses.

EDITED TO ADD: This host key infrastructure is not the only possibility. This and other key management methods are documented in the isakmpd(8) man page, in the IKE Public Key Infrastructure section.