> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aviatrix.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Aviatrix Gateway to Cisco Ios Router

> This document describes how to build an IPsec tunnel based Site2Cloud connection between an Aviatrix Gateway and a Cisco IOS router.

This document describes how to build an IPsec tunnel based Site2Cloud connection
between an Aviatrix Gateway and a Cisco IOS router.

The network setup is as follows:

**VPC/VNet-AVX (with Aviatrix Gateway)**

*VPC/VNet CIDR: 10.100.0.0/24*

**On-Prem (with Cisco IOS Router)**

*On-Prem Network CIDR: 10.10.2.0/24*

## Creating a Site2Cloud Connection

1. In Aviatrix CoPilot, launch an
   [Aviatrix Transit Gateway](https://docs.aviatrix.com/docs/enterprise/10.0/reference/ui/cloud-fabric/gateways.md#view-transit-gateways)
   at the subnet (public subnet for AWS, GCP, or OCI) of VPC/VNet-AVX. Collect
   the Gateway's public IP addresses (52.4.65.172 in this example).

2. Navigate to Networking > Connectivity > External Connections (S2C) to create
   a Site2Cloud connection using the values for one of the below options:

   | Static Route-Based | Static Policy-Based |
   | - | - |
   | [Static Route-Based](https://legacy.docs.aviatrix.com/documentation/latest/network/external-connection-create-static-route-based-unmapped.html) | [Static Policy-Based](https://legacy.docs.aviatrix.com/documentation/latest/network/external-connection-create-static-policy-based-unmapped.html) |

   Substitute the following values:

   * Remote Device Type: Generic
   * Algorithms: turn Off
   * Remote Device IP: Public IP of IOS Router WAN port (52.9.196.2 in this
     example)
   * Remote Subnet CIDR(s): 10.10.2.0/24 (On-Prem Network CIDR) (VPC2 private
     subnet)
   * Local Subnet CIDR(s): 10.100.0.0/24 (VPC/VNet-AVX CIDR) (VPC1 private
     subnet)

3. After the connection is created, select the vertical ellipsis ![25](https://docs.aviatrix.com/docs/enterprise/10.0/guides/connectivity/vpn/images/threedot.png) menu
   for that connection and select **Download Configuration**.

4. In the Download Configuration dialog, select **Cisco** from the **Vendor**
   dropdown menu.

5. Select **ISR, ASR, or CSR** from the Platform dropdown menu.

6. Select the appropriate Software version.

7. Click **Download**.

8. Save the configuration file as a reference for configuring your Cisco IOS
   router.

   The following is a sample configuration based on the Site2Cloud configuration
   above.

   ![s2c sample config](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/s2c-sample-config.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=fa42ff57d49bae07b6a627e58d2376aa)

## Configuring Cisco IOS Router

1. Either ssh into the Cisco router or connect to it directly through its
   console port.
2. Apply the following IOS configuration to your router.

> [!NOTE]
>
> From version 5.0, we use the gateway's public IP address as the identifier, so
> the "match identity address" should use the public IP instead of the private
> IP as shown below.

![image1](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/s2c-ios.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=5b1b79f39e434578eb51ac66f5ed2d1d)

## Verifying the Connection Status

In CoPilot, go to the Diagnostics > Cloud Routes > External Connections tab to
confirm the Status and Tunnel Status of the external connection.

## Troubleshooting

You can use the Diagnostic Tools (under Diagnostics in the left navigation menu)
to troubleshoot any connection issues.

For support, please open a support ticket at
[Aviatrix Support Portal](https://support.aviatrix.com).

## Appendix 1: Transit Connection to Cisco ISR/ASR Over the Internet

The following is the topology used for the sample configuration below:

![External-Device-Internet](https://mintcdn.com/aviatrix-14b37c43/1zOMu4WXCFpEtXhJ/images/guides/connectivity/vpn/external-device-internet.png?fit=max\&auto=format\&n=1zOMu4WXCFpEtXhJ\&q=85\&s=cc25da31a725b586938eb4d1ffb005e1)

For connection over the Internet, an Aviatrix Transit Gateway and Cisco ISR/ASR
use each other's public IP to create an IPsec tunnel and establish a BGP
connection.

The following diagrams display mappings between a sample downloaded
configuration and its corresponding Cisco ISR/ASR router configuration:

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-phase1.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=c8c7205765e8573610bfb334b2482533)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-phase2.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=eba30f0250eb07b16a4952994bb73dee)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-tunnel.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=91a0e9f97febb67a83f4b58439d6fd97)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-bgp.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=e2be856a671ec1d0af6aeddfa939c481)

## Appendix 2: Transit Connection to Cisco ISR/ASR over Direct Connect

The following is the topology used for the sample configuration below:

![500](https://mintcdn.com/aviatrix-14b37c43/1zOMu4WXCFpEtXhJ/images/guides/connectivity/vpn/external-device-dx.png?fit=max\&auto=format\&n=1zOMu4WXCFpEtXhJ\&q=85\&s=973fb902b33414e662b263a5b208fa09)

For connection over Direct Connect, the Aviatrix Transit Gateway and Cisco
ISR/ASR use each other's private IP to create an IPsec tunnel and establish BGP
connection.

> [!NOTE]
>
> The ASN number of the Aviatrix Transit Gateway created earlier in this
> document (Local ASN) should be the same as the VGW's ASN number (7224 in this
> example). Without it, the Transit VPC/VNet CIDR advertised from VGW to on-prem
> ASR/ISR will be advertised by ASR/ISR back to the Aviatrix Transit Gateway.
> With the same ASN number, the Aviatrix Transit Gateway will drop the route to
> the Transit VPC/VNet CIDR.

The following diagrams display mappings between a sample configuration from
[Creating a Site2Cloud Connection](#creating-a-site2cloud-connection) and its
corresponding Cisco ISR/ASR router configuration:

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-phase1-dx.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=6af56ea23d52f21807944893536edfd0)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-phase2-dx.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=b3f8c59a08e73d37155364be7160b01d)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-tunnel-dx.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=96ef17f0b2052734e6696ef8b0104c02)

![500](https://mintcdn.com/aviatrix-14b37c43/Gre8pdluiL7JmlpL/images/guides/connectivity/vpn/transitgw-bgp-dx.png?fit=max\&auto=format\&n=Gre8pdluiL7JmlpL\&q=85\&s=8d8c7d35dc4c983854a1d0f5bac683df)

## Related Topics

* [Overview of Transit Gateway to External Devices](https://docs.aviatrix.com/docs/enterprise/10.0/concepts-architectures/architecture/connectivity/transit-externaldevice-usecase.md)
* [Externaldevice Settings](https://legacy.docs.aviatrix.com/documentation/latest/network/externaldevice-settings.html)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.