Network Layer Flashcards
What is the purpose of the Network Layer?
It lets computers talk using IP, but doesn’t guarantee delivery, order, speed, or reliability
What is the key protocol used in the Network Layer?
Internet Protocol (IP)
What are the two key functions of a router?
Routing picks the path. Forwarding moves packets based on a table
What is the difference between routing and forwarding?
Routing plans the path (long-term). Forwarding sends packets out quickly (short-term)
What happens at a router when a packet arrives?
Physical layer gets bits,
Link layer opens the frame,
Network layer checks IP and forwards,
packet might wait (queue), then gets sent out
What is a switching fabric?
Hardware inside a router that moves packets from input to output
Where can packet loss occur in a router?
Input buffer stores packets if the router’s fabric is slow.
Output buffer stores packets if sending is slower than receiving
What is switching rate?
How fast a router can move packets inside, should match or beat line rate × number of ports
How are forwarding tables structured?
Group IP addresses into ranges instead of listing them one by one
What is Longest Prefix Matching?
Pick the route that matches the most bits of the IP address
What is an IP address?
A 32-bit number that identifies each interface on a computer or router
What is a subnet?
A group of interfaces directly connected, sharing the same IP prefix
What is CIDR?
Classless Inter-Domain Routing (CIDR) uses a format: a.b.c.d/x, where x is the number of subnet bits
How does CIDR help with address management?
It gives flexible IP ranges, not stuck with fixed classes like A, B, or C
What does DHCP do?
It auto-assigns IPs when devices connect, so setup is easy
What are the 4 DHCP messages?
Discover – Host asks for IP.
Offer – Server gives an IP.
Request – Host asks for the IP.
Ack – Server confirms the IP.
What else can DHCP provide besides an IP address?
First-hop router address, DNS server address, and subnet mask
Why is DHCP useful for mobile or temporary users?
IPs are given for a short time, then reused or renewed as needed
Who allocates IP address space globally?
ICANN – Manages internet names and numbers
What is NAT? Network Address Translation
Lets many local devices share one public IP using different port numbers
Why is NAT used?
Saves public IPs
Internal IPs can change without breaking external connections
Adds security
How does NAT translation work (example)?
Host sends packet → NAT changes IP and port → Server replies → NAT sends it back to the right host
Host 10.0.0.1 sends a packet.
NAT router changes it to 138.76.29.7:5001.
External server replies to 138.76.29.7:5001.
NAT sends back to 10.0.0.1:3345 and delivers the reply