Extend VRFs to AWS by using AWS Transit Gateway Connect
Created by Adam Till (AWS), Yashar Araghi (AWS), Vikas Dewangan (AWS), and Mohideen HajaMohideen (AWS)
Environment: PoC or pilot | Technologies: Infrastructure; Networking | AWS services: AWS Direct Connect; AWS Transit Gateway |
Summary
Virtual routing and forwarding (VRF) is a feature of traditional networks. It uses isolated logical routing domains, in the form of route tables, to separate network traffic within the same physical infrastructure. You can configure AWS Transit Gateway to support VRF isolation when you connect your on-premises network to AWS. This pattern uses a sample architecture to connect on-premises VRFs to different transit gateway route tables.
This pattern uses transit virtual interfaces (VIFs) in AWS Direct Connect and transit gateway Connect attachments to extend the VRFs. A transit VIF is used to access one or more Amazon VPC transit gateways that are associated with Direct Connect gateways. A transit gateway Connect attachment connects a transit gateway with a third-party virtual appliance that is running in a VPC. A transit gateway Connect attachment supports the Generic Routing Encapsulation (GRE) tunnel protocol for high performance, and it supports Border Gateway Protocol (BGP) for dynamic routing.
The approach described in this pattern has the following benefits:
Using Transit Gateway Connect, you can advertise up to 1,000 routes to the Transit Gateway Connect peer and receive up to 5,000 routes from it. Using the Direct Connect transit VIF feature without Transit Gateway Connect is limited to 20 prefixes per transit gateway.
You can maintain the traffic isolation and use Transit Gateway Connect to provide hosted services on AWS, regardless of the IP address schemas your customers are using.
The VRF traffic doesn’t need to traverse a public virtual interface. This makes it easier to adhere to compliance and security requirements in many organizations.
Each GRE tunnel supports up to 5 Gbps, and you can have up to four GRE tunnels per transit gateway Connect attachment. This is faster than many other connection types, such as AWS Site-to-Site VPN connections that support up to 1.25 Gbps.
Prerequisites and limitations
Prerequisites
The required AWS accounts have been created (see the architecture for details)
Permissions to assume an AWS Identity and Access Management (IAM) role in each account.
The IAM roles in each account must have permissions to provision AWS Transit Gateway and AWS Direct Connect resources. For more information, see Authentication and access control for your transit gateways and see Identity and access management for Direct Connect.
The Direct Connect connections have successfully been created. For more information, see Create a connection using the Connection wizard.
Limitations
There are limits for transit gateway attachments to the VPCs in the production, QA, and development accounts. For more information, see Transit gateway attachments to a VPC.
There are limits for creating and using Direct Connect gateways. For more information, see AWS Direct Connect quotas.
Architecture
Target architecture
The following sample architecture provides a reusable solution to deploy transit VIFs with transit gateway Connect attachments. This architecture provides resilience by using multiple Direct Connect locations. For more information, see Maximum resiliency in the Direct Connect documentation. The on-premises network has production, QA, and development VRFs that are extended to AWS and isolated by using dedicated route tables.
In the AWS environment, two accounts are dedicated to extending the VRFs: a Direct Connect account and a network hub account. The Direct Connect account contains the connection and the transit VIFs for each router. You create the transit VIFs from the Direct Connect account but deploy them to the network hub account so that you can associate them with the Direct Connect gateway in the network hub account. The network hub account contains the Direct Connect gateway and transit gateway. The AWS resources are connected as follows:
Transit VIFs connect the routers in the Direct Connect locations with AWS Direct Connect in the Direct Connect account.
A transit VIF connects Direct Connect with the Direct Connect gateway in the network hub account.
A transit gateway association connects the Direct Connect gateway with the transit gateway in the network hub account.
Transit gateway Connect attachments connect the transit gateway with the VPCs in the production, QA, and development accounts.
Transit VIF architecture
The following diagram shows the configuration details for the transit VIFs. This sample architecture uses a VLAN for the tunnel source, but you could also use a loopback.
The following are the configuration details, such as autonomous system numbers (ASNs), for the transit VIFs.
Resource | Item | Detail |
---|---|---|
router-01 | ASN | 65534 |
router-02 | ASN | 65534 |
router-03 | ASN | 65534 |
router-04 | ASN | 65534 |
Direct Connect gateway | ASN | 64601 |
Transit gateway | ASN | 64600 |
CIDR block | 10.100.254.0/24 |
Transit gateway Connect architecture
The following diagram and tables describe how to configure a single VRF through a transit gateway Connect attachment. For additional VRFs, assign unique tunnel IDs, transit gateway GRE IP addresses, and BGP inside CIDR blocks. The peer GRE IP address matches the router peer IP address from the transit VIF.
The following table contains router configuration details.
Router | Tunnel | IP address | Source | Destination |
---|---|---|---|---|
router-01 | Tunnel 1 | 169.254.101.17 | VLAN 60 169.254.100.1 | 10.100.254.1 |
router-02 | Tunnel 11 | 169.254.101.81 | VLAN 61 169.254.100.5 | 10.100.254.11 |
router-03 | Tunnel 21 | 169.254.101.145 | VLAN 62 169.254.100.9 | 10.100.254.21 |
router-04 | Tunnel 31 | 169.254.101.209 | VLAN 63 169.254.100.13 | 10.100.254.31 |
The following table contains transit gateway configuration details.
Tunnel | Transit gateway GRE IP address | Peer GRE IP address | BGP inside CIDR blocks |
---|---|---|---|
Tunnel 1 | 10.100.254.1 | VLAN 60 169.254.100.1 | 169.254.101.16/29 |
Tunnel 11 | 10.100.254.11 | VLAN 61 169.254.100.5 | 169.254.101.80/29 |
Tunnel 21 | 10.100.254.21 | VLAN 62 169.254.100.9 | 169.254.101.144/29 |
Tunnel 31 | 10.100.254.31 | VLAN 63 169.254.100.13 | 169.254.101.208/29 |
Deployment
The Epics section describes how to deploy a sample configuration for a single VRF across multiple customer routers. After steps 1–5 are complete, you can create new transit gateway Connect attachments by using steps 6–7 for every new VRF that you’re extending into AWS:
Create the transit gateway.
Create a Transit Gateway route table for each VRF.
Create the transit virtual interfaces.
Create the Direct Connect gateway.
Create the Direct Connect gateway virtual interface and gateway associations with allowed prefixes.
Create the transit gateway Connect attachment.
Create the Transit Gateway Connect peers.
Associate the transit gateway Connect attachment with the route table.
Advertise routes to the routers.
Tools
AWS services
AWS Direct Connect links your internal network to a Direct Connect location over a standard Ethernet fiber-optic cable. With this connection, you can create virtual interfaces directly to public AWS services while bypassing internet service providers in your network path.
AWS Transit Gateway is a central hub that connects virtual private clouds (VPCs) and on-premises networks.
Amazon Virtual Private Cloud (Amazon VPC) helps you launch AWS resources into a virtual network that you’ve defined. This virtual network resembles a traditional network that you’d operate in your own data center, with the benefits of using the scalable infrastructure of AWS.
Epics
Task | Description | Skills required |
---|---|---|
Create custom architecture diagrams. |
| Cloud architect, Network administrator |
Task | Description | Skills required |
---|---|---|
Create the transit gateway. |
| Network administrator, Cloud architect |
Create the transit gateway route table. | Follow the instructions in Create a transit gateway route table. Note the following for this pattern:
| Cloud architect, Network administrator |
Task | Description | Skills required |
---|---|---|
Create the transit virtual interfaces. |
| Cloud architect, Network administrator |
Task | Description | Skills required |
---|---|---|
Create a Direct Connect gateway. |
| Cloud architect, Network administrator |
Attach the Direct Connect gateway to the transit VIFs. |
| Cloud architect, Network administrator |
Create the Direct Connect gateway associations with allowed prefixes. | In the network hub account, follow the instructions in To associate a transit gateway. Note the following for this pattern:
Creating this association automatically creates a Transit Gateway attachment that has a Direct Connect Gateway resource type. This attachment does not need to be associated with a transit gateway route table. | Cloud architect, Network administrator |
Create the transit gateway Connect attachment. |
| Cloud architect, Network administrator |
Create the Transit Gateway Connect peers. |
|
Task | Description | Skills required |
---|---|---|
Advertise the routes. | Associate the new transit gateway Connect attachment with the route table you created previously for this VRF. For example, associate the production transit gateway Connect attachment with the Create a static route for the prefix that is advertised to the routers.
| Network administrator, Cloud architect |
Related resources
AWS documentation
Direct Connect documentation
Transit Gateway documentation
AWS blog posts
Attachments
To access additional content that is associated with this document, unzip the following file: attachment.zip