25
CSE 413: Computer CSE 413: Computer Networks Networks Md. Kamrul Hasan Md. Kamrul Hasan Assistant Professor and Chairman Assistant Professor and Chairman Dept. of Computer and Communication Dept. of Computer and Communication Engineering Engineering Patuakhali Science and Technology University Patuakhali Science and Technology University Homepage: www.mkhasan.info Homepage: www.mkhasan.info Chapter 10 – Circuit Switching Chapter 10 – Circuit Switching and and Packet Switching Packet Switching

CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Embed Size (px)

Citation preview

Page 1: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

CSE 413: Computer NetworksCSE 413: Computer Networks

Md. Kamrul HasanMd. Kamrul Hasan

Assistant Professor and ChairmanAssistant Professor and Chairman

Dept. of Computer and Communication EngineeringDept. of Computer and Communication Engineering

Patuakhali Science and Technology UniversityPatuakhali Science and Technology University

Homepage: www.mkhasan.infoHomepage: www.mkhasan.info

Chapter 10 – Circuit SwitchingChapter 10 – Circuit Switching and Packet and Packet SwitchingSwitching

Page 2: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Switched NetworkSwitched Network

Page 3: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

NodesNodes

a collection of nodes and connections is a a collection of nodes and connections is a communications network communications network

nodes may connect to other nodes only, or to nodes may connect to other nodes only, or to stations and other nodesstations and other nodes

network is usually partially connectednetwork is usually partially connected some redundant connections are desirable some redundant connections are desirable

have two different switching technologieshave two different switching technologies circuit switchingcircuit switching packet switchingpacket switching

Page 4: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Circuit SwitchingCircuit Switching uses a dedicated path between two stationsuses a dedicated path between two stations has three phaseshas three phases

establishestablish transfertransfer disconnectdisconnect

inefficientinefficient channel capacity dedicated for duration of connectionchannel capacity dedicated for duration of connection if no data, capacity wastedif no data, capacity wasted

set up (connection) takes timeset up (connection) takes time once connected, once connected, transfer is transparenttransfer is transparent

Page 5: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Public Circuit Switched Public Circuit Switched NetworkNetwork

Page 6: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Packet SwitchingPacket Switching

circuit switching was designed for voicecircuit switching was designed for voice packet switching was designed for datapacket switching was designed for data transmitted in small packetstransmitted in small packets packets contains user data and control infopackets contains user data and control info

user data may be part of a larger messageuser data may be part of a larger message control info includes routing (addressing) infocontrol info includes routing (addressing) info

packets are received, stored briefly (buffered) packets are received, stored briefly (buffered) and past on to the next nodeand past on to the next node

Page 7: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Packet SwitchingPacket Switching

Page 8: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

AdvantagesAdvantages

line efficiencyline efficiency single link shared by many packets over timesingle link shared by many packets over time packets queued and transmitted as fast as possiblepackets queued and transmitted as fast as possible

data rate conversiondata rate conversion stations connects to local node at own speedstations connects to local node at own speed nodes buffer data if required to equalize ratesnodes buffer data if required to equalize rates

packets accepted even when network is busypackets accepted even when network is busy prioritiespriorities can be used can be used

Page 9: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Switching TechniquesSwitching Techniques

station breaks long message into packetsstation breaks long message into packets packets sent one at a time to the networkpackets sent one at a time to the network packets can be handled in two wayspackets can be handled in two ways

datagramdatagram virtual circuitvirtual circuit

Page 10: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

DatagramDatagramDiagramDiagram

Page 11: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

VirtualVirtualCircuitCircuit

DiagramDiagram

Page 12: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Virtual Circuits vs. DatagramVirtual Circuits vs. Datagram

virtual circuitsvirtual circuits network can provide sequencing and error network can provide sequencing and error

controlcontrol packets are forwarded more quicklypackets are forwarded more quickly less reliableless reliable

datagramdatagram no call setup phaseno call setup phase more flexiblemore flexible more reliablemore reliable

Page 13: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Packet Packet SizeSize

Page 14: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Circuit vs. Packet SwitchingCircuit vs. Packet Switching

Table 10.1Table 10.1 performance depends on various delaysperformance depends on various delays

propagation delaypropagation delay transmission timetransmission time node delaynode delay

range of other characteristics, including:range of other characteristics, including: transparencytransparency amount of overheadamount of overhead

Page 15: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Event TimingEvent Timing

Page 16: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25X.25

One technical aspect of packet-switching: One technical aspect of packet-switching: the the interface between attached devices and the interface between attached devices and the network. network.

We have seen that a circuit-switching network We have seen that a circuit-switching network provides a transparent communications path provides a transparent communications path for attached devices that makes it appear that for attached devices that makes it appear that the two communicating stations have a direct the two communicating stations have a direct link. link.

Page 17: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25X.25 In the case of packet-switching networks, the attached In the case of packet-switching networks, the attached

stations must organize their data into packets for stations must organize their data into packets for transmission. transmission.

This cooperation is embodied in an interface standard. This cooperation is embodied in an interface standard. The standard used for traditional packet-switching The standard used for traditional packet-switching networks is X.25, which is an ITU-T standardnetworks is X.25, which is an ITU-T standard

ITU-T specifies an interface between a host system and a ITU-T specifies an interface between a host system and a packet-switching network. packet-switching network.

The functionality of X.25 is specified on three levels: The functionality of X.25 is specified on three levels:

Physical level, Link level, and Packet levelPhysical level, Link level, and Packet level..

Page 18: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25 - PhysicalX.25 - Physical

