Data Communication Circuit Switching and Packet Switching 1

  • Slides: 29
Download presentation
Data Communication Circuit Switching and Packet Switching 1

Data Communication Circuit Switching and Packet Switching 1

Overview • Transmission of data beyond a local area, communication is typically achieved by

Overview • Transmission of data beyond a local area, communication is typically achieved by transmitting data from source to destination through a network of intermediate switching nodes. • Networks are used to interconnect many devices or stations. • The stations may be computers, terminals, telephones, or other communicating devices. 2

Switched Communications Networks • Long distance transmission between stations is typically done over a

Switched Communications Networks • Long distance transmission between stations is typically done over a network of switching nodes. • Switching nodes do not concern with content of data. Their purpose is to provide a switching facility that will move the data from node to node until they reach their destination (the end device). • In a switched communications network, data entering the network from a station are routed to the destination by being switched from node to node. 3

Simple Switching Network 4

Simple Switching Network 4

Switching Nodes • Nodes may connect to other nodes, or to some stations. •

Switching Nodes • Nodes may connect to other nodes, or to some stations. • Network is usually partially connected —there is not a direct link between every possible pair of nodes. • However, some redundant connections are desirable for reliability 5

Types of Switching 6

Types of Switching 6

Circuit Switching • Circuit switching: —There is a dedicated communication path between two stations.

Circuit Switching • Circuit switching: —There is a dedicated communication path between two stations. —The path is a connected sequence of links between network nodes. —On each physical link, a logical channel is dedicated to the connection. • Communication via circuit switching has three phases: —Circuit establishment (link by link) • Routing & resource allocation (FDM or TDM) —Data transfer —Circuit disconnect • Deallocate the dedicated resources 7

1. Circuit establishment. • Before any signals can be transmitted, an end-toend (station-to-station) circuit

1. Circuit establishment. • Before any signals can be transmitted, an end-toend (station-to-station) circuit must be established. • For example, station A sends a request to node 4 requesting a connection to station E. • Typically, the link from A to 4 is a dedicated line node 4 must find the next route leading to E node 4 selects the link to node 5 and so on then sends a message requesting connection to E. • Thus, a dedicated path has been established from A-4 -5 -6 -E 8

2. Data transfer. • Data can now be transmitted from A through the network

2. Data transfer. • Data can now be transmitted from A through the network to E. • The transmission may be analog or digital, depending on the nature of the network. • The path is A-4 link, internal switching through 4, 4 -5 channel, internal switching through 5, 5 -6 channel, internal switching through 6, 6 -E link. Generally, the connection is full duplex. 9

3. Circuit disconnect. • After some period of data transfer, the connection is terminated,

3. Circuit disconnect. • After some period of data transfer, the connection is terminated, usually by the action of one of the two stations. • Signals must be propagated to nodes 4, 5, and 6 to deallocate the dedicated resources. 10

Advantages of Circuit Switching 1. The dedicated path/circuit established between sender and receiver provides

Advantages of Circuit Switching 1. The dedicated path/circuit established between sender and receiver provides a guaranteed data rate. 2. Once the circuit is established, data is transmitted without any delay as there is no waiting time at each switch. 3. Since a dedicated continuous transmission path is established, the method is suitable for long continuous transmission. 11

Disadvantages of Circuit Switching 1. As the connection is dedicated it cannot be used

Disadvantages of Circuit Switching 1. As the connection is dedicated it cannot be used to transmit any other data even if the channel is free. 2. It is inefficient in terms of utilization of system resources. As resources are allocated for the entire duration of connection, these are not available to other connections. 3. Dedicated channels require more bandwidth. 4. Prior to actual data transfer, the time required to establish a physical link is too long. 12

Summery In circuit switching, the resources need to be reserved during the setup phase;

Summery In circuit switching, the resources need to be reserved during the setup phase; the resources remain dedicated for the entire duration of data transfer until the teardown phase. 13

Message Switching • With message switching there is no need to establish a dedicated

Message Switching • With message switching there is no need to establish a dedicated path between two stations. • When a station sends a message, the destination address is appended to the message. • The message is then transmitted through the network, in its entirety, from node to node. • Each node receives the entire message, stores it in its entirety on disk, and then transmits the message to the next node. • This type of network is called a store-and-forward network. 16

Message Switching • A message-switching node is typically a computer. • The device needs

