OSI model, protocols, IP addressing, routing
Topics: Network goals and topologies; OSI and TCP/IP models; transmission media; switching; data link layer: framing, error control, MAC; IP addressing and subnetting; routing; TCP and UDP; application protocols.
Network basics, models and delays
Topologies: bus, star, ring, mesh (a full mesh of n nodes needs n(n − 1)/2 links), tree and hybrid. The OSI model has seven layers; TCP/IP has four or five. Transmission delay = packet size ÷ bandwidth; propagation delay = distance ÷ signal speed (about 2 × 10⁸ m/s in cable).
- Full mesh links = n(n − 1)/2
- Transmission delay = L/B
- Propagation delay = d/v
Example: How many links does a full mesh of 6 computers need?
- 6 × 5/2.
- = 15.
Answer: 15
Example: Find the propagation delay over 2000 km at 2 × 10⁸ m/s, and the time to send 1 MB at 8 Mbit/s.
- 2 × 10⁶/2 × 10⁸ = 10 ms.
- 8 Mbit/8 Mbit/s = 1 s.
Answer: 10 ms; 1 s
Data link layer and IP addressing
The data link layer frames data, detects errors (CRC) and controls access (CSMA/CD on classic Ethernet). IPv4 addresses are 32 bits; a /n prefix leaves 32 − n host bits, giving 2^(32 − n) − 2 usable hosts. Subnetting borrows host bits to make smaller networks. IPv6 uses 128-bit addresses.
- Hosts = 2^(32 − n) − 2
- Borrowing k bits → 2ᵏ subnets
- IPv6: 128 bits
Example: Split 192.168.10.0/24 into /26 subnets. How many subnets, hosts each, and the first subnet’s broadcast?
- 2 bits borrowed: 4 subnets; 6 host bits: 62 hosts each.
- First subnet 192.168.10.0–63: broadcast 192.168.10.63.
Answer: 4 subnets, 62 hosts, .63
Example: How many hosts fit in a /20 network?
- 12 host bits.
- 2¹² − 2 = 4094.
Answer: 4094
Routing, transport and applications
Routers forward packets by routing tables built statically or by protocols (RIP, OSPF, BGP). TCP gives reliable, ordered delivery with a three-way handshake (SYN, SYN-ACK, ACK); UDP is fast and connectionless (DNS queries, streaming, games). Well-known ports: FTP 21, SSH 22, SMTP 25, DNS 53, HTTP 80, HTTPS 443.
- TCP: reliable, handshake
- UDP: fast, no connection
- HTTP 80, HTTPS 443, DNS 53
Example: Which port does HTTPS use, and which transport protocol suits live video calls?
- HTTPS uses port 443.
- Live calls prefer UDP: late packets are useless anyway.
Answer: 443; UDP
The OSI model has seven layers: physical, data link, network, transport, session, presentation, application. TCP/IP merges them into four. The data link layer frames bits and uses MAC addresses; the network layer routes with IP; TCP gives reliable connection-oriented delivery using a three-way handshake, and UDP is fast and connectionless. IPv4 classes: A 1–126, B 128–191, C 192–223. A /n subnet has 2^(32−n) − 2 usable hosts. DNS maps names, DHCP assigns addresses, ARP maps IP to MAC. HTTP uses port 80, HTTPS 443, FTP 21, SMTP 25, DNS 53. Routing protocols are RIP (distance-vector) and OSPF (link-state).
- Hub: physical layer; switch: data link; router: network.
- Private IPv4: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.
- 127.0.0.1 is loopback.
- CRC detects burst errors.
- NAT lets many private hosts share one public IP.
Key formulas
- hosts = 2^(32 − n) − 2
- bandwidth-delay = B × t
- T_prop = d/v
Practice questions
Routers operate at the
- physical layer
- data link layer
- network layer
- application layer
Show the answer
Answer: C. network layer Layer 3.
TCP is
- connection-oriented
- connectionless
- a physical layer
- a hardware bus
Show the answer
Answer: A. connection-oriented Reliable.
UDP is
- connection-oriented
- connectionless
- routing
- encryption
Show the answer
Answer: B. connectionless No handshake.
HTTPS uses port
- 21
- 53
- 80
- 443
Show the answer
Answer: D. 443 TLS.
DNS uses port
- 25
- 53
- 80
- 110
Show the answer
Answer: B. 53 Name service.
ARP maps
- IP to MAC
- name to IP
- MAC to port
- port to IP
Show the answer
Answer: A. IP to MAC Address resolution.
DHCP
- assigns IP addresses
- encrypts mail
- routes packets
- stores web pages
Show the answer
Answer: A. assigns IP addresses Dynamic configuration.
Usable hosts in a /24 are
- 254
- 256
- 128
- 1024
Show the answer
Answer: A. 254 2⁸ − 2.
192.168.1.1 is a
- private address
- public address
- multicast address
- MAC address
Show the answer
Answer: A. private address RFC 1918.
OSPF is a
- link-state protocol
- distance-vector protocol
- transport protocol
- physical cable
Show the answer
Answer: A. link-state protocol Dijkstra.
The number of OSI layers is
- 4
- 5
- 7
- 9
Show the answer
Answer: C. 7 Seven.
The practice questions were written for this studio; they are not copied from ASTU papers. ASTU publishes no topic syllabus for these exams, so the topics are an informed guide based on diploma courses, not an official list.