210 likes | 305 Views
Communication concepts (Continued). Week 2 Lecture 2. Agenda. Yesterday, we covered Media Analogue & digital transmission Multiplexing Today we will cover Circuit & packet switching Virtual circuits & datagrams Latency & bandwidth. Multiplexing.
E N D
Communication concepts(Continued) Week 2 Lecture 2
Agenda • Yesterday, we covered • Media • Analogue & digital transmission • Multiplexing • Today we will cover • Circuit & packet switching • Virtual circuits & datagrams • Latency & bandwidth
Multiplexing • Transmission capacity of the media is often much greater than the needs of any one user • This capacity can be shared by allowing simultaneous transmission of multiple signals on a single data link • This technique is known as multiplexing • There is one device to combine the signals – a mux and one to separate them again – a demux – at each end of the link
ISP & Telco (IBP) Home ISP Wide Area Network WiFi Network The last kilometre Business Local Area Network
PC is in Sydney Sydney ISP Hong Kong Home computer New York London Web server is in New York How do our messages get through to New York?
How do we connect two hosts across the world? • Circuit switching • Packet switching
Circuit switching • The resources required for a connection are reserved for the duration of the connection. • Good for voice, with low bandwidth and relatively constant usage • Set up time to establish a circuit • While the circuit is reserved this does not imply physical resources totally reserved (multiplexing) • When used by data, transfer rate is constant
Packet switching • Data is bursty, often high data rates for short periods, and low usage for other parts of the connection. Inefficient use of circuits • Packet switching breaks the message into small packets, wraps an electronic envelope with address and sends it through the network with other packets from other users
Circuit switching Packet switching
Packet switching Packets can be routed through the network
Driveway Many vehicles share the road Junctions allow cars to change direction Map determines which roads to take to get to destination Telephone connects to PSTN Data packets share the link with data from other connects Switches allow data also to change direction Packet address instructs switch as to which links should be taken Packet switching like public road usage
Multiplexing is not the same as Packet switching • Multiplexing allows a physical link to carry multiple circuits • Any one circuit can carry packets for a number of user “connections” • Think of how a road can be divided into multiple lanes • One lane can carry a large number of cars going to different destinations • Another lane may be only available to buses going from A to B.
Two types of addressing • Virtual circuit – • the path is established at the beginning defining each segment the data is to be passed along for the period of the connection • Each of the switches must maintain state information about the connection • X.25, Frame relay and ATM use this form of addressing
Two types of addressing (cont) • Datagram • The packet has a final address in a hierarchical form similar to that on an envelope • Switches maintain tables that map destination addresses to outbound links and use this to send the message along • IP uses datagram addressing • IP can be carried over virtual circuit protocol links like X.25 & ATM
Packets can go via any path Packets thus can get out of sequence Assembled in right order at end
Store & Forward • Packets are routed through a number of switches in their journey • Each switch uses a store & forward mechanism • The packet must be totally received and checked before being sent on the outward link • Sometimes the outward link is busy, thus the packet must be buffered • Sometimes buffers are full and the packet is dropped, and must be sent again • This delay is called latency, and the uncertain nature of this latency is one of the problems with packet switching
Packet V Message switching • Why break the message into packets? • Messages can be quite long – eg on a file transfer • In packets you get a parallel processing through each switch • Many messages fit into a packet • But packets have an overhead of data and processing
Quick quiz You have a 10 second message to transmit through two switches. Will sending it as one whole message, or as 10x1 second packets take longer, end to end? 10 second file transfer C B D A
10 second file transfer C B D A Message switch A to B 10 B to C 10 C to D 10 Total transmit time is 30 Packet switch (10 x 1) A-B B-C C-D P1 1 sec 1 sec 1 sec A-B B-C C-D P2 1 sec 1 sec 1 sec A-B B-C C-D P3 1 sec 1 sec 1 sec Total transmit time is 10+2= 12 seconds
Latency & Bandwidth • Bandwidth is the speed at which data is passed down a specific link. Usually expressed in bits per second – bps • Latency is the collective delay from all of the switches in the trip to the final destination • As bandwidth increases, then latency becomes more of an issue • Read Kurose pages 41 to 49 for a more complete discussion