The Wayback Machine - https://web.archive.org/web/20240927183931/https://www.geeksforgeeks.org/last-minute-notes-computer-network/
Open In App

Last Minute Notes – Computer Networks

Last Updated : 01 Mar, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

See Last Minute Notes on all subjects here. 

  1. OSI Model
  2. Physical Layer
  3. Data Link layer
  4. Network Layer
  5. Transport Layer
  6. Presentation & Session layer
  7. Application Layer

OSI Model

OSI stands for Open Systems Interconnection. It has been developed by ISO–  International Organization for Standardization, in the year 1984. It is a seven-layer architecture with each layer having specific functionality to perform. 

OSI Layers, Data Units, and Functions:

Layers Data Units Functions
Application Layer Data Mail Services, Directory Services, FTAM
Presentation Layer Data Encryption/Decryption, Compression
Session Layer Data Session Establishment, Synchronization, Dialog Controller
Transport Layer Segments, Datagram Segmentation
Network Layer Packets Traffic control, Fragmentation, Routing
Data Link Layer Frames Flow control, Error control, Access control
Physical Layer Bits Bit Synchronization, Bit rate control, Physical Topologies

Layers and their uses:

 

Physical Layer

Network Topologies: 

  • Mesh Topology: In a mesh topology, every device is connected to another device via a particular channel. If suppose, N number of devices are connected with each other, then a total number of links is required to connect NC2.
  • Bus Topology: Bus topology is a network type in which every computer and network device is connected to a single cable. If N devices are connected, then the number of cables required is 1 which is known as backbone cable, and N drop lines are required.
  • Star Topology: In star topology, all the devices are connected to a single hub through a cable. If N devices are connected to each other, then the no. of cables required N.
  • Ring Topology: In this topology, it forms a ring connecting devices with exactly two neighboring devices.

Transmission Modes: 

  • Simplex Mode: the communication is unidirectional, as on a one-way street. Only one of the two devices on a link can transmit, and the other can only receive.
  • Half-duplex Mode: each station can both transmit and receive, but not at the same time.
  • Full-duplex Mode: both stations can transmit and receive simultaneously.

Manchester Encoding: When there is a long sequence of 0s and 1s, there is a problem at the receiving end. The problem is that the synchronization is lost due to a lack of transmissions.

  • NRZ-level encoding: The polarity of signals changes when the incoming signal changes from ‘1’ to ‘0’ or from ‘0’ to ‘1’. It considers the first bit of data as polarity change.
  • NRZ-Inverted/ Differential encoding: In this, the transitions at the beginning of the bit interval are equal to 1 and if there is no transition at the beginning of the bit interval are equal to 0.

Data Link Layer

  • Flow Control: The methods to maintain the flow of the data while the transmission is known as flow control methods. Mainly we have two approaches: 
    • Stop & Wait: Only one data packet can be shared over the link and the sender has to wait for the positive acknowledgment so that it can send another packet. It leads to poor efficiency and poor resource utilization. 
    • Sliding Window Protocol
      • Go Back N: It is also known as “conservative protocol”, and uses cumulative/piggybacking acknowledgments. The receiver window size is 1, and the sender window size is 2k -1 where K is the number of bits received for the window size in the header. 
      • Selective Repeat: It accepts out-of-order packets and accepts cumulative/ independent/ piggybacking acknowledgments.  
         

 

  • Round Trip Time is the overall time taken in transmitting a packet, it is also known as minimum acknowledgment waiting time. 
  • Sequence Number <= (Sender’s Window Size) + (Receiver’s Window Size )
  • Efficiency in TDM(polling) = Tt / (Tpoll + Tt)
  • In CSMA/CD, Tt >= 2*Tp Hence, min frame length = 2*Tp*B and Efficiency in CSMA = 1/(1 + 6.44a)
  • Back-off Algorithm for CSMA/CD Waiting time = back–off time Let n = collision number or re-transmission serial number. Then, Waiting time = K * Tslot where K = [0, 2n – 1 ]
  • N = No. of stations Early Token Reinsertion : Efficiency = 1/(1 + a/N) Delayed Token Reinsertion : Efficiency = 1/(1 + (N+1)a/N)
  • Pure Aloha Efficiency = 18.4 % Slotted Aloha Efficiency = 36.8%
  • Maximum data rate (channel capacity) for noiseless and noisy channels
    • Noiseless Channel: Nyquist Bit Rate BitRate = 2 * Bandwidth * log2(L) where L is the number of signal levels used to represent data.
    • Noisy Channel : Shannon Capacity Capacity = bandwidth * log2(1 + SNR) where, SNR is the signal-to-noise ratio
  • Error Control
    • Hamming Code: It is a set of error-correction codes that can be used to detect and correct the errors that can occur when the data is moved or stored from the sender to the receiver. 
      • Redundant bits: 2r ≥ m + r + 1 where, r = redundant bit, m = data bit
    • CRC: CRC stands for Cyclic Redundancy Check and this uses a polynomial generator on both the sender and receiver sides to detect the error in the transmitted data. 
    • Checksum: It is more reliable than other modes of error detection, it uses a checksum generator on the sender side and a checksum checker on the receiver side
    • Framing in DLL: It provides a way for a sender to transmit a set of bits that are meaningful to the receiver.
      • Character/Byte Stuffing: Used when frames consist of character. If data contains ED then, a byte is stuffed into the data to differentiate it from ED. 
      • Bit stuffing: Sender stuffs a bit to break the pattern i.e. here appends a 0 in data = 011101.

