Networking and Internet
Networking and Internet covers how computers communicate: OSI and TCP/IP layers, network devices, IPv4 addressing, protocols and ports, DNS, and basic internet services. Questions are often one-line facts plus a subnet or device identification.
Layers and devices
- OSI seven layers: physical, data link, network, transport, session, presentation, application. TCP/IP collapses these to network access, internet, transport, and application.
- A hub repeats to all ports at Layer 1; a switch forwards by MAC at Layer 2; a router forwards by IP at Layer 3.
Addressing and protocols
- IPv4 is 32-bit dotted decimal. Classes: A 1-126, B 128-191, C 192-223, D multicast 224-239, E experimental.
- Private ranges: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16. Loopback is 127.0.0.1.
- Common ports: HTTP 80, HTTPS 443, FTP 20/21, SMTP 25, DNS 53, DHCP 67/68.
- DNS maps names to IP; a URL has scheme, host, and path; bandwidth is measured in bits per second.
Worked example
For 192.168.1.50 with mask 255.255.255.0: the first octet 192 is Class C, and 192.168 is private. The mask has 24 network bits, so the network address is 192.168.1.0, broadcast is 192.168.1.255, and usable hosts are 192.168.1.1 to 192.168.1.254. Reasoning: host bits are the last octet; the all-zero host is the network and the all-ones host is broadcast.
Traps
Do not call a switch a Layer 3 device; MAC is hardware, IP is logical; HTTP is not encrypted; SMTP sends while POP3/IMAP retrieve; Mbps is megabits, MBps is megabytes.