Skip to content

Instantly share code, notes, and snippets.

@chaitanyagupta
Last active February 22, 2021 11:20
Show Gist options
  • Save chaitanyagupta/79d23b21a6ecd96c67c25b453e60e540 to your computer and use it in GitHub Desktop.
Save chaitanyagupta/79d23b21a6ecd96c67c25b453e60e540 to your computer and use it in GitHub Desktop.
Questions around TCP/IP networking

Assumes you've gone through the topics to study for TCP/IP networking.

You can use GNS3 to emulate TCP/IP networks inside a single host.

Link/Network Layer

  1. Assume you've got two machines with working ethernet ports and an ethernet crossover cable. You connect the two. Your objective is to send a message from one machine to the other. How will you do that? What networking protocols are required to achieve this and why?
  2. Assume you've got more than two machines, an ethernet hub and straight through ethernet cables for each machine. You connect all of these machines to the hub. Your objective is to send a message from one machine to any of the other machines. How will you do that? What networking protocols are required to achieve this and why?
  3. If you replace the hub in the previous question with a switch, what advantages do you get?
  4. You have three machines, an ethernet hub/switch and required cables. As does your neighbour. You want to connect your network with your neighbour's. How will you do that? Can you achieve this by connecting the two hubs or switches together?

Network Layer

  1. After a while your friend suggests using a router to connect the two networks instead of connecting the switches directly. Why might they suggest that?
    • Explain how you will configure the router to forward packets from one network to another.
    • How do ARP packet flows change compared to connecting switches directly together?
    • What impact does this have on layer 2 broadcasts?
  2. What are class A, class B and class C IP addresses?
  3. What are private IP address ranges?
  4. How does ping work?
  5. How does traceroute work?
  6. How do you list the IP routing table on your machine?
  7. What is IPv4 address exhaustion and how does a NAT help alleviate it?

Transport Layer

  1. What is a port number in TCP/UDP and why is it required?
  2. What is the relation between MTU and MSS?
  3. Why is IP fragmentation so bad for TCP connections? How is the path MTU discovered?
  4. Let's say you want to establish a TCP connection to another host. What is the minimum amount of time that it will take before your host can start sending the higher level application data to the other host?
  5. What is a listening socket? How do you create one? How is binding a listening socket to 0.0.0.0 different from binding it to 127.0.0.1?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment