Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Comparison of Circuit Switching and Packet Switching, Summaries of Computer Fundamentals

A detailed comparison of circuit switching and packet switching, two fundamental communication methods used in computer networks. It covers the key characteristics, advantages, and disadvantages of each approach. The document also discusses the similarities and differences between the osi (open systems interconnection) model and the tcp/ip (transmission control protocol/internet protocol) model, which are closely related to the concepts of circuit switching and packet switching. Additionally, the document introduces the stop and wait arq (automatic repeat request) protocol, which is a connection-oriented communication method used for error and flow control. The comparison of these networking concepts and protocols can be valuable for students and professionals studying computer networks, telecommunications, and related fields.

Typology: Summaries

2021/2022

Uploaded on 04/16/2024

armaan-technologies
armaan-technologies 🇮🇳

2 documents

1 / 16

Toggle sidebar

Related documents


Partial preview of the text

Download Comparison of Circuit Switching and Packet Switching and more Summaries Computer Fundamentals in PDF only on Docsity!

OSI Model

OSI stands for Open Systems Interconnection. It has 7 layers Physical layer, Data Link layer, Network layer, Transport layer, Session layer, Presentation layer, and Application layer. Each layer performs its task independently. It was developed in 1984 by the International Organization for Standardization (ISO).

OSI Model

Advantages

 Both connection-oriented services and connectionless services are supported.  It is quite flexible.  All the layers work independently.

Disadvantages

 Setting up a model is a challenging task.

 Sometimes, it becomes difficult to fit a new protocol into this model.  It is only used as a reference model.

TCP/IP Model

TCP/IP stands for Transmission Control Protocol/Internet Protocol. It has 4 layers named as Physical layer, Network layer, Transport layer, and Application layer. It also can be used as a communications protocol in a private computer network. It was designed by Vint Cerf and Bob Kahn in the 1970s.

Advantages

 Many Routing protocols are supported.  It is highly scalable and uses a client-server architecture.  It is lightweight.

Disadvantages

 Little difficult to set up.  Delivery of packets is not guaranteed by the transport layer.  Vulnerable to a synchronization attack.

Similarities between OSI Model and TCP/IP Model

OSI and TCP/IP both are logical models. One of the main similarities between the OSI and TCP/IP models is that they both describe how information is transmitted between two devices across a network. Both models define a set of layers. Each layer performs a specific set of functions to enable the transmission of data. Another similarity between the two models is that they both use the concept of encapsulation, in which data is packaged into a series of headers and trailers

that contain information about the data being transmitted and how it should be

handled by the network.

Differences between OSI Model and TCP/IP Model

Parameters OSI Model TCP/IP Model

Full Form

OSI stands for Open

Systems Interconnection.

TCP/IP stands for

Transmission Control

Protocol/Internet Protocol.

Layers It has 7 layers. It has 4 layers.

Usage It is low in usage. It is mostly used.

Approach It is vertically approached. It is horizontally approached.

Delivery

Delivery of the package is

guaranteed in OSI Model.

Delivery of the package is

not guaranteed in TCP/IP

Model.

Replacement

Replacement of tools and

changes can easily be done

in this model.

Replacing the tools is not

easy as it is in OSI Model.

Reliability

It is less reliable than TCP/IP

Model.

It is more reliable than OSI

Model.

Open In App

Circuit Switching

Circuit switching is a communication method where a dedicated communication path, or circuit,

is established between two devices before data transmission begins. The circuit remains

dedicated to the communication for the duration of the session, and no other devices can use it

while the session is in progress. Circuit switching is commonly used in voice communication and

some types of data communication.

Advantages of Circuit Switching:

 Guaranteed bandwidth: Circuit switching provides a dedicated path for communication, ensuring that bandwidth is guaranteed for the duration of the call.  Low latency: Circuit switching provides low latency because the path is predetermined, and there is no need to establish a connection for each packet.  Predictable performance: Circuit switching provides predictable performance because the bandwidth is reserved, and there is no competition for resources.  Suitable for real-time communication: Circuit switching is suitable for real-time communication, such as voice and video, because it provides low latency and predictable performance.

Disadvantages of Circuit Switching:

 Inefficient use of bandwidth: Circuit switching is inefficient because the bandwidth is reserved for the entire duration of the call, even when no data is being transmitted.  Limited scalability: Circuit switching is limited in its scalability because the number of circuits that can be established is finite, which can limit the number of simultaneous calls that can be made.  High cost: Circuit switching is expensive because it requires dedicated resources, such as hardware and bandwidth, for the duration of the call.

