Download presentation
Presentation is loading. Please wait.
Published byLoraine Harmon Modified over 8 years ago
1
Chapter 4 Medium Access Control Sublayer Computer Networks
2
Medium Access Control Sublayer Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Channel Allocation Problem Multiple Access Protocols Ethernet Wireless LANs Broadband Wireless Bluetooth RFID Data Link Layer Switching Revised: August 2011
3
Network Links Point to point Broadcast Broadcast channels are called Multiaccess channels Random access Channels In a broadcast network, the key issue is how to determine who gets to use the channel when there is competition for it. Protocols to determine who gets access belong to the MAC sublayer TheProblem
4
The MAC Sublayer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Responsible for deciding who sends next on a multi-access link An important part of the link layer, especially for LANs Physical Link Network Transport Application MAC is in here!
5
Channel Allocation Problem (1) How to allocate a single broadcast channel among competing users. Static allocation: divide capacity among users For fixed channel and traffic from N users ( each gets 1/N) Divide up bandwidth using FDM, TDM, CSMA, etc. This is a static allocation, e.g., FM radio Works for small number of users with steady demand This static allocation performs poorly for bursty traffic Allocation to a user will sometimes go unused Some denied access even if bandwidth is available, but assigned to others Most channels are idle most of the time CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
6
Channel Allocation Problem (2) Dynamic allocation gives the channel to a user when they need it. Potentially N times as efficient for N users. Schemes vary with assumptions: AssumptionImplication Independent trafficN independent stations ( computer, phone) Often not a good model, but permits analysis Single channelAll stations transmit on same channel No external way to coordinate senders ( can assign priorities) Observable collisions If two frames transmit, collision occurs- back off try again Needed for reliability; mechanisms vary (eg. CDMA) Continuous or slotted time Slotting may improve performance- contains 0 or more frames (idle, successful or collision) Carrier senseCan improve performance if available CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
7
Some assumptions were made: Frame arrivals are independent and at a constant rate In reality, not good model of network traffic (based on quequeing theory and Poisson Distributions) Single challenge – no way to communicate Collision assumption- stations need a way to detect collisions Wired channels – hardware can detect collisions Wireless more difficult to detect Slotted time assumes a master clock- not always available Networks may or may not have carrier sense- wireless can’t always use it- out of range Channel Allocation Problem
8
Simple queueing theory example: ( See p.259) Average time delay (T) to send a frame onto a channel of capacity C bps. Assume a random average arrival rate of λ frames/sec and that frames vary in length with an average length of 1/μ bits. The service rate of the channel is μC frames/sec According to queueing theory the delay is T = 1/( μC – λ) http://en.wikipedia.org/wiki/Poisson_distribution Poisson Distribution
9
When λ is small, the range of likely possibilities is near 0. As λ gets larger, the probability of zero occurrences becomes unlikely The “hump” is the likelihood of the occurrence of a certain value http://www.umass.edu/wsp/resources/poisson/ Poisson Distribution Number of occurrences
10
Multiple Access Protocols CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 ALOHA » CSMA (Carrier Sense Multiple Access) » Collision-free protocols » Limited-contention protocols » Wireless LAN protocols »
11
1970’s in University of Hawaii – connect users on remote islands String cables in Pacific Ocean not feasible Used short-range radios Users shared upstream frequency to send frames to central computer Two versions Pure – time continuous Slotted divided into discrete slots into which all frames must fit Basic idea – let users transmit whenever they have data to be sent. If there are collisions handle them – called a contention system ALOHA
12
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.12 ALOHA -Random Access Protocols ALOHAnet
13
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.13 ALOHA Random Access Protocols The ALOHA protocol is straightforward: when a station has a packet to send it transmits the packet on the inbound frequency the central transmitter repeats the transmission on the outbound frequency (which all stations can receive) To insure that transmission is successful a sending station listens to the outbound channel if a copy of its packet arrives, the sending station moves to the next packet if no copy arrives, the sending station waits a short time and tries again
14
Pure ALOHA CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 In pure ALOHA, users transmit frames whenever they have data; users retry after a random time for collisions Efficient and low-delay under low load ` Collision Time User A B C D E
15
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.15 ALOHA Why might a packet fail to arrive? Interference if two stations simultaneously transmit the signals will interfere and the two transmissions will be garbled called a collision, and say that the two transmitted packets collide The protocol handles a collision by requiring a sender to retransmit each lost packet
16
When two frames try to occupy the same channel there is a collision In a collision frames are damaged and destroyed Senders need a way to detect other transmissions If frame is destroyed, sender waits a random time and rebroadcasts Referred to as exponential backoff -doubling the wait time after each failure Frames do not collide if no other frames are sent within one frame time of its start When will a frame arrive undamaged? P 0 =probability of 0 collisions For G frames and S throughput S = GP 0 ( about 18% efficient) ALOHA
17
Pure ALOHA CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Collisions happen when other users transmit during a vulnerable period that is twice the frame time Synchronizing senders to slots can reduce collisions
18
Slotted ALOHA CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Slotted ALOHA is twice as efficient as pure ALOHA Low load wastes slots, high loads causes collisions Efficiency up to 1/e (37%) for random traffic models
19
Data Link Layer5-19 Slotted ALOHA Pros single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons collisions, wasting slots idle slots nodes may be able to detect collision in less than time to transmit packet clock synchronization
20
The probability that there is no other traffic during a time slot is e -G, where G is the number of packet attempts per unit time. Slotted ALOHA peaks at G= 1, with a throughput of S= 1/e or about 37%, which is twice that of pure ALOHA. Optimal is 37% empty slots, 37% successful transmissions and 26% collisions. Operating at higher values of G reduces the number of empties, but increases the number of collisions exponentially. Slotted ALOHA
21
Data Link Layer5-21 Summary of MAC protocols channel partitioning, by time, frequency or code Time Division, Frequency Division random access (dynamic), ALOHA, S-ALOHA, CSMA, CSMA/CD carrier sensing: easy in some technologies (wire), hard in others (wireless) CSMA/CD used in Ethernet CSMA/CA used in 802.11 taking turns polling from central site, token passing Bluetooth, FDDI, IBM Token Ring
22
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.22 CSMA - Ethernet Researchers at Xerox PARC created a random access protocol (1973) In 1978, a standard (also called the DIX standard) was created by Digital Equipment Corporation, Intel, and Xerox It is widely known as Ethernet It uses cable as a shared medium instead of broadcasting radio frequency transmissions through the atmosphere
23
Bob Metcalfe and David Boggs developed the Ethernet protocol Classic Ethernet
24
Data Link Layer5-24 Classic Ethernet “dominant” wired LAN technology: cheap $20 for NIC first widely used LAN technology simpler, cheaper than token LANs and ATM kept up with speed race: 10 Mbps – 10 Gbps Metcalfe’s Ethernet sketch
25
Data Link Layer5-25 Ethernet -Star topology bus topology popular through mid 90s all nodes in same collision domain (can collide with each other) today: star topology prevails active switch in center each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other) switch bus: coaxial cable star
26
Data Link Layer5-26 Ethernet Frame Structure Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates
27
Data Link Layer5-27 Ethernet Frame Structure (more) Addresses: 6 bytes if adapter receives frame with matching destination address, or with broadcast address (e.g. ARP packet), it passes data in frame to network layer protocol otherwise, adapter discards frame Type: indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, AppleTalk) CRC: checked at receiver, if error is detected, frame is dropped
28
Data Link Layer5-28 802.3 Ethernet Standards: Link & Physical Layers many different Ethernet standards common MAC protocol and frame format different speeds: 2 Mbps, 10 Mbps, 100 Mbps, 1Gbps, 10G bps different physical layer media: fiber, cable application transport network link physical MAC protocol and frame format 100BASE-TX 100BASE-T4 100BASE-FX 100BASE-T2 100BASE-SX 100BASE-BX fiber physical layer copper (twister pair) physical layer
29
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.29 CSMA - Ethernet Ethernet uses three (3) mechanisms to handle collisions: Carrier sense Collision detection Binary exponential backoff
30
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.30 CSMA - Ethernet Ethernet requires each station to monitor the cable to detect whether another transmission is already in progress this process is known as carrier sense it prevents the most obvious collision problems and substantially improves network utilization
31
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.31 CSMA - Collisions A collision can occur if two stations wait for a transmission to stop, find the cable idle, and both start transmitting A small part of the problem is that even at the speed of light, some time is required for a signal to travel down the cable Thus, a station at one end of the cable cannot know instantly when a station at the other end begins to transmit
32
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.32 CSMA – Collision Detection To handle collisions each station monitors the cable during transmission If the signal on the cable differs from the signal that the station is sending it means that a collision has occurred the technique is known as collision detection when a collision is detected, the sending station aborts transmission
33
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.33 CSMA - Collisions Many details complicate Ethernet transmission For example, following a collision, transmission does not abort until enough bits have been sent to guarantee that the collided signals reach all stations Furthermore, following a transmission, stations must wait for an interpacket gap (9.6 sec for a 10 Mbps Ethernet) to insure that all stations sense an idle network and have a chance to transmit
34
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.34 Binary Exponential Backoff After a collision occurs a computer must wait for the cable to become idle again before transmitting a frame Randomization is used to avoid having multiple stations transmit simultaneously as soon as the cable is idle The standard specifies a maximum delay, d, and requires each station to choose a random delay less than d after a collision occurs
35
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.35 Binary Exponential Backoff When two stations each choose a random value the station that chooses the smallest delay will proceed to send a packet and the network will return to normal operation In the case where two or more computers happen to choose nearly the same amount of delay they will both begin to transmit at nearly the same time producing a second collision
36
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.36 Binary Exponential Backoff To avoid a sequence of collisions Ethernet requires each computer to double the range from which a delay is chosen after each collision a computer chooses a random delay between 0 - d after one collision a random delay between 0 - 2d after a second collision a random delay between 0 - 4d after a third, and so on After a few collisions, the range from which a random value is chosen becomes large Thus, some computer will choose a random delay shorter than the others, and will transmit without a collision
37
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.37 Binary Exponential Backoff Doubling the range of the random delay after each collision is known as binary exponential backoff By using exponential backoff an Ethernet can recover quickly after a collision because each computer agrees to wait longer times between attempts when the cable becomes busy
38
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.38 Binary Exponential Backoff Even in the unlikely event that two or more computers choose delays that are approximately equal exponential backoff guarantees that contention for the cable will be reduced after a few collisions The combination of techniques described above is known by the name Carrier Sense Multi-Access with Collision Detection (CSMA/CD)
39
© 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.39 CSMA/CD Algorithm
40
CSMA CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Carrier Sense Multiple Access (CSMA) CSMA improves on ALOHA by sensing the channel! User doesn’t send if it senses someone else Variations on what to do if the channel is busy: 1-persistent (greedy) sends as soon as idle Nonpersistent waits a random time then tries again p-persistent sends with probability p when idle
41
Carrier Sense Multiple Access 1-Persistent is the simplest scheme but is greedy : When station has data to send, it listens to channel to see if anyone else is transmitting If channel is idle, it sends its data, otherwise it waits. When channel becomes idle it transmits. If a collision occurs, it waits a random amount of time and starts again. Called 1-persistent because the station transmits with a probability of 1 when the channel is idle. Collisions occur and propagation delay and bandwidth-delay product increases chance. Still better than ALOHA CSMA 1-Persistent
42
Conscious attempt is made to be non-greedy: Station listens for an idle signal and if no one else is transmitting it sends its data. If channel is in use it does not keep sensing; instead it waits a random amount of time before it tries sensing again. This leads to a better channel utilization but longer delays than 1- Persistent CSMA CSMA Non-Persistent
43
This protocol is used with slotted channels When a station is ready to send, it senses the channel If the channel is idle, it sends with a probability p. With a probability q = 1-p, it defers until the next slot. If that slot is idle, it either transmits or defers again with probabilities p and q. This continues until the frame is transmitted or until another station begins transmitting. In this case, it acts as though there was a collision and randomly backs off. WI-Fi ( 802.11) uses a refinement of this protocol CSMA p-Persistent
44
CSMA – Persistence CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 CSMA outperforms ALOHA, and being less persistent is better under high load
45
CSMA protocols are an improvement over ALOHA because they ensure that no station transmits while the channel is busy. If two stations sense the channel to be idle and both start transmitting simultaneously, collisions will still An improvement is for the station to quickly detect the busy channel and to stop transmitting since the frame will be garbeled and lost anyway. This is known as CSMA/CD ( Carrier Sense Multiple Access with Collision Detection) and it saves time and bandwidth. CSMA/CD
46
CSMA/CD ( Carrier Sense Multiple Access with Collision Detection) This is important because it is the basis of the Ethernet LAN protocol. Suppose a station has just finished transmitting a frame and not any other station with a frame to send can do so. If two or more begin to send there will be a collision. If a station detects the collision, it aborts the transmission, waits a random time and tries again sending when the channel becomes idle. Thus there are contention and transmitting times as well as idle times CSMA/CD
47
CSMA – Collision Detection CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 CSMA/CD improvement is to detect/abort collisions Reduced contention times improve performance Collision time is much shorter than frame time
48
The contention algorithm: Suppose two stations begin to transmit at the same time (t0). How long will it take them to detect a collision? The minimum time is the same as the time it takes for the signal to propagate from one station to another. Suppose a station begins transmitting and just before the frame arrives that station begins transmitting. When it detects the collision, it stops transmitting, but in the meantime almost 2 time units have passed (2τ –ε). We can think of this as a slotted ALOHA system with a slot of 2 τ CSMA/CD
49
Since collisions are not acceptable for real time traffic, such as VoIP, we must examine collision free protocols: 1. Basic Bit-map method – station sets a bit in a slot to indicate it has something to send. Works as long as everyone agrees. (Like making a reservation) 2. Token passing- token is passed from one station to another – permission to send. 3. Binary countdown-station wanting to send broadcasts its address as a binary bit string, which is ORed with others trying to send. An arbitration rule is applied ot choose one( usually highest). Collision Free Protocols
50
Two basic strategies for channel acquisition in broadcast network: Contention (as in CSMA) for heavy loads there is increasing overhead Collision free - larger delays for light loads, but as loads increase there is greater efficiency Combine best features of both – limited contention protocols Divide stations into groups Adaptive tree walk protocol Limited Contention Protocols
51
Collision-Free – Bitmap CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Collision-free protocols avoid collisions entirely Senders must know when it is their turn to send The basic bit-map protocol: Sender set a bit in contention slot if they have data Senders send in turn; everyone knows who has data
52
Collision-Free – Token Ring CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Token sent round ring defines the sending order Station with token may send a frame before passing Idea can be used without ring too, e.g., token bus Station Direction of transmission Token
53
Collision-Free – Countdown CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Binary countdown improves on the bitmap protocol Stations send their address in contention slot (log N bits instead of N bits) Medium ORs bits; stations give up when they send a “0” but see a “1” Station that sees its full address is next to send
54
Limited-Contention Protocols CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Idea is to divide stations into groups within which only a very small number are likely to want to send Avoids wastage due to idle periods and collisions Already too many contenders for a good chance of one winner
55
Limited Contention–Adaptive Tree Walk CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Tree divides stations into groups (nodes) to poll Depth first search under nodes with poll collisions Start search at lower levels if >1 station expected Level 0 Level 1 Level 2
56
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.56 CSMA/CD does not work as well in wireless LANs because a transmitter used in a wireless LAN has a limited range A receiver that is more δ than away from the transmitter will not receive a signal, and will not be able to detect a carrier Consider three computers with wireless LAN hardware positioned as the next slide illustrates
57
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.57
58
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.58 In Figure 14.6, computer1 can communicate with computer2, but cannot receive the signal from computer3 Thus, if computer3 is transmitting a packet to computer2, computer1's carrier sense mechanism will not detect the transmission Similarly, if computer1 and computer3 simultaneously transmit, only computer2 will detect a collision
59
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.59 The problem is sometimes called the hidden station problem because some stations are not visible to others Wireless LANs use a modified access protocol known as CSMA with Collision Avoidance (CSMA/CA) The CSMA/CA triggers a brief transmission from the intended receiver before transmitting a packet The idea is that if both the sender and receiver transmit a message all computers within range of either will know a packet transmission is beginning
60
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.60
61
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.61 On the previous slide computer3 sends a short message to announce that it is ready to transmit a packet to computer2 and computer2 responds by sending a short message announcing that it is ready to receive the packet all computers in range of computer3 receive the initial announcement and all computers in the range of computer2 receive the response even though it cannot receive the signal or sense a carrier, computer 1 knows that a packet transmission is taking place
62
CSMA/CA © 2009 Pearson Education Inc., Upper Saddle River, NJ. All rights reserved.62 Collisions of control messages can occur when using CSMA/CA, but they can be handled easily For example, if computer1 and computer3 each attempt to transmit a packet to computer2 at exactly the same time their control messages will collide When a collision occurs, the sending stations apply random backoff before resending the control messages. Because control messages are much shorter than a packet, the probability of a second collision is low
63
Wireless LAN Protocols CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Wireless has complications compared to wired. Nodes may have different coverage regions Leads to hidden and exposed terminals Nodes can’t detect collisions, i.e., sense while sending Makes collisions expensive and to be avoided
64
Wireless LANs– Hidden terminals CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Hidden terminals are senders that cannot sense each other but nonetheless collide at intended receiver Want to prevent; loss of efficiency A and C are hidden terminals when sending to B
65
Wireless LANs– Exposed terminals CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Exposed terminals are senders who can sense each other but still transmit safely (to different receivers) Desirably concurrency; improves performance B A and C D are exposed terminals
66
Wireless LANs – MACA CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MACA protocol grants access for A to send to B: A sends RTS to B [left]; B replies with CTS [right] A can send with exposed but no hidden terminals A sends RTS to B; C and E hear and defer for CTS B replies with CTS; D and E hear and defer for data
67
Wireless, Mobile Networks6-67 Elements of a wireless network network infrastructure wireless hosts laptop, PDA, IP phone run applications may be stationary (non-mobile) or mobile wireless does not always mean mobility
68
Wireless, Mobile Networks6-68 Elements of a wireless network network infrastructure base station typically connected to wired network relay - responsible for sending packets between wired network and wireless host(s) in its “area” e.g., cell towers, 802.11 access points
69
Wireless, Mobile Networks6-69 Elements of a wireless network network infrastructure wireless link typically used to connect mobile(s) to base station also used as backbone link multiple access protocol coordinates link access various data rates, transmission distance
70
Wireless, Mobile Networks6-70 Characteristics of selected wireless link standards Indoor 10-30m Outdoor 50-200m Mid-range outdoor 200m – 4 Km Long-range outdoor 5Km – 20 Km.056.384 1 4 5-11 54 IS-95, CDMA, GSM 2G UMTS/WCDMA, CDMA2000 3G 802.15 802.11b 802.11a,g UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO 3G cellular enhanced 802.16 (WiMAX) 802.11a,g point-to-point 200 802.11n Data rate (Mbps) data
71
Wireless, Mobile Networks6-71 Wireless Link Characteristics Differences from wired link …. decreased signal strength: radio signal attenuates as it propagates through matter (path loss) interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone); devices (motors) interfere as well multipath propagation: radio signal reflects off objects ground, arriving ad destination at slightly different times …. make communication across (even a point to point) wireless link much more “difficult”
72
Wireless, Mobile Networks6-72 Wireless network characteristics Multiple wireless senders and receivers create additional problems (beyond multiple access): A B C Hidden terminal problem B, A hear each other B, C hear each other A, C can not hear each other means A, C unaware of their interference at B A B C A’s signal strength space C’s signal strength Signal attenuation: B, A hear each other B, C hear each other A, C can not hear each other interfering at B
73
Wireless, Mobile Networks6-73 IEEE 802.11 Wireless LAN 802.11b 2.4-5 GHz unlicensed spectrum up to 11 Mbps direct sequence spread spectrum (DSSS) in physical layer all hosts use same chipping code 802.11a 5-6 GHz range up to 54 Mbps 802.11g 2.4-5 GHz range up to 54 Mbps 802.11n: multiple antennae 2.4-5 GHz range up to 200 Mbps all use CSMA/CA for multiple access all have base-station and ad-hoc network versions
74
Wireless, Mobile Networks6-74 802.11 LAN Architecture wireless host communicates with base station base station = access point (AP) Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains: wireless hosts access point (AP): base station ad hoc mode: hosts only BSS 1 BSS 2 Internet hub, switch or router AP
75
Wireless, Mobile Networks6-75 802.16: WiMAX like 802.11 & cellular: base station model transmissions to/from base station by hosts with omnidirectional antenna base station-to-base station backhaul with point-to-point antenna unlike 802.11: range ~ 6 miles (“city rather than coffee shop”) ~14 Mbps point-to-multipoint point-to-point
76
Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Classic Ethernet » Switched/Fast Ethernet » Gigabit/10 Gigabit Ethernet »
77
Classic Ethernet – Physical Layer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 One shared coaxial cable to which all hosts attached Up to 10 Mbps, with Manchester encoding Hosts ran the classic Ethernet protocol for access
78
Classic Ethernet – MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MAC protocol is 1-persistent CSMA/CD (earlier) Random delay (backoff) after collision is computed with BEB (Binary Exponential Backoff) Frame format is still used with modern Ethernet. Ethernet (DIX) IEEE 802.3
79
Classic Ethernet – MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Collisions can occur and take as long as 2 to detect is the time it takes to propagate over the Ethernet Leads to minimum packet size for reliable detection
80
Classic Ethernet - Performance CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Efficient for large frames, even with many senders Degrades for small frames (and long LANs) 10 Mbps Ethernet, 64 byte min. frame
81
Switched/Fast Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Hubs wire all lines into a single CSMA/CD domain Switches isolate each port to a separate domain Much greater throughput for multiple ports No need for CSMA/CD with full-duplex lines
82
Switched/Fast Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Switches can be wired to computers, hubs and switches Hubs concentrate traffic from computers More on how to switch frames the in 4.8 Switch Twisted pair Switch ports Hub
83
Switched/Fast Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Fast Ethernet extended Ethernet from 10 to 100 Mbps Twisted pair (with Cat 5) dominated the market
84
Gigabit / 10 Gigabit Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Switched Gigabit Ethernet is now the garden variety With full-duplex lines between computers/switches
85
Gigabit / 10 Gigabit Ethernet CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Gigabit Ethernet is commonly run over twisted pair 10 Gigabit Ethernet is being deployed where needed 40/100 Gigabit Ethernet is under development
86
Wireless LANs CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 802.11 architecture/protocol stack » 802.11 physical layer » 802.11 MAC » 802.11 frames »
87
802.11 Architecture/Protocol Stack CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Wireless clients associate to a wired AP (Access Point) Called infrastructure mode; there is a lso ad-hoc mode with no AP, but that is rare. Access Point Client To Network
88
802.11 Architecture/Protocol Stack CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MAC is used across different physical layers
89
802.11 physical layer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 NICs are compatible with multiple physical layers E.g., 802.11 a/b/g NameTechniqueMax. Bit Rate 802.11bSpread spectrum, 2.4 GHz11 Mbps 802.11gOFDM, 2.4 GHz54 Mbps 802.11aOFDM, 5 GHz54 Mbps 802.11nOFDM with MIMO, 2.4/5 GHz600 Mbps
90
802.11 MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 CSMA/CA inserts backoff slots to avoid collisions MAC uses ACKs/retransmissions for wireless errors
91
802.11 MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Virtual channel sensing with the NAV and optional RTS/CTS (often not used) avoids hidden terminals
92
802.11 MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Different backoff slot times add quality of service Short intervals give preferred access, e.g., control, VoIP MAC has other mechanisms too, e.g., power save
93
802.11 Frames CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Frames vary depending on their type (Frame control) Data frames have 3 addresses to pass via APs
94
Broadband Wireless CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 802.16 Architecture / Protocol Stack » 802.16 Physical Layer » 802.16 MAC » 802.16 Frames »
95
802.16 Architecture/Protocol Stack CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Wireless clients connect to a wired basestation (like 3G)
96
802.16 Architecture/Protocol Stack CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MAC is connection-oriented; IP is connectionless Convergence sublayer maps between the two
97
802.16 Physical Layer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Based on OFDM; base station gives mobiles bursts (subcarrier/time frame slots) for uplink and downlink
98
802.16 (Wi-MAX) MAC CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Connection-oriented with base station in control Clients request the bandwidth they need Different kinds of service can be requested: Constant bit rate, e.g., uncompressed voice Real-time variable bit rate, e.g., video, Web Non-real-time variable bit rate, e.g., file download Best-effort for everything else
99
802.16 Frames CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Frames vary depending on their type Connection ID instead of source/dest addresses (a) A generic frame. (b) A bandwidth request frame (b) (a)
100
Bluetooth CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Bluetooth Architecture » Bluetooth Applications / Protocol » Bluetooth Radio / Link Layers » Bluetooth Frames »
101
Bluetooth Architecture CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Piconet master is connected to slave wireless devices Slaves may be asleep (parked) to save power Two piconets can be bridged into a scatternet
102
Bluetooth Applications / Protocol Stack CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Profiles give the set of protocols for a given application 25 profiles, including headset, intercom, streaming audio, remote control, personal area network, …
103
Bluetooth Radio / Link Layers CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Radio layer Uses adaptive frequency hopping in 2.4 GHz band Link layer TDM with timeslots for master and slaves Synchronous CO for periodic slots in each direction Asynchronous CL for packet-switched data Links undergo pairing (user confirms passkey/PIN) to authorize them before use
104
Bluetooth Frames CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Time is slotted; enhanced data rates send faster but for the same time; addresses are only 3 bits for 8 devices (b) (a) (b)
105
RFID CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Gen 2 Architecture » Gen 2 Physical Layer » Gen 2 Tag Identification Layer » Gen 2 Frames »
106
Gen 2 Architecture CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Reader signal powers tags; tags reply with backscatter
107
Gen 2 Physical Layer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Reader uses duration of on period to send 0/1 Tag backscatters reader signal in pulses to send 0/1
108
Gen 2 Tag Identification Layer CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Reader sends query and sets slot structure Tags reply (RN16) in a random slot; may collide Reader asks one tag for its identifier (ACK) Process continues until no tags are left
109
Gen 2 Frames CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Reader frames vary depending on type (Command) Query shown below, has parameters and error detection Tag responses are simply data Reader sets timing and knows the expected format Query message
110
Data Link Layer Switching CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Uses of Bridges » Learning Bridges » Spanning Tree » Repeaters, hubs, bridges,.., routers, gateways » Virtual LANs »
111
Uses of Bridges Common setup is a building with centralized wiring Bridges (switches) are placed in or near wiring closets CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
112
Learning Bridges CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 A bridge operates as a switched LAN (not a hub) Computers, bridges, and hubs connect to its ports
113
Learning Bridges CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Backward learning algorithm picks the output port: Associates source address on frame with input port Frame with destination address sent to learned port Unlearned destinations are sent to all other ports Needs no configuration Forget unused addresses to allow changes Bandwidth efficient for two-way traffic
114
Learning Bridges CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Bridges extend the Link layer: Use but don’t remove Ethernet header/addresses Do not inspect Network header
115
Spanning Tree – Problem CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Bridge topologies with loops and only backward learning will cause frames to circulate for ever Need spanning tree support to solve problem
116
Spanning Tree – Algorithm CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Subset of forwarding ports for data is use to avoid loops Selected with the spanning tree distributed algorithm by Perlman I think that I shall never see A graph more lovely than a tree. A tree whose crucial property Is loop-free connectivity. A tree which must be sure to span. So packets can reach every LAN. First the Root must be selected By ID it is elected. Least cost paths from Root are traced In the tree these paths are placed. A mesh is made by folks like me Then bridges find a spanning tree. – Radia Perlman, 1985.
117
Spanning Tree – Example CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 After the algorithm runs: B1 is the root, two dashed links are turned off B4 uses link to B2 (lower than B3 also at distance 1) B5 uses B3 (distance 1 versus B4 at distance 2)
118
Repeaters, Hubs, Bridges, Switches, Routers, & Gateways CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Devices are named according to the layer they process A bridge or LAN switch operates in the Link layer
119
Virtual LANs CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 VLANs (Virtual LANs) splits one physical LAN into multiple logical LANs to ease management tasks Ports are “colored” according to their VLAN
120
Virtual LANs – IEEE 802.1Q CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Bridges need to be aware of VLANs to support them In 802.1Q, frames are tagged with their “color” Legacy switches with no tags are supported
121
Virtual LANs – IEEE 802.1Q CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 802.1Q frames carry a color tag (VLAN identifier) Length/Type value is 0x8100 for VLAN protocol
122
Queueing theory and Poisson Distributions http://www.youtube.com/watch?v=Fk02TW6reiA http://stattrek.com/probability-distributions/poisson.aspx http://www.math.csusb.edu/faculty/stanton/probstat/poisson.html http://mathworld.wolfram.com/PoissonDistribution.html http://hyperphysics.phy-astr.gsu.edu/hbase/math/poifcn.html References and Resources
123
End Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.