Lecture 2 (Feb. 4) Last lecture - Network requirements - Network connectivity - different link models - Switched Network - circuit switching vs. packet switching Today - Multiplexing - Network reliability -- sources of failures - Performance - bandwidth and latency. - Layering architecture A network can also be formed by connecting an independent set of networks, in that case we call the network an internetwork. A node connected to 2 or more networks is called a router or gateway, and has similar function to a switch. A router forwards a packets from a network to another. Each node on a network needs a unique address to be distinguished from one another. In a packet switched network, a host attaches its destination address to its packets, and the switches/routers use this address to determine how to forward the packets to the destination. Routing refers to the systematic method of forwarding packets to the destination node based on its address. There are applications where one node wants to send the same message to all nodes (broadcast) or a subset of nodes (multicast). In this case, a node can have a broadcast/multicast address in addition to a single unique address. Resource Sharing ---------------- Why the Internet uses a packet switched network? Goal -- to enable any pair of hosts to exchange messages. How should the hosts share the network resources if they want to use the network at the same time? How sho A figure illustrating the peer-to-peer configuration where several hosts sharing a single link. Some terminologies: Multiplexing = resource sharing among multiple users. e.g. a time-sharing computer system, where a single CPU is shared (multiplexed) among multiple jobs. Data sent by different users can be multiplexed over the physical links. Refer to the figure to illustrate the concepts of multiplexing of several flows into a physical link by Switch 1 and demultiplexing into separate flows by Switch 2. Methods of Multiplexing ----------------------- Synchronous time-division multiplexing (STDM) (e.g. in telephone network) -- divide time into equal-size units called time slots and give each flow a chance to send in a round robin fashion over a physical link. i.e. during time slot 1, data from the first flow is sent, and during time slot 2, data from the second flow is sent, and so on ... until every flow gets its turn to send, and the process will start over again. Frequency division multiplexing (FDM) -- divide the physical link into different frequency channels and have each flow transmitted at a different frequency. (e.g. TV broadcast channels, also used in optical transmission systems.) Most circuit switched networks make use of either STDM or FDM. Limitations of STDM and FDM: a) If a flow does not have any data to send, its share of the physical link (a time slot or a frequency channel) will be wasted. Other flows cannot make use of it. However, computer communication is very bursty, i.e. the amount of idling period is large compared with its transmission period (time spent on viewing a Web page compared with downloading a Web page). b) Both STDM and FDM assume that the maximum number of flows is fixed and known in advance ---> inflexibility. c) Need a mechanim to allocate channels, both ends have to agree that a slot is allocated to the same channel. Statistical Multiplexing used in the Internet involves 2 key ideas: ------------------------ a) the physical link is shared over time - data is transmitted from each flow in turn (like STDM0. b) But data is transmitted from each flow on demand rather than during a predetermined time slot. If only one flow has data to send, it gets to transmit without waiting for a predetermined time slot. Time slots are not wasted because of idling sources --> efficient sharing of network resources. Still need a mechanism to ensure each flow has its turn to send data (issue of fairness). Usually there is an upper bound on the maximum size of a block of data (max packet size) a flow can send at a given time. The decision on which flow's packet to send is done on a packet-by-packet basis. Packets from different flows are thus interleaved in general. Issues in Statistical Multiplexing A) Scheduling - which packet to send on a shared link? In a packet-switched network such as the Internet, the decision is usually made by each switch independently on a packet-by-packet basis. The challenge is to make this decision so that certain requirements (e.g. fairness) are satisfied. For example, a switch can forward packets from different flows in a round-robin fashion, just as STDM. But when packets are buffered in a first-in-first-out queues (because of cheaper implementation), round-robin may not be possible. B) Congestion control -- how to handle network overload? Since multiple flows can be multiplexed onto one shared outgoing link, it could happen that the switch is receiving packets faster than the shared link can handle. A switch will need to buffer these packets. When the buffer space is not sufficient, packets will be dropped and in some applications will need to be resent. The switch is then said to be in congestion state. Functionality ------------- Applications view a network as providing logical channels for its processes to communicate. What functionalities of the channels are required? Application dependent. - some require error free delivery, e.g. file transfer and most data applications - some require packets to arrive at the destination in the order they are sent e.g. video. but can tolerate certain degree of bit errors. Reliability ----------- Computer networks are subject to failures e.g. machines could crash, fiber cut, corruption of information bits due to electrical interference, software bugs. A good design of a network must be able to hide certain kinds of failures from the users. General classes of failures: a) Bit errors -- 1 out of 10^6 to 10^7 in copper-based cable, 1 out of 10^12 to 10^14 on a typical optical fiber. Techniques exist that can detect and correct some small bit errors. b) Packet corruption and discard -- buffer overflow due to congestion. Challenge: how to tell whether a packet is indeed lost or it is merely late in arriving at the destination? c) Node and link failure -- A switch can fail because of power loss, software bug. A physical link can break. In a packet-switched network, it is sometimes possible to reroute the traffic around a failed node or link. Challenge: how to distinguish between a failed computer and one that is merely slow. Performance ----------- Bandwidth of a network -- # of bits you can transmit over a period of time. Units = bps (bits per second). e.g. Ethernet has a bandwidth of 10Mbps, A cellular voice channel 9.6 Kbps. In a 10Mbps link, it takes 1/(10 x 10^6) = 0.1 microsecond to transmit a bit. Sometimes we talk about the bandwidth perceived by any application, which will then involve other factors, e.g. how fast the system software can handle each bit of data. Throughput -- measured (perceived) performance in terms of bandwidth. Latency -- how long it takes a single bit to propagate from one end of a network to the other. Units = time. 3 factors contributing to the latency latency = propagation delay + transmission time + queueing delay propagation delay = distance traveled / speed of light e.g. in fiber optics, 1 Km = 5 microsec. About 20 msec across the USA. transmission time = data size / bandwidth. Queueing delay = delay due to buffering of packets. Which factor dominates the latency depends on the relative size among the given bandwidth, distance traveled, and size of data. Delay X Bandwidth ------------------ If we interpret delay as the length of a pipe and bandwidth as the width of the pipe, the delay-bandwidth product represents the volume of the pipe, i.e. # of bits it can hold. It corresponds to # bits a sender must transmit before the first bit arrives at the receiver. delay-bandwidth product sometimes refers to RTT x bandwidth. Application Performance Needs ----------------------------- Data application is delay-insensitive, only concern throughput. Voice or video application is sensitive to delay and delay-variation (jitter). Layering -------- A modular structure. Divide the system into different layers of abstraction. Each layer provides a service to the upper layer. Allow adding new network functionalities by modifying a layer without changing other layers. A postal service analogy ----------------------- a) A customer goes to a post office and sends a letter to a friend abroad. b) A postal worker processes the letter and forwards it to a postal worker in the foreign country. Customer A ----------> Customer B | | | | | | | | Postal worker A Poster worker B Note: * The customer and his friend (upper layer) views the postal network as a black box that accepts letters at one end and delivers it at the other. * The postal workers (lower layer), who handle the letters on behalf of their customers, provide a service to their customers. The two (or more) parties communicating at the same layer are called peer entities.