Network Layer

Class Full Addressing Table: 

 

IPv4 header datagram: 

 

 IP version 6 Header Format:

 

Subnetting: Dividing a bigger network into a smaller network to maintain the security of the network is known as subnetting.

Supernetting: Multiple smaller networks are combined to form a bigger network. It is mainly used in router summarization, etc. 

VLSM: Variable Length Subnet Mask is where the subnet design uses more than one mask in the same network which means more than one mask is used for different subnets of a single class A, B, C, or a network. It is also defined as the process of subnetting a subnet. It is used to increase the usability of subnets as they can be of variable size. 

Internet Control Message Protocol: Since IP does not have an inbuilt mechanism for sending error and control messages. It depends on Internet Control Message Protocol(ICMP) to provide error control.

  1. Source quench message
  2. Parameter problem
  3. Time exceeded message
  4. Destination un-reachable

Difference between DVR and LSR:

 

  • The router having the highest router priority will be declared as DR.
  • If there is a tie-in router priority then the highest router will be considered. First, the highest loopback address is considered. If no loopback is configured then the highest active IP address on the router’s interface is considered.

Hop Count: Hop count is the number of routers between the source and destination network. The path with the lowest hop count is considered the best route to reach a network and therefore placed in the routing table. 

The maximum hop count allowed for RIP is 15 and a hop count of 16 is considered as network unreachable.

Open shortest path first (OSPF): Open the shortest path first (OSPF) is a link-state routing protocol that is used to find the best path between the source and the destination router using its own SPF algorithm.
Designated Router(DR) and Backup Designated Router(BDR) election takes place in the broadcast network or multi-access network.

Routing Information Protocol (RIP): RIP is a dynamic routing protocol that uses hop count as a routing metric to find the best path between the source and the destination network. It is a distance vector routing protocol that has an AD value of 120 and works on the application layer of the OSI model. RIP uses port number 520.

Transport Layer

TCP header

In TCP congestion control Algorithm

  • When Time Out Occurs Algorithm Enters Slow Start Phase
  • When 3 Duplicate occurs algorithm enters the congestion avoidance phase

TCP 3-Way Handshake Process:

  • Step 1 (SYN): In the first step, the client wants to establish a connection with the server, so it sends a segment with SYN(Synchronize Sequence Number) which informs the server that the client is likely to start communication and with what sequence number it starts segments with
  • Step 2 (SYN + ACK): Server responds to the client request with SYN-ACK signal bits set. Acknowledgment (ACK) signifies the response of the segment it received and SYN signifies with what sequence number it is likely to start the segments with
  • Step 3 (ACK): In the final part client acknowledges the response of the server and they both establish a reliable connection with which they will start eh actual data transfer.

UDP header:

Session & Presentation Layer

Session Layer:

  • The session layer is responsible for establishing, maintaining, and terminating sessions in a network. The session layer manages data transmission for a certain time period.
  • The session layer is responsible for the identification of entities participating in a session. 
  • It provides synchronization services to the data stream.

Presentation Layer:

  • The presentation layer translates the data packet from the network layer to the application layer and vice versa.
  • The main responsibility of the Presentation layer is protocol conversion, data encryption/decryption, character conversion, and data compression. 
  • It sets standards for different systems to provide flawless communication. 

Application Layer

Application Layer: It is the topmost layer of the OSI model and it directly interacts with web applications or application services. This layer provides several ways for manipulating the data (information) which actually enables any type of user to access the network with ease.

