Full Transcript

ADVANCED COMPUTER NETWORKS What is a Computer Network ?  Two or more computers that are connected with one another for the purpose of communicating data electronically and for sharing resources.  A computer, printer, or any other devices capable of sending or receiving th...

ADVANCED COMPUTER NETWORKS What is a Computer Network ?  Two or more computers that are connected with one another for the purpose of communicating data electronically and for sharing resources.  A computer, printer, or any other devices capable of sending or receiving the data can be connected through communication channels. Basics of Data Communication Process of transmitting data from one point to another Key elements in the model Source: Device which generates the data to be transmitted Transmitter: Device which transforms and encodes the information that needs to be transmitted Transmission medium: provides the path for data communication Receiver: Device which accepts the signal from the transmission media and converts in to a form that can be handled by the destination device Destination: Takes the incoming data from the receiver 7.7 Transmission Medium and physical layer 1-8 Protocol “Layers” Networks are complex!  many “pieces”: Protocol is a set of rules that  hosts govern a data  routers communication.  links of various media  applications  protocols  hardware, software Introduction Layering of airline 1-9 functionality ticket (purchase) ticket (complain) ticket baggage (check) baggage (claim baggage gates (load) gates (unload) gate runway (takeoff) runway (land) takeoff/landing airplane routing airplane routing airplane routing airplane routing airplane routing departure intermediate air-traffic arrival airport control centers airport Layers: each layer implements a service  via its own internal-layer actions Introduc tion 1-10 Why layering Dealing with complex ? systems:  explicit structure allows identification, relationship of complex system’s pieces  modularization eases maintenance, updating of system  change of implementation of layer’s service transparent to rest of system  e.g., change in gate procedure doesn’t affect rest of system Introduction 1-11 Protocol Stack Introduction ISO- OSI MODEL An ISO standard that covers all aspects of network communications is the Open Systems Interconnection (OSI) model. It was first introduced in the late 1970s. An open system is a set of protocols that allows any two different systems to communicate regardless of their underlying architecture. The OSI model is not a protocol; it is a model for understanding and designing a network architecture.that is flexible, robust, and interoperable Layered Architecture OSI layers OSI layers Within a single machine, each layer calls upon the services of the layer just below it. Layer 3, for example, uses the services provided by layer 2 and provides services for layer 4. Between machines, layer x on one machine logically communicates with layer x on another machine. This communication is governed by an agreed- upon series of rules and conventions called protocols. Introduction 1-5 Organization of the Layers The seven layers can be thought of as belonging to three subgroups. Layers 1, 2, and 3- physical, data link, and network - are the network support layers; they deal with the physical aspects of moving data from one device to another (such as electrical specifications, physical connections, physical addressing, timing ). Layers 5, 6, and 7- session, presentation, and application - can be thought of as the user support layers; they allow interoperability among unrelated software systems. Layer 4, the transport layer, links the two subgroups and ensures that what the lower layers have transmitted is in a form that the upper layers can use. Layers in the OSI Model Physical Layer The physical layer coordinates the functions required to carry a bit stream over a physical medium. Introduction OSI Physical Layer Physical characteristics of interfaces and media. Representation of bits. Data rate. Synchronization of bits. Line configuration. Physical topology. Transmission mode. Introduction OSI :Physical Layer The physical layer is also concerned with the following: Physical characteristics of interfaces and media. The physical layer defines the characteristics of the interface between the devices and the transmission media. It also defines the type of transmission media. Representation of bits. The physical layer data consists of a stream of bits (sequence of 0s or 1s) with no interpretation. To be transmitted, bits must be encoded into signals. The physical layer defines the type of encoding (how 0s and 1s are changed to signals). OSI :Physical Layer Data rate. The transmission rate - the number of bits sent each second—is also defined by the physical layer. In other words, the physical layer defines the duration of a bit, which is how long it lasts. Synchronization of bits. The sender and receiver must not only use the same bit rate but must also be synchronized at the bit level. In other words, the sender and the receiver clocks must be synchronized. Introduction OSI :Physical Layer Line configuration. The Physical layer is concerned with the connection of devices to the media. In a point-to-point configuration, two devices are connected together through a dedicated link. In a multipoint configuration, a link is shared between several devices. Physical topology. The physical topology defines how devices are connected to make a network. Devices can be connected using a mesh topology (every device connected to every other device), a star topology (devices are connected through a central device), a ring topology (each device is connected to the next, forming a ring), or a bus topology (every device on a common link). Introduction OSI :Physical Layer Transmission mode. The physical layer also defines the direction of transmission between two devices: simplex, half- duplex, or full-duplex. Introduction OSI DATA Link Layer Framing Physical addressing. Flow control. Error control. Access control Introduction OSI: Data Link Layer Framing. The data link layer divides the stream of bits received from the network layer into manageable data units called frames. Physical addressing. If frames are to be distributed to different systems on the network, the data link layer adds a header to the frame to define the sender and/or receiver of the frame. If the frame is intended for a system outside the sender's network, the receiver address is the address of the connecting device that connects the network to the next one. Introduction OSI: Data Link Layer Flow control. If the rate at which the data is absorbed by the receiver is less than the rate produced at the sender, the data link layer imposes a flow control mechanism to prevent overwhelming the receiver. Error control. The data link layer adds reliability to the physical layer by adding mechanisms to detect and retransmit damaged or lost frames. It also uses a mechanism to recognize duplicate frames. Error control is normally achieved through a trailer added to the end of the frame. Access control: when two or more devices are connected to the same link, data link layer protocols are necessary to determine which device has control over the link at any given time. OSI: Network Layer The network layer is responsible for the source-to- destination delivery of a packet, possibly across multiple networks (links). Whereas the data link layer oversees the delivery of the packet between two systems on the same network (link), the network layer ensures that each packet gets from its point of origin to its final destination. Introduction OSI: Network Layer Logical addressing Routing Introduction OSI: Network Layer If two systems are connected to the same link, there is usually no need for a network layer. if the two systems are attached to different networks (links) with connecting devices between the networks (links), there is often a need for the network. Logical addressing. The physical addressing implemented by the data link layer handles the addressing problem locally. If a packet passes the network boundary, we need another addressing system to help distinguish the source and destination systems. The network layer adds a header to the packet coming from the upper layer that, among other things, includes the logical addresses of the sender and receiver. OSI: Network Layer Routing. When independent networks or links are connected together to create internetworks (network of networks) or a large network, the connecting devices (called routers or switches) route or switch the packets to their final destination. One of the functions of the network layer is to provide this mechanism. Introduction 1-20 Network Layer OSI: Transport Layer The transport layer is responsible for process-to- process delivery of the entire message. A process is an application program running on the host. Whereas the network layer oversees source-to- destination delivery of individual packets, it does not recognize any relationship between those packets. It treats each one independently, as though each piece belonged to a separate OSI: Transport Layer The transport layer, on the other hand, ensures that the whole message arrives intact and in order, overseeing both error control and flow control at the source-to- destination level. Introduction Transport Layer Introduction OSI: Transport Layer Service-point addressing Segmentation and reassembly Connection control Flow control Error control Introduction OSI: Transport Layer Other responsibilities of the transport layer include the following: 1. Service-point addressing Computers often run several programs at the same time. For this reason, source-to-destination delivery means delivery not only from one computer to the next but also from a specific process (running program) on one Introduction computer to a specific process (running OSI: Transport Layer Service-point addressing The transport layer header must therefore include a type of address called a service- point address (or port address). The network layer gets each packet to the correct computer; the transport layer gets the entire Introduction message to the correct process on OSI: Transport Layer Segmentation and reassembly A message is divided into transmittable segments, with each segment containing a sequence number. These numbers enable the transport layer to reassemble the message correctly upon arriving at the destination and to identify and replace packets thatIntroduction were lost in OSI: Transport Layer Connection control The transport layer can be either connectionless or connection- oriented. A connectionless transport layer treats each segment as an independent packet and delivers it to the transport layer at the destination machine. A connection- oriented transport layer make a connection with the transport layer at the destination machine first before delivering the packets. After all the data are Introduction transferred, the connection is terminated OSI: Transport Layer Flow control. Like the data link layer, the transport layer is responsible for flow control. However, flow control at this layer is performed end to end rather than across a single link. Introduction OSI: Transport Layer Error control. Like the data link layer, the transport layer is responsible for error control. However, error control at this layer is performed process-to-process rather than across a single link. The sending transport layer makes sure that the entire message arrives at the receiving transport layer without error (damage, loss, or duplication). Error correction is usually achieved through retransmission. Introduction Transport Layer: process to process delivery Introduction OSI: Session Layer It establishes, maintains, and synchronizes the interaction between communicating systems. Specific responsibilities of the session layer include the following: Introduction OSI: Session Layer Dialog control. Synchronization. Introduction OSI: Session Layer Dialog control. The session layer allows two systems to enter into a dialog. It allows the communication between two processes to take place in either half- duplex (one way at a time) or full-duplex (two ways at a time) mode. Synchronization. The session layer allows a process to add checkpoints (synchronization Introduction points) OSI: Session Layer Introduction OSI Presentation Layer The presentation layer is concerned with the syntax and semantics of the information exchanged between two systems. Introduction OSI Presentation Layer Translation Encryption Compression Introduction OSI Presentation Layer Specific responsibilities of the presentation layer include the following: Translation. The presentation layer at the sender changes the information from its sender- dependent format into a common format. The presentation layer at the receiving machine changes the common format into its receiver- dependent format. Introduction OSI Presentation Layer Encryption To carry sensitive information a system must be able to assure privacy. Encryption means that the sender transforms the original information to another form and sends the resulting message out over the network. Decryption reverses the original process to transform the message back to its original form. Introduction OSI Presentation Layer Compression. Data compression reduces the number of bits contained in the information. Data compression becomes particularly important in the transmission of multimedia such as text, audio, and video. Introduction OSI Application Layer The application layer enables the user, whether human or software, to access the network. It provides user interfaces and support for services such as electronic mail, remote file access and transfer, shared database management, and other types of distributed information services. Introduction Summary of OSI Layers Introduction Internet protocol stack application: supporting network applications – FTP, SMTP, HTTP application transport: process- transport process data transfer – TCP, UDP network: routing of network datagrams from source to destination link – IP, routing protocols link: data transfer between physical neighboring network elements – Ethernet physical: bits “on the wire” Introduction Internet protocol stack Application Layer The application layer is where network applications and their application-layer protocols reside. The Internet’s application layer includes many protocols, such as the HTTP protocol (which provides for Web document request and transfer), SMTP (which provides for the transfer of e-mail messages), and FTP (which provides for the transfer of files between Introduction two end Internet protocol stack Application Layer Certain network functions, such as the translation of human-friendly names for Internet end systems like www.ietf.org to a 32- bit network address, are also done with the help of a specific application-layer protocol, namely, the domain name system (DNS) Introduction Internet protocol stack Transport Layer The Internet’s transport layer transports application-layer messages between application endpoints. In the Internet there are two transport protocols, TCP and UDP, either of which can transport application-layer messages. Introduction Internet protocol stack Transport Layer TCP provides a connection-oriented service to its applications. This service includes guaranteed delivery of application-layer messages to the destination and flow control (that is, sender/receiver speed matching). Transport-layer packet as a Introduction segment. Internet protocol stack TCP also breaks long messages into shorter segments and provides a congestion-control mechanism, so that a source throttles its transmission rate when the network is congested. The UDP protocol provides a connectionless service to its applications. This is a no-frills service that provides no reliability, no flow control, and no congestion control. Introduction 1-29 Internet protocol stack Network Layer The Internet’s network layer is responsible for moving network-layer packets known as datagrams from one host to another. The Internet transport-layer protocol (TCP or UDP) in a source host passes a transport-layer segment and a destination address toIntroduction the network Internet protocol stack Network Layer The network layer then provides the service of delivering the segment to the transport layer in the destination host. The Internet’s network layer includes the IP Protocol, which defines the fields in the datagram as well as how the end systems and Introduction routers act on Internet protocol stack Network Layer There is only one IP protocol, and all Internet components that have a network layer must run the IP protocol. The Internet’s network layer also contains routing protocols that determine the routes that datagrams take between sources and destinations. The Internet has many routing protocols Introduction Internet protocol stack Link Layer Data transfer between neighboring network elements Physical Layer While the job of the link layer is to move entire frames from one network element to an adjacent network element, the job of the physical layer is to move the individual bits within the frame from one node to the next. Introduction Internet protocol stack The protocols in this layer are again link dependent and further depend on the actual transmission medium of the link (for example, twisted-pair copper wire, single-mode fiber optics). For example, Ethernet has many physical-layer protocols: one for twisted-pair copper wire, another for coaxial cable, another for fiber, and so on. In each case, a bit is moved Introductionacross the Network devices Repeater – A repeater operates at the physical layer. Its job is to regenerate the signal over the same network before the signal becomes too weak or corrupted so as to extend the length to which the signal can be transmitted over the same network. An important point to be noted about repeaters is that they do not amplify the signal. When the signal becomes weak, they copy the signal bit by bit and regenerate it at the original strength. It is a 2 port device. Hub – A hub is basically a multiport repeater. A hub connects multiple wires coming from different branches, for example, the connector in star topology which connects different stations. Hubs cannot filter data, so data packets are sent to all connected devices. In other words, collision domain of all hosts connected through Hub remains one. Also, they do not have intelligence to find out best path for data packets which leads to inefficiencies and wastage. Bridge – A bridge operates at data link layer. A bridge is a repeater, with add on the functionality of filtering content by reading the MAC addresses of source and destination. It is also used for interconnecting two LANs working on the same protocol. It has a single input and single output port, thus making it a 2 port device. Switch – A switch is a multiport bridge with a buffer and a design that can boost its efficiency(a large number of ports imply less traffic) and performance. A switch is a data link layer device. The switch can perform error checking before forwarding data, that makes it very efficient as it does not forward packets that have errors and forward good packets selectively to correct port only. Routers – A router is a device like a switch that routes data packets based on their IP addresses. Router is mainly a Network Layer device. Routers normally connect LANs and WANs together and have a dynamically updating routing table based on which they make decisions on routing the data packets. Host name: Each device in the network is associated with a unique device name known as Hostname. Type “hostname” in the command prompt(Administrator Mode) and press ‘Enter’, this displays the hostname of your machine. IP Address (Internet Protocol address): Also known as the Logical Address, the IP Address is the network address of the system across the network. To identify each device in the world-wide-web, the Internet Assigned Numbers Authority (IANA) assigns an IPV4 (Version 4) address as a unique identifier to each device on the Internet. The length of an IPv4 address is 32-bits, hence, we have 232 IP addresses available. The length of an IPv6 address is 128-bits. Type “ipconfig” in the command prompt and press ‘Enter’, this gives us the IP address of the device. MAC Address (Media Access Control address): Also known as physical address, the MAC Address is the unique identifier of each host and is associated with its NIC (Network Interface Card). A MAC address is assigned to the NIC at the time of manufacturing. The length of the MAC address is : 12-nibble/ 6 bytes/ 48 bits Type “ipconfig/all” in the command prompt and press ‘Enter’, this gives us the MAC address. Port: A port can be referred to as a logical channel through which data can be sent/received to an application. Any host may have multiple applications running, and each of these applications is identified using the port number on which they are running. A port number is a 16-bit integer, hence, we have 216 ports available which are categorized as shown below: Number of ports: 65,536 Range: 0 – 65535 Type “netstat -a” in the command prompt and press ‘Enter’, this lists all the ports being used. Socket: The unique combination of IP address and Port number together are termed as Socket. DNS Server: DNS stands for Domain Name system. DNS is basically a server which translates web addresses or URLs (ex: www.google.com) into their corresponding IP addresses. We don’t have to remember all the IP addresses of each and every website. The command ‘nslookup’ gives you the IP address of the domain you are looking for. This also provides the information of our DNS Server. ARP: ARP stands for Address Resolution Protocol. It is used to convert an IP address to its corresponding physical address(i.e., MAC Address). ARP is used by the Data Link Layer to identify the MAC address of the Receiver’s machine. RARP: RARP stands for Reverse Address Resolution Protocol. As the name suggests, it provides the IP address of the device given a physical address as input. The Internet: In simplest terms, the Internet is a global network comprised of smaller networks that are interconnected using standardized communication protocols. The World Wide Web: The Web is a only way to access information through the Internet. It’s a system of Internet servers that support specially formatted documents. The documents are formatted in a markup language called HTML, or “HyperText Markup Language”, which supports a number of features including links and multimedia. These documents are interlinked using hypertext links and are accessible via the Internet. URI: URI stands for ‘Uniform Resource Identifier’. A URI can be a name, locator, or both for an online resource whereas a URL is just the locator. URLs are a subset of URIs. A URL is human-readable text that was designed to replace the numbers (IP addresses) that computers use to communicate with servers. A URL consists of a protocol, domain name, and path (which includes the specific subfolder structure where a page is located) like- protocol://WebSiteName.topLevelDomain/path Protocol – Http or Https. WebSiteName – google etc. topLevelDomain-.com,.edu,.in etc. path- specific folders and/or subfolders that are on a given website. Who governs the Internet? The Internet is not governed and has no single authority figure. The ultimate authority for where the Internet is going rests with the Internet Society, or ISOC. ISOC is a voluntary membership organization whose purpose is to promote global information exchange through Internet technology. ISOC appoints the IAB- Internet Architecture Board. They meet regularly to review standards and allocate resources, like addresses. IETF- Internet Engineering Task Force. Another volunteer organization that meets regularly to discuss operational and technical problems. Internet was invented by ARPANET in 1983. Internet is controlled by 75 million servers. Backbone of internet is made by 550, 000 miles of underwater cable. About one billion computer systems are connected to internet. About 3.2 billion people use the internet from which 1.7 billion internet users are Asians. Internet consists of five billion computing devices such as computers, phones, modems, switches, routers etc. According to Google, Internet consists of 5 million Terabytes of data. Goals of Computer Networks: Resource Sharing – Many organization has a substantial number of computers in operations, which are located apart. Ex. A group of office workers can share a common printer, fax, modem, scanner etc. High Reliability – If there are alternate sources of supply, all files could be replicated on two or, machines. If one of them is not available, due to hardware failure, the other copies could be used. Inter-process Communication – Network users, located geographically apart, may converse in an interactive session through the network. In order to permit this, the network must provide almost error- free communications. Flexible access – Files can be accessed from any computer in the network. The project can be begun on one computer and finished on another. There are two possible types of connections: Point-to-Point Connection Multipoint Connection Point-to-Point Connection : A point-to-point connection provides a dedicated link between two devices. The entire capacity of the link is reserved for transmission between those two devices. Most point-to-point connections use a actual length of wire or cable to connect the two end, but other options such as microwave or satellite links are also possible. Point to point network topology is considered to be one of the easiest and most conventional network topologies. It is also the simplest to establish and understand. Example: Point-to-Point connection between remote control and Television for changing the channels. Multipoint Connection : It is also called Multidrop configuration. In this connection two or more devices share a single link. More than two devices share the link that is the capacity of the channel is shared now. With shared capacity, there can be two possibilities in a Multipoint Line configuration: Spatial Sharing: If several devices can share the link simultaneously, its called Spatially shared line configuration. Temporal (Time) Sharing: If users must take turns using the link , then its called Temporally shared or Time Shared Line configuration. There are three types of transmission mode:- Simplex Mode In Simplex mode, the communication is unidirectional, as on a one- way street. Only one of the two devices on a link can transmit, the other can only receive. The simplex mode can use the entire capacity of the channel to send data in one direction. Example: Keyboard and traditional monitors. The keyboard can only introduce input, the monitor can only give the output. Half-Duplex Mode In half-duplex mode, each station can both transmit and receive, but not at the same time. When one device is sending, the other can only receive, and vice versa. The half-duplex mode is used in cases where there is no need for communication in both direction at the same time. The entire capacity of the channel can be utilized for each direction. Example: Walkie- talkie in which message is sent one at a time and messages are sent in both the directions. Full-Duplex Mode In full-duplex mode, both stations can transmit and receive simultaneously. In full_duplex mode, signals going in one direction share the capacity of the link with signals going in other direction, this sharing can occur in two ways: Either the link must contain two physically separate transmission paths, one for sending and other for receiving. Or the capacity is divided between signals travelling in both directions. Full-duplex mode is used when communication in both direction is required all the time. The capacity of the channel, however must be divided between the two directions. Example: Telephone Network in which there is communication between two persons by a telephone Types of Transmission Media Guided Media: It is also referred to as Wired or Bounded transmission media. Signals being transmitted are directed and confined in a narrow pathway by using physical links. High Speed Secure Used for comparatively shorter distances Unguided Media: It is also referred to as Wireless or Unbounded transmission media.No physical medium is required for the transmission of electromagnetic signals. Features: Signal is broadcasted through air Less Secure Used for larger distances Difference between Unicast, Broadcast and Multicast in Computer Network The cast term here signifies some data(stream of packets) is being transmitted to the recipient(s) from client(s) side over the communication channel that help them to communicate Unicast – This type of information transfer is useful when there is a participation of single sender and single recipient. So it as a one-to-one transmission. For example, a device having IP address 10.1.2.0 in a network wants to send the traffic stream(data packets) to the device with IP address 20.12.4.2 in the other network,then unicast comes into picture. This is the most common form of data transfer over the networks. Broadcast – Broadcasting transfer (one-to-all) techniques can be classified into two types : Limited Broadcasting – Suppose you have to send stream of packets to all the devices over the network that you reside, this broadcasting comes handy. For this to achieve,it will append 255.255.255.255 (all the 32 bits of IP address set to 1) called as Limited Broadcast Address in the destination address of the datagram (packet) header which is reserved for information tranfer to all the recipients from a single client (sender) over the network. Direct Broadcasting – This is useful when a device in one network wants to transfer packet stream to all the devices over the other network. This is achieved by translating all the Host ID part bits of the destination address to 1,referred as Direct Broadcast Address in the datagram header for information transfer. This mode is mainly utilized by television networks for video and audio distribution. Multica st In multicasting, one/more senders and one/more recipients participate in data transfer traffic. In this method traffic recline between the boundaries of unicast (one- to-one) and broadcast (one-to-all). Multicast lets server’s direct single copies of data streams that are then simulated and routed to hosts that request it. IP multicast requires support of some other protocols like IGMP (Internet Group Management Protocol), Multicast routing for its working. Also in Classful IP addressing Class D is reserved for multicast groups. Packet Switching Principles Circuit switching designed for voice Resources dedicated to a particular call Much of the time a data connection is idle Data rate is fixed Both ends must operate at the same rate Basic Operation Data transmitted in small packets Typically 1000 octets Longer messages split into series of packets Each packet contains a portion of user data plus some control info Control info Routing (addressing) info Packets are received, stored briefly (buffered) and past on to the next node Store and forward Use of Packets Advantages Line efficiency Single node to node link can be shared by many packets over time Packets queued and transmitted as fast as possible Data rate conversion Each station connects to the local node at its own speed Nodes buffer data if required to equalize rates Packets are accepted even when network is busy Delivery may slow down Priorities can be used Switching Technique Station breaks long message into packets Packets sent one at a time to the network Packets handled in two ways  Datagram  Virtual circuit Datagram Each packet treated independently Packets can take any practical route Packets may arrive out of order Packets may go missing Up to receiver to re-order packets and recover from missing packets Datagram Diagram Virtual Circuit Preplanned route established before any packets sent Call request and call accept packets establish connection (handshake) Each packet contains a virtual circuit identifier instead of destination address No routing decisions required for each packet Clear request to drop circuit Not a dedicated path Virtual Circuit Diagram Virtual Circuits v Datagram Virtual circuits Network can provide sequencing and error control Packets are forwarded more quickly No routing decisions to make Less reliable Loss of a node looses all circuits through that node Datagram No call setup phase Better if few packets More flexible Routing can be used to avoid congested parts of the network DATA TRAFFIC The main focus of congestion control and quality of service is data traffic. In congestion control we try to avoid traffic congestion. In quality of service, we try to create an appropriate environment for the traffic Three traffic profiles 24.2 CONGESTION Congestion in a network may occur if the load on the network—the number of packets sent to the network— is greater than the capacity of the network—the number of packets a network can handle. Congestion control refers to the mechanisms and techniques to control the congestion and keep the load below the capacity. 24-3 CONGESTION CONTROL Congestion control refers to techniques and mechanisms that either prevent congestion, can or remove congestion, after before it happens, it has happened. QUALITY OF SERVICE Quality of service (QoS) is an internetworking issue that has been discussed more than defined.  We can informally define quality of service as something a flow seeks to attain. QoS refers to the capability of a network to provide better service to selected network traffic. Flow characteristics Reliabilit yReliability is a characteristic that a flow needs. Lack of reliability means losing a packet or acknowledgment, which entails retransmission. However, the sensitivity of application programs to reliability is not the same. For example, it is more important that electronic mail, file transfer, and Internet access have reliable transmissions than telephony or audio conferencing. Dela y Source-to-destination delay is another flow characteristic. Again applications can tolerate delay in different degrees. In this case, telephony, audio conferencing, video conferencing, and remote log-in need minimum delay, while delay in file transfer or e-mail is less important. Jitte r same flow. Jitter is the variation in delay for packets belonging to the For example, if four packets depart at times 0, 1, 2, 3 and arrive at 20, 21, 22, 23, all have the same delay, 20 units of time. On the other hand, if the above four packets arrive at 21, 23, 21, and 28, they will have different delays: 21, 22, 19, and 24. For applications such as audio and video, the first case is completely acceptable; the second case is not. For these applications, it does not matter if the packets arrive with a short or long delay as long as the delay is the same for all packets. For this application, the second case is not acceptable. Jitter is defined as the variation in the packet delay. High jitter means the difference between delays is large; low jitter means the variation is small. Bandwidt h Different need different applications bandwidths. In video conferencing we need to send millions of bits per second to refresh a color screen while the total number of bits in an e- mail may not reach even a million. TECHNIQUES TO IMPROVE QoS Scheduling Traffic Shaping Resource Reservation Admission Control Scheduling Packets from different flows arrive at a switch or router for processing. A good scheduling technique treatsthe different flows in a fair and manner. appropriate Several scheduling techniques are designed to improve the quality of service. FIFO Queuing In first-in, first-out (FIFO) queuing, packets wait in a buffer (queue) until the node (router or switch) is ready to process them. If the average arrival rate is higher than the average processing rate, the queue will fill up and new packets will be discarded. FIFO queue Priority Queuing In priority queuing, packets are first assigned to a priority class. Each priority class has its own queue. The packets in the highest-priority queue are processed first. Packets in the lowest-priority queue are processed last. Priority Queuing A priority queue can provide better QoS than the FIFO queue because higher priority traffic, such as multimedia, can reach the destination with less delay. However, there is a potential drawback. If there is a continuous flow in a high-priority queue, the packets in the lower-priority queues will never have a chance to be processed. This is a condition called starvation. Priority queuing Weighted Fair Queuing A better scheduling method is weighted fair queuing. In this technique, the packets are still assigned to different classes and admitted to different queues. The queues, however, are weighted based on the priority of the queues; higher priority means a higher weight. The system processes packets in each queue in a round-robin fashion with the number of packets selected from each queue based on the corresponding weight. Weighted Fair Queuing For example, if the weights are 3, 2, and 1, three packets are processed from the first queue, two from the second queue, and one from the third queue. If the system does not impose priority on the classes, all weights can be equal. 24.19 Weighted fair queuing Traffic Shaping The busty traffic in the network results in congestion Traffic shaping reduces congestion. Traffic shaping is about regulating the average rate of data transmission Traffic Shaping Traffic shaping controls the rate at which packets are sent. At connection set-up time, the sender and carrier negotiate a traffic pattern (shape) Two traffic shaping algorithms are: Leaky Bucket Token Bucket The Leaky Bucket Algorithm The Leaky Bucket Algorithm used to control rate in a network. It is implemented as a single-server queue with constant service time. If the bucket (buffer) overflows then packets are discarded. 23 Leaky Bucket Algorithm The leaky bucket enforces a constant output rate (average rate) regardless of the burstiness of the input. Does nothing when input is idle. The host injects one packet per clock tick onto the network. This results in a uniform flow of packets, smoothing out bursts and reducing congestion. When packets are the same size, the one packet per tick is okay. For variable length packets, it is better to allow a fixed number of bytes per tick. E.g. 1024 bytes per tick will allow one 1024-byte packet or two 512-byte packets or four 256- byte packets on 1 tick. Leaky bucket Leaky bucket implementation Note A leaky bucket algorithm shapes bursty traffic into fixed-rate traffic by averaging the data rate. It may drop the packets if the bucket is full. Token Bucket Algorithm In contrast to the LB, the Token Bucket Algorithm, allows the output rate to vary, depending on the size of the burst. In the TB algorithm, the bucket holds tokens. To transmit a packet, the must capture and destroy one token. Tokens are generated by a clock at the rate of one token every  t sec. Idle hosts can capture and save up tokens (up to the max. size of the buck in order to send larger bursts later. The Token Bucket Algorithm 5-34 (a) (b) Note The token bucket allows bursty traffic at a regulated maximum rate. Token bucket Leaky Bucket vs Token Bucket  With TB, a packet can only be transmitted if there are enough tokens to cover its length in bytes.  LB sends packets at an average rate. TB allows for large bursts to be sent faster by speeding up the output.  TB allows saving up tokens (permissions) to send large bursts. LB does not allow saving. Reference  books 1. Behrouz A Forouzan, Firouz Mosharraf, “Computer Networks: A top down Approach”,  2. James F Kurose and Keith W Ross, “Computer Networking: A Top - Down Approach”,  3. Kevin R. Fall, W. Richard Stevens, “TCP/IP Illustrated, Volume 1 -The Protocols”,  4. Larry Peterson, Bruce Davie, “Computer Networks, A systems Approach”, Morgan  5. Uyless Black, “Computer Networks: Protocols, Standards and Interface”, Prentice Hall  6. William Stallings, “Foundations of Modern Networking: SDN, NFV, QoE, IoT "

Use Quizgecko on...
Browser
Browser