Computer Networking

Computer Networking

ยท

17 min read

๐Ÿ’ก
In this blog, we will delve into the fascinating world of Computer Networking. However, let us gain an insight into the functioning of the internet.

How does the Internet work?

  1. Devices connect to the Internet via Internet Service Providers (ISPs) using technologies like DSL, cable, or wireless connections.

  2. Data is divided into packets and transmitted using the TCP/IP protocol suite, which ensures reliable delivery and proper addressing.

  3. Each device on the Internet is assigned a unique IP address, allowing data packets to be routed across networks.

  4. The Domain Name System (DNS) translates human-readable domain names into IP addresses.

  5. Routers and switches direct data packets across the Internet, determining the best path based on routing tables and forwarding rules.

  6. Various protocols and services, such as HTTP, FTP, SMTP, and VoIP, enable different types of communication and data exchange.

  7. Encryption technologies like SSL and TLS provide secure data transmission, protecting sensitive information.

  8. Data packets are reassembled at their destination, allowing users to access websites, send emails, stream media, and engage in various online activities.


What is Computer Networking?

Computer Networking refers to the practice of connecting computers, devices, and systems to facilitate communication, data sharing, and resource sharing. It involves the design, implementation, management, and maintenance of both physical and virtual networks.

It enables devices to exchange information and resources, allowing users to access the internet, share files, communicate through email or messaging applications, and collaborate in real-time. It plays a crucial role in various domains, including businesses, education, healthcare, entertainment, and more.

๐Ÿ’ก
The International Standards Organization (ISO) created a model called the Open Systems Interconnection (OSI), which allows diverse systems to communicate.

OSI MODEL (Open Systems Interconnection)

Layered architecture

  1. The OSI model consists of seven layers (physical, data link, network, transport, session, presentation, and application) that define the functions and interactions involved in data transmission.

  2. Each layer has specific responsibilities and communicates with the layer above and below it, forming a hierarchical structure.

  3. The model allows for interoperability between different systems and machines by defining protocols and standards for communication.

  4. Within a single machine, each layer relies on the services provided by the layer below it, while communication between machines involves peer-to-peer processes at the corresponding layers.

  5. The OSI model provides a comprehensive and flexible framework for networking, enabling the understanding, troubleshooting, and design of efficient network architectures.

Peer to Peer Processes

The interaction between layers in the OSI model :

  1. Peer-to-peer processes occur at each layer of the OSI model between corresponding layers on different machines.

  2. These processes communicate using protocols that are specific to each layer and are responsible for the exchange of data and control information.

  3. Peer-to-peer processes enable interoperability between different systems and machines, allowing them to understand and communicate with each other based on the agreed-upon protocols.

  4. Communication between peer-to-peer processes follows a set of rules and conventions defined by the protocols of the respective layers.

  5. The peer-to-peer processes at each layer work collaboratively to ensure that data is transmitted correctly and reliably across the network, facilitating effective communication between different devices and systems.

Let's deep dive into layers of OSI model

  1. Physical Layer: This layer deals with the physical aspects of data transmission. It defines the electrical, mechanical, and physical characteristics of the network, such as cables, connectors, and signaling. Its primary function is to transmit raw bits over the network medium.

  2. Data Link Layer: The data link layer provides error-free transmission of data frames between neighboring nodes. It handles tasks like framing (dividing data into manageable chunks), error detection and correction, and flow control. It also defines protocols for accessing the physical network.

  3. Network Layer: The network layer facilitates the transfer of data packets across multiple networks. It handles addressing, routing, and logical addressing, ensuring that data is delivered to the correct destination across different networks. The IP (Internet Protocol) is a well-known example of a network layer protocol.

  4. Transport Layer: This layer ensures reliable delivery of data between end systems. It breaks down large data segments into smaller packets and handles error recovery, congestion control, and flow control. The most common protocols at this layer are TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

  5. Session Layer: The session layer establishes, maintains, and terminates connections between applications. It allows applications on different devices to establish a session and exchange data. It also handles session synchronization and checkpointing.

  6. Presentation Layer: The presentation layer is responsible for data representation, ensuring that information is properly formatted, encoded, and encrypted for transmission. It deals with tasks like data compression, encryption, and protocol conversion to ensure that data can be understood by the receiving system.

  7. Application Layer: The application layer is where users interact with the network through various applications. It includes protocols and services for tasks like email, file transfer, web browsing, and remote access. This layer provides an interface for user applications to access the network services.


TCP/IP - REFERENCE MODEL

  • TCP/IP stands for Transmission Control Protocol/Internet Protocol and is a suite of communication protocols used to interconnect network devices on the Internet.

  • It consists of only 4 Layers: Application, Transport, Internet and Datalink or Network access layer.

  • TCP/IP is also used as a communication protocol in a private computer network (An Intranet or Extranet).


