<<

Communication Networks

MAP-TELE 2011/12 José Ruela Network basic mechanisms Multiplexing

• Multiplexing is a technique that allows a single resource to be shared among multiple users – sharing can be static or dynamic • Multiplexing in a physical link means that multiple signals, which represent different flows of information, are simultaneously transmitted over the medium – a separate channel is provided to each flow • Different methods are possible to realize such “physical” multiplexing, either on point-to-point or multipoint (broadcast) links • On point-to-point links, the basic multiplexing techniques divide the physical link into channels along one of three dimensions – frequency, time or wavelength, but a combination of multiplexing techniques is possible –FDM –Frequency Division Multiplexing – TDM – Time Division Multiplexing –WDM –Wavelength Division Multiplexing (optical domain equivalent of FDM) • Multiplexing (channelization) in multipoint links is one solution (among others) to the multiple access problem (to be studied separately) Multiplexing

L1 R1

L2 R2 Mux 1 Mux 2

L3 R3 FDM – Frequency Division Multiplexing

• FDM is an analogue technique that divides the of a link (in Hz) into channels of smaller bandwidth – the channels occupy different (non overlapping) frequency bands – Example: multiplexing 12 analogue voice channels (4 kHz nominal bandwidth) into a link with bandwidth equal to 48 kHz • Signals generated by different can be analogue or digital and modulate carriers on different frequencies (thus occupying a different band or frequency slot) – For digital signals it is possible to relate the (in bit/s) with its bandwidth (in Hz) • FDM creates circuits of fixed bandwidth and thus has a number of limitations (especially for data traffic) – The bandwidth is shared among a maximum fixed number of flows, which has to be decided in advance, and thus it is not practical to resize the bandwidth quantum (let alone change it in a dynamic way) – The bandwidth of an idle channel cannot be reused by active flows – The bandwidth of a channel allocated to a flow cannot be reused when the flow is temporarily idle (case of variable bit rate flows) FDM – Frequency Division Multiplexing

• Transmission in all channels is simultaneous, on separate frequency bands (for digital signals, the bit rate of a channel is a fraction of the total bit rate that may be achieved on the link)

B

(Hz) CH 4

CH 3

CH 2

CH 1

t FDM – Frequency Division Multiplexing FDM – Frequency Division Multiplexing WDM – Wavelength Division Multiplexing

• WDM is conceptually similar to FDM, but the multiplexing and demultiplexing functions are realized on optical signals transmitted through optical fibers on different wavelengths () TDM – Time Division Multiplexing

• TDM is a digital technique that divides the capacity of a link (in bit/s) into multiple channels using temporal interleaving – the channels occupy different (non overlapping) time slots • The basic form of TDM is Synchronous Time Division Multiplexing (STM) – fixed size time slots allocated to each channel repeat periodically and time slots in the same cycle constitute a – Example: for a frame made up of 32 time slots with a period of 125 s and 8 bits transmitted per slot, the channel capacity is 64 kbit/s • A channel is identified by the position of the slot it occupies in the frame (position multiplexing), which requires a mechanism for identifying the start of a frame (frame synchronization) • Each flow is transmitted on the multiplexed link at the link rate and a conversion to the original rate occurs at the demultiplexer – the flow suffers a fixed delay (that corresponds to the time to access its slot) • Since STDM provides channels of fixed capacity, it has the same limitations as FDM • The flexibility of TDM allows exploiting alternatives that overcome the limitations of STDM STDM – Synchronous Time Division Multiplexing

• Channel transmissions are not “truly” simultaneous – transmission on each channel occurs at the link rate during a fraction of the frame time (on its time slot), but temporal transparency (with some delay) is achieved by the joint operation of the and demultiplexer

C (bit/s)

CH 1CH 2 CH 3 CH 4 CH 1CH 2 CH 3 CH 4

t Frame i Frame i + 1 STDM – Synchronous Time Division Multiplexing Limitations of STDM

