Lecture 6 Reminder: Homework 2, Programming Project 2 due on Thursday. Questions? Tuesday, September 13 CS 475 Networks - Lecture 6 1 Outline Chapter 2 - Getting Connected 2.1 Perspectives on Connecting 2.2 Encoding 2.3 Framing 2.4 Error Detection 2.5 Reliable Transmission 2.6 Ethernet 2.7 Wireless 2.8 Summary Tuesday, September 13 CS 475 Networks - Lecture 6 2 Ethernet Ethernet is the overwhelmingly most successful local area networking technology. Ethernet is a working example of carrier sense, multiple access with collision detection (CSMA/CD) technology. Ethernet was developed by Xerox and is based on the Aloha packet-radio network once used at the University of Hawaii. Ethernet was standardized as IEEE 802.3 Tuesday, September 13 CS 475 Networks - Lecture 6 3 Ethernet - Physical Properties Original Ethernet (thick-net) used 10Base5 (10 Mbps/Baseband/500 m link) signaling. Multiple hosts could be connected to the same cable and any signal was received by all hosts. Fig 2.22 Ethernet transceiver and adaptor Thin-net used 10Base2 (200 m). Twisted pair uses 10/100BaseT (100 m) and CAT5 cable. Tuesday, September 13 CS 475 Networks - Lecture 6 4 Ethernet - Physical Properties Multiple thick-net segments could be joined together with (no more than 4) repeaters for a total reach of 2500 m. Fig. 2.23 Ethernet repeater Thin-net segments could be joined similarly. Tuesday, September 13 CS 475 Networks - Lecture 6 5 Ethernet - Physical Properties Fig. 2.24 Ethernet hub With 10/100BaseT a hub (multiway repeater) is used to connect hosts and segments. All hosts on segments connected by hubs or repeaters are in the same collision domain. Tuesday, September 13 CS 475 Networks - Lecture 6 6 Access Protocol - Frame Format An Ethernet frame has a 64 bit preamble of alternating 0s and 1s that are used for synch. Ethernet (MAC) addresses are 48 bits. Each adaptor has a unique address. The type field is used for demuxing higher protocols. Each frame contains at least 46 bytes of data (64 total) and no more than 1500 bytes. A 32 bit CRC is included in each frame. Tuesday, September 13 CS 475 Networks - Lecture 6 7 Access Protocol - Addresses Addresses are 48 bits (6 bytes). They are typically printed in hex with colons separating the bytes (8:0:2b:e4:b1:2). Manufacturers have their own prefix to ensure that each adaptor has a unique address. A frame with a destination address of all 1s is a broadcast frame. A destination address with a leading 1 (but not a broadcast address) is a multicast frame. Tuesday, September 13 CS 475 Networks - Lecture 6 8 Access Protocol Transmitter Algorithm When an adaptor has a frame to send and it senses that the line is idle, it transmits the frame immediately. If the line is busy, it waits for the line to go idle and then transmits the frame. Due to propagation delays, collisions can occur. When an adaptor detects that a frame it sent has collided with another frame it stops transmitting and immediately transmits a 32 bit jamming sequence. Tuesday, September 13 CS 475 Networks - Lecture 6 9 Access Protocol Transmitter Algorithm In the worst case, A and B are widely separated and B starts transmitting just as A's frame reaches B. A's frame must be at least 2 x 2500 m / 3 x 108 m/s = 16.67 μs long in order to detect the collision. Ethernet specifies a min. length of 51.2 μs (512 bits or 64 bytes at 10 Mbps.) Fig. 2.26 Worst-case collision scenario Tuesday, September 13 CS 475 Networks - Lecture 6 10 Access Protocol Transmitter Algorithm Once a collision has been detected the adaptor waits before transmitting the frame again. Exponential backoff is used. It firsts waits either (randomly) 0 or 51.2 μs. If there is another collision it waits either 0, 51.2, 102.4 or 153.6 μs and so on. In general, a k value is randomly selected between 0 and 2n – 1 (n is the number of collisions). The adaptor waits k x 51.2 μs. Adaptors usually give up after 16 tries and report an error to the host.CS 475 Networks - Lecture 6 Tuesday, September 13 11 Experience with Ethernet Multi-access Ethernet has been used primarily in situations where there are fewer than 200 hosts and distances in the 100s of meters, since collisions waste network capacity. E.g. in a room to a hub connected to switch in a wiring closet. Tuesday, September 13 CS 475 Networks - Lecture 6 12 Experience with Ethernet Ethernet characteristics that made it successful Original Ethernet easy to administer and maintain no switches, no configuration tables, just add a tap to the network wire. Inexpensive - coaxial cable is cheap, one network adapter per host. Switched networks needed to similar. Resulted in switched Ethernet. Most Ethernet links are now point-to-point between hubs, switches, and routers. Tuesday, September 13 CS 475 Networks - Lecture 6 13 Wireless Wireless networks share some common characteristics with wired networks Bit errors are of great concern Media is inherently multi-access Wireless networks differ from wired networks in several ways Low power, especially small mobile devices Limits on transmission power and frequency, uses spread spectrum to minimize interference from other devices Tuesday, September 13 CS 475 Networks - Lecture 6 14 Wireless Table 2.4 Overview of Leading Wireless Technologies Bluetooth 802.15.1 Typical link 10 m length Typical 2.1 Mbps data rate (shared) Typical Peripherals to use computer (PAN) Wired USB analogy Tuesday, September 13 WiFi 802.11 100 m 3G Cellular 54 Mbps (shared) Laptop to wired network 384+ kbps (per conn.) Mobile device to wired tower DSL Ethernet CS 475 Networks - Lecture 6 Tens of km 15 Wireless Most common wireless links are asymmetric. One node (the base station) is not mobile and has a wired (or high BW) connection to another network. Fig 2.28 Wireless network with base station Even though radio waves transmitted by one client may be received by another, all node-tonode comm. is routed through the base station. Tuesday, September 13 CS 475 Networks - Lecture 6 16 Wireless The base station topology is associated with three levels of mobility: (1) no mobility (original WiMAX), (2) mobility within the range of a base (Bluetooth), and (3) mobility between bases (Wi-Fi, cell phones). An alternative topology is the mesh or ad hoc network in which there is no base station. All nodes are peers and communicate with neighbors. Messages may be forwarded along a chain of peer nodes. Tuesday, September 13 CS 475 Networks - Lecture 6 17 Wireless Fig 2.29 A wireless mesh or ad hoc network Tuesday, September 13 CS 475 Networks - Lecture 6 18 802.11 / Wi-Fi – Physical Properties Wi-Fi runs over six different physical layer protocols. The original 802.11 defined spread spectrum and direct sequence channels at 2 Mbps. 802.11b defined a new channel operating at 11 Mbps. All operated at 2.4 GHz. 802.11a delivers up to 54 Mbps and operates at 5 GHz. 802.11g went back to 2.4 GHz and delivers up to 54 Mbps. Most commercial products support 802.11a, 802.11b, and 802.11g to ensure compatibility with all WiFi devices. Tuesday, September 13 CS 475 Networks - Lecture 6 19 802.11 / Wi-Fi Collision Avoidance Due to hidden nodes collision avoidance is used instead of collision detection. The sender sends a Request to Send (RTS) packet waiting for a Clear to Send (CTS) from the receiver. Any adjacent nodes that see the CTS do not transmit. Tuesday, September 13 Fig. 2.30/2.31 Hidden and Exposed Nodes CS 475 Networks - Lecture 6 20 802.11 / Wi-Fi - Scanning To enable initial connection and mobility between access points (APs): 1) A node sends a Probe. 2) All APs within range send a Probe Response. 3) The node sends an Assoc. Request to one AP 4) The AP responds with an Assoc. Response frame Tuesday, September 13 CS 475 Networks - Lecture 6 Fig. 2.32/2.33 Node Mobility 21 802.11 / Wi-Fi - Frame Format A WiFi frame can carry up to 2,312 data bytes. The Control field indicates if the frame is an RTS or CTS and also contains the ToDS and FromDS bits. If two nodes are directly comm. both DS bits are 0, Addr1 ids the destination and Addr2 the source. In the more complex case where two nodes use two different APs, both bits are 1 and the AP addresses are included in the frame. Tuesday, September 13 CS 475 Networks - Lecture 6 22 Bluetooth (802.15.1) Bluetooth operates in the license exempt band of 2.45 GHz. It offers speeds up to 2.1 Mbps and low power consumption. It has a short range of only 10 m. A Bluetooth piconet consists of a master device and up to seven active slave devices (up to 255 devices can be inactive or parked). All comm. is through the master. Bluetooth uses spread spectrum across 79 channels to prevent interference with other devices operating at 2.45 GHz. Tuesday, September 13 CS 475 Networks - Lecture 6 23 Bluetooth (802.15.1) Fig 2.35 A Bluetooth piconet Tuesday, September 13 CS 475 Networks - Lecture 6 24 Cell Phone Technologies The area served by a cell phone base station is known as a cell. Cells overlap, but at any time a phone is communication with only one base. As the phone moves a handoff may be used to transfer the phone to a new base. There are several competing cell phone technologies. 2G (and higher) technologies are digital and optimized for voice. 3G and 4G have higher BW and simultaneous voice and data transmission. There are several (incompatible) technologies. Tuesday, September 13 CS 475 Networks - Lecture 6 25 Summary Chapter 2 introduced the many and varied types of links, and looked at five key problems How to encode bits into a signal at a source node and recover the bits at the receiving node How to package bits into frames How to detect bit errors How to make a link appear reliable How to mediate access to a shared link so that all nodes eventually have a chance to transmit data Tuesday, September 13 CS 475 Networks - Lecture 6 26