Computer Networks and Packet Switching Notes
Computer Networks and Packet Switching
Functionality of Computer Networks
- Computer networks belong to the domain of packet-switched networks.
- Information is sent in packets from sender to receiver.
- Each packet:
- Operates independently.
- Contains sender and receiver information.
- Network does not guarantee delivery, order, or integrity of packets.
Types of Networks
- Circuit-switched networks (used mainly for voice and video communication) vs packet-switched networks:
- Circuit-switched allows consistent quality but is more expensive.
- Packet-switched is less reliable, as packets may arrive out of order or be lost.
Complexity of Communication
- Devices securing the communication link are complex and operate with synchronized clocks.
- Peripheral devices (e.g., traditional telephones) are simpler than central networking devices.
Layers of Communication
- Communication systems are structured in layers:
- Application Layer (top)
- Transport Layer
- Network Layer
- Link Layer (bottom)
- Each layer handles specific types of protocols and tasks to ensure effective communication.
Protocol Operations
- Data flows through the layers, with each layer adding headers with metadata:
- Application layer generates data, passes it to the transport layer through a socket.
- Transport layer organizes data into segments (TCP) or datagrams (UDP).
- Key Protocols:
- TCP (Transmission Control Protocol): Reliable, connection-oriented; ensures data integrity and order; resends lost packets.
- UDP (User Datagram Protocol): Unreliable, connectionless; suitable for applications where speed is more critical than reliability.
Addressing in Networks
- IP protocol is essential for routing packets across networks:
- IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.
- Each application must also have a port (16-bit number) for identifying specific services on a host.
Transmission Methodology
- When data is transmitted, the link layer generates frames:
- Frames include both the packet (from the network layer) and link layer headers with source and destination MAC addresses.
- MAC Addressing:
- Unique to network interface cards; 48 bits in length.
Communication Efficiency and Collision Management
- Local Area Networks (LANs) allow direct communication without configuration.
- Protocols like CSMA/CD (Carrier Sense Multiple Access with Collision Detection) help manage collisions in networks.
- If a collision is detected, the devices involved must wait for a random time before retrying to send data.
Bridges and Switches in Networks
- A bridge connects two or more LAN segments:
- Filters traffic at the data link layer without forwarding all data to every other node (learns MAC addresses).
- Switches improve efficiency by maintaining a MAC address table for forwarding packets directly to the correct port, reducing collisions.
Networking Devices Overview
- Hub: Broadcasts data to all ports.
- Switch: Forwards data only to the intended recipient's port, increasing efficiency.
- Router: Connects different networks, operates at the network layer, manages traffic between different IP networks.
Conclusion
- Understanding packet-switched networks and the functions of various protocols, devices, and addressing is fundamental in computer networking.
- Familiarity with these concepts facilitates better implementation of effective communication in practical situations.