CS360 Computer Networks All Slides PDF
Document Details
Uploaded by GallantReal
College of Computing and Informatics
2000
Tags
Summary
This document is a set of lecture slides for a computer networks course, CS360. It covers topics such as data communications, different types of networks (LAN, WAN), network topologies (Mesh, Star, Bus, Ring), and switching techniques (circuit-switched and packet-switched).
Full Transcript
College of Computing and Informatics CS360 Computer Networks Chapter 1 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 1: Introduction Outline 1.1 Data Communications 1.2 Networks 1.3 Network Types 1-1 DATA COMMUNICATIONS...
College of Computing and Informatics CS360 Computer Networks Chapter 1 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 1: Introduction Outline 1.1 Data Communications 1.2 Networks 1.3 Network Types 1-1 DATA COMMUNICATIONS *When we communicate, we are sharing information. *This sharing can be local or remote. *The term telecommunication, which includes telephony, telegraph, and television, means communication at a distance. Data communications are the exchange of data between two devices via some form of transmission media. *Data Representation Information today comes in different forms such as text, numbers, images, audio, and video. 1.3 1-1 DATA COMMUNICATIONS A data communications system has five components (see Figure 1.1). Message Sender Receiver Transmission medium Protocol Figure 1.1: Five components of data communication 1.4 1-1 DATA COMMUNICATIONS 1. Message. The message is the information (data) to be communicated. Such as text, numbers, pictures, audio, and video. 2. Sender. The sender is the device that sends the data message. It can be a computer, workstation, telephone handset, video camera. 3. Receiver. The receiver is the device that receives the message. It can be a computer, workstation, telephone handset, television. 4. Transmission medium. The transmission medium is the physical path by which a message travels from sender to receiver. Some examples of transmission media include twisted-pair wire, coaxial cable, fiber-optic cable, and radio waves. 5. Protocol. A protocol is a set of rules that govern data communications. It represents an agreement between the communicating devices. Without a protocol, two devices may be connected but not communicating, just as a person speaking French cannot be understood by a person who speaks only Japanese. 1.5 Data flow (1/2) Communication between two devices can be simplex, half-duplex, or full-duplex as shown in Figure 1.2. Figure 1.2: Data flow 1.6 Data flow (2/2) 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. 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. In full-duplex mode (also called duplex), both stations can transmit and receive simultaneously 1.7 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 (called also end system) 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. Network Criteria A network must be able to meet a certain number of criteria. The most important of these are performance, reliability, and security. 1.8 1.2.2 Physical Structures Before discussing networks, we need to define some network attributes. Types of 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. A multipoint (also called multidrop) connection is one in which more than two devices share a single link. 1.9 Figure 1.4: A fully-connected mesh topology The topology of a network is the physical 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. In a mesh topology, every device has a dedicated point-to-point link to every other device. To find the number of physical links in a fully connected mesh network with n nodes, we use n (n – 1) / 2 1.10 Figure 1.5: A star topology In a star topology, each device has a dedicated point-to- point link only to a central controller, usually called a hub. 1.11 Figure 1.6: A bus topology A bus topology is multipoint in which a one long cable acts as a backbone to link all the devices in a network. A drop line is a connection running between the device and the main cable. A tap is a connector that connects the drop line with the main cable. 1.12 Figure 1.7: A ring topology In a ring topology, each device has a dedicated point-to- point connection with only the two devices on either side of it. Each computer serves as a repeater to increase the signal and send it to the next device. 1.13 1-3 NETWORKS TYPES After defining networks in the previous section and discussing their physical structures, we need to discuss different types of networks we encounter in the world today. The criteria of distinguishing one type of network from another is difficult and sometimes confusing. We use a few criteria such as size, geographical coverage, and ownership to make this distinction. 1.14 1.3.1 Local Area Network A local area network (LAN) is usually privately owned and connects some hosts in a single office, building, or campus. *Depending on the needs of an organization, a LAN can be as simple as two PCs and a printer in someone’s home office, or it can extend throughout a company and include audio and video devices. Each host in a LAN has an identifier (an address), that uniquely defines the host in the LAN. A packet sent by a host to another host carries both the source host’s and the destination host’s addresses. 1.15 Figure 1.8: An Isolated LAN in the past and today In the past, all hosts in a network were connected through a common cable, which meant that a packet sent from one host to another was received by all hosts. Today, most LANs use a smart connecting switch, which is able to recognize the destination address of the packet and guide the packet to its destination without sending it to all other hosts. 1.16 1.3.2 Wide Area Network A wide area network (WAN) is also an connection of devices capable of communication. However, there are some differences between a LAN and a WAN. A LAN is normally limited in size; a WAN has a wider geographical span, spanning a town, a state, a country, or even the world. A LAN interconnects hosts; a WAN interconnects connecting devices such as switches, routers, or modems. A LAN is normally privately owned by the organization that uses it; a WAN is normally created and run by communication companies and leased by an organization that uses it. 1.17 Types of WANs (1/2) We see two distinct examples of WANs today: point-to- point WANs and switched WANs. A point-to-point WAN is a network that connects two communicating devices through a transmission media (cable or air). Figure 1.9: A Point-to-Point WAN 1.18 Types of WANs (2/2) A switched WAN is a network with more than two ends Figure 1.10: A Switched WAN 1.19 1.3.3 Switching An internet is a switched network in which a switch connects at least two links together. *A switch needs to forward data from a network to another network when required. The two most common types of switched networks are circuit-switched and packet-switched networks. In a circuit-switched network, a dedicated connection, called a circuit, is always available between the two end systems. In a packet-switched network, the data transfer into a network in form of packets. Each packet uses different path toward the end system. 1.20 1.3.3 Switching: circuit-switched In a circuit-switched network, a dedicated connection, called a circuit, is always available between the two end systems. 1.21 1.3.3 Switching: packet-switched In a packet-switched network, the data transfer into a network in form of packets. Each packet uses different path toward the end system. 1.22 1.3.4 The Internet As we discussed before, 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 thousands of interconnected networks. Figure 1.15 shows a conceptual (not geographical) view of the Internet. Figure 1.15: The Internet today 1.23 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 2 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 2: Network Models Outline 2.1 Protocol Layering 2.2 TCP/IP Protocol Suite 2.3 OSI Model 2-1 PROTOCOL LAYERING *A word we hear all the time when we talk about the Internet is protocol. A protocol defines the rules that both the sender and receiver and all intermediate devices need to follow to be able to communicate effectively. When communication is simple, we may need only one simple protocol. When the communication is complex, we need a protocol at each layer, or protocol layering. 2.3 2.1.1 Scenarios Let us develop two simple scenarios to better understand the need for protocol layering. In the first scenario, communication is so simple that it can occur in only one layer. In the second scenario, the communication between Maria and Ann takes place in three layers. 2.4 Figure 2.1: A single-layer protocol Assume Maria and Ann are neighbors with a lot of common ideas. Communication between Maria and Ann takes place in one layer, face to face, in the same language. Set of rules needs to be followed. 1. Maria and Ann should greet each other when they meet. 2. They should restrict their vocabulary to the level of their friendship. 3. They should refrain from speaking when the other party is speaking. They should know that both should have the opportunity to talk about the issue. 4. They should exchange some nice words when they leave. 2.5 Figure 2.2: A three-layer protocol 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 do not want their ideas to be revealed by other people if the letters are intercepted. We assume that Ann and Maria each have three machines (or robots) that can perform the task at each layer. Protocol layering enables us to divide a complex task into several smaller and simpler tasks. Postal carrier facility 2.6 2.1.2 Principles of Protocol Layering Let us discuss two principles of protocol layering. 1. The first principle dictates that if we want bidirectional communication, we need to make each layer so that it is able to perform two opposite tasks, one in each direction. 2. The second principle that we need to follow in protocol layering is that the two objects under each layer at both sites should be identical. Postal carrier facility 2.7 2.1.3 Logical Connections *After following the above two principles, we can think about logical connection between each layer as shown in Figure 2.3. Logical connection means that we have layer-to-layer communication. *Maria and Ann can think that there is a logical (imaginary) connection at each layer through which they can send the object created from that layer. *We will see that the concept of logical connection will help us better understand the task of layering we encounter in data communication and networking. Figure 2.3: Logical connection between peer layers 2.8 2-2 TCP/IP PROTOCOL SUITE TCP/IP is a protocol suite (a set of protocols organized in different layers) used on the Internet today. TCP/IP (Transmission Control Protocol/Internet Protocol) Figure 2.4: Layers in the TCP/IP protocol suite 2.9 2.2.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 2.5. Figure 2.5: Communication through an Internet 2.10 Figure 2.5: Communication through an Internet 2.11 2.2.2 Layers in the TCP/IP Protocol Suite *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 2.6 shows logical connections in our simple Internet. 2.12 Figure 2.6: Logical connections between layers in TCP/IP As the figure shows, the duty of the application, transport, and network layers is end-to-end. The duty of the data-link and physical layers is hop-to-hop Logical connections 2.13 Figure 2.7: Identical objects in the TCP/IP protocol suite Figure 2.7 shows the second principle discussed previously for protocol layering. We show the identical objects below each layer related to each device. Identical objects (messages) Identical objects (segment or user datagram) Identical objects (datagram) Identical objects (datagram) Identical objects (frame) Identical objects (frame) Identical objects (bits) Identical objects (bits) 2.14 2.2.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. Summary of duties 2.15 2.2.4 Encapsulation and Decapsulation One of the important concepts in protocol layering in the Internet is encapsulation/ decapsulation. When the data is moving from upper layer to the lower layer according to a network model, each layer includes a bundle of information called a header along with the actual data. This packing of data in each layer is known as the encapsulation. This unpacking of data in each layer is known as the decapsulation. Figure 2.8 shows this concept for the small Internet in Figure 2.5. Figure 2.8 Encapsulation/Decapsulation 2.16 2.2.5 Addressing It is worth mentioning another concept related to protocol layering in the Internet, addressing. *As we discussed before, we have logical communication between pairs of layers in this model. Any communication that involves two parties needs two addresses: source address and destination address. *Although it looks as if we need five pairs of addresses, one pair per layer, we normally have only four because the physical layer does not need addresses; the unit of data exchange at the physical layer is a bit, which definitely cannot have an address. Figure 2.9: Addressing in the TCP/IP protocol suite 2.17 2.2.6 Multiplexing and Demultiplexing (1/2) Since the TCP/IP protocol suite uses several protocols at some layers, we can say that we have multiplexing at the source and demultiplexing at the destination. Figure 2.10 shows the concept of multiplexing and demultiplexing at the three upper layers. Figure 2.10: Multiplexing and demultiplexing 2.18 2.2.6 Multiplexing and Demultiplexing (2/2) Multiplexing in this case means that a protocol at a layer can encapsulate a packet from several next-higher layer protocols (one at a time). Demultiplexing means that a protocol can decapsulate and deliver a packet to several next-higher layer protocols (one at a time). Figure 2.10: Multiplexing and demultiplexing 2.19 2-3 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. Open Systems Interconnection (OSI) model is not a protocol; it is a layered framework for the design of network systems that allows communication between all types of computer systems. OSI model consists of seven layers, each of which defines a part of the process of moving information across a network (see Figure 2.11). 2.20 Figure 2.11: The OSI model 2-3 OSI MODEL 1. Physical Layer The physical layer is responsible for the physical cable or wireless connection between network nodes. It defines the connector, the electrical cable or wireless technology connecting the devices, and is responsible for transmission of the raw data, which is simply a series of 0s and 1s, while taking care of bit rate control. Figure 2.11: The OSI model 2.21 2-3 OSI MODEL 2. Data Link Layer The data link layer establishes and terminates a connection between two physically-connected nodes on a network. This layer is composed of two parts—Logical Link Control (LLC), which identifies network protocols, performs error checking and synchronizes frames, and Media Access Control (MAC) which uses MAC addresses to connect devices and define permissions to transmit and receive data. Figure 2.11: The OSI model 2.22 2-3 OSI MODEL 3. Network Layer The network layer has the main function to route packets by discovering the best path across a physical network. The network layer uses network addresses (typically Internet Protocol addresses) to route packets to a destination node. 2.23 Figure 2.11: The OSI model 2-3 OSI MODEL 4. Transport Layer The transport layer carries out flow control, sending data at a rate that matches the connection speed of the receiving device, and error control, checking if data was received incorrectly and if not, requesting it again. 2.24 Figure 2.11: The OSI model 2-3 OSI MODEL 5. Session Layer The session layer creates communication channels, called sessions, between devices. It is responsible for opening sessions, ensuring they remain open and functional while data is being transferred, and closing them when communication ends. 2.25 Figure 2.11: The OSI model 2-3 OSI MODEL 6. Presentation Layer The presentation layer prepares data for the application layer. It defines how two devices should encode, encrypt, and compress data so it is received correctly on the other end. The presentation layer takes any data transmitted by the application layer and prepares it for transmission over the session layer. 2.26 Figure 2.11: The OSI model 2-3 OSI MODEL 7. Application Layer The application layer is used by end-user software such as web browsers and email clients. It provides protocols that allow software to send and receive information and present meaningful data to users. A few examples of application layer protocols are the Hypertext Transfer Protocol (HTTP), File Transfer Protocol (FTP), Post Office Protocol (POP), Simple Mail Transfer Protocol (SMTP), and Domain Name System (DNS). 2.27 Figure 2.11: The OSI model 2.3.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 2.12. Figure 2.12: TCP/IP and OSI model 2.28 2.3.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: 1. OSI was completed when TCP/IP was fully in place and a lot of time and money had been spent on the suite; changing it would cost a lot. 2. Some layers in the OSI model were never fully defined (session and presentation layers) 3. OSI implementation issues. 2.29 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 3 Chapter 3: Introduction To Physical Layer Outline 3.1 DATA AND SIGNALS 3.2 PERIODIC ANALOG SIGNALS 3.3 DIGITAL SIGNALS 3.4 TRANSMISSION IMPAIRMENT (weakness) 3.6 PERFORMANCE 3-1 DATA AND SIGNALS Figure 3.1 shows a scenario in which a scientist working in a research company, Sky Research, needs to order a book related to her research from an online bookseller, Scientific Books. Figure 3.1: Communication at the physical layer 3.3 3.1.1 Analog and Digital Data Data can be analog or digital. ▪ Analog data refers to information that is continuous ▪ Digital data refers to information that has discrete states. For example, an analog clock that has hour, minute, and second hands gives information in a continuous form; the movements of the hands are continuous. On the other hand, a digital clock that reports the hours and the minutes will change suddenly from 8:05 to 8:06. Analog clock Digital clock 3.1.1 Analog and Digital Signals Like the data they represent, signals can be either analog or digital. An analog signal has infinitely many levels of intensity over a period of time. As the wave moves from value A to value B, it passes through and includes an infinite number of values along its path. A digital signal, on the other hand, can have only a limited number of defined values. Although each value can be any number, it is often as simple as 1 and 0. Figure 3.2: Comparison of analog and digital signals 3.5 3.1.3 Periodic and Nonperiodic A periodic signal completes a pattern within a measurable time frame (called a period (T) and repeats that pattern over subsequent identical periods. ▪ The completion of one full pattern is called a cycle. ▪ Period signal refers to the amount of time, in seconds, a signal needs to complete 1 cycle. A nonperiodic signal changes without exhibiting a pattern or cycle that repeats over time. Both analog and digital signals can be periodic or nonperiodic. Value Period (T) Period (T) Period (T) Time Cycle 1 Cycle 2 Cycle 3 Figure 3.3: A sine wave (periodic signal) The sine wave is the most fundamental form of a periodic analog signal. When we visualize it as a simple oscillating curve, its change over the course of a cycle is smooth and consistent, a continuous, rolling flow. Figure 3.3 shows a sine wave. Each cycle consists of a single arc above the time axis followed by a nonperiodic signal single arc below it. 3.6 Figure 3.4: Two signals with two different amplitudes A sine wave can be represented by three parameters: the peak amplitude, the frequency, and the phase. The peak amplitude of a signal is the absolute value of its highest intensity, proportional to the energy it carries. For electric signals, peak amplitude is normally measured in volts (V). Peak amplitude Peak amplitude 3.7 Table 3.1: Units of period and frequency Frequency refers to the number of (cycle) in 1 s Frequency unit is Hertz (Hz) 3.8 Example 3.4 Express a period of 100 millisecond (ms) in microseconds (µs). Solution: 100 ms = 100 x 103 µs = 105 µs 3.9 3.2.2 Phase The term Phase, or Phase Shift, 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. Phase is measured in degrees or radians [1º is 2π/360 rad] *A phase shift of 0º/360º corresponds to a shift of a complete period/cycle. *A phase shift of 90º corresponds to a shift of 1/4 of a period/cycle. *A phase shift of 180° corresponds to a shift of 1/2 of a period/cycle. (see Figure 3.6). 3.10 Example 3.6 A sine wave is offset/shift 1/6 cycle with respect to time 0. What is its phase in degrees and radians? Solution We know that 1 complete cycle is 360°. Therefore, 1/6 cycle is 3.11 3.2.3 Wavelength Wavelength is another characteristic of a signal traveling through a transmission medium. 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 of the medium (see Figure 3.7). Direction of propagation 3.12 3.2.4 Time and Frequency Domains *A sine wave is comprehensively defined by its amplitude, frequency, and phase. *We have been showing a sine wave by using what is called a time domain plot. The time-domain plot shows changes in signal amplitude with respect to time (it is an amplitude-versus-time plot). *Phase is not explicitly shown on a time- domain plot. A frequency-domain plot is concerned with only the peak value and the frequency. 3.13 3.2.6 Bandwidth Bandwidth is the range of frequencies contained in a composite signal. A composite signal is composed of multiple sine waves. Bandwidth is normally a difference between two numbers. For example, if a composite signal contains frequencies between 1000 and 5000, its bandwidth is 5000 − 1000, or 4000. Composite signal 3.14 Example 3.10 If a periodic signal is decomposed into five sine waves with frequencies of 100, 300, 500, 700, and 900 Hz. 1. What is its bandwidth? 2. Draw the spectrum, assuming all components have a maximum amplitude of 10 V. Solution Let fh be the highest frequency, fl the lowest frequency, and B the bandwidth. Then 3.15 3-3 DIGITAL SIGNALS In addition to being represented by an analog signal, information can also be represented by a digital signal (0 or 1). For example, a 1 can be encoded as a positive voltage and a 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 3.17 shows two signals, one with two levels and the other with four levels. 3.16 3.3.1 Bit Rate Most digital signals are nonperiodic, and thus period or frequency is not appropriate characteristics. Two new terms-bit interval (instead of period) and bit rate (instead of frequency)- are used to describe digital signals. Bit interval is the time required to send one single bit. Bit rate is the number of bit intervals per second, i.e., the number of bits sent in one second. This is expressed as bps. Bit Interval 3.17 3.3.2 Bit Length We discussed the concept of the wavelength for an analog signal: the distance one cycle occupies on the transmission medium. We can define something similar for a digital signal: the bit length. The bit length is the distance one bit occupies on the transmission medium. Direction of propagation 3.18 3-4 TRANSMISSION IMPAIRMENT ◼ Signals travel through transmission media, which are not perfect. ◼ The imperfection causes signal impairment (damage). ◼ 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. (see Figure 3.26). Figure 3.26: Causes of impairment 3.19 Figure 3.27: Attenuation and amplification Attenuation means a loss of energy. *When a signal, simple or composite, travels through a medium, it loses some of its energy in overcoming the resistance of the medium. *That is why a wire carrying electric signals gets warm, if not hot, after a while. Some of the electrical energy in the signal is converted to heat. To compensate for this loss, amplifiers are used to amplify the signal. *Figure 3.27 shows the effect of attenuation and amplification. 3.20 3.4.2 Distortion Distortion means that the signal changes its form or shape. *Distortion can occur in a composite signal made of different frequencies. Each signal component has its own propagation *speed (see the next section) through a medium and, therefore, its own delay in arriving at the final destination. *Differences in delay may create a difference in phase if the delay is not exactly the same as the period duration. 3.21 Figure 3.30: Noise Noise is another cause of impairment. Several types of noise, such as thermal noise, induced noise, crosstalk, and impulse noise, may corrupt the signal. Thermal noise is the random motion of electrons in a wire, which creates an extra signal not originally sent by the transmitter. Induced noise comes from sources such as motors and appliances. Crosstalk is the effect of one wire on the other. Impulse noise is a spike (a signal with high energy in a very short period of time) that comes from power lines, lightning. 3.22 *Figure 3.31: Two cases of SNR: a high SNR and a low SNR Example 3.31 The power of a signal is 10,000 μW and the power of the noise is 1 μW; what are the values of SNR and SNRdB? Solution: The values of SNR and SNRdB can be calculated as follows: 3.23 3-6 PERFORMANCE One important issue in networking is the performance of the network—how good is it? Any network performance can be judge based on one of the following characteristics: 1. Bandwidth 2. Throughput 3. Latency (Delay) 4. Jitter 5. Bandwidth-Delay Product 3.24 3.6.1 Bandwidth In networking, we use the term bandwidth in two contexts. ◼ The first, bandwidth in hertz, refers to the range of frequencies that a channel can pass. ◼ For example, we can say the bandwidth of a subscriber telephone line is 4 kHz. ◼ The second, bandwidth in bits per second (bps), refers to the number of bits per second that a channel, a link, or even a network can transmit. ◼ For example, one can say the bandwidth of a Fast Ethernet network (or the links in this network) is a maximum of 100 Mbps. This means that this network can send 100 Mbits per second. 3.25 3.6.2 Throughput ◼ The throughput (bps) is a measure of how much we can send data through a network. ◼ Although, at first glance, bandwidth in bits per second and throughput seem the same, they are different. ◼ A link may have a bandwidth of B bps, but we can only send T bps through this link with T always less than B. ◼ For example, we may have a link with a bandwidth of 1 Mbps, but the devices connected to the end of the link may handle only 200 kbps. This means that we cannot send more than 200 kbps through this link. 3.26 Example 3.44 A network with bandwidth of 10 Mbps can pass only an average of 12,000 frames per minute with each frame carrying an average of 10,000 bits. What is the throughput of this network? Solution We can calculate the throughput as The throughput is almost one-fifth of the bandwidth in this case. 3.27 3.6.2 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 can say that latency is made of four components: propagation time, transmission time, queuing time and processing delay. ◼ Time means “delay”. 3.28 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 29 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 7 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 7: Transmission Media and Cabling Outline 7.1 INTRODUCTION 7.2 GUIDED MEDIA 7.3 UNGUIDED MEDIA Objective ❑ The first section introduces the transmission media and defines its position in the Internet model. It shows that we can classify transmission media into two broad categories: guided and unguided media. ❑ The second section discusses guided media. The first part describes twisted-pair cables and their characteristics and applications. The second part describes coaxial cables and their characteristics and applications. ❑ The third section discusses unguided media. The first part describes radio waves and their characteristics and applications. The second part describes microwaves and their characteristics and applications. 7-1 INTRODUCTION Transmission media are actually located below the physical layer and are directly controlled by the physical layer. We could say that transmission media belong to layer zero. *Figure 7.1 shows the position of transmission media in relation to the physical layer. Signals are transmitted from one device to another in the form of electromagnetic energy, which is propagated through transmission media. Figure 7.1: Transmission media and physical layer 7.4 Figure 7.2: Classes of transmission media 7.5 7-2 GUIDED MEDIA Guided media, which are those that provide a conduit/channel from one device to another, include twisted-pair cable, coaxial cable, and fiber-optic cable. A signal traveling along any of these media is directed and contained by the physical limits of the medium. 7.6 7.2.1 Twisted-Pair Cable A twisted pair consists of two conductors (normally copper), each with its own plastic insulation, twisted together, as shown in Figure 7.3. One of the wires is used to carry signals to the receiver, and the other is used only as a ground reference. The receiver uses the difference between the two. *In addition to the signal sent by the sender on one of the wires, interference (noise) and crosstalk may affect both wires and create unwanted signals. Figure 7.3: Twisted-pair cable 7.7 Figure 7.4: UTP and STP cables The most common twisted-pair cable used in communications are unshielded twisted-pair (UTP) and shielded twisted-pair (STP). STP cable has a metal foil or braided-mesh covering that encases (wrap) each pair of insulated conductors. Although metal casing improves the quality of cable by preventing the penetration of noise or crosstalk, it is big and more expensive. Braided-mesh 7.8 Table 7.1: Categories of unshielded twisted-pair cables (UTP) 7.9 Figure 7.5: UTP Connectors The most common UTP connector is RJ45 (RJ stands for registered jack), as shown in Figure 7.5. 7.10 Figure 7.6: UTP Performance One way to measure the performance of twisted-pair cable is to compare attenuation versus frequency and distance. Figure 7.6 shows that with increasing frequency, the attenuation, measured in decibels per kilometer (dB/km), sharply increases with frequencies above 100 kHz. Note that gauge is a measure of the thickness of the wire. 7.11 7.2.2 Coaxial Cable Coaxial cable (or coax) carries signals of higher frequency ranges than those in twisted pair cable, in part because the two media are constructed quite differently. Instead of having two wires, coax has a central core conductor of solid or stranded wire (usually copper) enclosed in an insulating sheath/cover, which is, in turn, encased/covered in an outer conductor of metal foil, braid جديلة, or a combination of the two. The outer metallic wrapping serves both as a shield against noise and as the second conductor, which completes the circuit. Figure 7.7: Coaxial cable 7.12 Table 7.2: Categories of coaxial cables Coaxial cables are categorized by their Radio Government (RG) ratings. Each RG number denotes a unique set of physical specifications, including the Impedance مقاومة, thickness and usage. 7.13 Figure 7.8: BNC connectors To connect coaxial cable to devices, we need coaxial connectors. The most common type of connector used today is the BNC connector. Figure 7.8 shows three popular types of these connectors: the BNC connector, the BNC T connector, and the BNC terminator. 7.14 Figure 7.9: Coaxial cable performance *As we did with twisted-pair cable, we can measure the performance of a coaxial cable. We notice in Figure 7.9 that the attenuation is much higher in coaxial cable than in twisted-pair cable. In other words, although coaxial cable has a much higher bandwidth, the signal weakens rapidly and requires the frequent use of repeaters. 7.15 7.2.3 Fiber-Optic Cable A fiber-optic cable is made of glass or plastic and transmits signals in the form of light. 7.16 Figure 7.10: Bending of light ray To understand optical fiber, we first need to explore several aspects of the nature of light. Light travels in a straight line as long as it is moving through a single uniform substance. If a ray of light traveling through one substance suddenly enters another substance (of a different density), the ray changes direction. Figure 7.10 shows how a ray of light changes direction when going from a more dense to a less dense substance. Note that the critical angle is a property of the substance, and its value is different from one substance to another. 7.17 Figure 7.11: Optical fiber Optical fibers use reflection to guide light through a channel. A glass or plastic core is surrounded by a cladding حشوةof less dense glass or plastic. The difference in density of the two materials must be such that a beam of light moving through the core is reflected ينعكس off the cladding instead of being refracted ينكسرinto it. 7.18 Figure 7.12: Propagation modes Current technology supports two modes (multimode and single mode) for propagating light along optical channels, each requiring fiber with different physical characteristics. 7.19 Figure 7.13: Modes Density of the core remains constant from the center to the edges Density is highest at the center of the core and decreases gradually to its lowest at the edge. Highly focused source of light 7.20 Figure 7.14: Fiber connection Figure 7.14 shows the composition of a typical fiber-optic cable. The outer jacket is made of either PVC or Teflon. Inside the jacket are Kevlar strands to strengthen the cable. Kevlar is a strong material used in the fabrication of bulletproof vests. Below the Kevlar is another plastic coating to cushion the fiber. The fiber is at the center of the cable, and it consists of cladding and core. 7.21 Figure 7.15: Fiber-optic cable connector There are three types of connectors for fiber-optic cables, as shown in Figure 7.15. 1. The subscriber channel (SC) connector is used for cable TV. 2. The straight-tip (ST) connector is used for connecting cable to networking devices. 3. MT-RJ is a connector that is the same size as RJ45. 7.22 Figure 7.16: Optical fiber performance The plot of attenuation versus wavelength in Figure 7.16 shows a very interesting phenomenon in fiber-optic cable. Attenuation is flatter than in the case of twisted-pair cable and coaxial cable. The performance is such that we need fewer (actually 1/10 as many) repeaters when we use fiber-optic cable. 7.23 7-3 UNGUIDED MEDIA Unguided medium transport 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 7.17 shows the part of the electromagnetic spectrum, ranging from 3 kHz to 900 THz, used for wireless communication. Figure 7.17: Electromagnetic spectrum for wireless communication 7.24 Figure 7.18: Propagation methods Unguided signals can travel from the source to the destination in several ways: 1. Ground propagation Emanate in all directions from the transmitting antenna and follow the curvature of the earth. 2. Sky propagation This type of transmission allows for greater distances with lower output power. 3. Line-of-sight propagation Signals are transmitted in straight lines directly from antenna to antenna. 7.25 7.3.1 Radio Waves There is no clear-cut demarcation between radio waves and microwaves. Normally, 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. 7.26 Figure 7.19: Omnidirectional antenna Radio waves use omnidirectional antennas that send out signals in all directions. The omnidirectional characteristics of radio waves make them useful for multicasting, in which there is one sender but many receivers. AM and FM radio, television, maritime radio, cordless phones are examples of multicasting. 7.27 7.3.2 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. Two types of antennas are used for microwave communications: the parabolic dish and the horn 7.28 7.3.3 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. *When we use our infrared remote control, we do not interfere with the use of the remote by our neighbors. Infrared waves Images 7.29 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 9 + Chapter 12 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 9 &12: Outline 9.1 INTRODUCTION 9.2 LINK-LAYER ADDRESSING 12.1 RANDOM ACCESS 12.2 CONTROLLED ACCESS 12.3 CHANNELIZATION 9.9.1 Nodes and Links Communication at the data-link layer is node-to-node. *A data unit from one point in the Internet needs to pass through many networks (LANs and WANs) to reach another point. Theses LANs and WANs are connected by routers. It is usual to refer to the two end hosts and the routers as nodes and the networks in between as links. *Figure 9.2 is a simple representation of links and nodes when the path of the data unit is only six nodes. WAN WAN Figure 9.2: Nodes and Links 9.3 9.9.2 Services The data-link layer is located between the physical and the network layers. The data-link layer provides services to the network layer. Also, it receives services from the physical layer. Data-link layer service: 1. Framing 2. Flow Control 3. Error Control 4. Congestion Control 9.4 9.9.3 Two Categories 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. 9.5 9.9.4 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: 1. Data Link Control (DLC) and 2. Media Access Control (MAC). Figure 9.3: Dividing the data-link layer into two sublayers 9.6 5-4 LINK-LAYER ADDRESSING IP addresses use as the identifiers at the network layer. *However, in a 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. A link-layer address is sometimes called a link address, sometimes a physical address, sometimes a hardware address and sometimes a MAC address. 9.7 Figure 9.5: IP addresses and link-layer addresses in a small internet When a datagram passes from the network layer to the data-link layer, the datagram will be encapsulated in a frame and two data-link addresses are added to the frame header. These two addresses are changed every time the frame moves from one link to another. *Figure 9.5 demonstrates the concept in a small internet. 9.8 9.2.1 Three Types of addresses Some link-layer protocols define three types of addresses: unicast, multicast, and broadcast. 1. Unicasting means one-to-one communication. 2. Multicasting means one-to-many communication. 3. Broadcasting means one-to-all communication. 9.9 Example 9.1 (unicast) The unicast link-layer addresses in the most common LAN, Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons. The second digit needs to be an even number. For example, the following is a link-layer unicast address of a computer. A2:34:45:11:92:F1 9.10 Example 9.2 (multicast) The multicast link-layer addresses in the most common LAN, Ethernet, are 48 bits (six bytes) that are presented as 12 hexadecimal digits separated by colons. The second digit, however, needs to be an odd number in hexadecimal. The following shows a multicast address: A3:34:45:11:92:F1 9.11 Example 9.3 (broadcast) The broadcast link-layer addresses in the most common LAN, Ethernet, are 48 bits, all 1s, that are presented as 12 hexadecimal digits separated by colons. The following shows a broadcast address: 9.12 9.2.2 ARP *Anytime a node has an IP datagram to send to another node in a link, it has the IP address of the receiving node. *However, the IP address of the next node is not helpful in moving a frame through a link; we need the link-layer address of the next node. This is the time when the Address Resolution Protocol (ARP) becomes helpful. ARP accepts an IP address from the IP protocol, maps the address to the corresponding link-layer address, and passes it to the data-link layer. Figure 9.6: Position of ARP in TCP/IP protocol suite 9.13 Figure 9.7: ARP operation 10.10.10.3 9.14 Figure 9.8: ARP packet 9.15 Figure 12.1: Taxonomy of multiple-access protocols When nodes or stations are connected and use a shared link, called a multipoint or broadcast link, we need a multiple-access protocol to coordinate access to the link. Many protocols have been devised to handle access to a shared link. All of these protocols belong to a sublayer in the data-link layer called media access control (MAC). 12.16 12-1 RANDOM ACCESS In random-access or contention methods, no station is superior to another station and none is assigned control over another. At each instance, a station that has data to send uses a procedure defined by the protocol to make a decision on whether or not to send. This decision depends on the state of the medium (idle or busy). 12.17 12.12.1 ALOHA In ALOHA, 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. *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. 12.18 Figure 12.2: Frames in a pure ALOHA network 12.12.2 CSMA To minimize the chance of collision and, therefore, increase the performance, the CSMA method was developed. 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.” *The chance of collision can be reduced if a station senses the medium before trying to use it. CSMA can reduce the possibility of collision, but it cannot eliminate it. the reason for this is shown in Figure 12.7. Figure 12.7: Space/time model of a collision in CSMA 12.19 12.12.3 CSMA/CD The CSMA method does not specify the procedure to handle 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 or not. If so, the station is finished. If there is a collision, the frame is sent again. Collision Collision signal signal 12.20 12.12.4 CSMA/CA Carrier sense multiple access with collision avoidance (CSMA/CA) was invented for wireless networks. In CSMA/CA, collisions are avoided *through the use of CSMA/CA’s three strategies: interframe space (IFS), contention window, and acknowledgments. Figure 12.17 shows the exchange of data and control frames in time. DIFS: DCF Interframe Spacing SIFS: Short Inter-frame Spacing 12.21 Figure 12.17: CSMA/CA and NAV Figure 12.9: Behavior of three Persistence Methods What should a station do if the channel is busy? What should a station do if the channel is idle? Three methods have been devised to answer these questions: 1-persistent method, the nonpersistent method, and the p-persistent method. Figure 12.10: Flow diagram for three persistence methods 12.22 12-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. 1. Reservation 2. Polling 3. Token Passing 12.23 12.2.1 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/leads the data frames sent in that interval. Figure 12.18 shows a situation with five stations and a five-minislot reservation frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has made a reservation. Figure 12.18: Reservation access method 12.24 12.2.2 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. The select is used whenever the primary device has data to send. The poll function is used by the primary device is ready to data receive. 12.25 Figure 12.19: Select and poll functions in polling-access method 12.2.3 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 which is logically before the station in the ring; the successor is the station which is after the station in the ring. Figure 12.20: Logical ring and physical topology in token-passing access method 12.26 12-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. In this section, we discuss three channelization protocols: 1. Frequency-Division Multiple Access (FDMA) 2. Time-Division Multiple Access (TDMA) 3. Code-Division Multiple Access (CDMA) 12.27 12.3.1 FDMA In frequency-division multiple access (FDMA), the available bandwidth is divided into frequency bands (channels). *Each station is allocated a band to send its data. *In other words, each band is reserved for a specific station, and it belongs to the station all the time. Each station also uses a bandpass filter to confine the transmitter frequencies. Figure 12.21: Frequency-division multiple access (FDMA) 12.28 12.3.2 TDMA In time-division multiple access (TDMA), the stations share the bandwidth of the channel in time. *Each station is allocated a time slot during which it can send data. *Each station transmits its data in its assigned time slot. *Figure 12.22 shows the idea behind TDMA. Figure 12.22: Time-division multiple access (TDMA) 12.29 12.3.3 CDMA ◼ Code-division multiple access (CDMA) was considered several decades ago. Recent advances in electronic technology have finally made its implementation possible. ◼ CDMA differs from FDMA because only one channel occupies the entire bandwidth of the link. ◼ It differs from TDMA because all stations can send data simultaneously; there is no timesharing. ◼ CDMA is based on coding theory. Each station is assigned a code. ◼ Suppose we have four stations; each has a sequence of chips which we designate as C1, C2, C3, and C4 (see Figure 12.23). Figure 12.23: Simple idea of communication with code 12.30 College of Computing and Informatics CS360 Computer Networks Chapter 13 + Chapter 15 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 13: Objectives Ethernet Evolution Standard Ethernet Fast Ethernet Gigabit Ethernet 10-Gigabit Ethernet 13.2 REVIEW Comparing the OSI and TCP/IP Models 13.3 Ethernet ▪ Most widely used LAN technology. ▪ Operates in the data link layer and the physical layer. ▪ It’s a family of networking technologies that are defined in the IEEE 802.2 and IEEE 802.3 standards. ▪ Supports data bandwidths of 10, 100, 1000, 10,000, 40,000, and 100,000 Mbps (100 Gbps) ▪ The Ethernet LLC sublayer (IEEE 802.2) handles the communication between the upper layers and the lower layers ▪ LLC is implemented in software (driver software of NIC card) ▪ Ethernet MAC sublayer (IEEE 802.3) is implemented by hardware, typically in the IEEE computer NIC. IEEE 13.4 Ethernet Protocol ▪ Remember: The data link layer is actually divided into two sublayers: Logical Link Control (LLC) and Media Access Control (MAC) *The data-link layer and the physical layer are the territory of the local and wide area networks. This means that when we discuss these two layers, we are talking about networks that are using them. IEEE 802 standard for LANs (IEEE Project 802) It is a way of specifying functions of the physical layer and the data-link layer of major LAN protocols. Network LLC Sublayer (IEEE 802.2) Data Link MAC Sublayer IEEE 802.15 IEEE 802.11 IEEE 802.3 Bluetooth Ethernet Wi-Fi Physical 13.5 13.13.2 Ethernet Evolution *The Ethernet LAN was developed in the 1970s by Robert Metcalfe and David Boggs. Since then, it has gone through four generations: Standard Ethernet (10 Mbps), Fast Ethernet (100 Mbps), Gigabit Ethernet (1 Gbps), and 10 Gigabit Ethernet (10 Gbps), as shown in Figure 13.2. We briefly discuss all these generations. 13.6 13-2 Standard Ethernet (10 Mbps) 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. 13.2.1 Characteristics 1. Connectionless and Unreliable Service Ethernet has no connection establishment or connection termination phases. The sender sends a frame whenever it has it. If a frame is corrupted during transmission, the receiver drops the frame silently. It is the duty of high-level protocols to find out about it. 13.7 13-2 Standard Ethernet (10 Mbps) 13.2.1 Characteristics 2. Ethernet frame The Ethernet frame contains seven fields, as shown in Figure 13.3. Figure 13.3: Ethernet frame 13.8 13-2 Standard Ethernet (10 Mbps) 13.2.2 Addressing Each station on an Ethernet network 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: The source address is always a unicast address—the frame comes from only one station. The destination address, however, can be unicast, multicast, or broadcast. Figure 13.4 shows how to distinguish a unicast address from a multicast address. Figure 13.4: Unicast and multicast addresses 13.9 Example 13.1 Question: Show how the address 47:20:1B:2E:08:EE is sent out online. Solution The way the addresses are sent out online is different from the way they are written in hexadecimal notation. 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: 13.10 Example 13.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 To find the type of the address, we need to look at the second hexadecimal digit from the left. If it is even, the address is unicast. If it is odd, the address is multicast. If all digits are Fs, the address is broadcast. a. This is a unicast address because A in binary is 1010 (even 10). b. This is a multicast address because 7 in binary is 0111 (odd 7). c. This is a broadcast address because all digits are Fs in hexadecimal. 13.11 13-2 Standard Ethernet (10 Mbps) 13.2.3 Access Method *Since the network that uses the standard Ethernet protocol is a broadcast network, we need to use an access method to control access to the sharing medium. The standard Ethernet chose CSMA/CD with 1-persistent method, discussed earlier in Chapter 12, Section 13.3. Collision Collision signal signal 13.12 13-2 Standard Ethernet (10 Mbps) 13.2.4 Implementation Standard Ethernet uses a coaxial cable (bus topology) or a set of twisted-pair cables with a hub (star topology) as shown in Figure 13.5. We need to know that transmission in the standard Ethernet is always broadcast. 13.13 13-2 Standard Ethernet (10 Mbps) 13.2.4 Implementation The Standard Ethernet defined several implementations, but only four of them became popular during the 1980s. Table 13.1 shows a summary of Standard Ethernet implementations. In the terminology 10BaseX The number defines the data rate (10 Mbps) The term Base means baseband (digital) signal X approximately defines either the maximum size of the cable in 100 meters (for example 5 for 500 or 2 for 185 meters) OR the type of cable, T for unshielded twisted pair cable (UTP) and F for fiber-optic. Table 13.1: Summary of Standard Ethernet implementations 13.14 13-3 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 (such as features of frame format and the maximum and minimum size). But the features of the Standard Ethernet that depend on the transmission rate, access method, and implementation had to be changed. 13.15 13.3.1 Fast Ethernet /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). 13.16 13.3.1 Fast Ethernet /Implementation 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 13.2 is a summary of the Fast Ethernet implementations. Table 13.2: Summary of Fast Ethernet implementations 13.17 13-4 Gigabit Ethernet (1 Gbps) 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 (1000 Mbps), but keep the address length, the frame format, and the maximum and minimum frame length the same. 13.18 13.4.1 Gigabit Ethernet / Implementation 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. Gigabit Ethernet can be categorized as either a two-wire or a four-wire implementation. The two-wire implementations use fiber-optic cable (1000Base-SX, short-wave, or 1000Base-LX, long-wave), or STP (1000Base-CX). The four-wire version uses category 4 twisted-pair cable (1000Base-T). Table 13.3: Summary of Gigabit Ethernet implementations 13.19 10-Gigabit Ethernet (10 Gbps) 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. 13.20 10-Gigabit Ethernet (10 Gbps) / Implementation 10 Gigabit Ethernet operates only in full-duplex mode, which means there is no need for contention. The 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 13.4 shows a summary of the 10 Gigabit Ethernet implementations. Table 13.4: Summary of 10-Gigabit Ethernet implementations 13.21 Chapter 15 Wireless LAN 13.22 Chapter 15: Objectives Wireless LAN: Introduction Wireless LAN: Access Control MAC Sublayer Bluetooth 13.23 15.1 Wireless LAN: Introduction Wireless communication is one of the fastest-growing technologies. Let us first compare the architecture of wired and wireless LANs to give some idea of what we need to look for when we study wireless LANs. Architectural Comparison (Wire vs Wireless LAN) 1. Medium In a wired LAN, we use wires to connect hosts. In a wireless LAN, the medium is air, the signal is generally broadcast. 2. Hosts In a wired LAN, a host is always connected to its network at a point. In a wireless LAN, a host is not physically connected to the network; it can move freely. 13.24 15.1 Wireless LAN: Introduction Architectural Comparison (Wire vs Wireless LAN) 3. Isolated LANs A wired isolated LAN is a set of hosts connected via a link-layer switch. A wireless isolated LAN, called an ad hoc network, is a set of hosts that communicate freely with each other. Figure 15.1 Isolated LANs: wired versus wireless 4. Connection to other Networks A wired LAN can be connected to another network using a router. A wireless LAN may be connected to a wired infrastructure network, to a wireless infrastructure network, or to another wireless LAN. Figure 15.2 Connection of a wired LAN and a wireless LAN to other networks 13.25 Wireless LAN: Access Control *Maybe the most important issue we need to discuss in a wireless LAN is access control. How can a wireless host get access to the shared medium (air)? The CSMA/CD algorithm does not work in wireless LANs for three reasons: 1. To detect a collision, a host needs to send and receive at the same time (sending the frame and receiving the collision signal). Wireless hosts do not have enough power to send and receive at the same time. 2. The hidden station problem prevents collision detection. 3. The distance between stations can be great. Signal fading could prevent a station at one end from hearing a collision at the other end. Figure 15.3: Hidden station problem 13.26 15.2.2 Wireless LAN: MAC Sublayer IEEE 802.11 defines two MAC sublayers: 1. Distributed Coordination Function (DCF) DCF uses CSMA/CA as the access method 2. Point Coordination Function (PCF). Optional access method *Figure 15.6 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. 13.27 Figure 15.12: Wireless LAN: Exposed station problem In this problem, a station refrains يمنعfrom using a channel when it is, in fact, available. 15.28 15-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. 15.3.1 Architecture Bluetooth defines two types of networks: piconet and scatternet. In piconet, one of which is called the primary; the rest are called secondaries. Scatternet is a combination of group of piconets. A secondary station in one piconet can be the primary in another piconet. Scatternet 13.29 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 17 McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 17: Outline 17.1 CONNECTING DEVICES 17.2 VIRTUAL LANS Chapter 17: Outline The first section discusses connecting devices. It first describes hubs and their features. The section then discusses link-layer switches (or simply switches, as they are called), and shows how they can create loops if they connect LANs with broadcast domains. The second section discusses virtual LANs or VLANs. The section first shows how membership in a VLAN can be defined. The section then discusses the VLAN configuration. It next shows how switches can communicate in a VLAN. Finally, the section mentions the advantages of a VLAN. 17-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. Figure 17.1: Three categories of connecting devices 17.4 17.17.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 is a multiport device, often called a hub, receives a signal and, before it becomes too weak or corrupted, regenerates and retimes the original bit pattern. Figure 17.2 shows that when a packet from station A to station B arrives at the hub, the signal representing the frame is regenerated to remove any possible corrupting noise, but the hub forwards the packet from all outgoing ports except the one from which the signal was received. In other words, the frame is broadcast. All stations in the LAN receive the frame, but only station B keeps it. The rest of the stations discard it. Figure 17.2: Hub 17.5 17.17.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. In Figure 17.3, we have a LAN with four stations that are connected to a link-layer switch. If a frame destined for station 71:2B:13:45:61:42 arrives at port 1, the link- layer switch consults its table to find the departing port. According to its table, frames for 71:2B:13:45:61:42 should be sent out only through port 2; therefore, there is no need for forwarding the frame through other ports. Figure 17.3: Link-Layer Switch 17.6 Figure 17.4: Learning switch When station A sends a frame to station D, the switch does not have an entry for either D or A. The frame goes out from all three ports; the frame floods the network. However, by looking at the source address, the switch learns that station A must be connected to port 1. This means that frames destined for A, in the future, must be sent out through port 1. The switch adds this entry to its table. 17.7 *Figure 17.4: Learning switch (Cont.) To make a table dynamic, we need a switch that gradually learns from the frames’ movements. To do this, the switch inspects both the destination and the source addresses in each frame that passes through the switch. The destination address is used for the forwarding decision (table lookup); the source address is used for adding entries to the table and for updating purposes. Let us elaborate on this process using Figure 17.4. 1. When station A sends a frame to station D, the switch does not have an entry for either D or A. The frame goes out from all three ports; the frame floods the network. However, by looking at the source address, the switch learns that station A must be connected to port 1. This means that frames destined for A, in the future, must be sent out through port 1. The switch adds this entry to its table. The table has its first entry now. When station D sends a frame to station B, the switch has no entry for B, so it floods the network again. However, it adds one more entry to the table related to station D. The learning process continues until the table has information about every port. However, note that the learning process may take a long time. For example, if a station does not send out a frame (a rare situation), the station will never have an entry in the table. 17.8 Figure 17.5: Loop problem in a learning switch 17.9 Figure 17.5: Loop problem in a learning switch (Cont.) Figure 17.5 shows a very simple example of a loop created in a system with two LANs connected by two switches. 1. Station A sends a frame to station D. The tables of both switches are empty. Both forward the frame and update their tables based on the source address A. 2. Now there are two copies of the frame on LAN 2. The copy sent out by the left switch is received by the right switch, which does not have any information about the destination address D; it forwards the frame. The copy sent out by the right switch is received by the left switch and is sent out for lack of information about D. Note that each frame is handled separately because switches, as two nodes on a broadcast network sharing the medium, use an access method such as CSMA/CD. The tables of both switches are updated, but still there is no information for destination D. 3. Now there are two copies of the frame on LAN 1. Step 2 is repeated, and both copies are sent to LAN 2. 4. The process continues on and on. Note that switches are also repeaters and regenerate frames. So, in each iteration, there are newly generated fresh copies of the frames. 17.10 Spanning Tree Algorithm To solve the looping problem, the IEEE specification requires that switches use the spanning tree algorithm to create a loopless topology. In graph theory, a spanning tree is a graph in which there is no loop. In a switched LAN, this means creating a topology in which each LAN can be reached from any other LAN through one path only (no loop). 17.11 Spanning Tree Algorithm Figure 17.6 shows a system with four LANs and five switches. We have shown the physical system and its representation in graph theory. The nodes are the LANs and the switches. The connecting arcs show the connection of a LAN to a switch and vice versa. Figure 17.6: A system of connected LANs and its graph 17.12 Spanning Tree Algorithm To find the spanning tree, we need to assign a cost (metric) to each arc. Such has minimum hops. However, the hop count is normally: 1 from a switch to the LAN and 0 in the reverse direction. Figure 17.6: A system of connected LANs and its graph (Part b) 17.13 Spanning Tree Algorithm The process for finding the spanning tree involves three steps: Step 1: Every switch has a built-in ID (normally the serial number, which is unique). Each switch broadcasts this ID so that all switches know which one has the smallest ID. The switch with the smallest ID is selected as the root switch (root of the tree). We assume that switch S1 has the smallest ID. It is, therefore, selected as the root switch. 17.14 Spanning Tree Algorithm Step 2: The algorithm tries to find the shortest path (a path with the shortest cost) from the root switch to every other switch or LAN. The shortest path can be found by examining the total cost from the root switch to the destination. The combination of the shortest paths creates the shortest tree, which is also shown in Figure 17.7. Figure 17.7: Finding the shortest path and the spanning tree for a switch. 17.15 Spanning Tree Algorithm Step 3: Based on the spanning tree, We mark the ports that are part of the spanning tree, the forwarding ports, which forward a frame that the switch receives. We also mark those ports that are not part of the spanning tree, the blocking ports, which block the frames received by the switch. Figure 17.8 shows the logical systems of LANs with forwarding ports (solid lines) and blocking ports (broken lines). Figure 17.8: Forwarding and blocking ports after using spanning tree algorithm 17.16 17.17.3 Routers A router is a three-layer device; it operates in the physical, data-link, and network layers. In Figure 17.9, assume an organization has two separate buildings with a Gigabit Ethernet LAN installed in each building. The organization uses switches in each LAN. *The two LANs can be connected to form a larger LAN using 10 Gigabit Ethernet technology that speeds up the connection to the Ethernet and the connection to the organization server. A router then can connect the whole system to the Internet. Figure 17.9: Routing example 17.17 17.17.3 Routers There are three major differences between a router and a repeater or a switch. 1. A router has a physical and logical (IP) address for each of its interfaces. 2. A router changes the link-layer address of the packet (both source and destination) when it forwards the packet. 3. *A router acts only on those packets in which the link-layer destination address matches the address of the interface at which the packet arrives. 17.18 17-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. 17.19 Figure 17.11: A switch using VLAN software Figure 17.11 shows a switched LAN divided into VLANs. The whole idea of VLAN technology is to divide a LAN into logical, instead of physical, segments. *A LAN can be divided into several logical LANs, called VLANs. Each VLAN is a work group in the organization. The group membership in VLANs is defined by software, not hardware. *Any station can be logically moved to another VLAN. All members belonging to a VLAN can receive broadcast messages sent to that particular VLAN. *This means that if a station moves from VLAN 1 to VLAN 2, it receives broadcast messages sent to VLAN 2, but no longer receives broadcast messages sent to VLAN 1. 17.20 Figure 17.12: Two switches in a backbone using VLAN software VLAN technology even allows the grouping of stations connected to different switches in a VLAN. Figure 17.12 shows a backbone local area network with two switches and three VLANs. Stations from switches A and B belong to each VLAN. 17.21 17.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. 17.2.2 Configuration How are the stations grouped into different VLANs? Stations are configured in one of three ways: manually, automatically and semi-automatically 17.22 17.2.3 Communication between Switches In a multi-switched backbone, each switch must know not only which station belongs to which VLAN, but also the membership of stations connected to other switches. For example, in Figure 17.12, switch A must know the membership status of stations connected to switch B, and switch B must know the same about switch A. Three methods have been devised for this purpose: table maintenance, frame tagging, and time-division multiplexing. 17.23 17.2.4 Advantages There are several advantages to using VLANs. 1. Cost and Time Reduction VLANs can reduce the migration cost of stations going from one group to another. 2. 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. 3. 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. 17.24 Thank You College of Computing and Informatics CS360 Computer Networks Chapter 18- Introduction to Network Layer McGraw-Hill ©The McGraw-Hill Companies, Inc., 2000 Chapter 18: Outline NETWORK-LAYER SERVICES PACKET SWITCHING NETWORK-LAYER PERFORMANCE IPv4 ADDRESSES - Classful 18-1 NETWORK-LAYER SERVICES Before discussing the network layer on the Internet today, let’s briefly discuss the network-layer services that, in general, are expected from a network-layer protocol. 1. Packetizing 2. Routing and Forwarding Figure 18.1 shows the communication between Alice and Bob at the network layer. Figure 18.1: Communication at the network layer 18.3 18.18.1 Packetizing The first duty of the network layer is packetizing. Packetizing means 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. 18.4 18.18.2 Routing and Forwarding Other duties of the network layer, which are as important as the first, are routing and forwarding, which are directly related to each other. Forwarding Send the packet value out of interface 2 B Data B Data Figure 18.2: Forwarding process 18.5 18-2 PACKET SWITCHING A router, in fact, is a switch that creates a connection between an input port and an output port (or a set of output ports), just as an electrical switch connects the input to the output to let electricity flow. Data communication switching techniques are divided into two broad categories: 1. Circuit switching (example: telephone network) 2. Packet switching (uses in network layer) Today, packet switching network uses two approaches to route the packets: 1. Datagram (connectionless) approach. 2. Virtual circuit (connection-oriented) approach 18.6 18.2.1 Datagram (Connectionless) Approach When the Internet started, to make it simple, the network layer was designed to provide a connectionless service in which the network- layer protocol treats each packet independently, with each packet having no relationship to any other packet. *The idea was that the network layer is only responsible for delivery of packets from the source to the destination. *In this approach, the packets in a message may or may NOT travel the same path to their destination. Figure 18.3 shows the idea. Figure 18.3: A connectionless packet-switched network 18.7 Figure 18.4: Forwarding process in a router when used in a connectionless network In connectionless packet switching network, router ONLY routes the packet based on the destination address. SA DA Data SA DA Data 18.8 18.2.2 Virtual-Circuit (connection-oriented) Approach In a connection-oriented service (also called virtual-circuit approach), there is a relationship between ALL packets belonging to a message. Before all datagrams in a message can be sent, a virtual connection should be set up to define the path for the datagrams. After connection setup, the datagrams can all follow the same path. In this type of service, not only must the packet contain the source and destination addresses, it must also contain a flow label, a virtual circuit identifier that defines the virtual path the packet should follow. Figure 18.5: A virtual-circuit packet-switched network 18.9 Figure 18.6: Forwarding process in a router when used in a virtual circuit network Figure 18.6 shows the forwarding decision is based on the value of the label, or virtual circuit identifier. 18.10 Create Virtual-Circuit connection ❑ To create a virtual circuit connection, three phases are used: 1. Setup phase - In this phase, a router create an entry for a virtual circuit. - Two auxiliary packets need to be exchanged between the source and the destination; request packet and acknowledgment packet. (see figures 18.7, 18.8) 2. Data-transfer phase. - After all routers have created their forwarding table for specific virtual circuit, then the network-layer packets belonging to one message can be sent one after another. (see figure 18.9) 3. Teardown phase. - In the teardown phase, source A, after sending all packets to B, sends a special packet called teardown packet - Destination B responds with a confirmation packet. - All routers delete the corresponding entries from their tables. 1.11 4.11 *Figure 18.7: Sending request packet in a virtual-circuit network A to B A to B A to B A to B 18.12 *Figure 18.8: Sending acknowledgments in a virtual-circuit network 18.13 *Figure 18.9: Flow of one packet in an established virtual circuit 18.14 18-3 NETWORK-LAYER PERFORMANCE *The upper-layer protocols that use the service of the network layer expect to receive an ideal service, but the network layer is not perfect. The performance of a network can be measured in terms of delay, throughput, and packet loss. Congestion control is an issue that can improve the performance. 18.15 18.3.1 Delay All of us expect instantaneous response from a network, but a packet, from its source to its destination, encounters delays. The delays in a network can be divided into four types: 1. Transmission delay The time a sender needs to put the bits in a packet on the transmission media one by one. 2. Propagation delay The time it takes for a bit to travel from point A to point B in the transmission media. 3. Processing delay The time require to process a packet in a router 4. Queuing delay The time the packet waits in router’s queue. 18.16 18.3.2 Throughput (transmission rate) Throughput at any point in a network is defined as the number of bits passing through the point in a second. which is actually the transmission rate of data at that point. *In a path from source to destination, a packet may pass through several links (networks), each with a different transmission rate. Assume that we have three links, each with a different transmission rate, as shown in Figure 18.10. In general, in a path with n links in series: Throughput = minimum {TR1, TR2,…,TRn) 18.17 Figure 18.10: Throughput in a path with three links in a series 18.3.3 Packet Loss *Another issue that severely affects the performance of communication is the number of packets lost during transmission. *When a router receives a packet while processing another packet, the received packet needs to be stored in the input buffer waiting for its turn. A router, however, has an input buffer with a limited size. A time may come when the buffer is full and the next packet needs to be dropped. The effect of packet loss on the Internet network layer is that the packet needs to be resent, *which in turn may create overflow and cause more packet loss. 18.18 18.3.4 Congestion Control Congestion control is a mechanism for improving performance. Congestion control refers to the mechanisms and techniques to control the congestion and keep the load below the capacity of the network. In Chapter 2