Functions of Application Layer: 

  • Application Layer facilitates email sending and storing features. 
  • This layer allows users to access, retrieve and manage files from a remote computer.
  • This layer provides services that include: E-mail, File transfer, directory services, network resources, etc. 

Domain Name Server: DNS is a hostname for IP address translation service. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers.

Protocols in Application Layer

  • Dynamic Host Configuration Protocol(DHCP) is an application layer protocol that is used to provide:
    • Subnet Mask (Option 1 – e.g., 255.255.255.0)
    • Router Address (Option 3 – e.g., 192.168.1.1)
    • DNS Address (Option 6 – e.g., 8.8.8.8)
    • Vendor Class Identifier (Option 43 – e.g., ‘unifi’ = 192.168.1.9 ##where unifi = controller)
  • Simple Network Management Protocol (SNMP): SNMP is an application layer protocol that uses UDP port number 161/162.SNMP is used to monitor networks, detect network faults, and sometimes even used to configure remote devices.
  • Simple Mail Transfer Protocol (SMTP): SMTP is an application layer protocol. The client who wants to send the mail opens a TCP connection to the SMTP server and then sends the mail across the connection. The SMTP server is always in listening mode. As soon as it listens for a TCP connection from any client, the SMTP process initiates a connection on that port (25). After successfully establishing the TCP connection the client process sends the mail instantly.
  • File Transfer Protocol (FTP): File Transfer Protocol(FTP) is an application layer protocol that moves files between local and remote file systems. It runs on top of TCP, like HTTP. To transfer a file, 2 TCP connections are used by FTP in parallel: control connection and data connection.
  • Hypertext Transfer Protocol (HTTP): is an application-level protocol that uses TCP as an underlying transport and typically runs on port 80. HTTP is a stateless protocol i.e. server maintains no information about past client requests.

Port number and transport mode used by Protocols:

Port Number TCP/UDP Protocol Name
20, 21 TCP File Transfer Protocol (FTP)
22 TCP and UDP Secure Shell (SSH)
23 TCP Telnet
25 TCP Simple Mail Transfer Protocol (SMTP)
53 TCP and UDP Domain Name Server (DNS)
67, 68 UDP Dynamic Host Configuration Protocol (DHCP)
69 UDP Trivial File Transfer Protocol (TFTP)
80 TCP HyperText Transfer Protocol (HTTP)
110 TCP Post Office Protocol (POP3)
119 TCP Network News Transport Protocol (NNTP)
123 UDP Network Time Protocol (NTP)
135-139 TCP and UDP NetBIOS
143 TCP and UDP Internet Message Access Protocol (IMAP4)
161, 162 TCP and UDP Simple Network Management Protocol (SNMP)
179 TCP Border Gateway Protocol (BGP)
389 TCP and UDP Lightweight Directory Access Protocol
443 TCP and UDP HTTP with Secure Sockets Layer (SSL)
500 UDP Internet Security Association and Key Management Protocol (ISAKMP) / Internet Key Exchange (IKE)
636 TCP and UDP Lightweight Directory Access Protocol over TLS/SSL (LDAPS
989/990 TCP FTP over TLS/SSL


Previous Article
Next Article

Similar Reads

Computer Networks - GATE CSE Previous Year Questions
Solving GATE Previous Year's Questions (PYQs) not only clears the concepts but also helps to gain flexibility, speed, accuracy, and understanding of the level of questions generally asked in the GATE exam, and that eventually helps you to gain good marks in the examination. Previous Year Questions help a candidate practice and revise for GATE, whic
4 min read
Computer Networks | Set 5
Following questions have been asked in GATE CS 2005 exam. 1) Packets of the same session may be routed through different paths in: (a) TCP, but not UDP (b) TCP and UDP (c) UDP, but not TCP (d) Neither TCP nor UDP Answer (b) Packet is the Network layer Protocol Data Unit (PDU). TCP and UDP are Transport layer protocols. Packets of same session may b
2 min read
Computer Networks | Set 3
Following Questions have been asked in GATE 2011 CS exam. 1) A layer-4 firewall ( a device that can look at all protocol headers up to the transport layer) CANNOT (A) block HTTP traffic during 9:00PM and 5:00AM (B) block all ICMP traffic (C) stop incoming traffic from a specific IP address but allow outgoing traffic to same IP (D) block TCP traffic
3 min read
Computer Networks | Set 12
Following questions have been asked in GATE CS 2009 exam. 1) Let G(x) be the generator polynomial used for CRC checking. What is the condition that should be satisfied by G(x) to detect odd number of bits in error? (A) G(x) contains more than two terms (B) G(x) does not divide 1+x^k, for any k not exceeding the frame length (C) 1+x is a factor of G
2 min read
Computer Networks | Set 6
Following questions have been asked in GATE CS 2005 exam. 1) An organization has a class B network and wishes to form subnets for 64 departments. The subnet mask would be: (a) 255.255.0.0 (b) 255.255.64.0 (c) 255.255.128.0 (d) 255.255.252.0 Answer (d) The size of network ID is 16 bit in class B networks. So bits after 16th bit must be used to creat
4 min read
Computer Networks | Set 7
Following questions have been asked in GATE CS 2008 exam. 1) Which of the following system calls results in the sending of SYN packets? (A) socket (B) bind (C) listen (D) connect Answer (D) socket() creates a new socket of a certain socket type, identified by an integer number, and allocates system resources to it. bind() is typically used on the s
3 min read
Computer Networks | Set 8
Following questions have been asked in GATE CS 2008 exam. 1) What is the maximum size of data that the application layer can pass on to the TCP layer below? (A) Any size (B) 2^16 bytes-size of TCP header (C) 2^16 bytes (D) 1500 bytes Answer (A) Application layer can send any size of data. There is no limit defined by standards. The lower layers div
2 min read
Computer Networks | Set 9
Following questions have been asked in GATE CS 2007 exam. 1) Which one of the following uses UDP as the transport protocol? (A) HTTP (B) Telnet (C) DNS (D) SMTP Answer (C) DNS primarily uses User Datagram Protocol (UDP) on port number 53 to serve requests. DNS queries consist of a single UDP request from the client followed by a single UDP reply fr
2 min read
Computer Networks | Set 10
Following questions have been asked in GATE CS 2007 exam. 1) The address of a class B host is to be split into subnets with a 6-bit subnet number. What is the maximum number of subnets and the maximum number of hosts in each subnet? (A) 62 subnets and 262142 hosts. (B) 64 subnets and 262142 hosts. (C) 62 subnets and 1022 hosts. (D) 64 subnets and 1
4 min read
Computer Networks | Set 11
Following questions have been asked in GATE CS 2006 exam. 1) Station A uses 32 byte packets to transmit messages to Station B using a sliding window protocol. The round trip delay between A and B is 80 milliseconds and the bottleneck bandwidth on the path between A and B is 128 kbps. What is the optimal window size that A should use? (A) 20 (B) 40
3 min read
Computer Networks | IP Addressing | Question 5
If subnet mask 255.255.255.224, which of the following will be Direct Broadcast address ? (A) 202.15.19.127 (B) 202.15.19.63 (C) Both a and b (D) None of the Above Answer: (C) Explanation: Subnet mask is   255.255.255.11100000 In DBA all host bits are 1. from option 202.15.19.011 11111 , this can be a DBA. 202.15.19.001 11111 ,this can also be a DB
1 min read
Computer Networks | IP Addressing | Question 6
Which of the following is public IP address ? (A) 10.15.14.12 (B) 192.168.52.62 (C) 172.32.1.1 (D) None of the Above Answer: (C) Explanation: Range of Private IP 10.0.0.0 - 10.255.255.255 172.16.0.0 - 172.31.255.255 192.168.0.0 - 192.168.255.255 Option C doesn't belong to this rangeQuiz of this Question
1 min read
Congestion Control techniques in Computer Networks
Congestion control refers to the techniques used to control or prevent congestion. Congestion control techniques can be broadly classified into two categories: Open Loop Congestion Control Open loop congestion control policies are applied to prevent congestion before it happens. The congestion control is handled either by the source or the destinat
5 min read
Computer Networks | Set 14
This question for practice purpose for GATE CS Exam. Ques-1: Which of the following is not true about Subnetting? (A) It can be applied only for single network. (B) It is used to improve security. (C) Here, bits are borrowed from network ID portion. (D) Here, bits are borrowed from host ID portion. Explanation: In Subnetting bits are borrowed from
2 min read
End to End Encryption (E2EE) in Computer Networks
What is Encryption? Have you ever wondered how our emails, texts, photos, videos are sent over the Internet? Whenever you send anything over the Internet, it passes through a lot of servers, routers, and other devices where anyone can intercept it and get access to your private information. Thus, to tackle such mishap, encryption was introduced. In
2 min read
Computer Networks | Set 13
These questions for practice purpose for GATE CS Exam. Ques-1: How many bits are allocated for network id (NID) and host id(HID) in the IP address 25.193.155.233? (A) 24 bit for NID, 8 bits for HID (B) 8 bit for NID, 24 bits for HID (C) 16 bit for NID, 16 bits for HID (D) none Explanation: It is class A IP address and you know, that class A has 24
3 min read
Introduction of Botnet in Computer Networks
A Network of compromised computers is called a botnet. Compromised computers are also called Zombies or Bots. This software is mostly written in C++ & C. The main motive of botnet is that it starts with the dark side of the internet which introduced a new kind of Crime called Cybercrime. Among the malware (malicious software) botnet is the most
5 min read
Access Control Tactics in Computer Networks
Discretionary Access Control: Discretionary Access Control grants or restricts object access determined by the object’s owner. Controls are discretionary because an object owner with certain access permissions can pass on those permissions to another subject. In systems that utilize discretionary access controls, the owner of an object can choose w
2 min read
Forward Error Correction in Computer Networks
Forward Error Correction (FEC) is a technique used to minimize errors in data transmission over communication channels. In real-time multimedia transmission, re-transmission of corrupted and lost packets is not useful because it creates an unacceptable delay in reproducing : one needs to wait until the lost or corrupted packet is resent. Thus, ther
3 min read
List of "Difference Between" Computer Networks Topics
Computer Network is a set of devices or systems that shares resources through links and it can be defined as a collection of nodes. A node can be any device capable of transferring or receiving data. The communicating nodes need to be connected by communication links. A computer network refers to interconnected computing devices that can interchang
4 min read
What is Traffic Throttling in Computer Networks?
A network is made by connecting various devices either through ethernet or by connecting them wirelessly. When the performance of the network reduces due to the availability of so many packets in the subnet it is known as congestion. If the size of the router is small it leads to congestion and even if the size is large it takes more time for the p
4 min read
What is Load Shedding in Computer Networks?
A network consists of various devices or resources. Each resource is assigned to perform a particular task. Sometimes the available resources are more but the task or load to be performed is less whereas sometimes it is completely opposite. In such scenarios when the load is more as compared to the available resources in the network it is known as
4 min read
Computer Networks | Set 2
In this article, we are going to see the questions of GATE's previous year's questions of CN. An explanation of each question is also mentioned in this article. 1. The protocol data unit(PDU) for the application layer in the Internet stack is [GATE CSE 2012] (A) Segment (B) Datagram (C) Message (D) Frame Solution: (C) The Protocol Data Unit for the
5 min read
Microwaves in Computer Networks
Data transfer speed and reliability are two main contexts of the realm of computer networks. In the modern days, microwave connectivity medium has gained popularity for its blazing fast data transmission capability and reliability. Microwaves are nothing but a special type of electromagnetic spectrum. Microwaves are used in various computer applica
4 min read
Line Configuration in Computer Networks
A network is two or more devices connected through a link. A link is a communication pathway that transfers data from one device to another. Devices can be a computer, printer, or any other device that is capable to send and receive data. For visualization purposes, imagine any link as a line drawn between two points. For communication to occur, tw
9 min read
Payload in Computer Networks
Payload During the transmission of the data with the Internet Protocol from the sender to receiver. Data is sent in terms of packets and individual packets contain a header and the data which is sent by the sender this data is called Payload. Headers are appended to the payload for transport and then discarded when they successfully reach their des
2 min read
Piggybacking in Computer Networks
Pre-Requisite: Transmission Mode in Computer Networks Piggybacking is the technique of delaying outgoing acknowledgment and attaching it to the next data packet.  When a data frame arrives, the receiver waits and does not send the control frame (acknowledgment) back immediately. The receiver waits until its network layer moves to the next data pack
5 min read
Latency vs Jitter in Computer Networks
There are two vital concepts in the world of networking and telecommunications that are used frequently, latency and jitter. There are, on the other hand, two separate components of data transmission efficiency. LatencyIt refers to the time it takes for data to go from the origin to the destination. This delay encompasses various factors such as: P
4 min read
Satellite Switched TDMA in Computer Networks
Satellite Switched TDMA is a method used in satellite communication to efficiently allocate transmission time slots to different users. In this method the satellite acts like a traffic controller, giving each station a specific time interval to send and receive data. This process prevents interference and ensures that multiple stations can use the
4 min read
Computer Networks | Set 4
Following Questions have been asked in GATE 2010 CS exam. 1) One of the header fields in an IP datagram is the Time to Live (TTL) field. Which of the following statements best explains the need for this field? (A) It can be used to prioritize packets (B) It can be used to reduce delays (C) It can be used to optimize throughput (D) It can be used to
4 min read
Article Tags :