The physical level deals with the The physical level deals with the physicalphysical interface between an attached station interface between an attached station (computer, terminal) and the link(computer, terminal) and the link that attaches that attaches that station to the packet-switching node. that station to the packet-switching node.

It makes use of the physical-level specification It makes use of the physical-level specification in a standard known as X.21, but in many in a standard known as X.21, but in many cases other standards, such as EIA-232, are cases other standards, such as EIA-232, are substituted. substituted.

Page 19: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25 - LinkX.25 - Link

Defined as Link Access Protocol-Balanced Defined as Link Access Protocol-Balanced (LAPB)(LAPB) Subset of HDLCSubset of HDLC see chapter 7see chapter 7

provides reliable transfer of data over link provides reliable transfer of data over link by sending as a sequence of framesby sending as a sequence of frames

Page 20: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25 - PacketX.25 - Packet The packet level provides a The packet level provides a virtual circuit servicevirtual circuit service. . This service enables any subscriber to the network to This service enables any subscriber to the network to set up set up

logical connectionslogical connections, called virtual circuits, to other , called virtual circuits, to other subscribers.subscribers.

In this context, the term In this context, the term virtual circuitvirtual circuit refers to the refers to the logical logical connection between two stations through the networkconnection between two stations through the network;;

What is important for an external virtual circuit is that there What is important for an external virtual circuit is that there is a logical relationship, or logical channel, established is a logical relationship, or logical channel, established between two stations, and all of the data associated with that between two stations, and all of the data associated with that logical channel are considered as part of a single stream of logical channel are considered as part of a single stream of data between the two stations. data between the two stations.

Page 21: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

X.25 Use of Virtual CircuitsX.25 Use of Virtual Circuits

An example of X.25 virtual circuits is shown in Figure. In this example, station A has a virtual circuit connection to C; station B has two virtual circuits established, one to C and one to D; and stations E and F each have a virtual circuit connection to D. As an example of how these external virtual circuits are used, station D keeps track of data packets arriving from three different workstations (B, E, F) on the basis of the virtual circuit number associated with each incoming packet.

Page 22: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Frame RelayFrame Relay Today's networks employ Today's networks employ reliable digital transmission reliable digital transmission

technology over high-quality, reliable transmission linkstechnology over high-quality, reliable transmission links, , many of which are optical fiber. many of which are optical fiber.

In addition, with the use of optical fiber and digital In addition, with the use of optical fiber and digital transmission, high data rates can be achieved. transmission, high data rates can be achieved.

In this environment, In this environment, the overhead of X.25 is not only the overhead of X.25 is not only unnecessary but degrades the effective utilization of the unnecessary but degrades the effective utilization of the available high data ratesavailable high data rates. .

Frame relay is designed to eliminateFrame relay is designed to eliminate much of the overhead that much of the overhead that X.25 imposes X.25 imposes on end user systems and on the packet-on end user systems and on the packet-switching networkswitching network

Page 23: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Frame RelayFrame Relay The key differences between frame relay and a conventional X.25 packet-The key differences between frame relay and a conventional X.25 packet-

switching service are:switching service are:

• • Call control signaling, which is information needed to set up and manage a Call control signaling, which is information needed to set up and manage a connection, is carried on a separate logical connection from user data. connection, is carried on a separate logical connection from user data. Thus, intermediate nodes need not maintain state tables or process Thus, intermediate nodes need not maintain state tables or process messages relating to call control on an individual per-connection basis.messages relating to call control on an individual per-connection basis.

• • Multiplexing and switching of logical connections takes place at layer 2 Multiplexing and switching of logical connections takes place at layer 2 instead of layer 3, eliminating one entire layer of processing.instead of layer 3, eliminating one entire layer of processing.

• • There is no hop-by-hop flow control and error control. End-to-end flow There is no hop-by-hop flow control and error control. End-to-end flow control and error control are the responsibility of a higher layer, if they are control and error control are the responsibility of a higher layer, if they are employed at all.employed at all.

Thus, with frame relay, a single user data frame is sent from source to Thus, with frame relay, a single user data frame is sent from source to destination, and an acknowledgment, generated at a higher layer, may be destination, and an acknowledgment, generated at a higher layer, may be carried back in a frame. There are no hop-by-hop exchanges of data frames carried back in a frame. There are no hop-by-hop exchanges of data frames and acknowledgments.and acknowledgments.

Page 24: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Advantages and DisadvantagesAdvantages and Disadvantages

The principal potential disadvantage of frame relay, compared The principal potential disadvantage of frame relay, compared to X.25, is that we have lost the ability to do link-by-link flow to X.25, is that we have lost the ability to do link-by-link flow and error control. Although frame relay does not provide end-and error control. Although frame relay does not provide end-to-end flow and error control, this is easily provided at a to-end flow and error control, this is easily provided at a higher layer. With the increasing reliability of transmission higher layer. With the increasing reliability of transmission and switching facilities, this is not a major disadvantage.and switching facilities, this is not a major disadvantage.

The advantage of frame relay is that we have streamlined the The advantage of frame relay is that we have streamlined the communications process. The protocol functionality required communications process. The protocol functionality required at the user-network interface is reduced, as is the internal at the user-network interface is reduced, as is the internal network processing. As a result, lower delay and higher network processing. As a result, lower delay and higher throughput can be expected. throughput can be expected.

Page 25: CSE 413: Computer Networks Md. Kamrul Hasan Assistant Professor and Chairman Dept. of Computer and Communication Engineering Patuakhali Science and Technology

Thank YouThank You