Download presentation
Presentation is loading. Please wait.
Published byTommi Laakso Modified over 6 years ago
1
COSC 3213: Computer Networks I Instructor: Dr. Amir Asif
Department of Computer Science York University Handout # 7 Section M Multiple Access Control (MAC) Topics: 1. Multiple Access Communications: Channelization vs MAC 2. Data Link Layer: MAC and LLC sublayers 3. MAC: Random Access Protocols vs Scheduled Approaches 4. LAN Standards: Token Bus, Token Ring, FDDI and Wireless LANs 5. LAN Bridges Garcia: Sections 6.1 – 6.4 and 6.6
2
Classification of Networks (1)
There are two basic types of networks: Switched Networks: Interconnect users by transmission lines, multiplexers, and switches Addressing of hosts is hierarchical to scale to large sizes Multiple paths available between the source and destination Transmission of packets require routing table Subnet Router Host LAN
3
Classification of Networks (2)
Broadcast Networks: All machines connected to each other using a shared transmission medium. Addressing of hosts is flat (based on NIC) due to a small number of host machines. Only one path is available between source and destination, Routing is not needed Requires medium access protocol (MAC) to coordinate transmissions between different machines. Pros: low cost infrastructure; complex routing algorithms are not required Cons: A MAC protocol is needed to minimize collisions and ensure fair sharing of the medium; Transmission efficiency is low due to collisions. Computer Shared Medium Token Bus Token Ring
4
MAC Approaches MAC: Multiple users share the communication channel so a scheme (medium sharing technique) must be devised to prevent collision of packets. The strategy is referred to as the MAC protocol. Partition the medium into separate channels Each channel is dedicated to a transmitting host Useful for steady traffic conditions Pros: No collisions; fair Cons: waste of resources for bursty traffic Medium Sharing Techniques Static Channelization Dynamic Medium Access Control Scheduling Random Access Dynamic sharing of medium Use-as-required basis Useful when traffic is bursty Transmission is scheduled A central body typically determines the schedule Depending upon the traffic condition, any host can transmit at any time.
5
Example of MAC (1) Satellite Communications:
Two frequency bands: one for uplink (5M – 42M) & one for downlink (550M – 750M) Each station is allocated a channel (2M) in the uplink frequency band Satellite is a repeater that changes the carrier frequency & repeats message Each station has a channel (6M) in the downlink frequency band Activity 1: Under which category of MAC schemes does satellite communications fall? Uplink Downlink
6
Example of MAC (2) Multidrop Telephone Line:
Set of M stations share an inbound and an outbound line Stations transmit information to host using inbound line, one at a time Host transmits information to station using outbound line Host computer issues polling message to stations granting permission to transmit Activity 2: Under which category of MAC schemes does multidrop telephone line fall? Inbound line Outbound line Host Stations
7
Example of MAC (3) Ring Networks: Hosts are connected in a ring
One station with the token transmits packet in the form of bits Each connected station received data, bit by bit Destination host copies data but leaves data on the ring, Others ignore Transmitting host extracts data from the ring Activity 3: Under which category of MAC schemes does Ring Networks fall?
8
Example of MAC (4) Multitapped Bus:
Uses coaxial cable where a signal can propagate in both directions A station listens and if no one else is transmitting, starts to transmit If a collision occurs, it waits for a random duration before transmitting again All stations receive the transmitted message Destination station accepts the message others reject it Activity 4: Under which category of MAC schemes does multitapped bus fall?
9
May or may not be present
Example of MAC (5) Wireless LAN: Set of devices (workstations, laptops, cordless, etc.) share a wireless medium Message transmitted have different bit rates (hence different BW requirements) Different strategies used: A central authority accepts all messages and redirect them to its destination Messages can be communicated directly to each other A combination of the two May or may not be present Central Authority
10
Delay Bandwidth Product
B transmits before t = tprop A transmits at t = 0 Distance d meters tprop = d / seconds A B A detects collision at t = 2 tprop Station A wants to talk to station B Station A listens to the medium; begins transmitting as no signal is present Signal from Station A will take tprop seconds to reach station B and vice versa Station B listens and begins transmitting before tprop seconds as no signal is detected at its end. Result: collision of packets Station A will not know of collision till 2tprop seconds Station B knows almost immediately Resolution: Who stops transmitting? Protocol is the one who started transmitting last.
11
Delay Bandwidth Product (2)
B transmits before t = tprop A transmits at t = 0 Distance d meters tprop = d / seconds A B A detects collision at t = 2 tprop Time wasted in coordinating = 2tprop seconds. If transmission rate of the medium = R bps; # of bits wasted = 2tprop × R bits If size of packet = L bits, efficiency in the use of channel is Efficiency = L / (L + 2tprop × R) = 1 / (1 + 2a) where a = tprop R / L where tprop R is the delay-bandwidth and a is the ratio of delay-bandwidth to average packet length For a = 0.01, efficiency is 98%; For a = 0.5, efficiency is 50%
12
Delay Bandwidth Product (3)
Distance 10 Mbps 100 Mbps 1 Gbps Network 1 m 3.33 x 10-2 3.33 x 10-1 3.33 x 100 Desk area 100 m 3.33 x 101 3.33 x 102 3.33 x 103 LAN 10 km 3.33 x 104 MAN 1000 km 3.33 x 105 3.33 x 106 WAN km 3.33 x 107 3.33 x 108 Global area Table 6.1: Delay Bandwidth product for a number of Networks Activity 5: In Ethernet, the size of packets is limited to a maximum size of 1500 bytes (12,000 bits). Calculate the value of a (ratio of delay-bandwidth to average packet length) for a local area network (LAN) at 10 Mbps, 100 Mbps, and 1Gbps using the values of the delay BW product from the above table?
13
Definitions Frame Transfer Delay (X): Duration between the time when the first bit of frame leaves the MAC layer of the source to the time when the last bit reaches the MAC layer of the destination. Throughput (Sout): Effective rate of transmission (based on successful deliver of frames) in frames/s across a network Suppose that the transmission rate of a network is R bps Length of a frame is L bits Maximum throughtput = R / L frames/s Actual throughput < R / L frames/s, Why? Load (G): Load on the channel in frames per X seconds. Topology: Way a network is structured, i.e., ring versus bus versus star topology. Technology: Set of protocols used for a network to function.
14
Random Access: ALOHA (1)
MAC protocols allow sharing of a common transmission medium by several hosts. Recall MAC protocols can be divided into two different categories: Partition the medium into separate channels Each channel is dedicated to a transmitting host Useful for steady traffic conditions Medium Sharing Techniques Static Channelization Dynamic Medium Access Control Scheduling Random Access Dynamic sharing of medium Use-as-required basis Useful when traffic is bursty Transmission is scheduled A central body typically determines the schedule Depending upon the traffic condition, any host can transmit at any time.
15
Random Access: ALOHA (2)
Random Access: MAC protocols include ALOHA: Earliest random access method. Developed at University of Hawaii in 1970s to interconnect university campuses on different islands through a microwave link Transmitter: Transmits the frame as soon as the MAC layer receives it Channel: If a collision occurs, frames received by the receiver will contain errors Receiver: In case of errors, no acknowledgement is transmitted to the receiver. (Alternatively, a request for retransmission may be made in case of errors) Transmitter: If the transmitter receives no ACK within timeout (2 × propagation delay), it backs off for a random period of time. On the expiry of backoff tine, the transmitter retransmits the frame. Aloha is successful for light traffic. Note that collision is different from errors since it affects two host stations. For the scheme to work, it is vital that the host stations wait for a random period of time before retransmitting. If both stations wait an equal time before retransmitting, there will always be collisions.
16
Random Access: ALOHA algorithm (4)
Start Select random backoff Send the frame Wait ACK received? Wait backoff time Backoff = 0 Success! Backoff limit? Abort! yes no
17
Random Access: ALOHA throughput (5)
Station A Channel Station D Station C Station B A1 A2 A2 (retransmit) B1 B2 B2 (retransmit) D1 C1 C1 (retransmit) Frame transfer time (X) backoff period (B)
18
Random Access: ALOHA analysis (6)
t t0 t0 - X t0+X t0+X+2tprop t0 +X+2tprop+B Vulnerable period Time-out Backoff period B First transmission Retransmission if required Assumptions: All frames are of equal length (L). All hosts are similar such that the frame transfer time X = L/R is the same for each host. Traffic flows in one direction. (Two seprate channels are available in each direction). Assume that a frame is transmitted at t0 seconds, then Vulnerable time in which collision can occur is: (t0 – X ≤ t ≤ t0 + X). After transmission, host times out and wait for the ACK frame for: (t0 + X ≤ t ≤ t0 + X + 2tprop). In case no ACK is received, the host times out for B seconds. Retransmission is attempted at: t = t0 + X + 2tprop + B seconds.
19
Random Access: ALOHA analysis (7)
t t0 t0 - X t0+X t0+X+2tprop t0 +X+2tprop+B Vulnerable period Time-out Backoff period B First transmission Retransmission if required Assume that the number of frames transmitted in any time interval follows a Poisson’s distribution where l is the average number of frames transmitted per second. Given that the total load on the channel is G frames per X seconds, l = G/X. Based on the Poisson’s distribution,
20
Random Access: ALOHA analysis (8)
t t0 t0 - X t0+X t0+X+2tprop t0 +X+2tprop+B Vulnerable period Time-out Backoff period B First transmission Retransmission if required To prevent collisions, there should be no transmissions within the vulnerable period The throughput S is defined as the product of the total arrival rate and probability of a successful transmission. Activity 6: Determine the maximum value of throughput S and the value of G at which it is possible.
21
Random Access: ALOHA Performance (9)
0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.0625 0.125 0.25 0.5 1 2 4 G Mode 1 (low traffic): As we increase the load G from 0, the throughput increases steadily. In fact for low values of G, S = G. This matches our intuition that for low traffic, there will be no collisions and the throughput would equal the load. The throughput S achieves its maximum value of at G = 0.5. This corresponds to an arrival rate of exactly one frame per vulnerable period. Mode 2 (high traffic): As G > 0.5, the throughput drops. Again, this is consistent with our intuition that a high load would backlogg the channel with a large number of collisions.
22
Random Access: ALOHA (10)
Activity 7: Suppose that the ALOHA protocol is used to share a 56 kbps satellite channel. Suppose that the frames are 1000 bits long. What is the maximum throughput of the system in frames/s if the propagation time is ignored. Solution: Maximum throughput for ALOHA = frames / X seconds. Frame transfer delay (X) = 1000/56000 = 1/56 seconds Maximum throughput in frames/s = × 56, or approximately 10 frames/sec.
23
Random Access: Slotted ALOHA (1)
The maximum throughput of ALOHA is frames per frame transfer time. The first attempt to increase the throughput is called the Slotted ALOHA, which includes the following modifications to ALOHA. Divide the time into slots. Any station is only allowed to transmit at the beginning of a slot. Rest of the procedure is same as for ALOHA. Drawback: Additional complexity in the protocol as stations must be synchronized with the beginning of slots. Advantage: Number of collisions are reduced as frames would collide only at the beginning of a time slot.
24
Random Access: ALOHA throughput (5)
Station A Channel Station D Station C Station B A1 A2 A2 (retransmit) B1 B2 B2 (retransmit) D1 C1 C1 (retransmit) Frame transfer time (X) backoff period (B)
25
Random Access: CSMA (1) Carrier Sensitive Multiple Access (CSMA):
An improvement over ALOHA by providing carrier sense to the station. Before transmitting, the station sense if any carrier (or signal) is present on the shared medium. If a carrier is present, the station waits and transmits again when the medium indicates no carrier. Depending upon how the duration of the wait period is decided, CSMA can be classified in different categories: 1-Persistent CSMA: Transmit as soon as the medium is again idle (free of any carrier). Non-persistent CSMA: If the medium is busy, station runs a backoff algorithm to reschedule a future sensing period. It senses again after a certain wait and transmits only if the medium is free. P-persistent CSMA: Station senses for carrier. If the carrier is absent, it transmits with a p probability. If busy, it waits using the non-persistent CSMA approach.
26
Random Access: CSMA-CD
Random Access: MAC protocols include Carrier Sensitive Multiple Access with Collision Detection (CSMA-CD): An improvement over CSMA by giving the station capability of detecting collisions Procedure is same as CSMA except that if a collision is detected, the station stops immediately without transmitting the complete packet.
27
Local Area Networks (LAN): An Overview
Size: serve smaller areas (reduced geographic scope) generally connected by high-speed communications channels greater capacity over shorter distances Transmission Technology: switched point-to-point (used by WAN) shared-medium packet broadcasting (used by LAN) Transmission Rates: Traditional: 1-20Mbps High speed: 100Mbps Topology: Various topologies are possible varying from token bus to token ring Computer Shared Medium Token Bus Token Ring
28
Terminator: absorbs the signal
Local Area Network (1) IEEE 802, a committee of Institute of Electrical and Electronics Engineers, developed the standards. Standards include CSMA-CD (Ethernet) referred to as 802.3, Token-ring referred to as 802.5, and Wireless LAN referred to as Structure: Number of computers and network devices (jointly called hosts) are connected using a shared medium. Cabling system used is twisted pair, coaxial, optical fiber, or wireless. Topologies used are bus, ring, or star Bus Topology Terminator: absorbs the signal Printer Print Server Server
29
Local Area Network (2) Structure (contd.):
Each host contains a network interface card (NIC); Laptops have the smaller PCMCIA card, an alternative to NIC. RAM Ethernet Processor RAM ROM NIC performs the following functions: Converts parallel data (computer) to serial data (medium) Buffers data since CPU and network speeds are different Each NIC has a unique physical address (hardware address) burned on it. NIC is responsible for addressing within a LAN.
30
Data Link Layer in LAN Data link layer is divided into two sublayers:
Logical link control (LLC) enhances the services offered by its lower sublayer Multiple access control (MAC) coordinates access of the shared physical medium Accepts a block of data from LLC or directly from network layer Constructs a PDU (frame) including source and destination hardware addresses as well as frame check sequence using CRC Provides for connectionless transfer of frames using a MAC protocol Network Layer Logical Link Layer (802.2) Physical Layer CSMA-CD (802.3) Token-ring (802.5) Wireless (802.11) Others IEEE 802 LLC MAC Network Layer Data Link Layer (HDLC) Physical OSI High Level Data Link Control
31
LLC LLC operates over the MAC standards
LLC enhances the services offered by the MAC layer LLC hides the details of the MAC layer from the Network layer LLC also provides a mechanism for exchanging frames between LANs using different MAC protocols MAC PHY 1. Unreliable datagram service btw MAC layers 2. Direct interaction btw. MAC layers (not peer to peer) Frame
32
LLC LLC operates over the MAC standards
LLC enhances the services offered by the MAC layer LLC hides the details of the MAC layer from the Network layer LLC also provides a mechanism for exchanging frames between LANs using different MAC protocols MAC PHY Reliable Packet Service LLC A C Frame Packet LLC PDU
33
LLC (2) LLC provides three kinds of services to its upper (network) layer Unacknowledged Connectionless Service: uses unnumbered frames to communicate transfer unsequenced information. Reliable Connection-oriented Service: connection setup and release is required with error control, sequencing, and flow control features. Acknowledged Connectionless Service: Individual frames are acknowledged. LLC PDU contains SAP address of the port that is generating the PDU 1 byte 1 byte 1 or 2 bytes Destination SAP Address Source SAP Address Control Information Destination SAP Address Source SAP Address I/G 7 bits 1 C/R Individual or group address Command or response frame
34
LLC (3) LLC datagram is encapsulated into a MAC frame Header IP Data
FCS LLC PDU IP Packet Frame
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.