<?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 Finding the longest match prefix in ASA routing table in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860978#M460200</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today, the ASA unfortunately does not provide a way to see the 'best' route, without specifying an interface.&amp;nbsp; Reason being, the routing on the ASA is 2-parts:&amp;nbsp; &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;local to a specified interface&lt;/LI&gt;&lt;LI&gt;global&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, the PIX was really only 'interface' based routing.&amp;nbsp; Now that we also perform global routing, I agree that we should have a way of allowing a user to see the 'best' route, globally. Therefore, I have submitted an enhancement request (bug &lt;/P&gt;&lt;P&gt;CSCtz96946) requesting this functionality. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 May 2012 16:06:21 GMT</pubDate>
    <dc:creator>David White</dc:creator>
    <dc:date>2012-05-17T16:06:21Z</dc:date>
    <item>
      <title>Finding the longest match prefix in ASA routing table</title>
      <link>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860976#M460190</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;What is the correct way to find the longest matching prefix in the ASA's routing table?&amp;nbsp; It seems to be very difficult/impossible to do.&amp;nbsp; In IOS, the default behavior (if not specifying the subnet mask) gives you the best match (with the exception of the default route).&amp;nbsp; The ASA seems to, at least partially, use IOS's "longer-prefixes" logic which shows you any possible matches then lets you figure out which one is really the longest?&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;The ASA expects you to know the egress interface and subnet mask to which the entry belongs?!?!?!&amp;nbsp; If I knew that, I probably wouldn't need to check the routing table.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;I was reading the &lt;A href="http://www.cisco.com/en/US/partner/docs/security/asa/asa82/configuration/guide/route_overview.html" target="_blank"&gt;IP Routing Config Guide on the ASA&lt;/A&gt; and am aware that the ASA may, under certain scenarios, use NAT entries/definition to select the egress interface.&amp;nbsp; But suppose I'm not using NAT (or want to see where a simple ping will go without specifying the interface) and simply want to see the *best* match for a routing entry, how do I do it?&amp;nbsp; Especially when there are multiple routes entries that actually match.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;fw1# show route ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Current available interface(s):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; INSIDE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name of interface Ethernet0/1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; OUTSIDE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Name of interface Ethernet0/0&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Output modifiers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; &amp;lt;cr&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 style="font-size: 14px; color: #336666; text-decoration: none; font-family: Arial, Helvetica, sans-serif; margin-bottom: 7px; margin-left: -0.1in; margin-right: 0em; margin-top: 14px; background-color: #ffffff; padding-left: 90px;"&gt;How Routing Behaves Within the Adaptive Security Appliance&lt;/H2&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1095479" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 6px; margin-left: 0em; margin-right: 0em; margin-top: 1px; text-decoration: none; background-color: #ffffff; padding-left: 90px;"&gt;The ASA uses both routing table and XLATE tables for routing decisions. To handle destination IP translated traffic, that is, untranslated traffic, the ASA searches for existing XLATE, or static translation to select the egress interface. The selection process is as follows:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="Egress_Interface_Selection_Process" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;A name="wp1095480" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;H3 style="font-size: 13px; color: #000000; text-decoration: none; font-family: Arial, Helvetica, sans-serif; margin-bottom: 7px; margin-left: -0.1in; margin-right: 0em; margin-top: 14px; background-color: #ffffff; padding-left: 90px;"&gt;Egress Interface Selection Process&lt;/H3&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1095481" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;&lt;STRONG&gt;1. &lt;/STRONG&gt;&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="10" /&gt;If destination IP translating XLATE already exists, the egress interface for the packet is determined from the XLATE table, but not from the routing table.&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1095482" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;&lt;STRONG&gt;2. &lt;/STRONG&gt;&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="10" /&gt;If destination IP translating XLATE does not exist, but a matching static translation exists, then the egress interface is determined from the static route and an XLATE is created, and the routing table is not used.&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1095483" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;&lt;STRONG&gt;3. &lt;/STRONG&gt;&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="10" /&gt;If destination IP translating XLATE does not exist and no matching static translation exists, the packet is not destination IP translated. The ASA processes this packet by looking up the route to select egress interface, then source IP translation is performed (if necessary).&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1095487" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 6px; margin-left: 0.25in; margin-right: 0em; margin-top: 1px; text-decoration: none; background-color: #ffffff; padding-left: 90px;"&gt;For regular dynamic outbound NAT, initial outgoing packets are routed using the route table and then creating the XLATE. Incoming return packets are forwarded using existing XLATE only. For static NAT, destination translated incoming packets are always forwarded using existing XLATE or static translation rules.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H3 style="font-size: 13px; color: #336666; text-decoration: none; font-family: Arial, Helvetica, sans-serif; margin-bottom: 7px; margin-left: -0.1in; margin-right: 0em; margin-top: 14px; background-color: #ffffff; padding-left: 90px;"&gt;How Forwarding Decisions are Made&lt;/H3&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1097594" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 6px; margin-left: 0em; margin-right: 0em; margin-top: 1px; text-decoration: none; background-color: #ffffff; padding-left: 90px;"&gt;Forwarding decisions are made as follows:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1097595" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;•&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="19" /&gt;If the destination does not match an entry in the routing table, the packet is forwarded through the interface specified for the default route. If a default route has not been configured, the packet is discarded.&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1097596" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;•&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="19" /&gt;&lt;EM&gt;&lt;STRONG&gt;If the destination matches a single entry in the routing table, the packet is forwarded through the interface associated with that route.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1097597" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;•&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="19" /&gt;If the destination matches more than one entry in the routing table, and the entries all have the same network prefix length, the packets for that destination are distributed among the interfaces associated with that route.&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;&lt;A name="wp1097598" style="color: #000000; font-family: Arial, Helvetica, sans-serif; background-color: #ffffff;" target="_blank"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="color: #000000; font-family: Arial, Helvetica, sans-serif; font-size: 12px; margin-bottom: 7px; margin-left: 0.25in; margin-right: 0em; text-decoration: none; text-indent: -0.25in; background-color: #ffffff; padding-left: 90px;"&gt;•&lt;IMG border="0" height="2" src="http://www.cisco.com/en/US/partner/i/templates/blank.gif" width="19" /&gt;&lt;STRONG&gt;&lt;EM&gt;If the destination matches more than one entry in the routing table, and the entries have different network prefix lengths, then the packet is forwarded out of the interface associated with the route that has the longer network prefix length.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Mar 2019 22:23:15 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860976#M460190</guid>
      <dc:creator>ds6123</dc:creator>
      <dc:date>2019-03-11T22:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Finding the longest match prefix in ASA routing table</title>
      <link>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860977#M460194</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interesting friend. Have to research &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sent from Cisco Technical Support iPad App&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Feb 2012 00:06:28 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860977#M460194</guid>
      <dc:creator>integreon</dc:creator>
      <dc:date>2012-02-03T00:06:28Z</dc:date>
    </item>
    <item>
      <title>Finding the longest match prefix in ASA routing table</title>
      <link>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860978#M460200</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Today, the ASA unfortunately does not provide a way to see the 'best' route, without specifying an interface.&amp;nbsp; Reason being, the routing on the ASA is 2-parts:&amp;nbsp; &lt;/P&gt;&lt;OL&gt;&lt;LI&gt;local to a specified interface&lt;/LI&gt;&lt;LI&gt;global&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Initially, the PIX was really only 'interface' based routing.&amp;nbsp; Now that we also perform global routing, I agree that we should have a way of allowing a user to see the 'best' route, globally. Therefore, I have submitted an enhancement request (bug &lt;/P&gt;&lt;P&gt;CSCtz96946) requesting this functionality. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sincerely,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;David.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 May 2012 16:06:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/finding-the-longest-match-prefix-in-asa-routing-table/m-p/1860978#M460200</guid>
      <dc:creator>David White</dc:creator>
      <dc:date>2012-05-17T16:06:21Z</dc:date>
    </item>
  </channel>
</rss>

