


















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



















A computer network is a group of connected devices that communicate with each other to share data and resources. It enables efficient communication and supports services like email, file sharing, and internet access. Nodes are devices such as computers, mobiles, or printers that exchange data. Routers and switches control and direct the flow of information. Transmission media carries data between devices. Wired media includes Ethernet and optical fiber cables. Wireless media includes Wi-Fi, Bluetooth, and infrared.
A computer network operates by enabling devices to communicate and exchange data using a shared communication system. Each device in the network follows predefined rules to ensure that data is transmitted accurately, efficiently, and securely. A network consists of nodes such as computers, servers, routers, and switches that send or receive data. These nodes are connected through links, which may be wired (cables, optical fiber) or wireless (Wi-Fi, radio signals). When data is sent, it is broken into small packets and transmitted across the network. Protocols define how data packets are formatted, transmitted, received, and acknowledged. Each device is identified by a unique IP address, which ensures data reaches the correct destination. Network devices like switches and routers forward data packets along the best available path. Security mechanisms, such as firewalls, monitor traffic and allow or block data based on security rules.
The primary goals of computer networking are to facilitate resource sharing (files, printers, data), improve reliability via redundancy, enhance communication (email, video conferencing), reduce costs, and provide scalable performance. These goals enable efficient data access regardless of physical location and ensure secure, high-performance, and flexible system operations Key Goals of Computer Networking Resource Sharing: Sharing hardware (printers, scanners), software, and data (files, databases) among users regardless of their physical location. High Reliability: Ensuring system availability by replicating files across multiple machines and providing alternative sources, so that if one component fails, others can take over. Cost Reduction: Allowing multiple users to share expensive hardware and software resources, which lowers operational costs. Communication & Collaboration: Facilitating faster communication, such as instant messaging, emails, and teleconferencing, connecting users across large distances. Performance & Scalability: Increasing the system's overall capacity, such as improving performance by adding more processors (load sharing) and allowing easy expansion to accommodate new users. Security: Protecting sensitive information and ensuring data integrity while allowing remote access. Flexible Access: Enabling users to access information from any computer on the network, improving productivity
1. NIC(Network Interface Card) NIC or Network Interface Card is a network adapter used to connect the computer to the network. It is installed in the computer to establish a LAN. It has a unique ID that is written on the chip, and it has a connector to connect the cable to it.
The cable acts as an interface between the computer and the router or modem. NIC card is a layer 2 device, which means it works on the network model's physical and data link layers. Types of NIC Wired NIC: Cables and Connectors use Wired NIC to transfer data. Wireless NIC: These connect to a wireless network such as Wifi, Bluetooth, etc.
2. HUB A hub is a multi-port repeater. A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all connected devices. In other words, the collision domain of all hosts connected through hub remains one. Hub does not have any routing table to store the data of ports and map destination addresses., the routing table is used to send/broadcast information across all the ports. Types of HUB Active HUB: Active HUB regenerates and amplifies the electric signal before sending them to all connected device. This hub is suitable to transmit data for long distance connections over the network. Passive HUB: As the name suggests it does not amplify or regenerate electric signal, it is the simplest types of Hub among all and it is not suitable for long-distnace connections. Switching HUB: This is also known as intelligent HUB, they provide some additional functionality over active and passive hubs. They analyze data packets and make decisions based on MAC address and they are operated on DLL(Data Link Layer). 3. Router A Router is a device like a switch that routes data packets based on their IP addresses. The router is mainly a Network Layer device. Routers normally connect LANs and WANs and have a dynamically updating routing table based on which they make decisions on routing the data packets. The router divides the broadcast domains of hosts connected through it. 4. Modem A Modem is a short form of Modulator/Demodulator. The Modem is a hardware component/device that can connect computers and other devices such as routers and switches to the internet. Modems convert or modulate the analog signals coming from telephone wire into a digital form that is in the form of 0s and 1s. 5. Switch A Switch is a multiport bridge with a buffer and a design that can boost its efficiency(a large number of ports implies less traffic) and performance. A switch is a data link layer device. The switch can perform error checking before forwarding data, which makes it very efficient as it does not forward packets that have errors and forward good packets selectively to the correct port only.
Types of Repeaters There are several types of repeaters based on specifications you can check by tapping the link Types of Repeaters.
9. Server A server is a computer program that provides various functionality to another computer program. The server plays a vital role in facilitating communication, data storage, etc. Servers have more data storage as compared to normal computers. They are designed for the specific purpose of handling multiple requests from clients.
Network Architecture is the design of a computer or communication network that shows how devices, software, protocols, and media work together. It defines the physical and logical structure, task allocation, and connectivity between clients like laptops and servers. Simply put, it provides the rules and tools for smooth communication, managed by network architects. Types of Network Architecture Computer networks can be classified based on architecture into two primary types: Peer-to-Peer Architecture Client/Server Architecture Hybrid Networks
1. Peer-to-Peer Architecture In a P2P network, computers (peers) are directly connected, usually via the Internet, to share files and resources without a central server. Each computer acts as both client and server, with equal roles and responsibilities. Tasks are distributed across all devices, making P2P suitable for small setups (up to about 10 computers). Since there’s no strict client-server division, peers can both send and receive data directly. P2P networks are commonly used in business, education, and military applications. Advantages of Peer-to-Peer Architecture P2P network is less costly and cheaper. It is affordable. P2P is very simple and not complex. This is because all computers that are connected in network communication in an efficient and well- mannered with each other. It is very easy and simple to set up and manage as installation and setup is less painless and computer manages itself. This is because of built-in support in modern operating systems. Disadvantages of Peer-to-Peer Architecture It is more difficult to manage security policies consistently. Each peer demands individual care and control. As the network expands in size, it may become inefficient.
2. Client/Server Architecture CSN (Client/Server Network) is type of computer network in which one of centralized and powerful computers (commonly called as server) is hub to which many of personal computers that are less powerful or workstations (commonly known as clients) are connected. It is type of system where clients are connected to server to just share or use resources. These servers are generally considered as heart of system. This type of network is more stable and scalable as compared to P2P network. In this architecture, system is generally decomposed into client and server processor or processes. Advantages of Client/Server Architecture A special Network Operating System (NOS) is provided by server to provide resources to many users that request them. It is also very easy and simple to set up and manage data updates. This is because data is generally stored in centralized manner on server. The server usually controls resources and data security. Disadvantages of Client/Server Architecture If the server fails, clients may lose access to services. Setting up servers requires a higher investment in hardware and software. Managing servers requires skilled personnel. 3. Hybrid Networks Hybrid networks combine elements of both client-server and peer-to-peer architectures. They leverage the centralized control of client-server networks and the decentralized resource sharing of P2P networks. An example is a torrent network, where a central tracker (server) coordinates peers, but file sharing occurs directly between peers. Hybrid networks are used in applications requiring both centralized management and distributed resource sharing. Advantages of Hybrid Networks: Combines the benefits of centralized control and decentralized resource sharing. Flexible, allowing adaptation to different use cases and requirements. Can provide redundancy and fault tolerance by distributing tasks across peers and servers. Disadvantages of Hybrid Networks: Complex to design and maintain due to the combination of two architectures. May face security challenges from both client-server and P2P components. Higher costs compared to pure P2P networks due to the need for server infrastructure.
WAN (Wide Area Network) is another important computer network that which is spread across a large geographical area. WAN network system could be a connection of a LAN which connects with other LAN's using telephone lines and radio waves. It is mostly limited to an enterprise or an organization.
A Metropolitan Area Network or MAN is consisting of a computer network across an entire city, college campus, or a small region. This type of network is large than a LAN, which is mostly limited to a single building or site. Depending upon the type of configuration, this type of network allows you to cover an area from several miles to tens of miles.
For smooth data transmission, you need a very organized strategy because, in a network, many users transmit data simultaneously from one to another. An efficient approach is what allows users to send/receive data in an efficient and orderly manner. This strategy is implemented in computer networks, using different architecture and models and layered architecture is one of them. Layering: The grouping of relevant communication functions into different hierarchical sets is known as layering. Every batch of operations is a separate layer. Functions of layers
Each layer is responsible for the following functions: Perform a subset of different functions required for communication. Provide the services of its functions to the next higher layer in the hierarchy. Implementation of communication protocols with peer layers in another system. After implementing its operations, it relies on the next layer to perform additional functions. Layered architecture The architecture of computer networks uses a layering mechanism in which data transmitted from one defined layer to another for processing is a layered architecture. There are three major fundamental components of layered architecture: Service : A collection of functions provided by a layer to a higher layer. Protocol : A set of rules to share data with the peer layer. Interface : This is a means of transmitting a message from one layer to another. The application of layered architecture Layered architecture is used for communication. There are two network models which use layering. OSI model IP/TCP model There's a correspondence between these models, and TCP can be explained in terms of the OSI model. Layers can only communicate in two modes: Vertical communication The communication between adjacent layers requires mutual understanding of the services and information that the lower layer needs to provide to the upper layer. Horizontal communication This is the communication between hardware or software that is running on the same layer but on different machines.
A Protocol Hierarchy is a fixed set of rules and conventions that govern the communication between two or more computers. The hierarchical structure allows for modular design, interoperability, and ease of implementation in computer networks. What is Protocol? A protocol is simply defined as a set of rules and regulations for data communication. Rules are defined for every step and process at the time of communication among two or more computers. Networks are needed to follow these protocols to transmit the data successfully. All protocols might be implemented using hardware, software, or a combination of both of them. There are three aspects of protocols given below : Syntax - It is used to explain the data format that is needed to be sent or received. Semantics - It is used to explain the exact meaning of each of the sections of bits that are usually transferred.
Components Involved and their Functions : Service Data Unit (SDU) - SDU is a piece of information or data that is generally passed by layer just above current layer for transmission. Unit of data or information is passed down to a lower layer from an OSI (Open System Interconnection) layer or sublayer. Data is passed with request to transmit data. SDU basically identifies or determines information that is been transferred among entities of peer layers that are not interpreted by supporting entities of lower-layer. Protocol Data Unit (PDU) - PDU is a single unit of information or data that is transmitted or transferred among entities of peer layers of a computer network. When application data is passed down to protocol stack on its way to being transmitted all over network media, some of protocols add information and data to it at each and every level. PDU is used to represent and describe data is it gets transferred from one layer of OSI model to another layer. Interface Data Unit (IDU) - IDU is used to have an agreed way of communication among two layers in a network layered architecture. It is passed from (N+1 to N). Service Access Point (SAP) - SAP is generally used as an identifier label for endpoints of network in OSI networking or model. It is a data structure and identifier also for a buffer area in memory of system. It is a point in a layer of a layered architecture where a network is usually provided and where layer just above layer that provides service can probably have access to it. Interface Control Information (ICI) - ICI is a temporary parameter that is passed between N and N-1 layers to include service functions among two layers.
Benefits : Increase in Compatibility - Layered approach to networking and communication protocols generally provides and shows greater compatibility among all devices, systems, and networks that they deliver. Less expensive - Easy way of development and implementation converts to increase in an efficiency and even effectiveness that in turn converts into larger economic rationalization and very cheaper products while not compromising with quality. Increase in Mobility - Whenever we use layered and segmented strategies into architecture design, there will always be an increase in mobility. Better Scalability - Whenever we use a layered or hierarchical approach to networking protocol, design, and implementation scale much better than horizontal approach.
Connection-Oriented Service A connection-oriented service establishes a dedicated communication path between the sender and receiver before any data is transferred. This process involves a handshake to set up the connection, ensuring both parties are ready for communication Once the connection is established, data packets are transmitted sequentially and reliably. The connection remains active until all data has been successfully transferred. Afterward, the connection is terminated. A common example of a connection-oriented service is TCP (Transmission Control Protocol), which guarantees error-free and in-order delivery of packets. Examples: TCP (Transmission Control Protocol): used for reliable data transfer in applications like HTTP, FTP and email. Telephone calls: where a dedicated communication channel is established between two users. Key Features: Dedicated Connection: A logical/physical link is established before data transfer. Reliable Transmission: Error detection, acknowledgment and retransmission mechanisms ensure reliability. Sequencing: Packets arrive in the correct order. High Overhead: Extra resources are used to establish and maintain the connection. Advantages: Reliable and error-free data delivery Guaranteed data sequencing Suitable for large, continuous data transfers Ensures retransmission of lost data Disadvantages: Higher latency due to connection setup Greater resource consumption Less efficient for small or one-time messages
Parameter Connection-Oriented Service Connectionless Service Speed Slower due to setup and acknowledgments Faster as data is sent directly Resource Usage Consumes more resources (buffers, control info) Minimal resource usage Best Suited For File transfer, web browsing, emails (TCP) Streaming, DNS, VoIP (UDP) Example Protocol TCP (Transmission Control Protocol) UDP (User Datagram Protocol)
Service generally includes set of various primitives. A primitive simply means Operations. A Service is specified by set of primitives that are available and given to user or other various entities to access the service. All these primitives simply tell the service to perform some action or to report on action that is taken by peer entity. Each of the protocol that communicates in layered architecture also communicates in peer-to-peer manner with some of its remote protocol entity. Primitives are called calling functions between the layers that are used to manage communication among the adjacent protocol layers i.e., among the same communication node. The set of primitives that are available generally depends upon the nature of the service that is being provided. Classification of Service Primitives : Primitive Meaning Request It represent entity that wants or request service to perform some action or do some work (requesting for connection to remote computer). Indication It represent entity that is to be informed about event (receiver just have received request of connection). Response It represents entity that is responding to event (receiver is simply sending the permission or allowing to connect). Confirm It represent entity that acknowledges the response to earlier request that has come back (sender just acknowledge the permission to get connected to the remote host). Request - This primitive is transferred or sent to Layer N by Layer (N+1) to just request for service. Indication - This primitive is returned by Layer N to Layer (N+1) to just advise of activation of service that is being requested or of action that is initiated by the service of Layer N. Response - This primitive is simply provided by Layer (N+1) in reply to indication primitive. It might
acknowledge or complete action that is previously invoked by indication primitive. Confirm - This primitive is returned by the Nth^ layer to the requesting (N+1)st^ layer to simply acknowledge or complete action that is previously invoked by request primitive. Parameters of Service Primitives : Some of the Service Primitives need parameters. These are given below : Connect. Request - The initiating entity does this Connect.Request. It just specifies and determines machine that we want to get connected to, type of service that is being desired, and maximum size of packet or message that is used on connection. Connect. Indication - The receiver gets this Connect.Indication. It just specifies caller’s identity service that we want to use like FTP and Telnet, etc., and maximum size of packets that are exchanged. Connect. Response - It just specifies whether or not it wants to accept or simply reject connection that is being requested. Connect. Confirm - It just finds out or determines what happened using the entity that is issuing the initial Connect. Request.
Primitive Meaning Listen When server is ready to accept request of incoming connection, it simply put this primitive into action. Listen primitive simply waiting for incoming connection request. Connect This primitive is used to connect the server simply by creating or establishing connection with waiting peer. Accept This primitive simply accepts incoming connection from the peer. Receive These primitive afterwards block the server. Receive primitive simply waits for incoming message. Send This primitive is put into action by the client to transmit its request that is followed by putting receive primitive into action to get the reply. Send primitive simply sends or transfer the message to the peer. Disconnect This primitive is simply used to terminate or end the connection after which no one will be able to send any of the message.
Primitive Meaning Unitdata Unitdata primitive is simply required to send packet of data or information. Facility, Report This primitive is required for getting details about the performance and working of the network such as delivery statistics or report.
Framing: Framing is a function of the data link layer. It provides a way for a sender to transmit a set of bits that are meaningful to the receiver. This can be accomplished by attaching special bit patterns to the beginning and end of the frame. Physical Addressing: After creating frames, the Data link layer adds physical addresses (MAC addresses) of the sender and/or receiver in the header of each frame. Error Control: The data link layer provides the mechanism of error control in which it detects and retransmits damaged or lost frames. Flow Control: The data rate must be constant on both sides else the data may get corrupted thus, flow control coordinates the amount of data that can be sent before receiving an acknowledgment. Access Control: When a single communication channel is shared by multiple devices, the MAC sub-layer of the data link layer helps to determine which device has control over the channel at a given time. Layer 3: Network Layer The Network Layer works for the transmission of data from one host to the other located in different networks. It also takes care of packet routing i.e. selection of the shortest path to transmit the packet, from the number of routes available. The sender and receiver's IP address are placed in the header by the network layer. Segment in the Network layer is referred to as Packet. Network layer is implemented by networking devices such as routers and switches. Functions of the Network Layer Routing: The network layer protocols determine which route is suitable from source to destination. This function of the network layer is known as routing. Logical Addressing: To identify each device inter-network uniquely, the network layer defines an addressing scheme. The sender and receiver’s IP addresses are placed in the header by the network layer. Such an address distinguishes each device uniquely and universally. Layer 4: Transport Layer The Transport Layer provides services to the application layer and takes services from the network layer. The data in the transport layer is referred to as Segments. It is responsible for the end-to-end delivery of the complete message. The transport layer also provides the acknowledgment of the successful data transmission and re-transmits the data if an error is found. Protocols used in Transport Layer are TCP, UDP NetBIOS, PPTP. At the sender's side, the transport layer receives the formatted data from the upper layers, performs Segmentation, and also implements Flow and error control to ensure proper data transmission. It also adds Source and Destination port number in its header and forwards the segmented data to the Network Layer. Generally, this destination port number is configured, either by default or manually. Example: when a web application requests a web server, it typically uses port number 80, because this is the default port assigned to web applications. Many applications have default ports assigned. At the Receiver’s side, Transport Layer reads the port number from its header and forwards the Data which it has received to the respective application. It also performs sequencing and reassembling of the segmented data. Functions of the Transport Layer Segmentation and Reassembly: This layer accepts the message from the (session) layer and breaks the message into smaller units. Each of the segments produced has a header associated with it. The transport layer at the destination station reassembles the message.
Service Point Addressing: To deliver the message to the correct process, the transport layer header includes a type of address called service point address or port address. Thus, by specifying this address, the transport layer makes sure that the message is delivered to the correct process. Services Provided by Transport Layer Connection-Oriented Service Connectionless Service Layer 5: Session Layer Session Layer in the OSI Model is responsible for the establishment of connections, management of connections, terminations of sessions between two devices. It also provides authentication and security. Protocols used in the Session Layer are NetBIOS, PPTP. Functions of the Session Layer Session Establishment, Maintenance, and Termination: The layer allows the two processes to establish, use, and terminate a connection. Synchronization: This layer allows a process to add checkpoints that are considered synchronization points in the data. These synchronization points help to identify the error so that the data is re-synchronized properly, and ends of the messages are not cut prematurely, and data loss is avoided. Dialog Controller: The session layer allows two systems to start communication with each other in half-duplex or full duplex. Layer 6: Presentation Layer The Presentation Layer is also called the Translation layer. The data from the application layer is extracted here and manipulated as per the required format to transmit over the network. Protocols used in the Presentation Layer are TLS/SSL (Transport Layer Security / Secure Sockets Layer).JPEG, MPEG, GIF, are standards or formats used for encoding data, which is part of the presentation layer’s role. Functions of the Presentation Layer Translation: For example, ASCII to EBCDIC. Encryption/ Decryption: Data encryption translates the data into another form or code. The encrypted data is known as the ciphertext, and the decrypted data is known as plain text. A key value is used for encrypting as well as decrypting data. Compression: Reduces the number of bits that need to be transmitted on the network. Layer 7: Application Layer At the very top of the OSI Reference Model stack of layers, we find the Application Layer which is implemented by the network applications. These applications produce the data to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user. Protocols used in the Application layer are SMTP, FTP, DNS, etc. Functions of the Application Layer The main functions of the application layer are given below. Network Virtual Terminal (NVT): It allows a user to log on to a remote host. File Transfer Access and Management (FTAM): This application allows a user to access files in a remote host, retrieve files in a remote host, and manage or control files from a remote computer. Mail Services: Provide email service.
TCP/IP Model The TCP/IP model is a layered networking framework that explains how data is communicated between devices over a network using standardized protocols to ensure reliable and efficient transmission. Defined as a four-layer architecture consisting of Application, Transport, Internet, and Network Access layers. Standardized by RFC 1122, which specifies its structure and behavior. Simpler and more practical than the seven-layer OSI model. Serves as the core framework of the modern Internet and networking systems. Layers of TCP/IP Model
1. Application Layer The top layer of the TCP/IP model, closest to the user, where applications like web browsers, email clients, and file-sharing tools interact with the network. It provides an interface between user software and the lower layers that handle data transmission, enabling seamless communication over the network. Acts as a bridge between user applications and lower network layers Supports protocols such as HTTP, FTP, SMTP, and DNS Handles data formatting so information is correctly understood by both sender and receiver Provides encryption for secure communication Manages sessions to track ongoing connections 2. Transport Layer Ensures reliable and efficient delivery of data between devices, managing segmentation, ordering, and retransmission as needed. Segmentation and Reassembly: Breaks large messages into packets and reassembles them at the destination. Reliable Delivery & Error Handling: TCP checks for errors, resends lost data, and ensures correct order. Fast Communication: UDP provides low-latency, connectionless delivery without error checking. Flow Control: Prevents the receiver from being overwhelmed by regulating data flow. Multiplexing: Uses port numbers to allow multiple applications to share the network simultaneously. TCP (Transmission Control Protocol): TCP is used when reliability and accuracy are important. It ensures that data is delivered exactly as sent. Error Checking: TCP detects errors in the data using checksums to ensure integrity. Retransmission: If any data is lost or corrupted during transmission, TCP automatically resends it. Ordered Delivery: Data is broken into packets, and TCP ensures these packets arrive in the correct sequence. Connection-Oriented: TCP establishes a connection between sender and receiver before sending data, maintaining a stable session throughout the communication. Use Cases: Loading web pages, downloading files, sending emails, or any application where data must be complete and accurate. UDP (User Datagram Protocol): UDP is used when speed is more important than perfect accuracy. It is faster but does not guarantee reliable delivery. No Error Checking: UDP does not verify whether the data has errors. No Retransmission: Lost or damaged data is not resent.
No Ordered Delivery: Packets may arrive out of order, and the protocol does not fix it. Lightweight: Because it avoids extra checks and connections, UDP is faster and uses fewer resources. Use Cases: Live video streaming, online gaming, VoIP calls, or real-time applications where speed matters more than reliability.
3. Internet Layer Responsible for addressing, packaging, and routing data packets so they can travel across networks and reach the correct destination device. It ensures that data can move between different networks efficiently. Logical Addressing: Assigns IP addresses to identify source and destination devices. Packet Routing: Determines the best path for data to travel across networks. Fragmentation and Reassembly: Breaks large packets into smaller ones for transmission and reassembles them at the destination. Protocol Support: Primarily uses IP (Internet Protocol), along with supporting protocols like ICMP for error reporting and ARP for address resolution. 4. Network Access (Link Layer) Responsible for physically transmitting data over network hardware, including cables, switches, and wireless connections. It handles how data is formatted for the network medium and ensures it reaches the next device on the path. Physical Transmission: Sends and receives raw bits over physical media like Ethernet cables, fiber optics, or Wi-Fi. Framing: Organizes data into frames for proper transmission and recognition by devices. Error Detection: Detects transmission errors using checksums or CRC. MAC Addressing: Uses hardware addresses to identify devices within the same network segment. Access Control: Determines how multiple devices share the same physical medium, avoiding collisions. Working of TCP/IP Model When Sending Data (From Sender to Receiver) Application Layer: The user’s software (like a web browser or email client) creates the data and passes it to the next layer.