Networks Slides PDF
Document Details
Uploaded by VigilantLithium5490
Behrouz A. Forouzan
Tags
Summary
This document is a set of slides on data communications and networking, focusing on the TCP/IP protocol suite. It covers topics like communication components, data flow, different network types (LANs, WANs), network topologies, and accessing the internet.
Full Transcript
Because learning changes everything. ® Chapter 01 Introduction Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reprodu...
Because learning changes everything. ® Chapter 01 Introduction Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 3: Outline 1.1 DATA COMMUNICATIONS 1.2 NETWORKS 1.3 NETWORK TYPES 1.4 PROTOCOL LAYERING 1.5 TCP/IP PROTOCOL SUITE 1.6 THE OSI MODEL © McGraw Hill, LLC 2 1.1 DATA COMMUNICATIONS Data communication is the exchange of data between two devices via some form of transmission media. It depends on four characteristics: 1. Delivery 2. Accuracy 3. Timeliness 4. Jitter © McGraw Hill, LLC 3 1.1.1 Components A data communications system has five components: 1. Message 2. Sender 3. Receiver 4. Transmission Medium 5. Protocol (Figure 1.1) © McGraw Hill, LLC 4 Figure 1.1 Five components of data communication Access the text alternative for slide images. © McGraw Hill, LLC 5 1.1.2 Message Information today comes in different forms such as text, numbers, images, audio, and video. © McGraw Hill, LLC 6 Text Text is represented as a bit pattern using Unicode. © McGraw Hill, LLC 7 Numbers Numbers are represented in binary. © McGraw Hill, LLC 8 Images Images are represented as bit patterns using either RGB or YCM. © McGraw Hill, LLC 9 Audio Audio refers to the recording or broadcasting of sound or music, represented as analog or digital signals. © McGraw Hill, LLC 10 Video Videos can be a continues images or a combination of images. © McGraw Hill, LLC 11 1.1.3 Data Flow Communication between two devices can be simplex, half-duplex, and duplex as shown in Figure 1.2. © McGraw Hill, LLC 12 Figure 1.2 Data flow (simplex, half-duplex, full-duplex) Access the text alternative for slide images. © McGraw Hill, LLC 13 Simplex In simplex mode the communication is in one direction. Only one of the two connected devices can send or receive. © McGraw Hill, LLC 14 Half-Duplex In half-duplex, each station can send or receive, but not at the same time. © McGraw Hill, LLC 15 Full-Duplex In full-duplex, both stations can send or receive at the same time. © McGraw Hill, LLC 16 1-2 NETWORKS A network is the interconnection of a set of devices capable of communication. In this definition, a device can be a host such as a large computer, desktop, laptop, workstation, cellular phone, or security system. A device in this definition can also be a connecting device such as a router a switch, a modem that changes the form of data, and so on. © McGraw Hill, LLC 17 1.2.1 Network Criteria A network must be able to meet a certain number of criteria. The most important of these are: performance, reliability, and security. © McGraw Hill, LLC 18 Performance Performance can be measured in many ways, including transit time and response time. Transit time is the amount of time required for a message to travel from one device to another. Response time is the elapsed time between an inquiry and a response. © McGraw Hill, LLC 19 Reliability In addition to accuracy of delivery, network reliability is measured by the frequency of failure, the time it takes a link to recover from a failure, and the network’s robustness in a catastrophe. © McGraw Hill, LLC 20 Security Network security issues include protecting data from unauthorized access, protecting data from damage and development, and implementing policies and procedures for recovery from breaches and data losses. © McGraw Hill, LLC 21 1.2.2 Physical Structures Before discussing networks, we need to define some network structures. © McGraw Hill, LLC 22 Types of Connection A network is two or more devices connected through links. A link is a communications pathway that transfers data from one device to another. There are two possible types of connections: point-to-point and multipoint (see Figure 1.3) © McGraw Hill, LLC 23 Figure 1.3 Types of connection Access the text alternative for slide images. © McGraw Hill, LLC 24 Physical Topology The term physical topology refers to the way in which a network is laid out physically. Two or more devices connect to a link; two or more links form a topology. The topology of a network is the geometric representation of the relationship of all the links and linking devices (usually called nodes) to one another. There are four basic topologies possible: mesh, star, bus, and ring. © McGraw Hill, LLC 25 Figure 1.4 A fully connected mesh topology n=5 10 links Access the text alternative for slide images. © McGraw Hill, LLC 26 Figure 1.5 A star topology © McGraw Hill, LLC 27 Figure 1.6 A bus topology Access the text alternative for slide images. © McGraw Hill, LLC 28 Figure 1.7 A ring topology Access the text alternative for slide images. © McGraw Hill, LLC 29 1-3 NETWORK TYPES A network can be of two types: LANs and WANs © McGraw Hill, LLC 30 1.3.1 Local Area Network (LAN) A local area network (LAN) is usually privately owned and connects some hosts in a single office, building, or campus. © McGraw Hill, LLC 31 Figure 1.8 An isolated LAN in the past and today Access the text alternative for slide images. © McGraw Hill, LLC 32 1.3.2 Wide Area Network (WAN) A wide area network (WAN) is also a connection of devices capable of communication. a WAN has a wider geographical span, spanning a town, a state, a country, or even the world. © McGraw Hill, LLC 33 Point-to-Point WAN A point-to-point WAN is a network that connects two communicating devices through a transmission media (cable or air). Figure 1.9 shows an example of a point-to-point WAN. © McGraw Hill, LLC 34 Figure 1.9 A point-to-point WAN Access the text alternative for slide images. © McGraw Hill, LLC 35 Switched WAN A switched WAN is a network with more than two ends. A switched WAN is used in the backbone of global communication today. Figure 1.10 shows an example of a switched WAN. © McGraw Hill, LLC 36 Figure 1.10 A switched WAN Access the text alternative for slide images. © McGraw Hill, LLC 37 Internetwork Today, it is very rare to see a LAN or a WAN in isolation; they are connected to one another. When two or more networks are connected, they make an internetwork, or internet. © McGraw Hill, LLC 38 Figure 1.11 An internetwork made of two LANs and one WAN Access the text alternative for slide images. © McGraw Hill, LLC 39 Figure 1.12 A heterogeneous network made of WANs and LANs Access the text alternative for slide images. © McGraw Hill, LLC 40 1.3.3 The Internet An internet (note the lowercase i) is two or more networks that can communicate with each other. The most notable internet is called the Internet (uppercase I) and is composed of millions of interconnected networks. Figure 1.13 shows a conceptual (not geographical) view of the Internet. © McGraw Hill, LLC 41 Figure 1.13 The Internet today Access the text alternative for slide images. © McGraw Hill, LLC 42 1.3.4 Accessing the Internet The Internet today is an internetwork that allows any user to become part of it. The user, however, needs to be physically connected to an ISP. The physical connection is normally done through a point-to-point WAN. © McGraw Hill, LLC 43 Using Telephone Networks Today most residences and small businesses have telephone service, which means they are connected to a telephone network. Since most telephone networks have already connected themselves to the Internet, one option for residences and small businesses to connect to the Internet is to change the voice line between the residence or business and the telephone center to a point-to-point WAN. © McGraw Hill, LLC 44 Using Cable Networks More and more residents over the last two decades have begun using cable TV services instead of antennas to receive TV broadcasting. The cable companies have been upgrading their cable networks and connecting to the Internet. A residence or a small business can be connected to the Internet by using this service. © McGraw Hill, LLC 45 Using Wireless Networks Wireless connectivity has recently become increasingly popular. A household or a small business can use a combination of wireless and wired connections to access the Internet. With the growing wireless WAN access, a household or a small business can be connected to the Internet through a wireless WAN. © McGraw Hill, LLC 46 Direct Connection to the Internet A large organization or a large corporation can itself become a local ISP and be connected to the Internet. This can be done if the organization or the corporation leases a high-speed WAN from a carrier provider and connects itself to a regional ISP. For example, a large university with several campuses can create an internetwork and then connect the internetwork to the Internet. © McGraw Hill, LLC 47 1-4 PROTOCOL LAYERING We defined the term protocol before. In data communication and networking, a protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate directly. © McGraw Hill, LLC 48 1.4.1 Scenarios Let us develop two simple scenarios to better understand the need for protocol layering. © McGraw Hill, LLC 49 First Scenario A large organization or a large corporation can itself become a local ISP and be connected to the Internet. This can be done if the organization or the corporation leases a high-speed WAN from a carrier provider and connects itself to a regional ISP. © McGraw Hill, LLC 50 Figure 1.14 A single-layer protocol Access the text alternative for slide images. © McGraw Hill, LLC 51 Second Scenario In the second scenario, we assume that Ann is offered a higher- level position in her company, but needs to move to another branch located in a city very far from Maria. They decide to continue their conversion using regular mail through the post office. However, they do not want their ideas to be revealed by other people if the letters are intercepted. They use an encryption/decryption technique. © McGraw Hill, LLC 52 Figure 1.15 A three-layer protocol Access the text alternative for slide images. © McGraw Hill, LLC 53 1.4.2 Principles of Protocol Layering Let us discuss two principles of protocol layering. © McGraw Hill, LLC 54 First Principle The first principle dictates that we need to make each layer to perform two opposite task in each direction. © McGraw Hill, LLC 55 Second Principle The second principle dictates that two objects under each layer should be identical. © McGraw Hill, LLC 56 1.4.3 Logical Connections After following the above two principles, we can think about logical connection between each layer as shown in Figure 1.16. © McGraw Hill, LLC 57 Figure 1.16 Logical connection between peer layers Access the text alternative for slide images. © McGraw Hill, LLC 58 1-5 TCP/IP PROTOCOL SUITE Now we can introduce the TCP/IP (Transmission Control Protocol / Internet Protocol). This is the protocol suite used in the Internet today. © McGraw Hill, LLC 59 Figure 1.17 Layers in the TCP/IP protocol suite Access the text alternative for slide images. © McGraw Hill, LLC 60 1.5.1 Layered Architecture To show how the layers in the TCP/IP protocol suite are involved in communication between two hosts, we assume that we want to use the suite in a small internet made up of three LANs (links), each with a link-layer switch. We also assume that the links are connected by one router, as shown in Figure 1.18. © McGraw Hill, LLC 61 Figure 1.18 Communication through an internet Access the text alternative for slide images. © McGraw Hill, LLC 62 1.5.2 Brief Description of Layers After the above introduction, we briefly discuss the functions and duties of layers in the TCP/IP protocol suite. Each layer is discussed in detail in the next five parts of the book. To better understand the duties of each layer, we need to think about the logical connections between layers. Figure 1.19 shows logical connections in our simple internet. © McGraw Hill, LLC 63 Figure 1.19 Logical connections between layers in TCP/IP Access the text alternative for slide images. © McGraw Hill, LLC 64 Figure 1.20 Identical objects in the TCP/IP protocol suite Access the text alternative for slide images. © McGraw Hill, LLC 65 1.5.3 Description of Each Layer After understanding the concept of logical communication, we are ready to briefly discuss the duty of each layer. Our discussion in this chapter will be very brief, but we come back to the duty of each layer in next five parts of the book. © McGraw Hill, LLC 66 Physical Layer We can say that the physical layer is responsible for carrying individual bits in a frame across the link. The physical layer is the lowest level in the TCP/IP protocol suite, the communication between two devices at the physical layer is still a logical communication because there is another, hidden layer, the transmission media, under the physical layer. We discuss Physical Layer in Chapter 2. © McGraw Hill, LLC 67 Data Link Layer We have seen that an internet is made up of several links (LANs and WANs) connected by routers. When the next link to travel is determined by the router, the data-link layer is responsible for taking the datagram and moving it across the link. We discuss Data-Link Layer in Chapter 3. © McGraw Hill, LLC 68 Network Layer The network layer is responsible for creating a connection between the source computer and the destination computer. The communication at the network layer is host-to-host. However, since there can be several routers from the source to the destination, the routers in the path are responsible for choosing the best route for each packet. We discuss Network Layer in Chapter 4. © McGraw Hill, LLC 69 Transport Layer The logical connection at the transport layer is also end-to-end. The transport layer at the source host gets the message from the application layer, encapsulates it in a transport-layer packet. In other words, the transport layer is responsible for giving services to the application layer: to get a message from an application program running on the source host and deliver it to the corresponding application program on the destination host. transmits user datagrams without first creating a logical connection. We discuss Transport Layer in Chapter 9. © McGraw Hill, LLC 70 Application Layer The logical connection between the two application layers is end- to-end. The two application layers exchange messages between each other as though there were a bridge between the two layers. However, we should know that the communication is done through all the layers. Communication at the application layer is between two processes (two programs running at this layer). To communicate, a process sends a request to the other process and receives a response. Process-to-process communication is the duty of the application layer. We discuss Application Layer in Chapter 10. © McGraw Hill, LLC 71 1-6 OSI MODEL Although, when speaking of the Internet, everyone talks about the TCP/IP protocol suite, this suite is not the only suite of protocols defined. Established in 1947, the International Organization for Standardization (ISO) is a multinational body dedicated to worldwide agreement on international standards. Almost three- fourths of the countries in the world are represented in the ISO. 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. © McGraw Hill, LLC 72 Figure 1.21 The OSI model Access the text alternative for slide images. © McGraw Hill, LLC 73 1.6.1 OSI versus TCP/IP When we compare the two models, we find that two layers, session and presentation, are missing from the TCP/IP protocol suite. These two layers were not added to the TCP/IP protocol suite after the publication of the OSI model. The application layer in the suite is usually considered to be the combination of three layers in the OSI model, as shown in Figure 1.22. © McGraw Hill, LLC 74 Figure 1.22 TCP/IP and OSI model Access the text alternative for slide images. © McGraw Hill, LLC 75 1.6.2 Lack of OSI Model’s Success The OSI model appeared after the TCP/IP protocol suite. Most experts were at first excited and thought that the TCP/IP protocol would be fully replaced by the OSI model. This did not happen for several reasons, but we describe only three, which are agreed upon by all experts in the field. © McGraw Hill, LLC 76 Because learning changes everything. ® www.mheducation.com © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Because learning changes everything. ® Chapter 02 Physical Layer Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 2: Outline 2.1 SIGNALS 2.2 SIGNAL IMPAIRMENT 2.3 DIGITAL TRANSMISSION 2.4 ANALOG TRANSMISSION 2.5 MULTIPLEXING 2.6 TRANSMISSION MEDIA © McGraw Hill, LLC 2 Figure 2.1 Communication at the physical layer Access the text alternative for slide images. © McGraw Hill, LLC 3 2-1 SIGNALS What is exchanged between Alice and Bob is data, but what goes through the network at the physical layer is signals. © McGraw Hill, LLC 4 Figure 2.2 Comparison of analog and digital signals Access the text alternative for slide images. © McGraw Hill, LLC 5 2.1.1 Analog Signal An analog signal can take one of the two forms: periodic or aperiodic. In data communication, we normally use periodic signals. A simple periodic signal, a sine wave, cannot be decomposed into simpler signals. © McGraw Hill, LLC 6 Figure 2.3 A sine wave Access the text alternative for slide images. © McGraw Hill, LLC 7 Peak Amplitude The peak amplitude of a signal is the absolute value of its highest intensity. © McGraw Hill, LLC 8 Period and Frequency The period (T) refers to the amount of time, in seconds, that a signal needs to complete one cycle. The frequency (f), measured in Hertz (Hz), refers to the number of periods in one second. Note that period and frequency are just one characteristic defined in two ways. Period and frequency are inverse of each other, in other words (f = 1/ T). © McGraw Hill, LLC 9 Phase The term phase describes the position of the waveform relative to time 0. If we think of the wave as something that can be shifted backward or forward along the time axis, phase describes the amount of that shift. © McGraw Hill, LLC 10 Wavelength The wavelength is the distance a simple signal can travel in one period. Wavelength binds the period or the frequency of a simple sine wave to the propagation speed in the medium. If we represent wavelength by l, propagation speed by c, and frequency by f, and period by T, we get c f c T © McGraw Hill, LLC 11 Time and Frequency Domain A sine waves is comprehensively defined by its amplitude, frequency, and phase. This can be done in both time and frequency domain. © McGraw Hill, LLC 12 Figure 2.4 The time-domain and frequency-domain plots of a sine wave Access the text alternative for slide images. © McGraw Hill, LLC 13 Composite Signal So far, we have focused on simple sine waves. A composite signal is made of many simple sine waves. The range of frequencies contained in a composite signal is its bandwidth. The bandwidth of a signal is the difference between the lowest and highest frequencies in the signal. © McGraw Hill, LLC 14 Bandwidth 1 The range of frequencies contained in a composite signal is its bandwidth. The bandwidth of a signal is the difference between the lowest and highest frequencies in the signal. The bandwidth of a composite signal is the difference between the highest and the lowest frequencies contained in that signal. © McGraw Hill, LLC 15 2.1.2 Digital Signal Information can also be represented by a digital signal. For example, a value 1 can be encoded as a positive voltage and a value 0 as zero voltage. A digital signal can have more than two levels. In this case, we can send more than 1 bit for each level. Figure 2.5 shows two signals, one with two levels and the other with four. © McGraw Hill, LLC 16 Figure 2.5 Two digital signals, one with two and one with four bit-levels Access the text alternative for slide images. © McGraw Hill, LLC 17 Bit Rate Most digital signal are nonperiodic, and thus period and frequency are not appropriate characteristics. Another term-bit rate (instead of frequency) is used. The bit rate is the number of bits sent in 1 second. © McGraw Hill, LLC 18 Example 2.3 Assume we have downloaded text documentation at the rate of 100 pages per second. A page is an average of 24 lines with 80 characters per line. If we assume that one character requires 8 bits, the bit rate is: 100 * 24 * 80 * 8 = 1,536,000 bps = 1.536 Mbps © McGraw Hill, LLC 19 Bit Length We discuss the concept of a wavelength for an analog signal. We can define something similar for a digital signal: the bit length. The bit length is the distance one bit occupy on the transmission medium. bit length = 1 / bit rate © McGraw Hill, LLC 20 Example 2.4 The length of the bit in Example 2.3 is 1 / 1,536,000 = 0.651 microseconds © McGraw Hill, LLC 21 Transmission of Digital Signal A digital signal is a composite analog signal with frequency between zero and infinity. We can have two types of transmission: baseband and broadband. The first means sending the digital signal without changing it to analog signal. The second means changing the digital signal to analog signal and send the analog signal. © McGraw Hill, LLC 22 2-2 SIGNAL IMPAIRMENT Signals travel through transmission media, which are not perfect. The imperfection causes signal impairment. This means that the signal at the beginning of the medium is not the same as the signal at the end of the medium. What is sent is not what is received. Three causes of impairment are attenuation, distortion, and noise. © McGraw Hill, LLC 23 2.2.1 Attenuation and Amplification Attenuation means a loss of energy. To compensate for this loss we need amplification. When a signal, simple or composite, travels through a medium, it loses some of its energy in overcoming the resistance of the medium. To compensate for this loss, we need amplification. Figure 2.6 shows the effect of attenuation and amplification. © McGraw Hill, LLC 24 Figure 2.6 Attenuation and amplification Access the text alternative for slide images. © McGraw Hill, LLC 25 Example 2.5 Suppose a signal travels through a transmission medium and its power is reduced to one half. This means that P2 = 0.5 P1. In this case, the attenuation (loss of power) can be calculated as 10 log10 P2 P1 10 log10 (0.5P1 ) P1 10 log10 0.5 10 ( 0.3) 3dB. A loss of 3 dB (−3 dB) is equivalent to losing one-half the power. © McGraw Hill, LLC 26 2.2.2 Distortion Distortion means that the signal changes its form or shape. Distortion can occur in a composite signal made up of different frequencies. © McGraw Hill, LLC 27 Noise Noise is another cause of impairment. Several type of noise may occur during the signal transmission. Signal-to-Noise Ratio (SNR) is defined as SNR = (average signal power) / (average noise power) © McGraw Hill, LLC 28 2.2.3 Data Rate Limits A very important consideration in data communications is how fast we can send data, in bits per second, over a channel. Data rate depends on three factors: 1. The bandwidth available 2. The level of the signals we use 3. The quality of the channel (the level of noise) Two theoretical formulas were developed to calculate the data rate: one by Nyquist for a noiseless channel, another by Shannon for a noisy channel. © McGraw Hill, LLC 29 Noiseless Channel: Nyquist Bit Rate For a noiseless channel, the Nyquist bit rate formula defines the theoretical maximum bit rate. Bit Rate 2. B. log 2 L © McGraw Hill, LLC 30 Example 2.6 We need to send 265 kbps over a noiseless (ideal) channel with a bandwidth of 20 kHz. How many signal levels do we need? We can use the Nyquist formula as shown: 265,000 2 20,000 log 2L log 2 L 6.625 L 26.625 98.7 levels Since this result is not a power of 2, we need to either increase the number of levels or reduce the bit rate. If we have 128 levels, the bit rate is 280 kbps. If we have 64 levels, the bit rate is 240 kbps. © McGraw Hill, LLC 31 Noisy Channel: Shannon Capacity For a noisy channel, we have C B. log 2 (1 SNR) © McGraw Hill, LLC 32 Example 2.7 Consider an extremely noisy channel in which the value of the signal-to-noise ratio is almost zero. In other words, the noise is so strong that the signal is faint. For this channel the capacity C is calculated as shown below. C B log 2 (1 SNR) B log 2 (1 0) B log 2 1 B 0 0 This means that the capacity of this channel is zero regardless of the bandwidth. In other words, the data is so corrupted in this channel that it is useless when received. © McGraw Hill, LLC 33 Example 2.8 We can calculate the theoretical highest bit rate of a regular telephone line. A telephone line normally has a bandwidth of 3000 Hz (300 to 3300 Hz) assigned for data communications. The signal-to-noise ratio is usually 3162. For this channel the capacity is calculated as shown below. C B log 2 (1 SNR) 3000 log 2 (1 3162) 34,881 bps This means that the highest bit rate for a telephone line is 34.881 kbps. If we want to send data faster than this, we can either increase the bandwidth of the line or improve the signal-to noise ratio. © McGraw Hill, LLC 34 Using Both Limits In practice, we need to use both limits. C B. log 2 (1 SNR) © McGraw Hill, LLC 35 Example 2.9 We have a channel with a 1-MHz bandwidth. The SNR for this channel is 63. What are the appropriate bit rate and signal level? Solution First, we use the Shannon formula to find the upper limit. C B log 2 (1 SNR) 106 log 2 (1 63) 106 log 2 64 6 Mbps The Shannon formula gives us 6 Mbps, the upper limit. For better performance we choose something lower, 4 Mbps, for example. Then we use the Nyquist formula to find the number of signal levels. 4 Mbps 2 1 MHz log 2L log 2L 2 L 4 © McGraw Hill, LLC 36 2.2.4 Performance Up to now, we have discussed the tools of transmitting data (signals) over a network and how the data behave. One important issue in networking is the performance of the network—how good is it? © McGraw Hill, LLC 37 Bandwidth 2 One characteristic that measure network performance is bandwidth. © McGraw Hill, LLC 38 Example 2.10 The bandwidth of a subscriber line is 4 kHz for voice or data. The bit rate of this line for data transmission can be up to 56 kbps, using a sophisticated modem to change the digital signal to analog. If the telephone company improves the quality of the line and increases the bandwidth to 8 kHz, we can send 112 kbps. © McGraw Hill, LLC 39 Throughput The throughput is the measure of how fast we can actually send data through a network. © McGraw Hill, LLC 40 Latency (Delay) The latency or delay defines how long it takes for an entire message to completely arrive at the destination from the time the first bit is sent out from the source. We say that normally have four types of delay: propagation delay, transmission delay, queuing delay, and processing delay. The latency or total delay is Latency = propagation delay + transmission delay + queuing delay + processing delay © McGraw Hill, LLC 41 Bandwidth-Delay Product Bandwidth and delay are two performance metric of a link. However, what is very important in data communications is the product of the two, the bandwidth-delay product. © McGraw Hill, LLC 42 Example 2.12 We can think about the link between two points as a pipe. We can say that the volume of the pipe defines the bandwidth-delay product © McGraw Hill, LLC 43 Figure 2.7 Bandwidth-delay product Access the text alternative for slide images. © McGraw Hill, LLC 44 Jitter Another performance issue that is related to delay is jitter. We can roughly say that jitter is a problem if different packets of data encounter different delays and the application using the data at the receiver site is time-sensitive (audio and video data, for example). If the delay for the first packet is 20 ms, for the second is 45 ms, and for the third is 40 ms, then the real-time application that uses the packets endures jitter. © McGraw Hill, LLC 45 2-5 MULTIPLEXING In real life, we have links with limited bandwidths. Sometimes we need to combine several low-bandwidth channels to make use of one channel with a larger bandwidth. Sometimes we need to expand the bandwidth of a channel to achieve goals such as privacy and anti-jamming. © McGraw Hill, LLC 46 Figure 2.17 Dividing a link into channels Access the text alternative for slide images. © McGraw Hill, LLC 47 2.5.1 Frequency-Division Multiplexing Frequency-division multiplexing is an analog technique that can be applied when the bandwidth of a link is greater than the combined bandwidth of the signals to be transmitted together. © McGraw Hill, LLC 48 Figure 2.18 Frequency-division multiplexing Access the text alternative for slide images. © McGraw Hill, LLC 49 2.5.2 Time-Division Multiplexing Time-division multiplexing (TDM) is a digital technique that allows several connections to share the high bandwidth of a link. © McGraw Hill, LLC 50 Figure 2.19 Time division multiplexing (TDM) Access the text alternative for slide images. © McGraw Hill, LLC 51 2-6 TRANSMISSION MEDIA We discussed many issues related to the physical layer in this chapter. In this section, we discuss transmission media. Transmission media are located below the physical layer and are directly controlled by the physical layer. © McGraw Hill, LLC 52 Figure 2.20 Transmission media and physical layer Access the text alternative for slide images. © McGraw Hill, LLC 53 2.6.1 Guided Media Guided media, which are those that provide a conduit from one device to another, include twisted-pair cable, coaxial cable, and fiber-optic cable. © McGraw Hill, LLC 54 Twisted-Pair Cable A twisted-pair cable consists of two conductors, each with its own plastic insulation, twisted together as shown in Figure 2.21. © McGraw Hill, LLC 55 Figure 2.21 Twisted-pair cable Access the text alternative for slide images. © McGraw Hill, LLC 56 Coaxial Cable Coaxial cable carries signals of higher frequency ranges more than those in twisted-pair cable. Coaxial cable has a central core enclosed in an insulating sheath as shown in Figure 2.22. © McGraw Hill, LLC 57 Figure 2.22 Coaxial cable Access the text alternative for slide images. © McGraw Hill, LLC 58 Fiber-Optic Cable A fiber-optic cable is made of glass or plastic and transmits signal in the form of light. If a light traveling in a substance enters another substance, the ray changes direction as shown in Figure 2.23. Figure 2.24 shows how a beam of light travels through an optical fiber. © McGraw Hill, LLC 59 Figure 2.23 Bending of light ray Access the text alternative for slide images. © McGraw Hill, LLC 60 Figure 2.24 Optical fiber Access the text alternative for slide images. © McGraw Hill, LLC 61 2.6.2 Unguided Media: Wireless Unguided media transport electromagnetic waves without using a physical conductor. This type of communication is often referred to as wireless communication. Signals are normally broadcast through free space and thus are available to anyone who has a device capable of receiving them. Figure 2.25 shows part of the electromagnetic spectrum from 3KHz to 800 THz used for wireless communication. © McGraw Hill, LLC 62 Figure 2.25 Electromagnetic spectrum for wireless communication Access the text alternative for slide images. © McGraw Hill, LLC 63 Radio Waves Although there is no clear-cut demarcation between radio waves and microwaves, electromagnetic waves ranging in frequencies between 3 kHz and 1 GHz are normally called radio waves; waves ranging in frequencies between 1 and 300 GHz are called microwaves. However, the behavior of the waves, rather than the frequencies, is a better criterion for classification. Radio waves, for the most part, are omnidirectional. © McGraw Hill, LLC 64 Microwaves Electromagnetic waves having frequencies between 1 and 300 GHz are called microwaves. Microwaves are unidirectional. When an antenna transmits microwaves, they can be narrowly focused. This means that the sending and receiving antennas need to be aligned. The unidirectional property has an obvious advantage. A pair of antennas can be aligned without interfering with another pair of aligned antennas. © McGraw Hill, LLC 65 Infrared Infrared waves, with frequencies from 300 GHz to 400 THz (wavelengths from 1 mm to 770 nm), can be used for short-range communication. Infrared waves, having high frequencies, cannot penetrate walls. This advantageous characteristic prevents interference between one system and another; a short-range communication system in one room cannot be affected by another system in the next room. © McGraw Hill, LLC 66 Because learning changes everything. ® www.mheducation.com © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Because learning changes everything. ® Chapter 03 Data-Link Layer Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 3: Outline 3.1 INTRODUCTION 3.2 DATA LINK CONTROL 3.3 MEDIA ACCESS CONTROL 3.4 LINK-LAYER ADDRESSING © McGraw Hill, LLC 2 3-1 INTRODUCTION The Internet is a combination of networks glued together by connecting devices (routers or switches). If a packet is to travel from a host to another host, it needs to pass through these networks. Figure 3.1 shows the same scenario we discussed in Chapter 2, but we are now interested in communication at the data- link layer. © McGraw Hill, LLC 3 Figure 3.1 Communication at the data-link layer Access the text alternative for slide images. © McGraw Hill, LLC 4 Figure 3.2 Nodes and Links Access the text alternative for slide images. © McGraw Hill, LLC 5 3.1.2 Two Types of Links Although two nodes are physically connected by a transmission medium such as cable or air, we need to remember that the data- link layer controls how the medium is used. We can have a data- link layer that uses the whole capacity of the medium; we can also have a data-link layer that uses only part of the capacity of the link. In other words, we can have a point-to-point link or a broadcast link. © McGraw Hill, LLC 6 3.1.3 Two Sublayers To better understand the functionality of and the services provided by the link layer, we can divide the data-link layer into two sublayers: data link control (DLC) and media access control (MAC). This is not unusual because, as we will see in later chapters, LAN protocols actually use the same strategy. © McGraw Hill, LLC 7 Figure 3.3 Dividing the data-link layer into two sublayers Access the text alternative for slide images. © McGraw Hill, LLC 8 3-2 Data Link Control (DLC) The data link control (DLC) deals with procedures for communication between two adjacent nodes no matter whether the link is dedicated or broadcast. Data link control functions include framing and flow and error control. © McGraw Hill, LLC 9 3.2.1 Framing The data-link layer needs to pack bits into frames, so that each frame is distinguishable from another. Our postal system practices a type of framing. The simple act of inserting a letter into an envelope separates one piece of information from another; the envelope serves as the delimiter. © McGraw Hill, LLC 10 Frame Size Frames can be fixed or variable size. In the first, there is no need to define the boundary of the frame; in the second, we need to do so. © McGraw Hill, LLC 11 Character-Oriented Framing In this type of framing, data to be carried are 8-bit characters (Figure 3.4). In this type of framing, we need to do byte-stuffing to prevent a special character to be interpreted as beginning or end of the message. © McGraw Hill, LLC 12 Figure 3.4 A frame in a character-oriented protocol Access the text alternative for slide images. © McGraw Hill, LLC 13 Figure 3.5 Byte stuffing and unstuffing Access the text alternative for slide images. © McGraw Hill, LLC 14 Bit-Oriented Framing In bit-oriented framing data is a sequence of bits. To separate one frame from another, we normally use an 8-bit flag (01111110). To prevent that a byte to be interpreted as a flag, we do bit stuffing (Figure 3.7). © McGraw Hill, LLC 15 Figure 3.6 A frame in a bit-oriented protocol Access the text alternative for slide images. © McGraw Hill, LLC 16 Figure 3.7 Bit stuffing and unstuffing Access the text alternative for slide images. © McGraw Hill, LLC 17 3.2.2 Error Control Error control is both error detection and error correction. It allows the receiver to inform the sender of any frames lost or damage in transition and coordinates the retransmission of frames by the sender. © McGraw Hill, LLC 18 Types of Error Whenever bits flow from one point to another, they are subject to unpredictable changes because of interference. This interference can change the shape of the signal. The term single-bit error means that only 1 bit of a given data unit (such as a byte, character, or packet) is changed from 1 to 0 or from 0 to 1. The term burst error means that 2 or more bits in the data unit have changed from 1 to 0 or from 0 to 1. Figure 3.8 shows the effect of a single-bit and a burst error on a data unit. © McGraw Hill, LLC 19 Figure 3.8 Single-bit and burst error Access the text alternative for slide images. © McGraw Hill, LLC 20 Block Coding In block coding, we divide our message into blocks, each of k bits, called data-words. We add r redundant bits to each block to make the length n = k + r. The resulting n-bit blocks are called codewords. How the extra r bits are chosen or calculated is something we will discuss later. © McGraw Hill, LLC 21 Figure 3.9 Process of error detection in block coding Access the text alternative for slide images. © McGraw Hill, LLC 22 Example 3.1 (1) Let us assume that k = 2 and n = 3. Table 3.1 shows the list of datawords and codewords. Later, we will see how to derive a codeword from a dataword. Table 3.1 A code for error detection in Example 3.1 Datawords Codewords Datawords Codewords 00 000 10 101 01 011 11 110 © McGraw Hill, LLC 23 Example 3.1 (2) 1. The receiver receives 011. It is a valid codeword. The receiver extracts the dataword 01 from it. 2. The codeword is corrupted during transmission, and 111 is received (the leftmost bit is corrupted). This is not a valid codeword and is discarded. 3. The codeword is corrupted during transmission, and 000 is received (the right two bits are corrupted). This is a valid codeword. The receiver incorrectly extracts the dataword 00. Two corrupted bits have made the error undetectable. © McGraw Hill, LLC 24 Hamming Distance One of the central concepts in coding for error control is the idea of the Hamming distance. The Hamming distance between two words (of the same size) is the number of differences between the corresponding bits. The Hamming distance can easily be found if we apply the XOR operation (Å) on the two words and count the number of 1s in the result. Note that the Hamming distance is a value greater than or equal to zero. © McGraw Hill, LLC 25 Example 3.2 Let us find the Hamming distance between two pairs of words. 1. The Hamming distance d (000, 011) is 2 because (000 XOR 011) is 011 (two 1s). 2. The Hamming distance d (10101, 11110) is 3 because (10101 XOR 11110) is 01011 (three 1s). © McGraw Hill, LLC 26 3.2.3 Two DLC Protocols After finishing all issues related to DLC sublayer, we discuss two DCL protocols that actually implement these concepts: HDLC and Point-to-Point. Here, we will focus on the HDLC protocol. © McGraw Hill, LLC 27 HDLC High-level Data Link Control (HDLC) is a bit-oriented protocol for communication over point-to-point and multipoint links. It implements the stop-and-wait protocol. © McGraw Hill, LLC 28 11.29 Taxonomy of Protocols for Data Link Layer Flow Control © McGraw Hill, LLC 11.30 Design of Stop-and-Wait Protocol © McGraw Hill, LLC Figure 3.15 Normal response mode Access the text alternative for slide images. © McGraw Hill, LLC 31 Figure 3.16 Asynchronous balanced mode Access the text alternative for slide images. © McGraw Hill, LLC 32 3-3 Media Access Protocols We said that data link control is divided into two groups: data link control and media access control. © McGraw Hill, LLC 33 3.3.1 Random Access In random access no station is superior to another station and none is assigned the control over another. © McGraw Hill, LLC 34 ALOHA ALOHA, the earliest random access method, was developed at the University of Hawaii in early 1970. It was designed for a radio (wireless) LAN, but it can be used on any shared medium. It is obvious that there are potential collisions in this arrangement. The medium is shared between the stations. When a station sends data, another station may attempt to do so at the same time. The data from the two stations collide and become garbled. © McGraw Hill, LLC 35 Figure 3.24 Frames in a pure ALOHA network Access the text alternative for slide images. © McGraw Hill, LLC 36 Figure 3.25 Procedure for pure ALOHA protocol transmission time = frame_length/bit_rate Propagation delay = distance/medium_speed Access the text alternative for slide images. © McGraw Hill, LLC 37 Example 3.8 The stations on a wireless ALOHA network are a maximum of 600 km apart. If we assume that signals propagate at 3 × 108 m/s, we find Tp = (600 × 103)/(3 × 108) = 2 ms. For K = 2, the range of R is {0, 1, 2, 3}. This means that TB can be 0, 2, 4, or 6 ms, based on the outcome of the random variable R. © McGraw Hill, LLC 38 Figure 3.26 Vulnerable time for pure ALOHA protocol Access the text alternative for slide images. © McGraw Hill, LLC 39 Example 3.9 A pure ALOHA network transmits 200-bit frames on a shared channel of 200 kbps. What is the requirement to make this frame collision-free? Solution Average frame transmission time Tfr is 200 bits/200 kbps or 1 ms. The vulnerable time is 2 × 1 ms = 2 ms. This means no station should send later than 1 ms before this station starts transmission and no station should start sending during the period (1 ms) that this station is sending. © McGraw Hill, LLC 40 Figure 3.27 Frames in a slotted ALOHA network Access the text alternative for slide images. © McGraw Hill, LLC 41 Figure 3.28 Vulnerable time for slotted ALOHA protocol Access the text alternative for slide images. © McGraw Hill, LLC 42 Carrier Sense Multiple Access (CSMA) To minimize the chance of collision and, therefore, increase the performance, the CSMA method was developed. The chance of collision can be reduced if a station senses the medium before trying to use it. Carrier sense multiple access (CSMA) requires that each station first listen to the medium (or check the state of the medium) before sending. In other words, CSMA is based on the principle “sense before transmit” or “listen before talk.” © McGraw Hill, LLC 43 Figure 3.29 Space and time model of a collision in CSMA Access the text alternative for slide images. © McGraw Hill, LLC 44 Figure 3.30 Vulnerable time in CSMA Access the text alternative for slide images. © McGraw Hill, LLC 45 Carrier Sense Multiple Access with Collision Detection (CSMA/CD) The CSMA method does not specify the procedure following a collision. Carrier sense multiple access with collision detection (CSMA/CD) augments the algorithm to handle the collision. In this method, a station monitors the medium after it sends a frame to see if the transmission was successful. If so, the station is finished. If, however, there is a collision, the frame is sent again. © McGraw Hill, LLC 46 Figure 3.33 Collision of the first bits in CSMA/CD Access the text alternative for slide images. © McGraw Hill, LLC 47 Figure 3.34 Collision and abortion in CSMA/CD Access the text alternative for slide images. © McGraw Hill, LLC 48 Example 3.12 A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time (including the delays in the devices and ignoring the time needed to send a jamming signal, as we see later) is 25.6 μs, what is the minimum size of the frame? Solution The minimum frame transmission time is Tfr = 2 × Tp = 51.2 μs. This means, in the worst case, a station needs to transmit for a period of 51.2 μs to detect the collision. The minimum size of the frame is 10 Mbps × 51.2 μs = 512 bits or 64 bytes. This is actually the minimum size of the frame for Standard Ethernet, as we will see later in the chapter. © McGraw Hill, LLC 49 Figure 3.35 Flow diagram for the CSMA/CD Access the text alternative for slide images. © McGraw Hill, LLC 50 Figure 3.36 Energy level during transmission, idleness, or collision Access the text alternative for slide images. © McGraw Hill, LLC 51 CSMA/CA Carrier sense multiple access with collision avoidance (CSMA/CA) was invented for wireless networks. © McGraw Hill, LLC 52 3.3.2 Controlled Access In controlled access, the stations consult one another to find which station has the right to send. A station cannot send unless it has been authorized by other stations. We discuss three controlled-access methods. © McGraw Hill, LLC 53 Reservation In the reservation method, a station needs to make a reservation before sending data. Time is divided into intervals. In each interval, a reservation frame precedes the data frames sent in that interval. © McGraw Hill, LLC 54 Figure 3.37 Reservation access method Access the text alternative for slide images. © McGraw Hill, LLC 55 Polling Polling works with topologies in which one device is designated as a primary station and the other devices are secondary stations. All data exchanges must be made through the primary device even when the ultimate destination is a secondary device. The primary device controls the link; the secondary devices follow its instructions. It is up to the primary device to determine which device is allowed to use the channel at a given time. © McGraw Hill, LLC 56 Figure 3.38 Select and poll functions in polling-access method Access the text alternative for slide images. © McGraw Hill, LLC 57 Token Passing In the token-passing method, the stations in a network are organized in a logical ring. In other words, for each station, there is a predecessor and a successor. The predecessor is the station that is logically before the station in the ring; the successor is the station that is after the station in the ring. © McGraw Hill, LLC 58 Figure 3.39 Logical ring and physical topology in token-passing access method Access the text alternative for slide images. © McGraw Hill, LLC 59 3.3.3 Channelization Channelization (or channel partition, as it is sometimes called) is a multiple-access method in which the available bandwidth of a link is shared in time, frequency, or through code, among different stations. Since this method is normally used in wireless LAN, we postpone this discussion until Chapter 4. © McGraw Hill, LLC 60 3-4 LINK-LAYER ADDRESSING In Chapter 7, we will discuss IP addresses as the identifiers at the network layer. However, in an internetwork such as the Internet we cannot make a datagram reach its destination using only IP addresses. The source and destination IP addresses define the two ends but cannot define which links the packet should pass through. © McGraw Hill, LLC 61 Figure 3.40 IP addresses and link-layer addresses in a small internet Access the text alternative for slide images. © McGraw Hill, LLC 62 3.4.1 Three Types of Addresses Some link-layer protocols define three types of addresses: unicast, multicast, and broadcast. © McGraw Hill, LLC 63 Unicast Address Each host or interface is assigned a unicast address. © McGraw Hill, LLC 64 Example 3.13 As we discuss later in the chapter, the link-layer addresses in the most common LAN, Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons; for example, the following is a link-layer address of a computer. A2:34:45:11:92:F1 © McGraw Hill, LLC 65 Multicast Address Some link-layer protocols define multicast addresses. A multicast address means one-to-many communication. © McGraw Hill, LLC 66 Example 3.14 As we discuss later in the chapter, the link-layer addresses in the most common LAN, Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons; for example, the following is a link-layer address of a computer. A2:34:45:11:92:F1 © McGraw Hill, LLC 67 Broadcast Address A broadcast address means one-to-all address. © McGraw Hill, LLC 68 Example 3.15 A broadcast address is made of 48 bits of 1’s. FF:FF:FF:FF:FF:FF © McGraw Hill, LLC 69 3.4.2 Address Resolution Protocol (ARP) Any time a node has a packet to send to another node, it has the IP address (network-layer address of the next node); it needs the link- layer address of the next node. This is done by a protocol called ARP located in the network layer. We discuss it when we discuss the network layer. © McGraw Hill, LLC 70 Because learning changes everything. ® www.mheducation.com © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Because learning changes everything. ® Chapter 04 Local Area Network: LANs Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 4: Outline 4.1 ETHERNET 4.2 WIFI, IEEE 802.11 PROJECT 4.3 BLUETOOTH © McGraw Hill, LLC 2 4-1 ETHERNET In Chapter 1, we learned that a local area network (LAN) is a computer network that is designed for a limited geographic area such as a building or a campus. In the 1980s and 1990s several different types of wired LANs were used. The IEEE has subdivided the data-link layer into two sub-layers: logical link control (LLC) and media access control (MAC). © McGraw Hill, LLC 3 Figure 4.1 IEEE standard for LANs Access the text alternative for slide images. © McGraw Hill, LLC 4 Figure 4.2 Ethernet evolution through four generations Access the text alternative for slide images. © McGraw Hill, LLC 5 4.1.1 Standard Ethernet We refer to the original Ethernet technology with the data rate of 10 Mbps as the Standard Ethernet. Although most implementations have moved to other technologies in the Ethernet evolution, there are some features of the Standard Ethernet that have not changed during the evolution. We discuss this standard version first. © McGraw Hill, LLC 6 Connectionless and Unreliable Service Ethernet provide a connectionless service, which means that the frames are sent independent of each other. © McGraw Hill, LLC 7 Frame Format 1 The Ethernet frame contains seven fields, as shown in Figure 4.3. © McGraw Hill, LLC 8 Figure 4.3 Ethernet frame Access the text alternative for slide images. © McGraw Hill, LLC 9 Frame Length Ethernet has imposed restriction on maximum and minimum length to provide correct operation of CSMA/CD. An Ethernet frame has minimum length of 64 bytes. The maximum length limit is 1518 bytes (without preamble and SFD). This means that maximum payload is 1500 bytes. © McGraw Hill, LLC 10 Addressing Each station on an Ethernet network (such as a PC, workstation, or printer) has its own network interface card (NIC). The NIC fits inside the station and provides the station with a link-layer address. The Ethernet address is 6 bytes (48 bits), normally written in hexadecimal notation, with a colon between the bytes. For example, the following shows an Ethernet MAC address: 4A:30:10:21:10:1A © McGraw Hill, LLC 11 Transmission of Address Bits The way addresses are sent online is different from they way they are written in hexadecimal notation: Transmission is left to right, byte by byte; however, for each byte, the least significant bit that defines the address type is sent first. © McGraw Hill, LLC 12 Example 4.1 The example shows how how the address 47:20:1B:2E:08:EE is sent out online. The address is sent left to right, byte by byte; for each byte, it is sent right to left, bit by bit, as shown below: Hexadecimal 47 20 1B 2E 08 EE Binary 01000111 00100000 00011011 00101110 00001000 11101110 Transmitted ← 11100010 00000100 11011000 01110100 00010000 01110111 © McGraw Hill, LLC 13 Figure 4.4 Unicast and multicast addresses Access the text alternative for slide images. © McGraw Hill, LLC 14 Example 4.2 Define the type of the following destination addresses: a. 4A:30:10:21:10:1A b. 47:20:1B:2E:08:EE c. FF:FF:FF:FF:FF:FF Solution a. This is a unicast address because A in binary is 1010 (even). b. This is a multicast address because 7 in binary is 0111 (odd). c. This is a broadcast address because all digits are Fs in hexadecimal. © McGraw Hill, LLC 15 Implementation 1 The standard Ethernet defines several implementation, but only four of them became popular. © McGraw Hill, LLC 16 Table 4.1 Summary of Standard Ethernet implementations Implementation Medium Medium Length(m) Encoding 10Base5 Thick coax 500 m Manchester 10Base2 Thin coax 185 m Manchester 10Base-T 2 UTP 100 m Manchester 10Base-F 2 Fiber 2000 Manchester © McGraw Hill, LLC 17 4.1.2 Fast Ethernet (100 Mbps) In the 1990s, Ethernet made a big jump by increasing the transmission rate to 100 Mbps, and the new generation was called the Fast Ethernet. The designers of the Fast Ethernet needed to make it compatible with the Standard Ethernet. The MAC sublayer was left unchanged. But the features of the Standard Ethernet that depend on the transmission rate, had to be changed. © McGraw Hill, LLC 18 Access Method We remember that the proper operation of the CSMA/CD depends on the transmission rate, the minimum size of the frame, and the maximum network length. If we want to keep the minimum size of the frame, the maximum length of the network should be changed. In other words, if the minimum frame size is still 512 bits, and it is transmitted 10 times faster, the collision needs to be detected 10 times sooner, which means the maximum length of the network should be 10 times shorter (the propagation speed does not change). © McGraw Hill, LLC 19 Auto-negotiation A new feature added to Fast Ethernet is auto-negotiation. It allows two station to negotiate the mode or data rate of transmission. © McGraw Hill, LLC 20 Physical Layer 1 To be able to handle a 100 Mbps data rate, several changes need to be made at the physical layer. © McGraw Hill, LLC 21 Summary Fast Ethernet implementation at the physical layer can be categorized as either two-wire or four-wire. The two-wire implementation can be either shielded twisted pair (STP), which is called 100Base-TX, or fiber-optic cable, which is called 100Base- FX. The four-wire implementation is designed only for unshielded twisted pair (UTP), which is called 100Base-T4. Table 4.2 is a summary of the Fast Ethernet implementations. © McGraw Hill, LLC 22 Table 4.2 Summary of Fast Ethernet implementations Implementation Medium Medium Length Wires Encoding 100Base-TX STP 100 m 2 4B/5B + MLT-3 100Base-FX Fiber 185 m 2 4B/5B + NRZ-I 100Base-T4 UTP 100 m 4 Two 8B/6T © McGraw Hill, LLC 23 4.1.3 Gigabit Ethernet (1000 Mbps) The need for an even higher data rate resulted in the design of the Gigabit Ethernet Protocol (1000 Mbps). The IEEE committee calls it the Standard 802.3z. The goals of the Gigabit Ethernet were to upgrade the data rate to 1 Gbps, but keep the address length, the frame format, and the maximum and minimum frame length the same. © McGraw Hill, LLC 24 MAC Sublayer A main consideration in the evolution of Ethernet was to keep the MAC sublayer untouched. However, to achieve a data rate of 1 Gbps, this was no longer possible. Gigabit Ethernet has two distinctive approaches for medium access: half-duplex and full- duplex. Almost all implementations of Gigabit Ethernet follow the full-duplex approach, so we mostly ignore the half-duplex mode. © McGraw Hill, LLC 25 Full-Duplex Mode In the full duplex mode, there is a central switch connected to all computers. There is no collision in this mode. © McGraw Hill, LLC 26 Half-Duplex Mode In this mode, a switch can be replaced by a hub. © McGraw Hill, LLC 27 Physical Layer 2 The physical layer in Gigabit Ethernet is more complex that the other version. We have different implementations. © McGraw Hill, LLC 28 Table 4.3 Summary of Gigabit Ethernet implementations Implementation Medium Medium Length(m) Wires Encoding 1000Base-SX Fiber S-W 550 m 2 8B/10B + NRZ 1000Base-LX Fiber L-W 5000 m 2 8B/10B + NRZ 1000Base-CX STP 25 m 2 8B/10B + NRZ 1000Base-T4 UTP 100 m 2 4D-PAM5 © McGraw Hill, LLC 29 4.1.4 10-Gigabit Ethernet In recent years, there has been another look into the Ethernet for use in metropolitan areas. The idea is to extend the technology, the data rate, and the coverage distance so that the Ethernet can be used as LAN and MAN (metropolitan area network). The IEEE committee created 10 Gigabit Ethernet and called it Standard 802.3ae. © McGraw Hill, LLC 30 Implementation 2 10 Gigabit Ethernet operates only in full-duplex mode, which means there is no need for contention; CSMA/CD is not used in 10 Gigabit Ethernet. Four implementations are the most common: 10GBase-SR, 10GBase-LR, 10GBase-EW, and 10GBase-X4. Table 4.4 shows a summary of the 10 Gigabit Ethernet implementations. © McGraw Hill, LLC 31 Table 4.4 Summary of 10-Gigabit Ethernet implementations Implementation Medium Medium Length Number of wires Encoding 10GBase-SR Fiber 850 nm 300 m 2 64B66B 10GBase-LR Fiber 1310 nm 10 km 2 64B66B 10GBase-EW Fiber 1350 nm 40 km 2 SONET 10GBase-X4 Fiber 1310 nm 300 m to 10 km 2 8B10B © McGraw Hill, LLC 32 4-2 WIFI, IEEE 802.11 PROJECT IEEE has defined the specifications for a wireless LAN, called IEEE 802.11, which covers the physical and data-link layers. It is sometimes called wireless Ethernet. In some countries, including the United States, the public uses the term WiFi (short for wireless fidelity) as a synonym for wireless LAN. WiFi, however, is a wireless LAN that is certified by the WiFi Alliance. © McGraw Hill, LLC 33 4.2.1 Architecture The standard defines two kinds of services: the basic service set (BSS) and the extended service set (ESS). © McGraw Hill, LLC 34 Basic Service Set (BSS) IEEE defines the basic service set as the building block of a wireless LAN. It also defines an optional base station known as the access point (AP). © McGraw Hill, LLC 35 Figure 4.7 Basic service sets (BSSs) Access the text alternative for slide images. © McGraw Hill, LLC 36 Extended Service Set (ESS) An extended service set is made of two or more BSS with Aps that are connected together using a distribution system. © McGraw Hill, LLC 37 Figure 4.8 Extended service set (ESS) Access the text alternative for slide images. © McGraw Hill, LLC 38 Station Type IEEE defines three types of stations: no transition, BSS transition, and ESS transition. © McGraw Hill, LLC 39 4.2.2 MAC Sublayer IEEE 802.11 defines two MAC sublayers: the distributed coordination function (DCF) and point coordination function (PCF). Figure 4.7 shows the relationship between the two MAC sublayers, the LLC sublayer, and the physical layer. We discuss the physical layer implementations later in the chapter and will now concentrate on the MAC sublayer. © McGraw Hill, LLC 40 Figure 4.9 MAC layers in IEEE 802.11 standard Access the text alternative for slide images. © McGraw Hill, LLC 41 Distribution Coordination Function (DCF) One of the two protocol defined by IEEE at the MAC sublayer is called distribution coordination function (DCF), which uses CSMA/CA. © McGraw Hill, LLC 42 Figure 4.10 CSMA/CA and NAV Access the text alternative for slide images. © McGraw Hill, LLC 43 Point Coordination Function (PCF) This is an optional access that can be implemented in an infrastructure network. PCF has priority over DCF. However, to allow DCF frame to get access to the network repetition interval has been added to the network as shown in Figure 4.9. © McGraw Hill, LLC 44 Figure 4.11 Example of repetition interval Access the text alternative for slide images. © McGraw Hill, LLC 45 Fragmentation The wireless environment is very noisy, so frames are often corrupted. A corrupted frame cannot be resubmitted. The protocol recommend fragmentation. The division of frame into smaller ones. © McGraw Hill, LLC 46 Frame Format 2 The MAC layer frame consists of nine fields as shown in Figure 4.12. © McGraw Hill, LLC 47 Figure 4.12 Frame format Access the text alternative for slide images. © McGraw Hill, LLC 48 Table 4.5 Subfields in FC field Field Explanation Version Current version is 0 Type Type of information: management (00), control (01), or data (10) Subtype Subtype of each type (see Table 4.6) To DS Defined later From DS Defined later More flag When set to 1, means more fragments Retry When set to 1, means retransmitted frame Pwr mgt When set to 1, means station is in power management mode More data When set to 1, means station has more data to send WEP Wired equivalent privacy (encryption implemented) Rsvd Reserved © McGraw Hill, LLC 49 Frame Type A wireless LAN defined by IEEE 802.11 has three categories of frames: management frames, control frames, and data frames. © McGraw Hill, LLC 50 Figure 4.13 Control frames Access the text alternative for slide images. © McGraw Hill, LLC 51 Table 4.6 Values of subfields in control frames Subtype Meaning 1011 Request to send (RTS) 1100 Clear to send (CTS) 1101 Acknowledgment (ACK) © McGraw Hill, LLC 52 4.2.3 Addressing Mechanism The IEEE 802.11 addressing mechanism specifies four cases, defined by the value of the two flags in the FC field, To DS and From DS. Each flag can be either 0 or 1, resulting in four different situations. The interpretation of the four addresses (address 1 to address 4) in the MAC frame depends on the value of these flags, as shown in Table 4.7. © McGraw Hill, LLC 53 Table 4.7 Addresses To DS From DS Address 1 Address 2 Address 3 Address 4 0 0 Destination Source BSS ID N/A 0 1 Destination Sending AP Source N/A 1 0 Receiving AP Source Destination N/A 1 1 Receiving AP Sending AP Destination Source © McGraw Hill, LLC 54 Figure 4.14 Addressing mechanisms Access the text alternative for slide images. © McGraw Hill, LLC 55 Exposed Station Problem A similar problem to the hidden station problem is exposed station problem. In this problem, refrains using a channel when the channel is available. © McGraw Hill, LLC 56 Figure 4.15 Exposed station problem Access the text alternative for slide images. © McGraw Hill, LLC 57 4.2.4 Physical Layer We discuss six specifications, as shown in Table 4.8. All implementations, except the infrared, operate in the industrial, scientific, and medical (ISM) band, which defines three unlicensed bands in the three ranges 902–928 MHz, 2.400–4.835 GHz, and 5.725–5.850 GHz. © McGraw Hill, LLC 58 Table 4.8 Specifications IEEE Technique Band Modulation Rate (Mbps) 802.11 FHSS 2.400–4.835 GHz FSK 1 and 2 DSSS 2.400–4.835 GHz PSK 1 and 2 None Infrared PPM 1 and 2 802.11a OFDM 5.725–5.850 GHz PSK or QAM 6 to 54 802.11b DSSS 2.400–4.835 GHz PSK 5.5 and 11 802.11g OFDM 2.400–4.835 GHz Different 22 and 54 802.11n OFDM 5.725–5.850 GHz Different 600 © McGraw Hill, LLC 59 4-3 BLUETOOTH Bluetooth is a wireless LAN technology designed to connect devices of different functions when they are at a short distance from each other. A Bluetooth LAN is an ad- hoc network. The devices, sometimes called gadgets, find each other and make a network called a piconet. © McGraw Hill, LLC 60 4.3.1 Architecture Bluetooth defines two types of networks: piconet and scatternet. © McGraw Hill, LLC 61 Piconet A Bluetooth network is called a piconet (a small net). It can have up to 8 stations, one of which is called the primary; the other are called the secondaries. © McGraw Hill, LLC 62 Figure 4.20 Piconet Access the text alternative for slide images. © McGraw Hill, LLC 63 Scatternet Piconets can be combined to create a scatternet. A secondary station in one piconet can be a primary in another one. © McGraw Hill, LLC 64 Figure 4.21 Scatternet Access the text alternative for slide images. © McGraw Hill, LLC 65 Bluetooth Devices A Bluetooth device has a built-in short-range radio transmitter. The current rate is 1 Mbps with a 2.4-GHz bandwidth. © McGraw Hill, LLC 66 Bluetooth Layers Bluetooth uses several layers that do not exactly match those of the Internet model we have defined in this book. Figure 4.16 shows these layers. © McGraw Hill, LLC 67 Figure 4.22 Bluetooth layers Access the text alternative for slide images. © McGraw Hill, LLC 68 L2CAP The Logical Link Control and Adaption Protocol is roughly equivalent to the LLC sublayer in LANs. © McGraw Hill, LLC 69 Figure 4.23 L2CAP data packet format Access the text alternative for slide images. © McGraw Hill, LLC 70 Baseband Layer The Baseband layer is roughly equivalent to MAC sublayer in LANs. © McGraw Hill, LLC 71 Radio Layer The radio layer is roughly equivalent to the physical layer of the Internet model. Bluetooth devices are low-power and have a range of 10 m. © McGraw Hill, LLC 72 Because learning changes everything. ® www.mheducation.com © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Because learning changes everything. ® Chapter 06 Connecting Devices And Virtual LANs Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 6: Outline 6.1 Connecting Devices 6.2 Virtual LANS © McGraw Hill, LLC 2 6-1 CONNECTING DEVICES Hosts and networks do not normally operate in isolation. We use connecting devices to connect hosts together to make a network or to connect networks together to make an internet. Connecting devices can operate in different layers of the Internet model. We discuss three kinds of connecting devices: hubs, link-layer switches, and routers. © McGraw Hill, LLC 3 Figure 6.1 Three categories of connecting devices Access the text alternative for slide images. © McGraw Hill, LLC 4 6.1.1 Hubs A hub is a device that operates only in the physical layer. Signals that carry information within a network can travel a fixed distance before attenuation endangers the integrity of the data. A repeater receives a signal and, before it becomes too weak or corrupted, regenerates and retimes the original bit pattern. © McGraw Hill, LLC 5 Figure 6.2 A hub Access the text alternative for slide images. © McGraw Hill, LLC 6 6.1.2 Link-Layer Switches A link-layer switch (or switch) operates in both the physical and the data-link layers. As a physical-layer device, it regenerates the signal it receives. As a link-layer device, the link-layer switch can check the MAC addresses (source and destination) contained in the frame. © McGraw Hill, LLC 7 Filtering One may ask what is the difference in functionality between a link- layer switch and a hub. A link-layer switch has filtering capability. It can check the destination link-layer address of a frame and can decide from which outgoing port the frame should be sent. © McGraw Hill, LLC 8 Figure 6.3 Link-layer switch Access the text alternative for slide images. © McGraw Hill, LLC 9 Transparent Switches A transparent switch is a switch in which the stations are completely unaware of the switch’s existence. If a switch is added or deleted from the system, reconfiguration of the stations is unnecessary. © McGraw Hill, LLC 10 Figure 6.4 Learning switch Access the text alternative for slide images. © McGraw Hill, LLC 11 Advantages of Switches A link-layer switch has several advantages over a hub. We discuss only two of them here: collision elimination and connecting heterogenous routers. © McGraw Hill, LLC 12 6.1.3 Routers We will discuss routing in a future chapter when we discuss the network layer. In this section, we mention routers to compare them with a two-layer switch and a hub. A router is a three-layer device; it operates in the physical, data-link, and network layers. © McGraw Hill, LLC 13 Figure 6.9 Routing example Access the text alternative for slide images. © McGraw Hill, LLC 14 6-2 VIRTUAL LANS A station is considered part of a LAN if it physically belongs to that LAN. The criterion of membership is geographic. What happens if we need a virtual connection between two stations belonging to two different physical LANs? We can roughly define a virtual local area network (VLAN) as a local area network configured by software, not by physical wiring. © McGraw Hill, LLC 15 Figure 6.10 A switch connecting three LANs © McGraw Hill, LLC 16 Figure 6.11 A switch using VLAN software Access the text alternative for slide images. © McGraw Hill, LLC 17 Figure 6.12 Two switches in a backbone using VLAN software Access the text alternative for slide images. © McGraw Hill, LLC 18 6.2.1 Membership What characteristic can be used to group stations in a VLAN? Vendors use different characteristics such as interface numbers, port numbers, MAC addresses, IP addresses, IP multicast addresses, or a combination of two or more of these. © McGraw Hill, LLC 19 6.2.4 Advantages There are several advantages to using VLANs: Cost and time reduction Creating virtual work groups Security © McGraw Hill, LLC 20 Cost and Time Reduction VLANs can reduce the migration cost of stations going from one group to another. Physical reconfiguration takes time and is costly. Instead of physically moving one station to another segment or even to another switch, it is much easier and quicker to move it by using software. © McGraw Hill, LLC 21 Creating Virtual Work Groups VLANs can be used to create virtual work groups. For example, in a campus environment, professors working on the same project can send broadcast messages to one another without the necessity of belonging to the same department. This can reduce traffic if the multicasting capability of IP was previously used. © McGraw Hill, LLC 22 Security VLANs provide an extra measure of security. People belonging to the same group can send broadcast messages with the guaranteed assurance that users in other groups will not receive these messages. © McGraw Hill, LLC 23 Because learning changes everything. ® www.mheducation.com © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Because learning changes everything. ® Chapter 07 Network Layer: Data Transfer Data Communications and Networking, With TCP/IP protocol suite Sixth Edition Behrouz A. Forouzan © 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom. No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC. Chapter 7: Outline 7.1 Services 7.2 Packet Switching 7.3 Performance 7.4 Internet Protocol V4 7.5 Internet Protocol V6 7.6 Transition from V4 To V6 © McGraw Hill, LLC 2 Figure 7.1 Communication at the network layer Access the text alternative for slide images. © McGraw Hill, LLC 3 7-1 SERVICES We briefly discuss the services provided at the network layer. © McGraw Hill, LLC 4 7.1.1 Packetizing The first duty of the network layer is definitely packetizing: encapsulating the payload in a network-layer packet at the source and decapsulating the payload from the network-layer packet at the destination. In other words, one duty of the network layer is to carry a payload from the source to the destination without changing it or using it. The network layer is doing the service of a carrier such as the postal office, which is responsible for delivery of packages from a sender to a receiver without changing or using the contents. © McGraw Hill, LLC 5 7.1.2 Routing Other duties of the network layer, which are as important as the first, are routing and forwarding, which are directly related to each other. © McGraw Hill, LLC 6 7.1.3 Error Control Although error control can be implemented in the network layer, the designers of the network layer in the Internet ignored this issue for the data being carried by the network layer. One reason for this decision is the fact that the packet in the network layer may be fragmented at each router, which makes error checking at this layer inefficient. © McGraw Hill, LLC 7 7.1.4 Flow Control Flow control regulates the amount of data a source can send without overwhelming the receiver. If the up