Monitoring and Troubleshooting Complex Networks
This lesson explains the AWS tools that analyse network configuration, record traffic and measure performance, and how choosing the right one speeds up troubleshooting in complex networks.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish Reachability Analyzer from Network Access Analyzer.
- Explain what flow logs and Traffic Mirroring record.
- Identify the tools that monitor hybrid and internet performance.
- Follow a systematic troubleshooting sequence.
Configuration analysis
Two tools analyse network configuration, routes, security groups, network ACLs and gateways, without sending any traffic. Reachability Analyzer takes one source and one destination and reports whether a path exists between them; if not, it names the component that blocks it. That makes it the tool for troubleshooting why A cannot reach B and for verifying a change. Network Access Analyzer works the other way round: you state an intent, such as that no path should lead from the internet to the database subnets, and it finds every path that violates it, which proves the network is segmented as required. The following table summarises the tools.
| Tool | Answers | Typical use |
|---|---|---|
| Reachability Analyzer | Whether a path exists between a source and a destination, and which component blocks it | Troubleshooting why A cannot reach B, or verifying a change |
| Network Access Analyzer | Which paths exist that violate a stated intent | Proving that no path leads from the internet to databases |
Traffic records
Configuration analysis shows what should happen; traffic records show what did. VPC Flow Logs record metadata for each flow through a VPC, subnet or network interface: addresses, ports, protocol, bytes and whether the traffic was accepted or rejected, delivered to CloudWatch Logs, S3 or Firehose. Transit Gateway Flow Logs record the traffic that crosses a transit gateway, including which attachments it entered and left, which VPC flow logs cannot show.
Flow logs record metadata only. When the packets themselves are needed, for intrusion detection or deep troubleshooting, Traffic Mirroring copies packets from network interfaces, filtered by rules, to a monitoring appliance behind a Network Load Balancer or Gateway Load Balancer.
Performance monitoring
Performance problems need tools that measure real traffic. CloudWatch Network Monitor sends probes over hybrid paths, such as Direct Connect and VPN, and reports latency and packet loss, showing whether a problem lies in the AWS network. CloudWatch Internet Monitor shows internet performance and availability problems affecting an application's users, by location and network provider. Network Flow Monitor measures the performance of TCP flows between workloads inside AWS. Network Manager provides a global view of transit gateways and Cloud WAN, with topology, route analysis and events. The following table summarises the tools.
| Tool | Measures |
|---|---|
| CloudWatch Network Monitor | Latency and packet loss on hybrid paths such as Direct Connect and VPN |
| CloudWatch Internet Monitor | Internet performance and availability problems affecting users of an application |
| Network Flow Monitor | Performance of TCP flows between workloads inside AWS |
| Network Manager | Global topology, route analysis and events for transit gateways and Cloud WAN |
A troubleshooting sequence
Network connectivity problems can be diagnosed with a systematic sequence of checks. The sequence is as follows.
-
Check the configuration
Run Reachability Analyzer between the two endpoints; it names the blocking component if the configuration is wrong.
-
Check the traffic
If the configuration permits the path, check flow logs for rejected traffic and its direction.
-
Check stateful devices
Look for asymmetric routing through firewalls and other stateful devices.
-
Measure intermittent problems
Measure latency and loss with Network Monitor or Internet Monitor.
Finding why an application cannot reach its database
After a network change, an application instance in a workload account can no longer reach an Aurora cluster in a shared-services VPC through the transit gateway. Instead of reading route tables in three accounts, the engineer runs Reachability Analyzer from the network account:
PATH_ID=$(aws ec2 create-network-insights-path --source eni-0app1234 --destination eni-0aurora5678 \
--protocol tcp --destination-port 5432 --query NetworkInsightsPath.NetworkInsightsPathId --output text)
aws ec2 start-network-insights-analysis --network-insights-path-id $PATH_ID
aws ec2 describe-network-insights-analyses --network-insights-path-id $PATH_ID \
--query 'NetworkInsightsAnalyses[0].[NetworkPathFound,Explanations[0].ExplanationCode]'The analysis reports NetworkPathFound: false with an explanation that the transit gateway route table associated with the workload attachment has no route to the shared-services CIDR; the change had disassociated the attachment from its table. Re-associating it and re-running the analysis confirms the fix without sending any traffic. Separately, the team defines a Network Access Analyzer scope that flags any path from an internet gateway to a database subnet, run after every network change.
What is the difference between Reachability Analyzer and Network Access Analyzer?
Show answer
Reachability Analyzer checks whether a path exists between two endpoints and names the blocking component. Network Access Analyzer finds access paths that break defined requirements, such as resources reachable from the internet.
Exam Tips
Remember for the exam
- To find out why A cannot reach B, use Reachability Analyzer.
- To verify that only intended paths lead to sensitive resources, use Network Access Analyzer.
- For packet-level inspection, use Traffic Mirroring; flow logs record metadata only.
- To monitor latency and loss on hybrid links, use CloudWatch Network Monitor.
- Use Transit Gateway Flow Logs to see traffic crossing the transit gateway.