- Services → packet switching (virtual circuit vs. datagram) → IPv4 addressing → subnetting → DHCP, ARP → IPv4 header, fragmentation → NAT.
- Practise subnetting until it’s automatic: it is the biggest calculation topic in the course.
- 7.1 services · 7.2 packet switching · 7.4 IPv4.
- Five duties: internetworking, addressing, routing, packetizing, fragmenting.
🎯 How this can come up · 1 question
Which is NOT a duty of the network layer in the slides?
Framing is the data link layer.
- Packetizing: wrap the payload in a packet at the source, unwrap at the destination, never change or use it (like the post office).
- Routing = run routing protocols to BUILD the routing table (find best paths).
- Forwarding = what the router DOES with each arriving packet: pick the output interface.
🎯 How this can come up · 1 question
Deciding which output interface to send an arriving packet on is:
Correct: Forwarding.
- A router is a switch between its input and output ports.
- Two packet-switching approaches: virtual circuit (connection-oriented) and datagram (connectionless).
- Virtual circuit: set up a connection first, then every packet follows the SAME path and carries a VC identifier (flow label).
- Setup reserves resources in every switch. “Virtual” because the circuit is not dedicated wire: resources are shared.
🎯 How this can come up · 1 question
A virtual circuit is called virtual because resources are shared by packets of several connections.
True.
- Each switch maps (incoming port, label) → (outgoing port, new label).
- Setup and teardown add delay, but no per-packet routing decisions.
- Datagram (connectionless): each packet handled independently; packets may take different paths.
- The Internet’s network layer (IP) is CONNECTIONLESS (datagram).
🎯 How this can come up · 1 question
Communication at the network layer in the Internet is:
Correct: Connectionless (datagram).
- No setup, full addresses in every packet, may arrive out of order, robust (if a router dies, other packets reroute).
🎯 How this can come up · 2 questions
Compare the virtual-circuit and datagram approaches.
Virtual circuit: a connection is set up first, all packets follow the same path in order and carry a VC label, resources are reserved, but there is setup delay. Datagram: no setup, every packet carries full source and destination addresses and is routed independently, so packets can take different paths and arrive out of order; it is robust and is what the Internet uses.
In a datagram network, packets are guaranteed to arrive in order.
False.
- The router looks only at the destination address.
- IPv4 address = 32 bits = 4 octets. Unique and universal.
- ICANN manages them: ICANN → regional authorities → ISPs.
🎯 How this can come up · 1 question
An IPv4 address is:
Correct: 32 bits.
- 2³² ≈ 4.3 billion addresses.
- Bit weights: 128 64 32 16 8 4 2 1.
🎯 How this can come up · 1 question
11000000 10101000 00000001 00001010 in dotted decimal is:
Correct: 192.168.1.10.
- Subtract the biggest weight that fits, write 1, continue.
- Each octet is 0–255. Also watch for leading zeros (045) and more than four octets.
🎯 How this can come up · 1 question
Which is a valid IPv4 address?
Correct: 200.56.1.255.
- Prefix = network, suffix = host. Network address = host bits all 0.
- A router has one IP address PER INTERFACE (one per network it touches).
🎯 How this can come up · 1 question
A router connected to three networks has three IP addresses.
True. One per interface.
- Classful: classes A, B, C, D, E.
- First bits: A 0 · B 10 · C 110 · D 1110 · E 1111.
- First byte: A 0–127 · B 128–191 · C 192–223 · D 224–239 · E 240–255.
🎯 How this can come up · 2 questions
An address starting with 190 is class:
Correct: B.
An address whose first bits are 110 is class:
Correct: C.
- Class A: /8, 126 usable networks, ~16.7 million hosts each. 127 = loopback.
- Class B: /16, 16,384 networks, 65,534 hosts each.
🎯 How this can come up · 2 questions
The 127.x.x.x block is reserved for:
Correct: Loopback.
How many usable host addresses does one class B block have?
Correct: 65,534.
- Class C: /24, 254 hosts. Class D: multicast, no net/host split.
- Private ranges: 10/8, 172.16–172.31, 192.168/16. Not routable on the Internet (NAT needed).
🎯 How this can come up · 2 questions
Which address is private?
172.16–172.31 is private.
Class D addresses are used for:
Correct: Multicast.
- E (1111, 240–255) is reserved / experimental.
🎯 How this can come up · 1 question
The address 227.12.14.87 is class:
Correct: D.
- Class A → keep 1 byte, zero the rest: 23.0.0.0.
- Class B → keep 2 bytes: 132.6.0.0.
🎯 How this can come up · 1 question
The network address of 201.14.78.65 (classful) is:
Class C → keep 3 bytes.
- 17.0.0.0 → netid is 1 byte → class A.
- Host bits all 0 → network address. All 1 → directed broadcast. Everything in between is usable.
- Directed broadcast = net ID + host all 1s, sent to ANOTHER network. Routers forward it (often blocked: DoS risk).
- Limited broadcast 255.255.255.255 = everyone on MY network. Routers never forward it.
🎯 How this can come up · 2 questions
Which broadcast address is never forwarded by routers?
Correct: 255.255.255.255.
The directed broadcast address of 192.168.10.0/24 is:
Correct: 192.168.10.255.
- In classful addressing, the organization is assigned the NETWORK address (the whole block).
- Mask → network address by AND.
- Default (class) mask = classful. Subnet mask = classless (the mask, not the class, defines the network).
- Valid subnet mask: longer than the class default, at most /30.
- Shortcut: mask 255 → copy the octet, mask 0 → write 0, otherwise AND in binary.
- Sender ANDs the destination with its mask: same network → deliver directly; different → send to the default gateway.
🎯 How this can come up · 1 question
Host 192.168.10.10/24 sends to 192.168.20.5. What does its network layer do?
It ANDs both addresses with 255.255.255.0: 192.168.10.0 vs. 192.168.20.0, which are different networks, so it hands the packet to the data link layer addressed to the default gateway (the router interface on its own network), not to the destination directly.
- Routing tables list NETWORKS, so the router needs the destination’s network address to find the next hop.
- Classful is dead: today addresses are classless (CIDR), written /n.
- ISPs subdivide blocks into subnets.
- /n = number of 1 bits in the mask.
🎯 How this can come up · 1 question
The default mask of a class C address is:
Correct: /24.
- Fill whole octets of 255 (8 bits each), then the leftover bits go in the next octet.
🎯 How this can come up · 2 questions
/20 in dotted decimal is:
Correct: 255.255.240.0.
/27 in dotted decimal is:
Correct: 255.255.255.224.
- Memorize this list.
- 1 AND 1 = 1, everything else 0.
- Only the octet where the mask is not 255 or 0 needs binary work.
- 172.16.200.200/18: mask 255.255.192.0; 200 AND 192 = 192 → 172.16.192.0.
- 220.1.2.162/30: 162 AND 252 = 160 → 220.1.2.160.
🎯 How this can come up · 2 questions
The subnet address of 172.16.200.200/18 is:
Correct: 172.16.192.0.
The subnet address of 220.1.2.162 with mask 255.255.255.252 is:
Correct: 220.1.2.160.
- One organisation, one block, many departmental LANs → subnetting.
- Benefits: less traffic (smaller broadcast domains), easier management, control over the address space, security.
- Outside the organisation it looks like ONE network; inside, routers use the subnet addresses.
- Three levels: network, subnet, host. Subnet bits are borrowed from the host part.
🎯 How this can come up · 1 question
A /22 network has how many usable host addresses?
2¹⁰ - 2.
- Example: 192.168.1.0/24 into 5 subnets. 5 - 1 = 4 = 100 → 3 bits → /27 (255.255.255.224).
- Weight: the last 1 of the mask sits at 2⁵ = 32 → subnets .0, .32, .64, .96, .128, .160, .192, .224.
🎯 How this can come up · 1 question
A class C network must be split into 6 subnets. The new mask is:
3 bits (2³ = 8 ≥ 6) → 24 + 3.
- Subnets = 2^(borrowed bits). Hosts = 2^(host bits) - 2.
🎯 How this can come up · 2 questions
A class B network uses mask /20. How many subnets?
2^(20 - 16).
How many hosts per subnet with mask /20?
2¹² - 2.
- The slide’s table is blank in the PDF: these are the answers. Each /27 has 32 addresses, 30 usable.
🎯 How this can come up · 2 questions
In 192.168.1.64/27, the broadcast address is:
Correct: 192.168.1.95.
The first usable host of 192.168.1.160/27 is:
Correct: 192.168.1.161.
- One /27 per floor; .160, .192 and .224 are kept for expansion.
- Use the answers on slide 58.
- 141.14.0.0/16 split into 4 subnets with /18: .0.0, .64.0, .128.0, .192.0.
🎯 How this can come up · 1 question
141.14.0.0/16 is split with mask /18. Which is one of the subnet addresses?
Correct: 141.14.128.0.
- Four settings every host needs: IP address, subnet mask, default gateway, DNS server.
- Manual configuration doesn’t work for diskless, newly booted or moved machines → DHCP.
🎯 How this can come up · 1 question
Which is NOT one of the four IP settings a host needs?
Correct: MAC address of the switch.
- Two networks joined by one router: 192.168.10.0/24 (A–D) and 192.168.20.0/24 (S).
- Gateway for A–D: the router interface on their LAN (192.168.10.1). For S: 192.168.20.1.
- IP: A → S on both sides (unchanged).
- MAC from A: source A’s MAC, destination the router’s 192.168.10.1 interface. At S: source the router’s 192.168.20.1 interface, destination S’s MAC.
🎯 How this can come up · 1 question
In the example, give the source and destination MAC addresses of the frame leaving A, and of the frame arriving at S.
Leaving A: source = A’s MAC, destination = the MAC of the router interface on A’s network (the default gateway). Arriving at S: source = the MAC of the router interface on S’s network, destination = S’s MAC. The IP addresses stay A → S the whole way.
- /29 → block 8 → 35 is in 32–39 → network 211.56.77.32, broadcast 211.56.77.39.
- Others: 172.16.192.0 and 220.1.2.160 (see slide 52).
🎯 How this can come up · 1 question
The directed broadcast address of 211.56.77.35/29 is:
Correct: 211.56.77.39.
- DHCP is an APPLICATION-layer protocol that hands out IP, mask, gateway and DNS.
- Static database: MAC → permanent IP (checked first). Dynamic: a pool of temporary addresses, LEASED for a time, then returned or renewed.
🎯 How this can come up · 2 questions
DHCP is a protocol of which layer?
Correct: Application.
A DHCP lease means the address is given for a limited period.
True.
- IP gets the packet to the right NEXT node logically, but the frame needs that node’s MAC address. ARP finds it.
- ARP: IP address → MAC address.
🎯 How this can come up · 1 question
ARP maps:
Correct: An IP address to a MAC address.
- Request = BROADCAST (“who has IP N2?”). Reply = UNICAST (“I do, my MAC is L2”).
🎯 How this can come up · 1 question
An ARP request is sent as a ___ and the reply as a ___.
Correct: Broadcast; unicast.
- ARP is carried directly in an Ethernet frame (type 0x0806), not inside IP.
- Header 20–60 bytes; datagram up to 65,535 bytes.
- Min header 20 bytes; total length ≤ 65,535.
- Fragment anywhere, reassemble ONLY at the destination.
- TTL: each router subtracts 1; 0 → drop (kills loops).
- Protocol field: who gets the payload (TCP 6, UDP 17…). Checksum covers the HEADER only and is recomputed at every router.
🎯 How this can come up · 3 questions
What happens when a router decrements TTL to 0?
Correct: The packet is dropped.
IPv4 fragments can be reassembled at intermediate routers.
False. Only at the destination.
The minimum IPv4 header length is:
Correct: 20 bytes.
- ICMP 1, IGMP 2, TCP 6, UDP 17, OSPF 89.
🎯 How this can come up · 1 question
The IPv4 protocol value for UDP is:
Correct: 17.
- Each network has its own frame format and size, so a router may have to cut a datagram to fit the next network.
- Ethernet MTU = 1500 bytes (= Ethernet’s max data).
🎯 How this can come up · 1 question
The MTU of Ethernet is:
Correct: 1500 bytes.
- MTU = biggest payload a frame can carry. The datagram must be ≤ MTU, or it gets fragmented.
- Each router re-encapsulates the datagram in the next network’s frame type.
- M = more fragments follow. D = don’t fragment (too big + D = 1 → dropped).
🎯 How this can come up · 2 questions
A fragment with M = 0 is:
Correct: The last fragment.
A router fragments a packet even if D = 1 when it is bigger than the MTU.
False. It drops it.
- Same one’s-complement checksum as Chapter 3, over the header words only.
- Always-on customers each need an address; there aren’t enough. NAT lets many private hosts share one public IP.
- Inside: private 172.18.3.x. Outside: one public 200.24.5.8.
- Out: the router rewrites the SOURCE (private → public). In: it rewrites the DESTINATION (public → private).
🎯 How this can come up · 1 question
For an outgoing packet, a NAT router changes the:
Correct: Source IP address.
- The table entry made on the way out tells the router where to send the reply.
- Table row: private source address, source port, destination address, NAT port.
- NAT advantages: saves public addresses, change inside addresses or ISP freely, acts like a firewall (outsiders can’t start a connection in).
🎯 How this can come up · 1 question
Give three advantages of NAT.
It saves public IP addresses (one public address for the whole site); internal addresses can be changed without telling the outside world, and the ISP can be changed without renumbering inside; and it acts like a firewall, since outside hosts cannot open a connection to an internal host unless it started the contact.
No slides match this filter.








































