I have resources that are in different AWS accounts and AWS Regions where traffic flows through AWS Transit Gateway. I want to resolve the slow connectivity between the accounts or Regions.
Resolution
To troubleshoot performance issues between resources across accounts and Regions, check your IP address flow and routing paths.
Test connectivity to determine latency between source and destination
Complete the following steps:
-
From the AWS host, confirm that port 443 and other required ports are open for your application to test connectivity from the destination side.
-
Download the tcping tool on the Eli Fulkerson website.
-
Download the portal Wireshark tool on the Wireshark website.
-
Run the following tcping command to determine TCP latency:
tcping TARGET-IP PORT
Note: Replace the TARGET-IP with your target host's IP address and PORT with your port number. When you run the tcping command, use Wireshark to capture packets on both your source and destination resources.
-
Review the following packet capture results from Wireshark:
Look for the initial SYN packet timestamp 0.00000 that your source sends to the destination host.
Find the SYN-ACK packet that your destination host sends to the source. The timestamp difference shows the round-trip time (RTT).
Locate the final ACK packet that returns to the host and note its processing time.
Note: For a detailed view of trends, use Wireshark's graphing capabilities. For more information, see TCP stream graphs on the Wireshark website.
Test the connectivity link's maximum throughput
To measure bandwidth between your source and destination resources and identify drops in the connection when utilization is high, complete the following steps:
- Install iPerf on both the source and destination machines.
- Run an iPerf test between the two endpoints.
- Perform another packet capture during the iPerf test to gather detailed information about the traffic flow.
Trace the network path to identify errors during peak utilization
If you use Windows, then use the WinMTR My Traceroute (MTR) tool to perform the trace. To download WinMTR, see WinMTR on the SOURCEFORGE website.
If you use macOS or Linux, then run the following mtr command to identify packet loss and latency along the path of connectivity:
mtr -u -P 443 -c 20 --report IP ADDRESS
Note: Replace IP ADDRESS with your IP address. The mtr command uses UDP on port 443 and runs 20 polls to display results.
Check tcping, iPerf, and mtr test results
Take the following actions:
- Use the tcping results to check whether latency values are consistent. High latency variation is high shows network congestion or routing issues.
- Use the iPerf results to compare achieved bandwidth with expected throughput for your connection type. Large differences show network bottlenecks or resource misconfiguration.
- Use the MTR results to check where latency consistently increases and packet loss occurs at each hop in the route.
- Regularly test and benchmark network performance to establish a baseline and quickly identify differences.
Implement best practices
Take the following actions:
- To proactively identify issues, use network monitoring tools, such as Amazon EventBridge and Transit Gateway Flow Logs.
- Check Amazon CloudWatch metrics to identify patterns and anomalies in network performance for your transit gateway, VPN connections, and AWS Direct Connect connections.
- Verify that you associated the correct route tables with the correct attachments.
- Verify that routes correctly propagate between virtual private clouds (VPCs) and on-premises networks.
- Check the status of VPN connection tunnels and CloudWatch metrics for data transfer.
- Check the status of the Direct Connect virtual interface and Border Gateway Protocol (BGP) session health.
Related information
What is AWS Transit Gateway for Amazon VPC?
What is AWS Site-to-Site VPN?
Troubleshoot Direct Connect
What is Amazon VPC?