Packet Switching

Packet switching is a communication method where data is divided into smaller units called

packets and transmitted over the network. Each packet contains the source and destination

addresses, as well as other information needed for routing. The packets may take different paths

to reach their destination, and they may be transmitted out of order or delayed due to network

congestion.

Advantages of Packet Switching:

 Efficient use of bandwidth: Packet switching is efficient because bandwidth is shared among multiple users, and resources are allocated only when data needs to be transmitted.  Flexible: Packet switching is flexible and can handle a wide range of data rates and packet sizes.  Scalable: Packet switching is highly scalable and can handle large amounts of traffic on a network.  Lower cost: Packet switching is less expensive than circuit switching because resources are shared among multiple users.

Disadvantages of Packet Switching:

 Higher latency: Packet switching has higher latency than circuit switching because packets must be routed through multiple nodes, which can cause delay.  Limited QoS: Packet switching provides limited QoS guarantees, meaning that different types of traffic may be treated equally.  Packet loss: Packet switching can result in packet loss due to congestion on the network or errors in transmission.

 Unsuitable for real-time communication: Packet switching is not suitable for real-time communication, such as voice and video, because of the potential for latency and packet loss.

Similarities:

 Both methods involve the transmission of data over a network.  Both methods use a physical layer of the OSI model for transmission of data.  Both methods can be used to transmit voice, video, and data.  Both methods can be used in the same network infrastructure.  Both methods can be used for both wired and wireless networks.

Difference between Circuit Switching and Packet Switching:

Circuit Switching Packet Switching In-circuit switching has there are 3 phases: i) Connection Establishment. ii) Data Transfer. iii) Connection Released. In Packet switching directly data transfer takes place. In-circuit switching, each data unit knows the entire path address which is provided by the source. In Packet switching, each data unit just knows the final destination address intermediate path is decided by the routers. In-Circuit switching, data is processed at the source system only In Packet switching, data is processed at all intermediate nodes including the source system. The delay between data units in circuit switching is uniform. The delay between data units in packet switching is not uniform. Resource reservation is the feature of circuit switching because the path is fixed for data transmission. There is no resource reservation because bandwidth is shared among users. Circuit switching is more reliable. Packet switching is less reliable. Wastage of resources is more in Circuit Switching Less wastage of resources as compared to Circuit Switching It is not a store and forward technique. It is a store and forward technique.

Circuit Switching Packet Switching Transmission of the data is done by the source. Transmission of the data is done not only by the source but also by the intermediate routers. Congestion can occur during the connection establishment phase because there might be a case where a request is being made for a channel but the channel is already occupied. Congestion can occur during the data transfer phase, a large number of packets comes in no time. Circuit switching is not convenient for handling bilateral traffic. Packet switching is suitable for handling bilateral traffic. In-Circuit switching, the charge depends on time and distance, not on traffic in the network. In Packet switching, the charge is based on the number of bytes and connection time. Recording of packets is never possible in circuit switching. Recording of packets is possible in packet switching. In-Circuit Switching there is a physical path between the source and the destination In Packet Switching there is no physical path between the source and the destination Circuit Switching does not support store and forward transmission Packet Switching supports store and forward transmission Call setup is required in circuit switching. No call setup is required in packet switching. In-circuit switching each packet follows the same route. In packet switching packets can follow any route. The circuit switching network is implemented at the physical layer. Packet switching is implemented at the datalink layer and network layer Circuit switching requires simple protocols for delivery. Packet switching requires complex

Circuit Switching Packet Switching protocols for delivery. 3

Open In App

Stop and Wait ARQ

Characteristics

 Used in Connection-oriented communication.  It offers error and flows control  It is used in Data Link and Transport Layers  Stop and Wait for ARQ mainly implements the Sliding Window Protocol concept with Window Size 1

Useful Terms:

Propagation Delay: Amount of time taken by a packet to make a physical journey from one router to another router.

Propagation Delay = (Distance between routers) / (Velocity of propagation)

 RoundTripTime ( RTT ) = Amount of time taken by a packet to reach the receiver + Time taken by the Acknowledgement to reach the sender  TimeOut ( TO ) = 2* RTT  Time To Live ( TTL ) = 2* TimeOut. (Maximum TTL is 255 seconds)

Simple Stop and Wait

Sender:

Rule 1) Send one data packet at a time.