• In the first place, STDM provides fixed bit rate channels – This is adequate for constant bit rate but not for variable bit rate flows – Even for constant bit rate flows, the channel rate may not match the natural bit rates of the flows • For variable bit rate flows, the channel rate limits the maximum instantaneous bit rate of the flow – The channel is not fully used when the flow is transmitting with an average rate lower than the channel rate (there will be idle periods) – Handling bursts with an instantaneous peak rate higher than the channel rate requires buffering, which introduces variable delays (and even losses) • A channel may remain idle during some time periods, whenever the corresponding time slots are not allocated to any flow • Time slots not used for any of these reasons cannot be reused by active flows (but this would be desirable when the instantaneous bit rate of a flow exceeds the capacity of its channel) Limitations of STDM – examples

Frame i Frame i+1 Frame i+2

CH1 CH2 CH3 CH4CH1 CH2 CH3 CH4 CH1 CH2 CH3 CH4

1

2

3

Idle slot

• 1 – all channels are fully used • 2 – channel 3 is idle (all corresponding slots are unused) • 3 – some slots are unused due to variable bit rate traffic on some channels STDM – channel aggregation

• It is possible to aggregate channels to form higher bit rate channels, by allocating multiple slots to a channel • In this way it is possible to create channels of different rates, but the bit rates of such channels form a discrete set (the possible values are multiples of the basic rate) – Since such channels are of fixed rates, they have the same problems as the basic channels • Creating such channels in a static (fixed) way is straightforward – a channel is allocated a number of slots in known positions on the frame (and this may be achieved by configuration) • The application of this concept to switching (multi-rate switching) is highly complex because it would be necessary to preserve the temporal order of the slots throughout the network • All these limitations may be overcome by dynamically allocating slots to channels, which is more efficient but more complex – this is the idea behind Asynchronous Time Division Multiplexing (ATDM) ATDM – Asynchronous Time Division Multiplexing

• ATDM is based on a dynamic allocation of time slots to channels, which may be performed on different ways • Starting with an STDM frame structure and fixed size slots, it is necessary to identify the channel that is associated with each time slot, since the number and position of slots allocated to a channel are not defined in advance (in particular, they depend on the traffic submitted to each channel and slot availability) – One possible solution is to include on each frame a map of the slot usage, which associates a channel identifier with each slot – Another solution is to carry on each slot a channel identifier (label) together with the data (label multiplexing) • The need for a channel identification introduces overhead, which may be very high when the slots carry a small number of bits • An alternative solution is not using physical frames but allocating time slots of variable size to carry variable length data frames, which carry an identifier on their (e.g., addresses or labels) – A delineation mechanism for data frames (framing) is necessary ATDM – Asynchronous Time Division Multiplexing

• Channels created by ATDM are logical channels, since resources (time slots) are not previously reserved and allocated in a fixed way – Resources are allocated on demand to competing flows and thus statistical multiplexing can be exploited – Competition is arbitrated by means of mechanisms that may implement different strategies (based on the characteristics and requirements of the traffic flows, possibly of different classes) – As a result of dynamic allocation of resources, channel rates may have any value in a continuous range • A transmission link may be divided into multiple physical channels (using, for example STDM) or handled as a single physical channel – In either case, a physical channel may carry multiple logical channels by means of ATDM • ATDM is the basis for – a packet switch has multiple input and output ports (a multiplexer has a single output port) – Incoming and outgoing links carry ATDM flows – Flows are demultiplexed at each input port, independently switched to output ports (spatial switching), where they are again multiplexed ATDM – example

■■■ STDM vs. ATDM

• Consider input links with Capacity Ci, which places an upper limit on the bit rate of a flow (its peak rate), and bursty flows with an average rate Ri • An important question is how to choose the capacity C of the transmission link in STDM and ATDM

Ci Ci

1 1

2 M M 2 A C U U B X X

N N STDM vs. ATDM

• In STDM the capacity of the multiplexed link is C =  Ci (ignoring overhead bits) – the multiplexed link is equivalent to N independent links, each with capacity Ci – The ratio Ri / Ci is critical (as far as resource utilization vs. delay) • In ATDM, statistical multiplexing may be exploited

