The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
This document describes the configuration guide on how to deploy CSR1000v routers for High Availability on Amazon AWS cloud. It is aimed to give users practical knowledge of HA and the ability to deploy a fully functional testbed.
For more in depth background about AWS and HA, refer to the section.
Cisco recommends that you have knowledge of these topics:
The information in this document is based on Cisco IOS-XE® Denali 16.7.1.
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, ensure that you understand the potential impact of any command.
In a multiple Availability Zone environment, simulate continuous traffic from the private datacenter (VM) to the internet. Simulate an HA failover and observe that HA succeeds as the routing table switches traffic from CSRHA to CSRHA1's private interface is confirmed.
Before the configuration starts, it is important to understand the topology and design completely. This helps to troubleshoot any potential issues later on.
There are various scenarios of HA deployment based on the network requirements. For this example, HA redundancy is configured with these settings:
There are 2x CSR1000v routers in an HA pair, in two different availability zones. Think of each availability zone as a separate datacenter for additional hardware resiliency.
The third zone is a VM, which simulates a device in a private datacenter. For now, internet access is enabled through the public interface on so that you can access and configure the VM. Generally, all normal traffic should flow through the private route table.
Ping the VM's private interface → private route table → CSRHA → 8.8.8.8 for Traffic simulation. In a failover scenario, observe the private route table has switched the route to point to CSRHA1's private interface.
RTB - The route table ID.
CIDR - Destination address for the route to be updated in the route table.
ENI - The network interface ID of the CSR 1000v gigabit interface to which traffic is routed.
For Example, if CSRHA fails then CSRHA1 takes over and updates the route in the AWS route table to point to its own ENI.
REGION - The AWS region of CSR 1000v.
The general flow of configuration is to start at the top most encompassing feature (Region/VPC) and move your way down to the most specific (Interface/subnet). However, there is no specific order of configuration. Before you start, it is important to understand the topology first .
Tip: Give names to all your settings (VPC, Interface, Subnet, Route Tables, etc).
This example uses US West (Oregon).
Security Groups are like ACLs to permit or deny traffic.
IAM grants your CSR access to Amazon APIs.
The CSR1000v is used as a proxy to call AWS API commands to modify the route table. By default, AMI's are not allowed access to APIs. This procedure creates an IAM role and this role is used during the launch of a CSR instance. IAM provides the access credentials for CSRs to use and modify AWS APIs.
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "ec2:AssociateRouteTable", "ec2:CreateRoute", "ec2:CreateRouteTable", "ec2:DeleteRoute", "ec2:DeleteRouteTable", "ec2:DescribeRouteTables", "ec2:DescribeVpcs", "ec2:ReplaceRoute", "ec2:DisassociateRouteTable", "ec2:ReplaceRouteTableAssociation" ], "Resource": "*" } ] }
Each CSR1000v router has 2 interfaces (1 public, 1 private) and is in its own Availability Zone. You can think of each CSR as being in separate datacenters.
Note: The subnet created in the previous step may not appear in this drop down. You may need to refresh or cancel the page and start again for the subnet to appear.
Note: If you lose your private key, you cannot login to your CSR's again. There is no method to recover keys.
Note: Public/private terminology may confuse you here. For the purposes of this example, definition of a public interface is Eth0 which is the internet facing interface. From the point of view of AWS, our public interface is their private ip.
By default, all ENIs come with this Source/Dest check enabled. An anti-spoofing feature meant to avoid letting an ENI get overrun with traffic that is not really intended for it by verifying that the ENI is the destination of the traffic before forwarding it. The router is rarely the actual destination of a packet. This feature must be disabled on all CSR transit ENIs or it cannot forward packets.
Note: The username provided by AWS to SSH into the CSR1000v may be incorrectly listed as root. Change this to ec2-user if necessary.
Note: You must be able to ping the DNS address to SSH in. Here it is ec2-54-208-234-64.compute-1.amazonaws.com. Check that the router's public subnet/eni is associated with the Public Route Table. Briefly go to Step 8 on how to associate the subnet to the Route Table.
Public Subnet: 10.16.1.0/24
Private Subnet: 10.16.5.0/24
If you are unable to ping the elastic ip address of this new AMI, briefly go to Step 8 and ensure that the public subnet is associated with the public route table.
For this example, use Ubuntu Server 14.04 LTS on the marketplace.
Public Subnet: 10.16.2.0/24
Private Subnet: 10.16.6.0/24
If you are unable to ping the elastic ip address of this new AMI, briefly go to Step 8 and ensure that the public subnet is associated with the public route table.
ubuntu@ip-10-16-2-139:~$ cd /etc/network/interfaces.d/ ubuntu@ip-10-16-2-139:/etc/network/interfaces.d$ sudo vi eth1.cfg auto eth1 iface eth1 inet static address 10.16.6.131 netmask 255.255.255.0 network 10.16.6.0 up route add -host 8.8.8.8 gw 10.16.6.1 dev eth1
ubuntu@ip-10-16-2-139:/etc/network/interfaces.d$ sudo ifdown eth1 && sudo ifup eth1 ubuntu@ip-10-16-2-139:/etc/network/interfaces.d$ sudo reboot
ubuntu@ip-10-16-2-139:~$ route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.16.2.1 0.0.0.0 UG 0 0 0 eth0 8.8.8.8 10.16.6.1 255.255.255.255 UGH 0 0 0 eth1 <-------------- 10.16.3.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 10.16.6.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
If 8.8.8.8 is not listed in the table, add it manually:
ubuntu@ip-10-16-2-139:~$ sudo route add -host 8.8.8.8 gw 10.16.6.1 dev eth1
3 Public interfaces are associated with the Public Route Table:
Public Subnets: 10.16.0.0/24, 10.16.1.0/24, 10.16.2.0/24
3 Private interfaces are associated with the Private Route Table:
Private Subnets: 10.16.4.0/24, 10.16.5.0/24, 10.16.6.0/24
Configure the Generic Routing Encapsulation (GRE) tunnel through the Elastic IPs of the CSR 1000v's (recommended to avoid DHCP lease renewal issues, which detect false failures.) The Biderection Forwarding Detection (BFD) values can be configured to be more aggressive than those shown in this example, if faster convergence is required. However, this can lead to BFD peer down events during intermittent connectivity. The values in this example detects peer failure within 1.5 seconds. There is a variable delay of about a few seconds between the time when the AWS API command is executed and when the VPC routing table changes go into effect.
GRE and BFD - Used to observe conditions for HA failover
interface Tunnel1 ip address 192.168.1.1 255.255.255.0 bfd interval 500 min_rx 500 multiplier 3 tunnel source GigabitEthernet1 tunnel destination 52.10.183.185 /* Elastic IP of the peer CSR */ ! router eigrp 1 bfd interface Tunnel1 network 192.168.1.0 passive-interface GigabitEthernet1
NAT and Routing - Used for VM internet reachability through the private interface
interface GigabitEthernet1 ip address dhcp ip nat outside no shutdown ! interface GigabitEthernet2 ip address dhcp ip nat inside no shutdown ! ip nat inside source list 10 interface GigabitEthernet1 overload ! access-list 10 permit 10.16.6.0 0.0.0.255 ! ip route 10.16.6.0 255.255.255.0 GigabitEthernet2 10.16.4.1
GRE and BFD - Used to observe conditions for HA failover
interface Tunnel1 ip address 192.168.1.2 255.255.255.0 bfd interval 500 min_rx 500 multiplier 3 tunnel source GigabitEthernet1 tunnel destination 50.112.227.77 /* Elastic IP of the peer CSR */ ! router eigrp 1 bfd interface Tunnel1 network 192.168.1.0 passive-interface GigabitEthernet1
NAT and Routing - Used for VM internet reachability through the private interface
interface GigabitEthernet1 ip address dhcp ip nat outside no shutdown ! interface GigabitEthernet2 ip address dhcp ip nat inside no shutdown ! ip nat inside source list 10 interface GigabitEthernet1 overload ! access-list 10 permit 10.16.6.0 0.0.0.255 ! ip route 10.16.6.0 255.255.255.0 GigabitEthernet2 10.16.5.1
Monitor BFD peer down events by configuring each CSR 1000v using the cloud provider aws command specified below. Use this command to define the routing changes to (VPC) Route-table-id, Network-interface-id and CIDR after an AWS HA error such as BFD peer down, is detected.
CSR(config)# redundancy CSR(config-red)# cloud provider [aws | azure] node-id # bfd peer ipaddr # route-table table-name # cidr ip ipaddr/prefix # eni elastic-network-intf-name # region region-name
CSRHA#show bfd neighbors IPv4 Sessions NeighAddr LD/RD RH/RS State Int 192.168.1.2 4097/4097 Up Up Tu1
Redundancy Configuration Example on CSRHA
redundancy cloud provider aws 1 bfd peer 192.168.1.2 route-table rtb-ec081d94 cidr ip 8.8.8.8/32 eni eni-90b500a8 region us-west-2
Redundancy Configuration Example on CSRHA1
redundancy cloud provider aws 1 bfd peer 192.168.1.1 route-table rtb-ec081d94 cidr ip 8.8.8.8/32 eni eni-10e3a018 region us-west-2
CSRHA#show bfd nei IPv4 Sessions NeighAddr LD/RD RH/RS State Int 192.168.1.2 4097/4097 Up Up Tu1 CSRHA#show ip eigrp neighbors EIGRP-IPv4 Neighbors for AS(1) H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 0 192.168.1.2 Tu1 12 00:11:57 1 1470 0 2
CSRHA#show redundancy cloud provider aws 1 Cloud HA: work_in_progress=FALSE Provider : AWS node 1 State : idle BFD peer = 192.168.1.2 BFD intf = Tunnel1 route-table = rtb-ec081d94 cidr = 8.8.8.8/32 eni = eni-90b500a8 region = us-west-2
ubuntu@ip-10-16-3-139:~$ ping -I eth1 8.8.8.8 PING 8.8.8.8 (8.8.8.8) from 10.16.6.131 eth1: 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=50 time=1.60 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=50 time=1.62 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=50 time=1.57 ms
CSRHA(config)#int Tun1 CSRHA(config-if)#shut
show redundancy cloud provider [aws | azure] node-id debug redundancy cloud [all | trace | detail | error] debug ip http all
Resolution: Http is used to send the API call from the CSR to AWS. Ensure DNS can resolve the DNS name listed in your instance. Ensure http traffic is not blocked.
*May 30 20:08:06.922: %VXE_CLOUD_HA-3-FAILED: VXE Cloud HA BFD state transitioned, AWS node 1 event httpc_send_request failed *May 30 20:08:06.922: CLOUD-HA : AWS node 1 httpc_send_request failed (0x12) URL=http://ec2.us-east-2b.amazonaws.com
Resolution: Region name and ENI are incorrectly configured in different networks. Region and ENI should be in the same zone as the router.
*May 30 23:38:09.141: CLOUD-HA : res content iov_len=284 iov_base=<?xml version="1.0" encoding="UTF-8"?> <Response><Errors><Error><Code>InvalidParameterValue</Code><Message>route table rtb-9c0000f4 and interface eni-32791318 belong to different networks</Message></Error></Errors><RequestID>af3f228c-d5d8-4b23-b22c-f6ad999e70bd</RequestID></Response>
Resolution: IAM JSON role/policy created incorrectly or not applied to the CSR. IAM role authorizes the CSR to make API calls.
*May 30 22:22:46.437: CLOUD-HA : res content iov_len=895 iov_base=<?xml version="1.0" encoding="UTF-8"?> <Response><Errors><Error><Code>UnauthorizedOperation</Code><Message>You are not authorized to perform this operation. Encoded
authorization failure message: qYvEB4MUdOB8m2itSteRgnOuslAaxhAbDph5qGRJkjJbrESajbmF5HWUR-MmHYeRAlpKZ3Jg_y-_tMlYel5l_ws8Jd9q2W8YDXBl3uXQqfW_cjjrgy9jhnGY0nOaNu65aLpfqui8kS_4RPOpm5grRFfo99-8uv_N3mYaBqKFPn3vUcSYKBmxFIIkJKcjY9esOeLIOWDcnYGGu6AGGMoMxWDtk0K8nwk4IjLDcnd2cDXeENS45w1PqzKGPsHv3wD28TS5xRjIrPXYrT18UpV6lLA_09Oh4737VncQKfzbz4tPpnAkoW0mJLQ1vDpPmNvHUpEng8KrGWYNfbfemoDtWqIdABfaLLLmh4saNtnQ_OMBoTi4toBLEb2BNdMkl1UVBIxqTqdFUVRS**MSG 00041 TRUNCATED** **MSG 00041 CONTINUATION #01**qLosAb5Yx0DrOsLSQwzS95VGvQM_n87LBHYbAWWhqWj3UfP_zmiak7dlm9P41mFCucEB3Cs4FRsFtb-9q44VtyQJaS2sU2nhGe3x4uGEsl7F1pNv5vhVeYOZB3tbOfbV1_Y4trZwYPFgLKgBShZp-WNmUKUJsKc1-6KGqmp7519imvh66JgwgmU9DT_qAZ-jEjkqWjBrxg6krw</Message></Error></Errors><RequestID>4cf31249-2a6e-4414-ae8d-6fb825b0f398</RequestID></Response>
Cisco CSR 1000v Series Cloud Services Router Deployment Guide for Amazon Web Services