CS代考 VCI 77as the incoming VCI for frames from A.

Circuit vs. Packet Switching

Introduction

Copyright By PowCoder代写 加微信 powcoder

• Switchingisneededtoestablishone-to-oneconnection between network nodes, without having a dedicated physical link between the nodes
• Linksaresharedbyallnetworknodes
• Switchingisusedtoestablishatemporaryconnection between the network nodes

Introduction
• Aswitchednetworkconsistsofaseriesofinter-linked nodes, called switches
• Switchesaredevicescapableofcreatingtemporary connections between two or more devices linked to the switch
• Someswitchesareconnectedtotheendsystems (computers or telephones), others are used only for routing

• Switchingcanbediscussedatseverallayers: – at the physical layer
circuit-switching – at the data-link layer
packet-switching: virtual circuit – at the network layer
packet-switching: datagram network – and even logically at the application layer
(message switching)

Switched Networks

Switching and TCP/IP Layers
• Switching at Physical Layer: circuit switching. There are no packets exchanged at the physical layer. The switches at the physical layer allow signals to travel in one path or another
• Switching at Data-Link Layer: we can have packet switching. The term packet in this case means frames or cells. Packet switching at the data-link layer is normally done using a virtual-circuit approach

Switching and TCP/IP Layers
• Switching at Network Layer: packet switching. Either a virtual-circuit approach or a datagram approach can be used.
– Currently the Internet uses a datagram approach, but the tendency is to move to a virtual-circuit approach
• Switching at Application Layer: message switching. The communication at the application layer occurs by exchanging messages. Conceptually, we can say that communication using e-mail is a kind of message- switched communication, but we do not see any network that actually can be called a message-switched network

Circuit-switched Network
• Acircuit-switchednetworkismadeofasetofswitches connected by physical links, in which each link is divided into n channels

Circuit-switched Network
• Circuitswitchingtakesplaceatthephysicallayer.
• Beforestartingcommunication,thestationsmustmake a reservation for the resources to be used during the communication. These resources that must remain dedicated during the entire duration of data transfer until the teardown phase, such as:
– channels (bandwidth in FDM and time slots in TDM), – switch buffers,
– switch processing time, and
– switch input/output ports,.

Circuit-switched Network
• Datatransferredbetweenthetwostationsarenot packetized (physical layer transfer of the signal). The data are a continuous flow sent by the source station and received by the destination station, although there may be periods of silence
• Thereisnoaddressinginvolvedduringdatatransfer. The switches route the data based on their occupied band (FDM) or time slot (TDM).
– there is end-to-end addressing used during the setup phase

When end system A needs to communicate with end system M:
– system A needs to request a connection to M
– that must be accepted by all switches as well as by
– This is called the setup phase
– a circuit (channel) is reserved on each link, and the combination of circuits or channels defines the dedicated path

• Acircuit-switchednetworkconnectseighttelephonesin a small area. Communication is through 4-kHz voice channels. We assume that each link uses FDM to connect a maximum of two voice channels. The bandwidth of each link is then 8 kHz.

• Consideracircuit-switchednetworkthatconnects computers in two remote offices of a private company.
• TheofficesareconnectedusingaT-1lineleasedfroma communication service provider.

• Therearetwo4×8(4inputsand8outputs)switches in this network. For each switch, four output ports are folded into the input ports to allow communication between computers in the same office. Four other output ports allow communication between the two offices.

Circuit-switched Network Phases
• Setup Phase: Before the two parties can communicate, a dedicated circuit (combination of channels in links) needs to be established
– Note that end-to-end addressing is required for creating a connection between the two end systems
• Data-Transfer Phase: After the establishment of the dedicated circuit (channels), the two parties can transfer data.
• Teardown Phase: When one of the parties needs to disconnect, a signal is sent to each switch to release the resources

Circuit-switched Network Efficiency
• Circuit-switchednetworksarenotasefficientasthe other two types of networks because resources are allocated during the entire duration of the connection. These resources are unavailable to other connections.
– In a telephone network, people normally terminate the communication when they have finished their conversation – suitable
– in computer networks, a computer can be connected to another computer even if there is no activity for a long time. In this case, allowing resources to be dedicated means that other connections are deprived – not suitable

Circuit-switched Network Delay
• Althoughacircuit-switchednetworknormallyhaslow efficiency, the delay in this type of network is minimal.
• Duringdatatransferthedataarenotdelayedateach switch; the resources are allocated for the duration of the connection
• Circuitswitchnetworksaresuitableforinternet backbone connections, these node are always in high demand

Circuit-switched Network Delay

