Presentation is loading. Please wait.

Presentation is loading. Please wait.

Medium Access Control Sublayer 2 Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Channel Allocation Problem.

Similar presentations


Presentation on theme: "Medium Access Control Sublayer 2 Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Channel Allocation Problem."— Presentation transcript:

1 Medium Access Control Sublayer 2 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 Data Link Layer Switching Revised: August 2011

2 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!

3 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 »

4 802.11 Architecture/Protocol Stack (1) 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 also ad-hoc mode with no AP, but that is rare. Access Point Client To Network

5 802.11 Architecture/Protocol Stack (2) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MAC is used across different physical layers

6 802.11 Physical Layer General CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 2.4-GHz or 5-GHz ISM Radiated power at most 1 W Multiple rates supported Rate adaptation used for weak signals

7 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 (CDMA) 2.4 GHz, BPSK or QPSK 11 Mbps 802.11gOFDM, 2.4 GHz54 Mbps 802.11aOFDM, 5 GHz54 Mbps 802.11nOFDM with MIMO, 2.4/5 GHz600 Mbps

8 802.11 MAC (1) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Two environmental differences from Ethernet Communication is half duplex CD mechanism does not work Transmission ranges are different Hidden and exposed terminal problems

9 802.11 MAC (2) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 CSMA CA A station sensing idle channel waits for a random backoff period instead of attempting to send immediately The destination sends a short ack Lack of ack leads to waiting doubled backoff period and try again Further attempts are as in exponential backoff

10 802.11 MAC (3) 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

11 802.11 MAC (4) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Transmission range difference causes problems Even if the ranges are assumed to be same, two problems still exist hidden terminal exposed terminal

12 802.11 MAC (5) 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

13 802.11 MAC (6) 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

14 802.11 MAC (7) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 In power save mode, the AP will buffer the frames destined to a station and forward them when it receives frames from that station

15 TUNALI Computer Networks 1 15 Fragmenting MAC Frames Wireless networks are noisy and unreliable The shorter the frame the higher the probability that it will go through undamaged Fragmenting is preferred due to these reasons

16 TUNALI Computer Networks 1 16 802.11 Frames (1) There are three classes of frames −data −control −management Data frame structure −Frame control has 11 subfields »To DS and from DS indicate incoming or outgoing frame »MF is more fragments »Pwr indicates sleep or wake-up »More is for more frames to come »W is encryption indicator »O is indicating that frames with this bit set must be processed in order

17 TUNALI Computer Networks 1 17 802.11 Frames (2) »Duration indicates frame duration in microseconds »The first address is receiver and the second address is transmitter, the third address (if any) is the distant endpoint −The first bytes of data field are in the form of LLC header

18 802.11 Frames (3) 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

19 TUNALI Computer Networks 1 19 802.11 Services Association (connection to AP) Authentication is required Reassociation (change preferred AP) Distribution −How to route frames sent to the base station? Integration −Translation of format for non 802.11 networks Privacy −AES encryption Data delivery

20 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 »

21 Broadband Wireless Introduction CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Implemented outdoors In short called WiMAX Uses OFDM to support non-line-of-sight between 2 GHz and 10 GHz Aim is to provide Internet access to users without digging for a cable High capacity with powerful stations

22 802.16 Architecture/Protocol Stack (1) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Wireless clients connect to a wired base station (like 3G)

23 Clients CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Two different types of stations supported Subscribers are at fixed location Mobile stations move around (car equipped with wimax)

24 802.16 Architecture/Protocol Stack (2) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 MAC is connection-oriented; IP is connectionless Convergence sub-layer maps between the two

25 802.16 Physical Layer (1) CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 OFDM used QPSK, QAM16 or QAM-64 for modulation Convolution codes for error correction 12.6 Mbps downlink, 6.2 Mbps uplink supported OFDMA assigns different sets of subcarriers to different stations leading to Allocation of different amounts of bandwidth to different stations