Rule 2) Send the next packet only after receiving acknowledgement for the previous.

Receiver:

Rule 1) Send acknowledgement after receiving and consuming a data packet.

Rule 2) After consuming packet acknowledgement need to be sent (Flow Control)

Problems :

1. Lost Data

2. Lost Acknowledgement:

3. Delayed Acknowledgement/Data: After a timeout on the sender side, a long-delayed

acknowledgement might be wrongly considered as acknowledgement of some other recent

packet.

Stop and Wait for ARQ (Automatic Repeat Request)

The above 3 problems are resolved by Stop and Wait for ARQ (Automatic Repeat Request) that

does both error control and flow control.

1. Time Out:

2. Sequence Number (Data)

3. Delayed Acknowledgement:

This is resolved by introducing sequence numbers for acknowledgement also.

Working of Stop and Wait for ARQ:

1) Sender A sends a data frame or packet with sequence number 0.

2) Receiver B, after receiving the data frame, sends an acknowledgement with sequence number

1 (the sequence number of the next expected data frame or packet)

There is only a one-bit sequence number that implies that both sender and receiver have a buffer

for one frame or packet only.

Characteristics of Stop and Wait ARQ:  It uses a link between sender and receiver as a half-duplex link  Throughput = 1 Data packet/frame per RTT  If the Bandwidth*Delay product is very high, then they stop and wait for protocol if it is not so useful. The sender has to keep waiting for acknowledgements before sending the processed next packet.  It is an example of “ Closed Loop OR connection-oriented “ protocols  It is a special category of SWP where its window size is 1  Irrespective of the number of packets sender is having stop and wait for protocol requires only 2 sequence numbers 0 and 1

Constraints :

Stop and Wait ARQ has very less efficiency , it can be improved by increasing the window size.

Also , for better efficiency , Go back N and Selective Repeat Protocols are used.

The Stop and Wait ARQ solves the main three problems but may cause big performance issues

as the sender always waits for acknowledgement even if it has the next packet ready to send.

Consider a situation where you have a high bandwidth connection and propagation delay is also

high (you are connected to some server in some other country through a high-speed connection).

To solve this problem, we can send more than one packet at a time with a larger sequence

number. We will be discussing these protocols in the next articles.

So Stop and Wait ARQ may work fine where propagation delay is very less for example LAN

connections but performs badly for distant connections like satellite connections.

Advantages of Stop and Wait ARQ :

Simple Implementation: Stop and Wait ARQ is a simple protocol that is easy to implement in both hardware and software. It does not require complex algorithms or hardware components, making it an inexpensive and efficient option.  Error Detection: Stop and Wait ARQ detects errors in the transmitted data by using checksums or cyclic redundancy checks (CRC). If an error is detected, the receiver sends a negative acknowledgment (NAK) to the sender, indicating that the data needs to be retransmitted.  Reliable: Stop and Wait ARQ ensures that the data is transmitted reliably and in order. The receiver cannot move on to the next data packet until it receives the current one. This ensures that the data is received in the correct order and eliminates the possibility of data corruption.  Flow Control: Stop and Wait ARQ can be used for flow control, where the receiver can control the rate at which the sender transmits data. This is useful in situations where the receiver has limited buffer space or processing power.  Backward Compatibility: Stop and Wait ARQ is compatible with many existing systems and protocols, making it a popular choice for communication over unreliable channels.

Disadvantages of Stop and Wait ARQ :

Low Efficiency: Stop and Wait ARQ has low efficiency as it requires the sender to wait for an acknowledgment from the receiver before sending the next data packet. This results in a low data transmission rate, especially for large data sets.  High Latency: Stop and Wait ARQ introduces additional latency in the transmission of data, as the sender must wait for an acknowledgment before sending the next packet. This can be a problem for real-time applications such as video streaming or online gaming.  Limited Bandwidth Utilization: Stop and Wait ARQ does not utilize the available bandwidth efficiently, as the sender can transmit only one data packet at a time. This results in underutilization of the channel, which can be a problem in situations where the available bandwidth is limited.  Limited Error Recovery: Stop and Wait ARQ has limited error recovery capabilities. If a data packet is lost or corrupted, the sender must retransmit the entire packet, which can be time- consuming and can result in further delays.  Vulnerable to Channel Noise: Stop and Wait ARQ is vulnerable to channel noise, which can cause errors in the transmitted data. This can result in frequent retransmissions and can impact the overall efficiency of the protocol.