Final Study ECE358

  • Chapter 3
    • Need to understand DHCP
    • Forwarding table
    • p.67 onwards
  • Chapter 4
  • Chapter 5
  • Wifi

Todo:

  • Finish all tutorials
  • Go back to tutorial 4 and understand how to do it
  • Review all tutorials one last time
  • Go over answer for midterm
  • Header of HTTP response message

laptop uses DHCP (Dynamic Host Configuration Protocol) to automatically obtain network configuration settings, including its IP address, gateway IP, and DNS server address, when it connects to a network. Here’s a simplified step-by-step summary:

  1. DHCP Discovery:
    • The laptop sends a DHCP DISCOVER message to locate DHCP servers on the network. This message is broadcast over the network using the Ethernet broadcast address (FFFFFFFFFF), meaning it is sent to all devices on the local network segment.
  2. DHCP Offer:
    • The router with a built-in DHCP server receives this broadcast. The router then sends a DHCP OFFER back to the laptop. This message contains potential IP address assignment and other network configuration details for the laptop.
  3. DHCP Request:
    • The laptop receives the DHCP OFFER and decides to accept the offered configuration. It responds with a DHCP REQUEST message, indicating that it wants to accept the settings provided by the DHCP server. This message is again encapsulated and sent across the network, targeted at the DHCP server.
  4. DHCP Acknowledgment:
    • Upon receiving the DHCP REQUEST, the DHCP server sends a DHCP ACK (acknowledgment) message back to the laptop. This message confirms the IP address and other configuration details such as the subnet mask, default gateway, and DNS server addresses.
    • The ACK message is sent to the laptop, and upon receipt, the laptop configures its network interface with these settings.
  5. Network Configuration Established:
    • With the DHCP ACK received and processed, the laptop now has a valid IP address, knows the IP address of its first-hop router (gateway), and the IP address of the DNS server it should use for domain name resolution.

NAT Implementation:

The provided image explains the process of Network Address Translation (NAT) used by routers to manage IP addresses for internal and external network traffic. Here’s a concise explanation of how NAT works in this example:

  1. Outgoing Datagram:
    • A host within a private network (IP: 10.0.0.1) sends a datagram to an external IP address (128.119.40.186) on the internet.
    • The NAT router intercepts this datagram and replaces the source IP address and port (10.0.0.1, 3345) with its own public IP address and a new port number (138.76.29.7, 5001). This mapping is recorded in the NAT table.
  2. NAT Table Update:
    • The router maintains a NAT translation table where it keeps track of the mapping between the internal (LAN) IP addresses and port numbers and the external (WAN) IP addresses and port numbers used.
  3. Incoming Datagram:
    • When a response comes back from the internet destined for the public IP address of the router (138.76.29.7) and the port number 5001, the router consults the NAT table.
    • It then translates the destination IP and port back to the original internal IP address and port (10.0.0.1, 3345) before forwarding it to the correct internal host.
  4. Transparent Routing:
    • This process is transparent to both the internal host and the external server. The internal host appears to the outside world as if it has the public IP address of the router, thereby masking and protecting individual internal IP addresses.