Circuit-switched Network Delay
• Thetotaldelayisduetothetimeneededto: 1. createtheconnection,
2. transferdata,and
3. disconnectthecircuit.
• The delay caused by the setup is the sum of four parts:
1. the propagation time of the source computer request (slope of
the first gray box),
2. the request signal transfer time (height of the first gray box),
3. the propagation time of the acknowledgment from the destination computer (slope of the second gray box), and
4. the signal transfer time of the acknowledgment (height of the second gray box).

Circuit-switched Network Delay
• The delay due to data transfer is the sum of two parts: the propagation time (slope of the colored box) and data transfer time (height of the colored box), which can be very long.
• The third box shows the time needed to tear down the circuit. We have shown the case in which the receiver requests disconnection, which creates the maximum delay

Packet Switching
• Messagepassingthroughapacket-switchednetwork needs to be divided into packets of fixed or variable size
– The size of the packet is determined by the network and the governing protocol
• Inpacketswitching,thereisnoresourceallocationfora packet
– No reserved bandwidth on the links
– No scheduled processing time for each packet
– Resources are allocated on demand on a first come, first-served basis
• Whenaswitchreceivesapacket,thepacketmustwait if there are other packets being processed

Datagram Networks
• Inadatagramnetwork,eachpacketistreated independently of all others, even if it is part of a multi- packet transmission
• Packetsinthisapproacharereferredtoasdatagrams
• Datagramswitchingisnormallydoneatthenetwork layer

Datagram Networks
• Thedatagramnetworksaresometimesreferredtoas connectionless networks
• Thetermconnectionlessheremeansthattheswitch (packet switch) does not keep information about the connection state.
• Therearenosetuporteardownphases.Eachpacketis treated the same by a switch regardless of its source or destination

Datagram Networks
• Theswitchesinadatagramnetworkaretraditionally referred to as routers
– That is why we use a different symbol for the switches in the figure
• Inthisexample,allfourpackets(ordatagrams)belong to the same message, but may travel different paths to reach their destination

Datagram Networks
• Traveldifferentpaths,why?!!
– because the links may be involved in carrying packets from other sources and do not have the necessary bandwidth available to carry all the packets from A to X.
– can cause the datagrams of a transmission to arrive at their destination out of order with different delays between the packets.

Datagram Networks
– Packets may also be lost or dropped because of a
lack of resources.
– In most protocols, it is the responsibility of an upper- layer protocol to reorder the datagrams or ask for lost datagrams before passing them on to the application.

Datagram Networks – Routing Table
• Iftherearenosetuporteardownphases,howarethe packets routed to their destinations in a datagram network?
– each switch (or packet switch) has a routing table which is based on the destination address
– The routing tables are dynamic and are updated periodically.
– The destination addresses and the corresponding forwarding output ports are recorded in the tables

Datagram Networks – Routing Table
• Everypacketinadatagramnetworkcarriesaheader that contains, among other information, the destination address of the packet.
• Whentheswitchreceivesthepacket,thisdestination address is examined
• Routingtablelookuptofindthecorrespondingport through which the packet should be forwarded.
• Destinationaddress,unliketheaddressinavirtual- circuit network, remains the same during the entire journey of the packet

Datagram Networks – Efficiency
• Theefficiencyofadatagramnetworkisbetterthanthat of a circuit-switched network
• Resourcesareallocatedonlywhentherearepacketsto be transferred
• Ifasourcesendsapacketandthereisadelayofafew minutes before another packet can be sent, the resources can be reallocated during these minutes for other packets from other sources

Datagram Networks – Delay
• Theremaybegreaterdelayinadatagramnetworkthan in a virtual-circuit network
• Althoughtherearenosetupandteardownphases,each packet may experience a wait at a switch before it is forwarded
• Sincenotallpacketsinamessagenecessarilytravel through the same switches, the delay is not uniform for the packets of a message
Store and forward switch mode Total delay = 3T + 3τ + w1 + w2

Virtual-Circuit Networks
• Avirtual-circuitnetworkisacrossbetweenacircuit- switched network and a datagram network.
• Ithassomecharacteristicsofboth.
1. Asinacircuit-switchednetwork,therearesetup and teardown phases in addition to the data transfer phase
2. Resourcescanbeallocatedduringthesetupphase, as in a circuit-switched network, or on demand, as in a datagram network

Virtual-Circuit Networks
3. Asinacircuit-switchednetwork,allpacketsfollow
the same path established during the connection.
4. Avirtual-circuitnetworkisnormallyimplementedin the data-link layer, while a circuit-switched network is implemented in the physical layer and a datagram network in the network layer
 But this may change in the future

Virtual-Circuit Networks
5. Asinadatagramnetwork,dataarepacketizedand
each packet carries an address in the header
the address in the header has local jurisdiction (it defines what the next switch should be and the channel on which the packet is being carried), not end-to-end jurisdiction.
virtual-circuit identifiers is used by intermediate switches to know where to send the packet next