Difference between OSI Model and TCP/IP Model

It stands for Open System Interconnection.

It stands for Transmission Control Protocol.

OSI model has been developed by ISO (International Standard Organization).

It was developed by ARPANET (Advanced Research Project Agency Network).

It is an independent standard and generic protocol used as a communication gateway between the network and the end user.

It consists of standard protocols that lead to the development of an internet. It is a communication protocol that provides the connection among the hosts.

In the OSI model, the transport layer provides a guarantee for the delivery of the packets.

The transport layer does not provide the surety for the delivery of packets. But still, we can say that it is a reliable model.

This model is based on a vertical approach.

This model is based on a horizontal approach.

In this model, the session and presentation layers are separated, i.e., both the layers are different.

In this model, the session and presentation layer are not different layers. Both layers are included in the application layer.

It is also known as a reference model through which various networks are built. For example, the TCP/IP model is built from the OSI model. It is also referred to as a guidance tool.

It is an implemented model of an OSI model.

In this model, the network layer provides both connection-oriented and connectionless service.

The network layer provides only connectionless service.

Protocols in the OSI model are hidden and can be easily replaced when the technology changes.

In this model, the protocol cannot be easily replaced.

It consists of 7 layers.

It consists of 4 layers.

OSI model defines the services, protocols, and interfaces as well as provides a proper distinction between them. It is protocol independent.

In the TCP/IP model, services, protocols, and interfaces are not properly separated. It is protocol dependent.

The usage of this model is very low.

This model is highly used.

It provides standardization to the devices like router, motherboard, switches, and other hardware devices.

It does not provide the standardization to the devices. It provides a connection between various computers.


Network Protocols

A network protocol is an established set of rules that determine how data is transmitted between different devices in the same network. Essentially, it allows connected devices to communicate with each other, regardless of any differences in their internal processes, structure or design.

Network protocols are the reason you can easily communicate with people all over the world, and thus play a critical role in modern digital communications.

  1. TCP (Transmission Control Protocol):

    • TCP is a connection-oriented protocol that provides reliable, ordered, and error-checked delivery of data packets over an IP network.

    • It establishes a connection between two devices, sets up parameters for data transfer, and ensures the packets are delivered in the correct order.

    • TCP guarantees data integrity through error detection and retransmission of lost or corrupted packets.

    • It is widely used for applications that require reliable data delivery, such as web browsing, email, file transfer, and remote login.

  2. Internet Protocol (IP):

    • IP is the primary protocol responsible for addressing and routing packets across an IP network.

    • It provides logical addresses (IP addresses) to identify devices and routers on the network.

    • IP breaks data into packets, adds routing information, and delivers them to the destination based on the best available path.

    • IPv4 (Internet Protocol version 4) is the most commonly used version, but IPv6 (Internet Protocol version 6) is gaining prominence due to the exhaustion of IPv4 addresses.

    • IPv4 addresses are divided into different classes based on their network size and structure. The classes are Class A, B, C, D, and E. Classes A, B, and C are primarily used for addressing hosts on a network, while classes D and E serve other purposes. IPv4 addresses consist of four sets of numbers separated by periods (dots), such as 192.168.0.1.

    • IPv6 addresses consist of eight sets of hexadecimal numbers separated by colons, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334.

  3. UDP (User Datagram Protocol):

    • UDP is a connectionless protocol that provides a lightweight alternative to TCP.

    • It does not establish a connection before transmitting data and does not guarantee reliability or ordered delivery.

    • UDP is commonly used for real-time applications, such as video streaming, VoIP (Voice over IP), online gaming, and DNS.

    • The lower overhead of UDP makes it faster than TCP but less reliable.

  4. DNS (Domain Name System):

    • Translates domain names to IP addresses, facilitating human-readable web addresses.

    • Acts as a distributed database mapping domain names to their corresponding IP addresses.

  5. DHCP (Dynamic Host Configuration Protocol):

    • Simplifies IP address allocation and network configuration for devices.

    • Dynamically assigns IP addresses, subnet masks, and other network parameters, automating IP configuration.

  6. Hypertext Transfer Protocol (HTTP):

    • HTTP is an application-level protocol used for transferring hypertext (web) documents on the World Wide Web.

    • It operates on top of TCP and follows a client-server model, where the client (web browser) sends requests to the server (webserver) for web pages or resources.

    • HTTP defines methods like GET, POST, PUT, and DELETE for different types of interactions with web servers.

    • HTTP is widely used for browsing the web, accessing websites, and retrieving web content.

  7. File Transfer Protocol (FTP):

    • FTP is a standard network protocol used for transferring files between a client and a server on a computer network.

    • It operates on the application layer and uses TCP for reliable data transfer.

    • FTP provides commands for file management, file transfers (uploading and downloading), and directory navigation.

    • It is commonly used for uploading website files, sharing large files, and accessing remote file repositories.

  8. Simple Mail Transfer Protocol (SMTP):

    • SMTP is an application-level protocol used for sending and routing email between mail servers.

    • It defines the rules and formats for email transfer, including message format, addressing, and delivery notifications.

    • SMTP operates on the application layer and typically uses TCP for reliable data transmission.

    • When you send an email, your email client uses SMTP to communicate with the recipient's mail server and deliver the message.


