Networking Fundamentals: Layers and Protocols
Overview of Information Exchange and Multiplexing
Information can be exchanged between a source and destination through various physical mediums: electrical wires, optical links, and radio links.
Multiple sources and destinations can share the same physical medium independently through multiplexing methods.
Multiplexing Techniques
Time Division Multiplexing (TDM)
Sources and destinations use specific time intervals to communicate.
Each pair occupies the transport medium fully during its assigned time slot.
Frequency Division Multiplexing (FDM)
Communication encoded into different frequency bands.
Similar to radio stations on specific frequencies, this method applies to electrical wires and optical waveguides.
Code Division Multiplexing (CDM)
Bundles information from different pairs into a common code.
The code is encoded at the source and unraveled at the destination, facilitating rapid transmission.
Wavelength Division Multiplexing (WDM)
Used in optical communication by utilizing different light frequencies.
Information Encoding Methods in Transmission
Basic transmission involves binary encoding (0s and 1s).
Amplitude Shift Keying (ASK)
Changes in amplitude represent bits; for example, small amplitude (0) vs. large amplitude (1).
Frequency Shift Keying (FSK)
Uses different frequencies for encoding bits, e.g., one frequency for 0 and another for 1.
Phase Shift Keying (PSK)
Same frequency is used with phase changes representing bits.
Higher Bit Encoding
More complex methods can encode multiple bits per symbol by varying amplitude, frequency, or phase.
The Data Link Layer
The Data Link Layer manages data transfer between devices and includes error detection and correction.
It provides a structure for data packets, including source and destination MAC addresses.
Components of a Data Link Layer Frame
MAC Addresses
Each device has a unique hardware MAC address.
Frame Structure
Includes destination MAC, source MAC, protocol type, variable-length payload data, and a cyclic redundancy check (CRC).
Error Detection and Correction
Includes checks for errors using parity checks and cyclic redundancy checks, with the latter being more robust and complex.
Understanding MAC Addresses
MAC addresses are typically expressed as 48-bit identifiers unique to each device on a network.
Ensures devices are differentiated within local networks.
Error Handling
If a frame fails the CRC check, it is discarded, leading to a request for the source to resend the frame.
This prevents corrupted data from being propagated through the network.
Network Layer
The Network Layer establishes paths for packets across the network using unique IP addresses.
Internet Protocol (IP)
IPv4
32-bit addressing scheme, limited to approximately 4 billion unique addresses.
Written in dot-decimal notation (e.g., 192.168.0.1).
IPv6
128-bit addressing scheme, offering a vastly larger address space to accommodate more devices.
Written in hexadecimal notation with colons separating groups (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).
Packet Structure in IPv4
Contains a header (20-60 bytes) with information on total length, fragmentation, and checksum for error checking.
Special reserved addresses exist for local networks, multicast, and loopback communication.
Routers and Packet Forwarding
Routers direct packets through networks using Address Resolution Protocol (ARP) to determine optimal paths.
Algorithms like Dijkstra's are used to manage congestion and determine the most efficient routing paths.
Transport Layer
Handles communication services for applications, utilizing port numbers for transferring data.
Protocols in the Transport Layer
User Datagram Protocol (UDP)
Fast and efficient for real-time applications, provides no guarantees of order or correction.
Transmission Control Protocol (TCP)
Connection-oriented, ensures reliable data transmission. Includes error checking, packets are tracked and acknowledged to maintain order and integrity.