Computer Networking Lecture: Core Concepts, Protocols & Algorithms
The five essential components of data communication are the sender, the receiver, the message, the transmission medium, and the protocols that govern exchange. Transmission can occur in simplex, half‑duplex, or full‑duplex modes. Common network topologies include mesh, star, bus, ring, tree, and hybrid; a full mesh contains n(n‑1)/2 links. The OSI model defines seven layered functions—from Physical up to Application—providing a conceptual framework for interoperability rather than a concrete protocol suite. Identification occurs at three levels: IP addresses locate hosts on the network, MAC addresses identify interfaces on a host, and port numbers pinpoint processes.
IP Addressing and Subnetting
IPv4 addresses are 32‑bit numbers, while MAC addresses use 48 bits and ports occupy 16 bits. Classful addressing divides the address space into classes A‑E, each with a default network‑host split. Subnetting borrows bits from the host identifier, creating a hierarchy of network → subnet → host → process. Subnet masks are typically contiguous, though non‑contiguous masks exist. Supernetting aggregates contiguous networks by borrowing bits from the network identifier; the resulting CIDR block size equals 2^(32‑n). Variable Length Subnet Masking (VLSM) allows flexible allocation of address space.
Error Control and Performance
Redundancy underpins all error‑handling techniques. Simple parity, checksums, and cyclic redundancy checks (CRC) detect errors, while Hamming codes correct them. Detection requires a minimum Hamming distance dₘᵢₙ ≥ k + 1; correction demands dₘᵢₙ ≥ 2k + 1, making correction considerably harder than detection. Transmission delay equals L / bandwidth, and propagation delay equals distance / signal velocity. Queuing and processing delays add to total latency. Data units follow binary prefixes for storage (2¹⁰) and decimal prefixes for bandwidth (10³).
Transport Layer: TCP and UDP
TCP provides a connection‑oriented, reliable service with byte‑oriented sequencing, while UDP offers a connectionless, low‑latency alternative. TCP headers range from 20 to 60 bytes; UDP headers are fixed at 8 bytes. TCP establishes a connection through a three‑way handshake: SYN, SYN‑ACK, and ACK. Persistent timers prevent deadlock during zero‑window advertisements. Flow control mechanisms such as Stop‑and‑Wait ARQ, Go‑Back‑N, and Selective Repeat manage data pacing, and congestion control regulates network load.
Media Access Control (MAC)
Random‑access protocols include Pure Aloha, Slotted Aloha, CSMA/CD, and CSMA/CA. Pure Aloha’s vulnerable period equals twice the transmission delay; Slotted Aloha reduces it to one transmission delay, doubling maximum throughput from 18.4 % to 36.8 %. CSMA/CD uses a jam signal to notify stations of collisions, while CSMA/CA attempts to avoid collisions before they occur. Controlled‑access methods—polling, reservation, and token passing—assign transmission rights deterministically.
Routing and Switching
Circuit switching reserves a dedicated path for the duration of a session, whereas packet switching routes each packet independently. Flooding guarantees the shortest path but generates excessive traffic and duplicate packets. Distance Vector Routing (Bellman‑Ford) relies on local neighbor information, while Link State Routing (Dijkstra) builds a global view of the network topology. Routers apply a bitwise AND between the destination IP and each subnet mask; the longest matching prefix determines the forwarding interface.
Application Layer
Email services use distinct protocols: SMTP (port 25) pushes outgoing mail, while POP3 (port 110) and IMAP4 (port 143) pull incoming messages. DNS resolves domain names to IP addresses via UDP (port 53) and switches to TCP when responses exceed 512 bytes. FTP separates control (port 21) from data transfer (port 20), operating out‑of‑band. HTTP (port 80) and HTTPS (port 443) enable web communication, with HTTPS adding TLS encryption.
Takeaways
- The OSI model provides a layered framework that separates physical transmission, network routing, and application services, enabling interoperable protocol design.
- IPv4 addresses consist of 32 bits, and subnetting borrows host bits to create hierarchical network‑subnet‑host identifiers, while supernetting aggregates contiguous networks using CIDR notation.
- Error detection relies on redundancy such as parity, CRC, or checksum, whereas correction requires a higher Hamming distance, making correction significantly more complex than detection.
- TCP establishes reliable connections through a three‑way handshake, uses byte‑oriented sequencing, and employs flow and congestion control, while UDP offers connectionless, low‑latency delivery with minimal header overhead.
- Media access protocols range from random‑access schemes like Aloha and CSMA/CD to controlled methods such as token passing, and routing algorithms contrast distance‑vector’s local view with link‑state’s global network map.
Frequently Asked Questions
What is the difference between subnetting and supernetting?
Subnetting takes bits from the host portion of an IPv4 address to create smaller, more specific networks, increasing the hierarchy from network to subnet to host. Supernetting does the opposite: it borrows bits from the network portion to combine several contiguous networks into a larger block, expressed with CIDR slash notation.
How does the three-way handshake establish a TCP connection?
The client sends a SYN segment with an initial sequence number X. The server replies with a SYN‑ACK segment containing its own sequence number Y and acknowledges X+1. The client completes the exchange by sending an ACK that acknowledges Y+1. After this three‑step exchange, both sides consider the connection established and can exchange data.
Who is freeCodeCamp.org on YouTube?
freeCodeCamp.org is a YouTube channel that publishes videos on a range of topics. Browse more summaries from this channel below.
Does this page include the full transcript of the video?
Yes, the full transcript for this video is available on this page. Click 'Show transcript' in the sidebar to read it.
Helpful resources related to this video
If you want to practice or explore the concepts discussed in the video, these commonly used tools may help.
Links may be affiliate links. We only include resources that are genuinely relevant to the topic.