Computer Networking Fundamentals: Protocols, Topologies, and Media
Posted on Sep 13, 2025 in Computer Engineering
Computer Networks: Definition and OSI Model’s Open Nature
A computer network is a collection of interconnected computers and other hardware devices that are linked together to share resources, exchange data, and communicate. These networks can be connected via wired (e.g., Ethernet) or wireless (e.g., Wi-Fi) means. The main purpose of a computer network is to enable devices to work together, share files, access the internet, and use shared applications or hardware like printers.
Why the OSI Model is Called “Open”
The OSI (Open Systems Interconnection) model is called “open” because:
- Vendor-Neutral Standard: It was developed by the International Organization for Standardization (ISO) as a universal framework that can be used by any manufacturer or developer, regardless of the brand or technology platform.
- Interoperability: The model promotes interoperability between different systems and devices by providing a standard structure for communication protocols.
- Publicly Available: The OSI model is publicly documented, meaning anyone can access and implement it. This openness helps in the development of networking protocols that are compatible and standardized.
- Guiding Framework: It serves as an open guide for designing and understanding network protocols, even if not all real-world networks implement the model exactly as it is.
Types of Computer Networks
Type | Full Form | Coverage Area | Description | Examples |
---|
PAN | Personal Area Network | Very small (within a few meters) | A network for interconnecting personal devices, typically around one person. | Bluetooth between phone and headset, USB connections |
LAN | Local Area Network | Small (up to a few kilometers) | A network that connects computers within a limited area like a home, office, or school. | Office network, school computer lab, home Wi-Fi |
MAN | Metropolitan Area Network | Medium (covers a city or town) | A network that spans a city or a large campus. Larger than LAN but smaller than WAN. | Cable TV network, city-wide Wi-Fi, university campus network |
WAN | Wide Area Network | Very large (country or worldwide) | A network that covers a broad area, often connecting multiple LANs and MANs across regions. | The Internet, corporate networks with global offices |
Network Topology: Layouts and Structures
Network topology refers to the arrangement or layout of different network devices (like computers, routers, switches, etc.) and how they are physically or logically connected to each other in a computer network.
Types of Network Topology
- Physical Topology: The actual layout of cables and devices.
- Logical Topology: The way data flows through the network regardless of physical design.
Common Network Topologies
Topology | Description | Advantages | Disadvantages |
---|
Bus | All devices share a single cable. | Easy to install, low cost. | One cable failure affects the whole network. |
Star | Devices connect to a central hub. | Easy to manage, failure of one device doesn’t affect others. | Hub failure brings down the network. |
Ring | Devices form a closed loop. | Predictable performance. | Failure in one device affects all. |
Mesh | Every device connects to every other. | High reliability and redundancy. | Expensive and complex. |
Tree | Hierarchical, combines star + bus. | Scalable and easy to manage. | If the main cable fails, the network fails. |
Hybrid | Mix of two or more topologies. | Flexible and scalable. | Complex and costly. |
The OSI Reference Model Explained
The OSI Model is a conceptual framework developed by the ISO (International Organization for Standardization) that standardizes the functions of a communication system into seven distinct layers. It helps different systems communicate over a network.
7 Layers of the OSI Model
Layer | Name | Function | Examples |
---|
7 | Application | Interfaces with user applications | Web browsers, Email (HTTP, FTP) |
6 | Presentation | Translates, encrypts, compresses data | Data encryption (SSL), character encoding |
5 | Session | Manages sessions and controls dialogs | Login sessions, APIs, NetBIOS |
4 | Transport | Ensures reliable data transfer | TCP, UDP |
3 | Network | Handles routing and addressing | IP, routers |
2 | Data Link | Transfers data between two directly connected nodes | MAC address, switches, Ethernet |
1 | Physical | Transmits raw bit stream over physical medium | Cables, hubs, NICs, signals |
The TCP/IP Reference Model
The TCP/IP Model (Transmission Control Protocol/Internet Protocol) is the foundation of the internet and real-world networking. It is a simplified, practical model that defines how data should be transmitted over networks.
4 Layers of the TCP/IP Model
Layer | Corresponds to OSI Layer(s) | Function | Examples |
---|
4. Application Layer | OSI Layers 7, 6, 5 | Provides services to user applications | HTTP, FTP, SMTP, DNS |
3. Transport Layer | OSI Layer 4 | Ensures reliable or fast data delivery | TCP, UDP |
2. Internet Layer | OSI Layer 3 | Handles addressing and routing of packets | IP, ICMP, ARP |
1. Network Access (Link) Layer | OSI Layers 2 & 1 | Manages physical transmission and MAC addressing | Ethernet, Wi-Fi, MAC, DSL |
OSI Model vs. TCP/IP Model Comparison
Aspect | OSI Model | TCP/IP Model |
---|
Full Form | Open Systems Interconnection | Transmission Control Protocol / Internet Protocol |
Developed By | ISO (International Organization for Standardization) | U.S. Department of Defense |
Number of Layers | 7 layers | 4 layers |
Layers | Application, Presentation, Session, Transport, Network, Data Link, Physical | Application, Transport, Internet, Network Access (Link) |
Approach | Theoretical model (conceptual framework) | Practical model (real-world protocol suite) |
Protocol Dependency | Protocol-independent | Based on standard protocols (TCP, IP) |
Usage | Mainly used for teaching and reference | Used in real-world networking and the internet |
Layer Separation | Presentation and Session layers are separate | These are part of the Application layer |
Reliability | Emphasizes service, interfaces, and layers | Focuses on standard protocol communication |
TCP vs. UDP: A Comparison
Aspect | TCP (Transmission Control Protocol) | UDP (User Datagram Protocol) |
---|
Connection Type | Connection-oriented (establishes a connection before data transfer) | Connectionless (no setup before sending data) |
Reliability | Reliable – ensures data is delivered correctly and in order | Unreliable – no guarantee of delivery or order |
Error Checking | Yes, with acknowledgment and retransmission | Yes, but no retransmission or acknowledgment |
Speed | Slower due to overhead from reliability features | Faster, with minimal overhead |
Data Transfer | Stream-based (continuous flow) | Message-based (sends discrete packets) |
Use Cases | Web browsing (HTTP/HTTPS), Email (SMTP), File transfer (FTP) | Streaming (video/audio), Online games, VoIP, DNS |
Header Size | Larger (20 bytes or more) | Smaller (8 bytes) |
Flow Control & Congestion Control | Yes | No |
Transmission Media: Wired and Wireless
Transmission media are the physical paths or channels used to transmit data from one device to another in a computer network. They are broadly categorized into guided (wired) and unguided (wireless) media.
1. Guided (Wired) Media
Data travels through a physical medium like cables.
Type | Description | Examples / Features |
---|
Twisted Pair Cable | Pairs of insulated wires twisted together. | - Used in LANs, telephones
- Types: UTP (Unshielded), STP (Shielded)
- Low cost, easy to install
|
Coaxial Cable | Central copper conductor with shielding. | - Used in cable TV and early networks
- Better shielding than twisted pair
|
Fiber Optic Cable | Uses light signals through glass fibers. | - Very high speed and bandwidth
- Immune to electromagnetic interference
- Used for long-distance and high-speed data transmission
|
2. Unguided (Wireless) Media
Data is transmitted through the air or vacuum without cables.
Type | Description | Examples / Features |
---|
Radio Waves | Omnidirectional; used for wireless communication. | - Wi-Fi, AM/FM radio, Bluetooth
- Long range, penetrates walls
|
Microwaves | Line-of-sight communication. | - Used in satellite and mobile networks
- High frequency and speed
|
Infrared | Short-range, line-of-sight. | - TV remotes, short-range devices
- Cannot pass through walls
|
Satellite Communication | Signals sent to a satellite and then relayed. | - Global coverage
- Used in GPS, TV, and remote internet access
|
Network Switching: Methods of Data Forwarding
Switching is the process of forwarding data packets between devices in a network. It determines how data travels from the source to the destination.
Types of Switching
- Circuit Switching: Establishes a dedicated path for the entire communication. Reliable but wastes bandwidth. Example: Traditional telephone calls.
- Packet Switching: Data is broken into packets that travel independently. Efficient and flexible but can have delays. Example: The Internet.
- Message Switching: The entire message is sent to each node, stored, then forwarded. No dedicated path, but slower due to storage delays. Example: Email systems (older method).
Circuit Switching vs. Packet Switching
Aspect | Circuit Switching | Packet Switching |
---|
Connection | Dedicated path established for entire session | No dedicated path; data sent in packets independently |
Data Transfer | Continuous, real-time communication | Data broken into packets, sent separately |
Efficiency | Inefficient; bandwidth reserved even if idle | Efficient; bandwidth shared among users |
Delay | Low delay once circuit is set up | Variable delay due to routing and congestion |
Example | Traditional telephone networks | Internet, LANs |
Reliability | High reliability during connection | Possible packet loss or delay |
Datagram Switching vs. Virtual Circuit Switching
Aspect | Datagram Switching | Virtual Circuit Switching |
---|
Path Setup | No prior path setup; each packet routed independently | Path is established before data transfer begins |
Packet Routing | Each packet may take a different route | All packets follow the same pre-established path |
Packet Numbering | Packets may arrive out of order | Packets arrive in order |
Connection Type | Connectionless | Connection-oriented |
Reliability | Less reliable; possible out-of-order or lost packets | More reliable due to fixed path and order |
Example | Internet Protocol (IP) | Frame Relay, ATM networks |
Data Link Layer: Functions and Protocols
The Data Link Layer is the 2nd layer of the OSI model. Its main job is to provide reliable and error-free data transfer between two directly connected nodes in a network.
Key Functions of the Data Link Layer
- Framing: Divides the bit stream from the Physical Layer into manageable frames.
- Physical Addressing: Adds MAC (Media Access Control) addresses to frames to identify source and destination devices on the same network.
- Error Detection and Correction: Detects errors in transmitted frames using techniques like CRC and may request retransmission.
- Flow Control: Manages the pace of data transmission to prevent a fast sender from overwhelming a slow receiver.
- Access Control: Determines which device has the right to use the transmission medium, especially in shared networks (e.g., Ethernet).
- Reliable Delivery: Ensures frames are delivered to the next node correctly and in order.
Pure ALOHA vs. Slotted ALOHA
Aspect | Pure ALOHA | Slotted ALOHA |
---|
Time Division | No time slots; users transmit anytime | Time divided into slots; users transmit only at slot start |
Collision Chance | Higher, collisions can occur anytime | Lower, collisions occur only if packets overlap in the same slot |
Efficiency | About 18.4% (maximum throughput) | About 36.8% (maximum throughput) |
Synchronization | Not required | Required to synchronize users to time slots |
Usage | Simpler but less efficient | More complex but more efficient |
Routing Protocols: RIP and OSPF
- RIP (Routing Information Protocol):
- Distance Vector protocol using hop count as a metric.
- Sends full routing table every 30 seconds to neighbors.
- Maximum hop count = 15 (beyond that is unreachable).
- Simple but slow and not suitable for large networks.
- OSPF (Open Shortest Path First):
- Link State protocol using cost based on bandwidth.
- Shares link information with all routers, builds a network map.
- Uses Dijkstra’s algorithm for the shortest path.
- Faster, scalable, and better for large/complex networks.