– The average rate of all multiplexed flows is R =  Ri – The aggregate flow is expected to have a smoother pattern than the individual flows (this is the basis for statistical multiplexing)

–Ci is usually chosen so that Ri is (much) lower than Ci (this means that the input link may handle bursts with low delay) – The capacity of the multiplexed link (C) must be higher than R, but does not need to be as high as  Ci (R =  Ri < C <  Ci) – this means that traffic is concentrated – When the multiplexed link is moderately loaded, an active flow sending at its peak rate (Ci) may profit from the spare capacity on the multiplexed link (this would not be possible if Ci was chosen with a value slightly higher than Ri – the input link would be a bottleneck for the flow) STDM vs. ATDM – example (STDM)

• Consider 4 traffic sources that generate flows with variable bit rate, with a peak rate of 1 packet/s and an average rate of 0.1 packets/s • Fixed size packets are assumed for simplicity of analysis • How to multiplex these flows and what should be the link rate? • Using STDM, we may consider two possible extreme solutions – A link supporting a rate of 4 packets/s, divided into four 1 packet/s channels – A link supporting a rate of 0.4 packet/s, divided into four 0.1 packets/s channels • The first solution is based on a peak rate criterion – packets are served by each channel without any queuing delay, but the overall efficiency (link utilization) is only 10% • The second solution is based on an average rate criterion – the overall efficiency would be 100% (in ideal conditions), but a large queuing delay would occur during bursts at the peak rate and the delay (and even losses) would depend on the burst sizes • Other solutions could be based on a trade-off between efficiency and delay, but would not be flexible for handling a variety of traffic patterns STDM vs. ATDM – example (ATDM)

• Using ATDM, a more flexible and efficient solution is possible • Statistical multiplexing is based on dynamically sharing the link capacity among independent (uncorrelated) traffic flows • The maximum statistical gain occurs with a link rate of 0.4 packets/s, but this could lead to an unacceptable delay (this solution would however be better than the corresponding STDM solution, since resources unused by a flow could always be allocated to other flows) • A link rate of, for instance, 1 packet/s would allow a statistical gain of 4, with a link utilization of 40% • ATDM allows trading-off efficiency for delay in a flexible way, based on dynamic sharing (reusing) of resources, not possible with STDM • In general, the degree of statistical gain (that ultimately defines the maximum number of flows that can be multiplexed) depends on a number of factors, such as the burstiness of each flow (ratio of peak to average rate) and the ratio of the link rate to the peak rate of the flows, as well as some performance objectives (e.g., delay) ATDM – statistical multiplexing gain vs. delay

Delay

0.4 1 2 3 4 Capacity (packets/s) HighStatistical Gain Low Examples of sharing circuits with ATDM

• In early data communications systems, direct links were used to connect computers in different places of the same organization or to connect remote terminals to central computers – Such links were switched or leased circuits • Reserving circuits to single bursty data flows is highly inefficient since resources not used by a flow cannot be reused by other flows • It is possible to share a circuit among multiple bursty flows by means of ATDM, thus reducing communications costs • This sharing was the responsibility of end-users and thus transparent to the circuit provider • Different solutions and types of equipment were developed, based on the concept of ATDM – Statistical – Terminal concentrators – Multidrop configurations (with polling) • Leased circuits were also used to interconnect remote LANs, with routers acting as traffic multiplexers (concentrators) Terminal concentrator

• A Concentrator manages the access of the terminals to the shared circuit (buffering, queue management, speed and format conversion) •ATDM –C <  Ci

Ci TE1

C TE2 COMP CONC

TEN Multidrop

• Access by the terminals to the shared circuit is arbitrated by the computer using centralized polling techniques • ATDM – the instantaneous (peak) rate of each terminal is equal to the circuit capacity but the sum of the average rates of all terminal is bounded by the circuit capacity

C COMP

TE1 TE2 TEN LAN

• Routers behave as traffic concentrators and manage the use of the aggregate traffic between the remote LANs • Physical circuits may be replaced, with advantage, by virtual circuits (e.g., or ATM), which are also based on ATDM (this is a native packet switched service offered by the network provider and not built by the end-users)