Message Switching • A message-switching node is typically a computer. • The device needs sufficient secondary-storage capacity to store the incoming messages. • A time delay is introduced using this type of scheme due to store- and-forward time, plus the time required to 17 find the next node in the transmission path.

Message Switching Advantages: • Channel efficiency can be greater compared to circuit switched systems,

Message Switching Advantages: • Channel efficiency can be greater compared to circuit switched systems, because more devices are sharing the channel. • Traffic congestion can be reduced, because messages may be temporarily stored in route. • Message priorities can be established due to store-andforward technique. • Message broadcasting can be achieved with the use of broadcast address appended in the message. 18

Message Switching Disadvantages • Message switching is not compatible with interactive applications. • Store-and-forward

Message Switching Disadvantages • Message switching is not compatible with interactive applications. • Store-and-forward devices are expensive, because they must have large disks to hold potentially long messages. 19

Packet Switching • Packet switching can be seen as a solution that tries to

Packet Switching • Packet switching can be seen as a solution that tries to combine the advantages of message and circuit switching. • There are two methods of packet switching: • Datagram and • virtual circuit. 20

Packet Switching • In packet switching methods, a message is broken into small parts,

Packet Switching • In packet switching methods, a message is broken into small parts, called packets. • Each packet is tagged with appropriate source and destination addresses. • Since packets have a strictly defined maximum length, they can be stored in main memory instead of disk, therefore access delay and cost are minimized. • Also the transmission speeds, between nodes, are optimized. • With current technology, packets are generally accepted onto the network on a first-come, first-served basis.

Use of Packets 22

Use of Packets 22

Packet Switching Technique • A station breaks long message into packets • Packets are

Packet Switching Technique • A station breaks long message into packets • Packets are sent out to the network sequentially, one at a time • How will the network handle this stream of packets as it attempts to route them through the network and deliver them to the intended destination? —Two approaches • Datagram approach • Virtual circuit approach 24

Datagram • Each packet is treated independently, with no reference to packets that have

Datagram • Each packet is treated independently, with no reference to packets that have gone before. —Each node chooses the next node on a packet’s path. • • Packets can take any possible route. Packets may arrive at the receiver out of order. Packets may go missing. It is up to the receiver to re-order packets and recover from missing packets. • Example: Internet 25

Datagram 26

Datagram 26

Virtual Circuit • In virtual circuit, a preplanned route is established before any packets

Virtual Circuit • In virtual circuit, a preplanned route is established before any packets are sent, then all packets follow the same route. • Each packet contains a virtual circuit identifier instead of destination address, and each node on the pre-established route knows where to forward such packets. —The node need not make a routing decision for each packet. • Example: X. 25, Frame Relay, ATM 27

Virtual Circuit A route between stations is set up prior to data transfer. All

Virtual Circuit A route between stations is set up prior to data transfer. All the data packets then follow the same route. But there is no dedicated resources reserved for the virtual circuit! Packets need to be stored-and-forwarded. 28

Virtual Circuits v Datagram • Virtual circuits — Network can provide sequencing (packets arrive

Virtual Circuits v Datagram • Virtual circuits — Network can provide sequencing (packets arrive at the same order) and error control (retransmission between two nodes). — Packets are forwarded more quickly • Based on the virtual circuit identifier • No routing decisions to make — Less reliable • If a node fails, all virtual circuits that pass through that node fail. • Datagram — No call setup phase • Good for bursty data, such as Web applications — More flexible • If a node fails, packets may find an alternate route • Routing can be used to avoid congested parts of the network 29

Advantages of packet switching • Packet switching is cost effective, because switching devices do

Advantages of packet switching • Packet switching is cost effective, because switching devices do not need massive amount of secondary storage. • Packet switching offers improved delay characteristics, because there are no long messages in the queue. (maximum packet size is fixed). • Packet can be rerouted if there is any problem, such as, busy or disabled links. • The advantage of packet switching is that many network users can share the same channel at the same time. • Packet switching can maximize link efficiency by making optimal use of link bandwidth. 30

Disadvantages of packet switching • • Protocols for packet switching are typically more complex.

Disadvantages of packet switching • • Protocols for packet switching are typically more complex. It can add some initial costs in implementation. If packet is lost, sender needs to retransmit the data. Another disadvantage is that packet-switched systems still can’t deliver the same quality as dedicated circuits in applications requiring very little delay - like voice conversations or moving images. 31