Network Devices

Network devices are physical devices that enable communication and interaction between hardware on a computer network. Each networking device operates in a distinct computer network segment and performs distinct functions.

1. Router:

A router is a networking device that connects multiple networks and forwards data packets between them. It operates at the network layer (Layer 3) of the OSI model and uses routing tables to determine the best path for data transmission. Routers are essential for interconnecting networks across the internet and play a crucial role in directing network traffic.

  • Example: In a home network, a router connects multiple devices (computers, smartphones, smart TVs) to the internet. It acts as the gateway for internet access, allowing devices to communicate with each other within the network and access online services.

2. Switch:

The switch is a networking device that connects multiple devices within a local area network (LAN). It operates at the data link layer (Layer 2) of the OSI model and uses MAC addresses to forward data packets to the appropriate destination. Switches provide high-speed, dedicated connections between devices and enable efficient data transmission within a LAN.

  • Example: In a small office LAN, a switch connects computers, printers, and other devices. It enables devices to share files, access shared resources like printers, and communicate with each other within the local network.

3. Load Balancer:

A load balancer distributes incoming network traffic across multiple servers in a server farm or data center to ensure optimal resource utilization and improve performance. It acts as an intermediary between clients and servers, distributing requests based on factors like server capacity, response time, and current load. Load balancers help prevent the overloading of individual servers and improve the scalability, availability, and reliability of applications.

  • Example: In a popular e-commerce website, a load balancer distributes incoming user requests across multiple servers. It ensures that the workload is evenly distributed, preventing any single server from being overwhelmed. This improves response times and the overall performance of the website.

4. Proxy Server:

A proxy server acts as an intermediary between clients and servers, forwarding client requests to the appropriate server and returning responses to the clients. It can provide various functionalities such as caching, filtering, and anonymizing client requests. Proxy servers enhance security, privacy, and performance by controlling access to resources, optimizing network traffic, and masking the client's identity.

  • Example: In a corporate network, a proxy server is deployed to control and monitor internet access. It acts as an intermediary between employees' devices and the internet. The proxy server can cache frequently accessed web content, filter malicious websites, and provide an additional layer of security for the organization's network.
๐Ÿ’ก
There are several other network devices such as Hub, Modem, Repeater, Bridge, Gateway & so on...

Network Topologies

A network topology refers to the physical or logical layout of a computer network. It defines how devices, such as computers, servers, switches, routers, and other network components, are connected and communicate with each other.

  1. Bus Topology;

    • All devices are connected to a common communication medium, called a bus.

    • Each device receives all transmitted data but only processes data intended for itself.

    • It is relatively simple and inexpensive, but the failure of the main bus can disrupt the entire network.

  2. Star Topology:

    • All devices are connected to a central device, typically a switch or a hub.

    • Each device has a dedicated connection to the central device.

    • If one device fails, only that device is affected, and the rest of the network remains operational.

    • It provides better performance and scalability than bus topology but relies heavily on the central device.

  3. Ring Topology:

    • Devices are connected in a circular manner, forming a closed loop.

    • Each device is connected to two neighboring devices, and data travels in one direction.

    • It requires less cabling than other topologies, but the failure of one device can disrupt the entire network.

  4. Mesh Topology:

    • Every device is connected to every other device in the network.

    • It provides redundant paths, allowing data to be rerouted if one path fails.

    • It offers high reliability and fault tolerance, but it requires a large number of connections, making it expensive and complex.

  5. Tree Topology (Hierarchical Topology):

    • Devices are arranged in a hierarchical structure, similar to a tree.

    • It combines multiple star topologies connected to a central backbone.

    • It provides scalability and allows for the segmentation of larger networks into smaller, more manageable subnetworks.

  6. Hybrid Topology:

    • It combines two or more different network topologies.

    • For example, a combination of star and mesh topologies can create a star-mesh hybrid network.


Network Security