R1 R2 C LAN A LAN B

R1 R2

ATM LAN AVC LAN B Multiplexing and Switching

• The principles of Synchronous Time Division Multiplexing, when applied to the links that interconnect network nodes (switches), give rise to

• The principles of Asynchronous Time Division Multiplexing may be extended to a network, that is, applied to the circuits that interconnect the switching nodes – This is the basis for Packet Switching – Sharing of network resources is now the responsibility of the network provider and this is the main role of packet switches Switching Circuit Switching and Packet Switching Circuit Switching

• Circuit Switching is based on Synchronous Time Division Multiplexing (STDM) • A circuit is a concatenation (chain) of channels established between adjacent switching nodes along a predefined path • Network resources are previously reserved and statically allocated to create a circuit (with fixed and dedicated capacity) – Delay is constant (no queuing delay inside the network) – is guaranteed (suitable for Constant Bit Rate flows) • Circuits may be established in two ways – On demand (on a call basis, by means of signaling procedures) and then released at the end of the call – switched circuit – In permanence, for a contractual period (by means of management procedures) – leased circuit • Circuit Switching is used in the Circuit Switching

• A circuit may be used to transfer data between computers and terminals attached at the circuit endpoints by means of adequate interfaces (for example, a in analogue subscriber loops) Packet Switching

• Packet Switching is based on Asynchronous Time Division Multiplexing and Switching • Unlike Circuit Switching, Packet Switching is based on dynamic sharing of resources – this means that resources are allocated on demand and competition for shared resources has to be arbitrated by the network nodes – Short term competition is solved by means of buffers and queue management – Solving medium and long term conflicts (which may lead to congestion) requires more complex control strategies • Packet Switching introduces variable delays and even losses • In its basic form there is no reservation of resources at all, and therefore no guarantees on throughput, delay and even delivery (best effort service) • Packet Switching was initially used in computer networks, but due to its flexibility and scalability properties, it is adopted today as the basic technology in networks that carry a multitude of traffic flows of different services • Packet Switching has evolved and exists today in different flavours – Current packet switching networks may provide soft or hard guarantees (control of delay, delay and losses), provided that adequate resource reservation and allocation mechanisms are implemented (while keeping the asynchronous time division multiplexing and switching paradigm) Packet Switching

• In packet switched networks, data is carried in data units called packets – Packets may be of fixed or variable size and the maximum size of packets varies from network to network (depending on various factors) • Packet switched networks operate in a store-and-forward manner – Each switches (forwards) packets from an input to an output port – Packets are queued (and delayed) until they become eligible (are scheduled) for transmission to the next node • A packet switched network may treat packets as independent entities or as belonging to distinct identifiable flows • Packets are composed of a header and a – Application data is fragmented and fragments are carried in the payload of individual packets – The header is processed by network nodes in order to forward packets and to perform other functions required by specific mechanisms (for example, to provide delivery guarantees) • The header format and associated functionality is specific of each network, its mode of operation and services provided and forwarding

• Routing is the process of discovering routes (paths) in the network by means of a routing algorithm (assisted by a routing protocol) – A routing table typically provides at each node mappings between destinations and the next hops to reach such destinations – Routing is a network wide process and is influenced by the and its changes • Forwarding (or switching) is a local process performed at each node and consists in moving a packet from an input to an output port – The decision is taken after searching a forwarding (switching) table using information extracted from the packet header – Forwarding tables are built based on routing information, but the building process and their content depend on the type of network

• Packet switched networks operate in one of two basic modes, which are based on rather different principles and provide native services with very different characteristics – and

• In Datagram networks, packets (called datagrams) are treated by the network as autonomous and independent entities • The network does not know (care about) any relations that may exist between packets and therefore no logical associations are established between network nodes as well as with end-systems – Network nodes do not establish logical connections (associations) in order to carry packets (connectionless operation) – Network nodes do not keep state information (stateless operation) • Datagrams are forwarded based on a destination address carried on their header (destination based routing) – The forwarding decisions are taken independently on each node along the path (hop-by-hop routing) and for each packet – datagrams “discover” their own path while they move towards the destination – Datagrams with the same destination address may follow different paths, according to the current content of the routing tables on the nodes (updates of routing tables may also cause temporary loops in the path) – Updates of the routing tables may be due to topology changes or to dynamic and adaptive routing algorithms Example of Datagram operation

