0. Computer Networks
A computer network is a collection of interconnected devices (such as computers, servers, routers, switches) that share data and resources through communication channels. These networks enable devices to exchange information, providing the foundation for the internet, cloud computing, and enterprise systems. Computer networks can be categorized based on size, communication methods, topology, and architecture, making them versatile in supporting various applications like file sharing, communication, and collaboration.
0.1 Key Components of a Computer Network
Computer networks consist of several key components, each playing a critical role in enabling communication:
- Nodes: Any device connected to the network, including computers, smartphones, and servers.
- Links: The communication channels (wired or wireless) that connect nodes, allowing data transmission between them.
- Network Interface Card (NIC): A hardware component in devices that allows them to connect to a network.
- Routers: Devices that direct data packets between networks, making decisions about the optimal path for delivery.
- Switches: Devices that connect devices within a local area network (LAN) by forwarding data to the correct destination based on MAC addresses.
- Hubs: Basic devices that broadcast data to all devices in the network, often considered inefficient compared to switches.
0.2 Types of Computer Networks
Computer networks can be classified based on their size, structure, and purpose:
- Local Area Network (LAN): A network that covers a small geographical area, such as a home, office, or building. LANs are commonly used for sharing resources like printers and files within a limited area.
- Wide Area Network (WAN): A network that spans large geographical areas, connecting multiple LANs together. The internet is the largest WAN, enabling global connectivity.
- Metropolitan Area Network (MAN): A network that covers a city or a large campus, typically larger than a LAN but smaller than a WAN.
- Personal Area Network (PAN): A small network designed for personal devices, such as smartphones, tablets, and laptops, often using technologies like Bluetooth or Wi-Fi.
- Virtual Private Network (VPN): A secure network that extends across public networks, allowing users to send and receive data as if their devices were directly connected to a private network.
0.3 Network Topologies
The arrangement or layout of devices in a network is called its topology. Common network topologies include:
- Bus Topology: All devices are connected to a single central cable (the bus). Data is sent in both directions, but only one device can transmit at a time.
- Star Topology: Devices are connected to a central hub or switch. If the hub fails, the entire network goes down, but the failure of individual devices does not affect the network.
- Ring Topology: Devices are connected in a circular manner, with each device connected to two other devices. Data travels in one direction until it reaches its destination.
- Mesh Topology: Every device is connected to every other device, providing redundancy and fault tolerance. It is expensive and complex but offers excellent reliability.
- Hybrid Topology: A combination of two or more different types of topologies, often used in larger networks to take advantage of the strengths of each topology.
0.4 Network Protocols
Protocols are standardized rules that define how data is transmitted across a network. Common network protocols include:
- Transmission Control Protocol/Internet Protocol (TCP/IP): The foundational protocol of the internet, ensuring reliable transmission of data by breaking it into packets and reassembling it at the destination.
- User Datagram Protocol (UDP): A connectionless protocol that allows faster data transmission but without the reliability features of TCP. It is commonly used for streaming and gaming.
- Hypertext Transfer Protocol (HTTP/HTTPS): The protocol used for transferring web pages on the internet. HTTPS is the secure version, encrypting data for safe communication.
- Simple Mail Transfer Protocol (SMTP): A protocol used for sending emails over a network.
- File Transfer Protocol (FTP): A protocol used for transferring files between devices on a network.
0.5 Network Devices
Several network devices are commonly used to manage traffic and ensure smooth communication between devices:
- Routers: Direct data between different networks by determining the best route for data packets.
- Switches: Operate within a LAN, connecting devices and managing the flow of data to ensure efficient communication.
- Hubs: Broadcast incoming data to all devices on the network, leading to inefficiency and potential data collisions.
- Firewalls: Control incoming and outgoing network traffic based on security rules, helping to protect networks from unauthorized access and cyberattacks.
- Access Points: Provide wireless connectivity to devices within a network, allowing them to connect to a wired network via Wi-Fi.
0.6 OSI Model
The Open Systems Interconnection (OSI) model is a conceptual framework used to understand how different protocols and devices interact within a network. It has seven layers:
- Layer 1: Physical Layer: Deals with the physical medium of transmission, such as cables and signals.
- Layer 2: Data Link Layer: Manages error detection and correction between devices on the same network. It includes MAC addressing.
- Layer 3: Network Layer: Responsible for routing data between networks using IP addresses.
- Layer 4: Transport Layer: Ensures reliable data transmission, with protocols like TCP and UDP.
- Layer 5: Session Layer: Manages sessions or connections between applications on different devices.
- Layer 6: Presentation Layer: Ensures that data is presented in a readable format, handling encryption and data compression.
- Layer 7: Application Layer: The layer closest to the user, managing network services such as email, file transfer, and web browsing.
0.7 Internet vs. Intranet vs. Extranet
Networks can be classified based on their scope and access level:
- Internet: A global network of interconnected devices and networks, accessible by anyone with an internet connection.
- Intranet: A private network that is only accessible to users within an organization, providing internal communication and resource sharing.
- Extranet: A private network that allows external partners, vendors, or customers to access certain parts of an organization's intranet through secure authentication.
0.8 Network Security
Network security is critical to protect data, systems, and users from unauthorized access, cyberattacks, and data breaches. Common security mechanisms include:
- Firewalls: Control network traffic by filtering packets based on security rules.
- Encryption: Protects data by converting it into a secure format that can only be decrypted by authorized users.
- Intrusion Detection Systems (IDS): Monitors network traffic for suspicious activity or policy violations.
- Virtual Private Networks (VPN): Creates a secure tunnel for remote users to access the network as if they were on-site, ensuring confidentiality and data integrity.
- Authentication Protocols: Ensures that only authorized users can access the network using methods such as passwords, biometrics, or two-factor authentication.
0.9 Types of Network Architectures
Network architecture defines how network resources are structured and shared. Two primary models include:
- Client-Server Architecture: In this model, the server provides resources or services, and clients access them. Commonly used in large networks where centralized management is needed.
- Peer-to-Peer (P2P) Architecture: In a P2P network, each device can act as both a client and a server, sharing resources directly without relying on a central server. This architecture is used in small networks or for specific purposes like file-sharing applications.