SYSTEM-DESIGN
    intermediate

    Network Address Translation

    Software Engineer path · lesson 66 of 99

    Scroll to see full diagram

    Private NetworkHome PC192.168.1.5
    NAT RouterPub IP: 203.0.113.1
    NAT Table
    (empty)
    Public InternetWeb Server93.184.216.34
    Step 0 / 6

    A packet through NAT

    Sequence

    Order what happens when a laptop at 192.168.1.10 fetches a web page.

    Tap a piece, then tap where it goes — or drag it. Tap the tray to take one back.

    1. 1Drop a step here
    2. 2Drop a step here
    3. 3Drop a step here
    4. 4Drop a step here
    5. 5Drop a step here
    5 pieces left to place

    Test your knowledge

    21 questions
    Question 1 of 21
    Score: 0

    What crucial piece of information does a NAT router store in its translation table to ensure returning packets reach the correct private device?

    The short version

    NAT is like an office receptionist. Employees have internal extension numbers (private IPs). When an employee makes an outside call, the receptionist masks it with the company's main phone number (public IP). When a reply comes to the main number, the receptionist looks at their logbook (NAT Table) and forwards it to the correct internal extension.

    In more depth

    NAT (Network Address Translation)

    NAT is a method of mapping an IP address space into another by modifying network address information in the IP header of packets while they are in transit across a traffic routing device.

    How it Works

    1.Outbound: The NAT router replaces the source Private IP and port with its own Public IP and a unique port.
    2.Tracking: The mapping is saved in a NAT Translation Table.
    3.Inbound: When a response arrives at the Public IP/Port, the router looks up the table and rewrites the destination back to the original Private IP/Port.

    Interview Questions

    Cisco
    Cloudflare
    Microsoft
    Google
    Amazon
    Cisco
    Cloudflare
    Meta
    Microsoft
    Amazon
    Netflix
    Stripe

    Love this visualization?

    Sign up to track your progress, earn achievements, use the AI assistant, and access your personal learning dashboard.

    100% free • No credit card required