• In the example, three packets from A to B (B1, B2, B3) follow different paths and reach B on a different order (B3 has overtaken B2)

C

B3 2 4

B 2 , 3 B B 3

B3, B2, B1 A 1 6 2 B B 2 , B B 2 3 , 1 , B B B 1 1

3 5 B1 B Datagram service

• The Datagram service (offered to network users) is connectionless • Datagrams may reach the destination out of order (datagrams may be disordered by the network) • The network may loose (discard packets) due to buffer overflow or as a measure to control congestion – Since the network does not keep state information, it is not possible to control flows in a selective way (for instance, misbehaving flows) – There is no attempt of recovering packet losses by the network (there is no internal retransmission mechanism) • A Datagram network provides a so-called best effort service – The network may deliver packets out of order – The network does not guarantee a maximum delivery time – The network may even not deliver packets at all (packet loss) • IP networks were designed based on the Datagram paradigm, but are being extended with new mechanisms to provide service guarantees to traffic classes for which the best effort service is not adequate Datagram service

• In the example, packets from A to B are delivered out of order, while one packet from A to C (C2) is lost by the network

A to B – packets B1, B2, B3 C A to C – packets C1, C2, C3

1 C 3, C

C3, C2, C1 Datagram A B3, B2, B1 Network

B2 , B 3, B1

B Virtual Circuits

• In Packet Switching it is possible to exploit the call concept, as in Circuit Switching networks, but without reserving resources in a static (fixed) way, thus keeping the principles of ATDM – for this reason, the designation Virtual Call is used • To support the Virtual Call concept, packets of the same call (flow) must bear a common identifier so that the network can recognize (and relate) them as belonging to that flow • A Virtual Call is supported on a Virtual Circuit, that is, a logical connection (association) established and maintained by the network nodes, which keep state information associated with each connection (connection oriented and stateful operation) – Packets carried on the same Virtual Circuit may benefit from a similar treatment by the network and of control mechanisms applied to the corresponding packet flow – This also opens the possibility of treating different packet flows (possibly of different traffic classes) in a differentiated way Virtual Circuit Identifiers

• A Virtual Circuit (VC) has to be established before data packets may be transmitted on that VC, which may be permanent (PVC) or switched (SVC) • A VC is a concatenation of virtual (logical) channels between adjacent nodes, along a path selected by means of configuration (PVC) or signaling (SVC) • A Identifier (VCI), sometimes called a label, is allocated to each virtual channel – VCI values are allocated during VC establishment – VCI values have a local meaning – they are independently managed on each interface between adjacent nodes (global administration of VCI values would be complex and inefficient) – For each VC, a node keeps a map between the pair (input port, input VCI) and the pair (output port, output VCI) on its switching / forwarding table • This allows memorizing (reconstructing) the path followed by packets of a VC – Switching is performed by processing the packet header (reading the VCI), accessing a table entry using the pair (input port, input VCI) as an index, changing the VCI value (label swapping) and switching the packet to the output port as determined by the pair (output port, output VCI) read from the table • Packets carried in the same VC follow the same path and thus are kept in order Virtual Circuit – operation and forwarding table

b cca kkn 1 1 n m 2 Switch yczy gh g M N

t t

SwitchSwitch Input Output ControlControl Port VCI Port VCI

a 2 n 1 b 1 n c N g header

payload y 1 k M z N h a, b, c, .. Virtual Circuit Identifier (VCI) c 2 m

Forwarding table Example of Virtual Circuit operation

• In the example two Virtual Circuits are represented – packets carried in the same VC follow the same path

VC #1 (A to B) – path A, 1, 2, 4, 6, B C VC #2 (A to C) – path A, 1, 3, 4, C

2 4

A 1 6