26 802.16 Physical Layer (2) 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

27 802.16 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

28 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)

29 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 »

30 Uses of Bridges (1) 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

31 TUNALI Computer Networks 1 31 Uses of Bridges (2) Operate in the data link layer Connect LANs to each other Reasons for multiple LANs Departments have their own LANs Organizations may be spread over several buildings Split a single LAN into multiple LANs to accommodate the load −Do not send traffic onto ports where it is not needed Using bridges total physical distance covered can be increased Increased reliability Increased security

32 Transparent Bridges Buy the bridge Plug the cables Let it run We need two algorithms backward learning spanning tree CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

33 Learning Bridges (1) 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

34 Backward Learning CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Accept every frame transmitted by the stations attached to each of its ports (promiscıous mode) If the source and destination are on the same port, just discard it If not, use a table to figure out the port to forward the packet to If port is not on the table, broadcast the address to figure out the port Maintain the table (hashing used) by timestamping the frame so that incoming port info is fresh

35 Learning Bridges (2) 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

36 Learning Bridges (3) 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

37 Cut-through switching CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Do not wait for the complete frame Do the switching as soon as source and destination address bits arrive

38 Spanning Tree (1) – 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 forever Need spanning tree support to solve problem −On spanning tree, there is exactly one path from one station to every other station

39 Spanning Tree (2) – 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.

40 Spanning Tree (3) – 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)

41 TUNALI Computer Networks 1 41 Spanning Tree (4) – Algorithm Each bridge broadcasts its serial number. The bridge with lowest serial number becomes root A tree of shortest paths from the root to every bridge and LAN is constructed. This is the spanning tree. −Serial numbers are again used to break the ties −Bridges include their distance from the root in their messages After the tree is constructed, the bridges turn off ports that are not part of the shortest path Algorithm runs continuously to detect topology changes

42 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 Buffering in bridge is needed to receive a frame from one port and transmit it from another port

43 TUNALI Computer Networks 1 43 Virtual LANs (1) Many departments, such as research, patents, and accounting, have information that they do not want passed outside their department Some LANs are more heavily used and the other may not want their communication slowing down due to external causes Most LANs support broadcasting and either regular broadcast or broadcast storm may be isolated by virtual LANs

44 Virtual LANs (2) Unfortunately, physical locations of offices belonging to a department may not allow configuring them on the same physical LAN The solution is to introduce an overlay logical topology that is decoupled from the physical topology Implemetation requires VLAN aware switches Ethernet frame expanded to include a VLAN field in its header Configuration tables are set up in VLAN aware bridges telling which VLANs are accesible through which ports CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

45 Virtual LANs (3) 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

46 Virtual LANs (4) – 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

47 Virtual LANs (5) – 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

48 Virtual LANs (6) – IEEE 802.1Q CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 VLAN aware bridges coexist with legacy switches Legacy switches are usually located towards the leaves of the spanning tree The ethernet frame entering the first VLAN aware switch is modified to containn VLAN info in its header. The ethernet frame leaving VLAN aware switch heading for legacy swich is modified and VLAN info is removed from the header

49 TUNALI Computer Networks 1 49 Virtual LANs (7) – IEEE 802.1Q IEEE changed the Ethernet header 802.1Q is the new standard supporting VLANs VLAN fields are actually used only by bridges and switches, not by the user machines No need to throw away the old Ethernet cards If a PC that does not have a card supporting 802.1Q sends a frame to a VLAN aware switch, the switch builds a new tagged frame based on its knowledge of the sender’s VLAN

50 TUNALI Computer Networks 1 50 Required Reading Tanenbaum Sections 4.4 4.5 4.8

51 Homework 25 26 28 36 38 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

52 End Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011


Download ppt "Medium Access Control Sublayer 2 Chapter 4 CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011 Channel Allocation Problem."

Similar presentations


Ads by Google