Lesson 8 of 11 Advanced Networking

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.

ToolAnswersTypical use
Reachability AnalyzerWhether a path exists between a source and a destination, and which component blocks itTroubleshooting why A cannot reach B, or verifying a change
Network Access AnalyzerWhich paths exist that violate a stated intentProving that no path leads from the internet to databases
Match the pairs

Which network tool?

Exam skills 5.3.1 · 1.4.3

Match each question with the tool that answers it.

Log in to try this activity Interactive activities are free with an account.

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.

ToolMeasures
CloudWatch Network MonitorLatency and packet loss on hybrid paths such as Direct Connect and VPN
CloudWatch Internet MonitorInternet performance and availability problems affecting users of an application
Network Flow MonitorPerformance of TCP flows between workloads inside AWS
Network ManagerGlobal 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.

  1. Check the configuration

    Run Reachability Analyzer between the two endpoints; it names the blocking component if the configuration is wrong.

  2. Check the traffic

    If the configuration permits the path, check flow logs for rejected traffic and its direction.

  3. Check stateful devices

    Look for asymmetric routing through firewalls and other stateful devices.

  4. Measure intermittent problems

    Measure latency and loss with Network Monitor or Internet Monitor.

Worked example

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.

Check yourself

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.