<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Keyring not found when using hostname in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784172#M1098242</link>
    <description>&lt;P&gt;you need to use fvrf 10 since your tunnel source is in VRF 10&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2023 14:45:24 GMT</pubDate>
    <dc:creator>MHM Cisco World</dc:creator>
    <dc:date>2023-02-28T14:45:24Z</dc:date>
    <item>
      <title>Keyring not found when using hostname</title>
      <link>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784152#M1098241</link>
      <description>&lt;P&gt;I am trying to build an ipsec tunnel in IOS XE 17.6.3 using hostname but I get a keyring not found error. Is there a way to do this without having to use the IP?&lt;/P&gt;
&lt;P&gt;Non-working:&lt;/P&gt;
&lt;P&gt;crypto ikev2 keyring zscaler-keyring&lt;BR /&gt;peer zscaler-peer&lt;BR /&gt;hostname sea1-vpn.zscaler.net&lt;BR /&gt;pre-shared-key hgjgjhgjhgjgjhgjhgjhghjg&lt;BR /&gt;!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Error:&lt;/P&gt;
&lt;P&gt;*Feb 28 14:11:02.888: IKEv2-ERROR:(SESSION ID = 0,SA ID = 0):% key not found.&lt;BR /&gt;*Feb 28 14:11:02.888: IKEv2-ERROR:(SESSION ID = 0,SA ID = 0):Failed to initiate sa&lt;/P&gt;
&lt;P&gt;If I use an IP then this works. I think the issue may be when I specify the hostname in the Tunnel interface, IOS will translate this to an IP:&lt;/P&gt;
&lt;P&gt;interface Tunnel10&lt;BR /&gt;description vrf10tunneltoZscaler&lt;BR /&gt;vrf forwarding 10&lt;BR /&gt;ip unnumbered GigabitEthernet3&lt;BR /&gt;ip mtu 1500&lt;BR /&gt;tunnel source GigabitEthernet3&lt;BR /&gt;tunnel mode ipsec ipv4&lt;BR /&gt;tunnel destination 165.225.50.10 &amp;lt;--- configured with hostname but gets changed to an IP by IOS&lt;BR /&gt;tunnel path-mtu-discovery&lt;BR /&gt;tunnel vrf 10&lt;BR /&gt;tunnel protection ipsec profile zscaler-ipsec-profile&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:19:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784152#M1098241</guid>
      <dc:creator>dodgerfan78</dc:creator>
      <dc:date>2023-02-28T14:19:39Z</dc:date>
    </item>
    <item>
      <title>Re: Keyring not found when using hostname</title>
      <link>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784172#M1098242</link>
      <description>&lt;P&gt;you need to use fvrf 10 since your tunnel source is in VRF 10&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:45:24 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784172#M1098242</guid>
      <dc:creator>MHM Cisco World</dc:creator>
      <dc:date>2023-02-28T14:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: Keyring not found when using hostname</title>
      <link>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784414#M1098250</link>
      <description>&lt;P&gt;&lt;a href="https://community.cisco.com/t5/user/viewprofilepage/user-id/55865"&gt;@dodgerfan78&lt;/a&gt;&amp;nbsp;From the Cisco IKEv2 book - "The key lookup by peer hostname is performed only by the hostname string and not by its resolved address, as address resolution is not performed during the lookup. The key lookup by peer hostname has very limited use; although the key lookup by peer hostname can be performed on an initiator, specifying the IKE/IPsec peer as a hostname is possible only with crypto map configuration by use of the set peer hostname dynamic command and not with a tunnel interface configuration."&lt;/P&gt;
&lt;P&gt;How about specifying an FQDN as the identity on the initator and match on this identity in the keyring on the responder.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;# Initiator&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;crypto ikev2 keyring KEY&lt;BR /&gt;&amp;nbsp;peer 1&lt;BR /&gt;&amp;nbsp;address 1.1.1.1&lt;BR /&gt;&amp;nbsp;pre-shared-key local Cisco1234&lt;BR /&gt;&amp;nbsp;pre-shared-key remote Cisco1234&lt;BR /&gt;!&lt;BR /&gt;crypto ikev2 profile IKEV2-PROFILE&lt;BR /&gt;&amp;nbsp;match fvrf WAN&lt;BR /&gt;&amp;nbsp;match identity remote any&lt;BR /&gt;&lt;STRONG&gt;&amp;nbsp;identity local fqdn branch-1.lab.local&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;authentication remote pre-share&lt;BR /&gt;&amp;nbsp;authentication local pre-share&lt;BR /&gt;&amp;nbsp;keyring local KEY&lt;/PRE&gt;
&lt;P&gt;&lt;STRONG&gt;# Responder&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;PRE&gt;crypto ikev2 keyring KEY&lt;BR /&gt;&amp;nbsp;peer 4&lt;BR /&gt;&amp;nbsp;&lt;STRONG&gt;identity fqdn branch-1.lab.local&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;pre-shared-key local Cisco1234&lt;BR /&gt;&amp;nbsp;pre-shared-key remote Cisco1234&lt;BR /&gt;!&lt;BR /&gt;crypto ikev2 profile IKEV2-PROFILE&lt;BR /&gt;&amp;nbsp;match fvrf WAN&lt;BR /&gt;&amp;nbsp;match identity remote fqdn domain lab.local&lt;BR /&gt;&amp;nbsp;identity local address 1.1.1.1&lt;BR /&gt;&amp;nbsp;keyring local KEY&lt;/PRE&gt;
&lt;P&gt;Therefore the responder needs only match on the sent identity FQDN of the spoke router (initiator), not the IP address.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 20:36:59 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/keyring-not-found-when-using-hostname/m-p/4784414#M1098250</guid>
      <dc:creator>Rob Ingram</dc:creator>
      <dc:date>2023-02-28T20:36:59Z</dc:date>
    </item>
  </channel>
</rss>