3 5 B Virtual Circuits and VCIs – example

Virtual Circuit VCIs – Path: A-1-3-6-B (1, 2, 7, 8) – Path: A-1-3-4-5-D (5, 3, 4, 5, 2) – Path: C-2-4-3-6-B (6, 3, 2, 1, 5)

2 1 7 8 1 3 B A 3 5 1 6 5 4 2 VCI 4

3 5 switch 2 C 5 6 2 D Virtual Circuits – forwarding tables over a VC path

• Example (corresponding to the previous figure) Virtual Circuit with path A-1-3-4-5-D and VCI sequence (5, 3, 4, 5, 2) For simplicity, the table entries identify the adjacent nodes (previous and next) in the VC path, instead of identifying the corresponding input and output ports

Node 3 Input Output Node 1 Node VCI Node VCI Node 6 Input Output 1 2 6 7 Input Output Node VCI Node VCI 1 3 4 4 Node VCI Node VCI A 1 3 2 4 2 6 1 3 7 B 8 A 5 3 3 6 7 1 2 3 1 B 5 3 2 A 1 6 1 4 2 B 5 3 1 3 3 A 5 4 4 1 3 B 8 3 7 Node 4 Input Output Node VCI Node VCI Node 2 2 3 3 2 Node 5 3 4 5 5 Input Output 3 2 2 3 Input Output Node VCI Node VCI 5 5 3 4 Node VCI Node VCI C 6 4 3 4 5 D 2 4 3 C 6 D 2 4 5 Virtual Circuit service

• The Virtual Circuit service (offered to network users) is connection oriented • Packets are delivered to the destination in the same order they were submitted to the network • Since the network keeps state information per Virtual Circuit it is possible to control flows in a selective way, to support various traffic control mechanisms and to adopt different strategies for reservation and allocation of resources – Such differences may be found in various networks that provide a Virtual Circuit service, such as X.25, Frame Relay and ATM – A Virtual Circuit service may be emulated by entry and exit nodes on a Datagram network (this is transparent to the other nodes) • In general, a Virtual Circuit service may guarantee a high probability of packet delivery (reliable service) or provide other guarantees (e.g., throughput, delay), depending on the QoS requirements of different traffic classes (however, traffic carried in some Virtual Circuits may receive a best effort service, if so desired) Virtual Circuit service

• In the example, all packets are delivered in order to B and C

C VC #1 – packets 1.1, 1.2, 1.3 VC #2 – packets 2.1, 2.2, 2.3 .1 , 2 .2 2 3, 2.

2.3, 2.2, 2.1 Virtual Circuit A 1.3, 1.2, 1.1 Network

1. 3, 1 .2, 1.1

B Datagrams – summary

• The network operation is connectionless and stateless – There is no overhead associated with the management of connections – There is no need to keep state information in nodes • The organization of the routing and switching tables is based on (groups of) addresses • The operation is robust, since routing algorithms dynamically adapt to link or node failures • The service provided is basic and flexible, but unreliable (best effort) – It may be enhanced, if needed, by end-to-end mechanisms, transparent to the network (e.g., TCP on IP networks) • The overhead per packet is higher than with VCs (headers carry addresses that are longer than VCIs / labels) • The processing of a packet is more complex than with VCs (table look-up based on addresses, modification of header bits, etc.) • It is not possible to selectively control packet flows • Datagrams are usually discarded, at random, in case of congestion Virtual Circuits – summary

• The network operation is connection oriented and stateful • It is possible to directly provide a reliable service • It is possible to selectively control a VC and to provide different levels of assurance per VC • The overhead per packet is small (headers do not carry addresses) • Switching is simple and fast (e.g., hardware based in ATM networks) • There is an extra overhead to set up and clear a VC – this consumes transmission and processing resources and introduces delays, which are critical in transactions of short duration and involving a small number of packets • It is necessary to keep state information per active VC • The switching tables must be sized to the maximum number of VCs (active or not) that can be supported on a node • In case of failure of a link or node, it is necessary to set up a new VC Circuits, Virtual Circuits and Datagrams – comparison