Network security fundamentals play a crucial role in protecting sensitive data, ensuring the integrity of network communications, and mitigating the risk of unauthorized access or malicious activities. Several key components contribute to a robust network security framework, including firewalls, VPNs, access control, and encryption.

1. Firewalls:

Firewalls act as the first line of defence by monitoring and controlling incoming and outgoing network traffic. They enforce security policies, such as allowing or blocking specific protocols, ports, or IP addresses, to prevent unauthorized access and filter out potential threats.

Here are the key points about firewalls in network security:

  • Firewalls act as a barrier between trusted internal networks and untrusted external networks.

  • They monitor and control incoming and outgoing network traffic based on predefined security rules.

  • Firewalls use packet filtering techniques to examine individual packets of data.

  • Network Address Translation (NAT) is often used to hide internal IP addresses.

  • Application-level filtering allows more granular control over traffic.

  • Stateful inspection keeps track of the state of network connections.

  • Some firewalls incorporate intrusion prevention systems (IPS) to detect and block known attack patterns.

  • Firewalls provide a crucial defence against unauthorized access, malware, and threats.

  • By implementing and properly configuring firewalls, organizations can bolster their network security and protect sensitive data.

๐Ÿ’ก
Firewalls act as digital barriers that monitor and control network traffic, just like a security guard checks IDs before allowing entry to a building.

2. VPNs (Virtual Private Networks):

VPNs establish secure connections over public networks, enabling users to access private networks remotely. By encrypting data traffic and creating a secure tunnel, VPNs protect sensitive information from interception, ensuring confidentiality and integrity.

Here are the key points about VPNs in network security:

  • Secure remote access to private networks.

  • Data encryption for confidentiality and integrity.

  • Tunnelling protocols establish secure connections.

  • Provides privacy and anonymity by masking IP addresses.

  • Access control through user authentication and authorization.

  • Enhances security when using public Wi-Fi networks.

  • VPNs are crucial for maintaining secure connections, protecting data, and ensuring privacy in network communications.

๐Ÿ’ก
VPNs create secure and encrypted connections, similar to using a secret tunnel, allowing users to access private networks remotely.

3. Access Control:

Access control mechanisms limit network access to authorized users and devices. This includes user authentication through strong passwords, multi-factor authentication, and implementing role-based access control (RBAC) to restrict privileges based on user roles and responsibilities.

Here are the five main points about access control in network security:

  • User Authentication: Verify user identities through passwords, biometrics, or two-factor authentication.

  • Authorization and Privilege Management: Grant or deny access based on user roles and permissions.

  • Network Segmentation: Divide the network into isolated segments to control access and limit breaches.

  • Access Control Lists (ACLs): Define rules to allow or deny access based on specific criteria.

  • Secure Remote Access: Implement secure mechanisms (e.g., VPNs) for remote network access.

  • These points highlight the key aspects of access control, focusing on user authentication, authorization, network segmentation, access control rules, and secure remote access.

๐Ÿ’ก
Access control ensures that only authorized individuals have access to specific resources, similar to using a key card to enter restricted areas in an office building.

4. Encryption:

Encryption transforms data into an unreadable format using cryptographic algorithms. It ensures data confidentiality, even if intercepted, by allowing only authorized parties with the corresponding decryption keys to access and decipher the information.

Here are the five main short points about encryption in network security:

  • Encryption protects data by converting it into an unreadable format.

  • Symmetric and asymmetric encryption use keys for encryption and decryption.

  • Encryption ensures data integrity and detects unauthorized modifications.

  • TLS/SSL protocols encrypt data during transmission over networks.

  • Encryption is crucial for data security and compliance with regulations.

  • By implementing encryption, organizations can secure their data, maintain privacy, ensure integrity, and adhere to compliance standards.

๐Ÿ’ก
Encryption converts data into a secret code that can only be deciphered using a specific key, like writing a message in a secret language that only the intended recipient can understand.

Conclusion

In conclusion, computer networking serves as the backbone of our modern digital world, enabling seamless communication, information sharing, and collaboration across vast distances. We have journeyed through the fundamental concepts of computer networking, exploring protocols, network architectures, and the layers that make up the intricate network stack. From local area networks (LANs) to wide area networks (WANs), we have seen how networking technologies have evolved to meet the growing demands of our interconnected world.

Understanding computer networking is essential not only for IT professionals but also for anyone who interacts with the internet or relies on technology for their daily activities. It empowers us to troubleshoot network issues, optimize performance, and ensure secure data transmission. By grasping the fundamentals of computer networking, we gain a deeper appreciation for the underlying infrastructure that drives our digital lives.

Happy Learning :)

ย