Virtual-Circuit Networks – Addressing
• Inavirtual-circuitnetwork,twotypesofaddressingare involved: global and local (virtual-circuit identifier).
1. GlobalAddressingAsourceoradestinationneedsto have a global address—an address that can be unique in the scope of the network or internationally if the network is part of an international network.
– The global address in virtual-circuit networks is used only to create a virtual-circuit identifier

Virtual-Circuit Networks – Addressing
• Inavirtual-circuitnetwork,twotypesofaddressingare involved: global and local (virtual-circuit identifier).
2. Virtual-CircuitIdentifierTheidentifierthatisactually used for data transfer (VCI, label)
– A VCI, unlike a global address, is a small number that has only switch scope;
– it is used by a frame between two switches. When a frame arrives at a switch, it has a VCI; when it leaves, it has a different VCI
– VCI does not need to be a large number since each switch can use its own unique set of VCIs

Virtual-Circuit Networks – Phases
• Asinacircuit-switchednetwork,asourceand destination need to go through three phases in a virtual-circuit network:
1. Setup:switchescreateanentryforavirtualcircuit 2. Datatransfer,and
3. Teardown

Virtual-Circuit Networks – Setup Phase
• SetupRequest
a) Source A sends a setup frame to switch 1

Virtual-Circuit Networks – Setup Phase
• SetupRequest
b) Switch knows that a frame going from A to B goes out through port 3. The switch creates an entry in its table for this virtual circuit, but it is only able to fill three of the four fields: the incoming port (1), chooses an available incoming VCI (14), and the outgoing port (3)

Virtual-Circuit Networks – Setup Phase
• SetupRequest
c) Switch2receivesthesetuprequestframe.The same events happen here as at switch 1; three columns of the table are completed: in this case, incoming port (1), incoming VCI (66), and outgoing port (2).

Virtual-Circuit Networks – Setup Phase
• SetupRequest
d) Switch 3 receives the setup request frame. Again, three columns are completed: incoming port (2), incoming VCI (22), and outgoing port (3).

Virtual-Circuit Networks – Setup Phase
• SetupRequest
d) Destination B receives the setup frame, and if it is ready to receive frames from A, it assigns a VCI to the incoming frames that come from A, in this case 77. This VCI lets the destination know that the frames come from A, and not other sources

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
a) The destination sends an acknowledgment to switch 3. The acknowledgment carries the global source and destination addresses so the switch knows which entry in the table is to be completed. The frame also carries chosen VCI 77as the incoming VCI for frames from A.

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
a) Switch 3 uses this VCI to complete the outgoing VCI column for this entry. Note that 77 is the incoming VCI for destination B, but the outgoing VCI for switch 3.

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
b) Switch 3 sends an acknowledgment to switch 2 that contains its incoming VCI in the table, chosen in the previous step. Switch 2 uses this as the outgoing VCI in the table

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
c) Switch2sendsanacknowledgmenttoswitch1that contains its incoming VCI inthe table, chosen in the previous step. Switch 1 uses this as the outgoing VCI in the table.

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
d) Switch 1 sends an acknowledgment to source A that contains its incoming VCI in the table, chosen in the previous step

Virtual-Circuit Networks – Setup Phase
• SetupAcknowledge
e) The source uses this as the outgoing VCI for the data frames to be sent to destination B.

Virtual-Circuit Networks – Transfer Phase
• Totransferaframefromasourcetoitsdestination,all
switches need to have a table entry for this virtual circuit.
• Thetable,initssimplestform,hasfourcolumns.Two columns for In/Out traffic. Each direction has VCI and port number.

Virtual-Circuit Networks – Transfer Phase • Whentheframearrives,theswitchlooksinitstableto
find incoming port and VCI entry.
• Whenitisfound,theswitchknowshowtochangethe outgoing VCI to 22 and port number to. It sends out the frame from the proper port number

Virtual-Circuit Networks – Teardown Phase
• Inthisphase,sourceA,aftersendingallframestoB, sends a special frame called a teardown request.
• DestinationBrespondswithateardownconfirmation frame.
• Allswitchesdeletethecorrespondingentryfromtheir tables

Virtual-Circuit Networks – Efficiency
• Resourcereservationcanbemadeduringthesetupor can be on demand during the data-transfer phase.
– In the first case, the delay for each packet is the same;
– in the second case, each packet may encounter different delays.
• Thereisonebigadvantageinavirtual-circuitnetwork even if resource allocation is on demand. The source can check the availability of the resources, without actually reserving it

Virtual-Circuit Networks – Delay
• Inavirtual-circuitnetwork,thereisaone-timedelay for setup and a one-time delay for teardown. If resources are allocated during the setup phase, there is no wait time for individual packets
Total delay = 3T + 3τ + setup delay +
teardown delay

References
• DataCommunicationsandNetworking5thedition– 2013, Behrouz A. Forouzan; Chapter 8

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com