Download presentation
Presentation is loading. Please wait.
Published byGlenna Tanudjaja Modified over 6 years ago
1
EEC4113 Data Communication & Multimedia System Chapter 6: Media Access Control of Data Link Sub-Layer by Muhazam Mustapha, August 2010
2
Learning Outcome By the end of this chapter, students are expected to understand and able to explain the various protocols and technologies in MAC sub-layer
3
Chapter Content MAC Sub-Layer Issues ALOHA Protocols CSMA Protocols
Collision-Free Protocols Topology IEEE Ethernet IEEE Wire Ethernet IEEE Token Ring
4
Media Access Control Sub-Layer
5
Media Access Control Media Access Control is a sub-layer of data link layer in OSI’s 7 layer model Provides access to the shared networking medium in LAN or MAN The currently most popular technology that provides MAC is the Ethernet technology Others are FDDI (Fiber Distributed Data Interface), ARCNET and Token ring
6
Ethernet A family of frame-based technology defining standards for wiring and signaling Standardized in IEEE document Combination of twisted wire pair and optical fiber Characterized by the used of 8P8C connector
7
Shared Network Medium In shared environment, packets sent by one sender will be received by all nodes, but only the packet addressee will process it, the rest will discard packet sent out sender recipient
8
Multiple Access Protocol
Since the network medium is shared, there is a need to resolve competition between the nodes Two general schemes: Static Frequency / Time Division Multiplexing (digital communication) Dynamic ALOHA, Carrier Sense Multiple Access (data communication)
9
Channel Allocation Problem
In shared medium, a user will first listen to the channel for its availability, then sends its frame COLLISION occurs when more than one user start using the medium at the same time At collision incidence, both user release the medium and wait for random time before re-sending
10
ALOHA Protocols
11
ALOHA Protocols Created in 1970s in the University of Hawaii by Norman Abramson First ingenious method to resolve channel allocation problem It was best for wireless communication and the concept is still in used by modern protocol like Wi-fi
12
Pure ALOHA Basic ideas:
Anyone is allowed to transmit their data whenever they have something to transmit, without checking the channel availability first After sending, the sender will listen to its own frequency to tell whether its frame has been destroyed due to collision or not This is possible due to feedback property of broadcasting channel, or The sender will require an acknowledgement
13
Pure ALOHA Basic ideas:
If there is no feedback, then there is collision If collision occurs, the sender will wait for a random amount of time, then re-send – this called backoff
14
Pure ALOHA User A B C D E Time
15
Slotted ALOHA Time is divided into slots, and users can only transmit at start of slot Resulting advantage: Efficiency is doubled (see graph) Disadvantages: Requires synchronization clock Still poor at high loads (see graph)
16
Pure vs Slotted ALOHA Slotted ALOHA: S = Ge-G Pure ALOHA: S = Ge-2G
0.40 Slotted ALOHA: S = Ge-G S (throughput per frame time) 0.30 0.20 Pure ALOHA: S = Ge-2G 0.10 0.5 1.0 1.5 2.0 2.5 3.0 G (attempts per packet time)
17
Carrier Sense Multiple Access Protocols
18
Carrier Sensing Protocols
Network communication can be improved greatly if the nodes can sense the existence of any transmission signal inside the transmission medium Implemented in Carrier Sense Multiple Access (CSMA) and a few of its variations Improvement is due to the fact that collisions is reduced since hosts will only send data if medium is not in use
19
CSMA A host that needs to transmit data will first listen into communication medium and decide whether another host is using the medium or not The host will only transmit its data if no one is using the medium After finish sending the data frame, there will be an interframe gap of 9.6μs idle before any host can take the medium
20
Persistent and Non-persistent CSMA
CSMA is called persistent if: when sensing that a medium is being used, the host waits and will definitely transmit once the current transmission ends may cause collision if more than one host was waiting And non-persistent if: the host waits for a random duration and re-sends only if no one using it results in less collision
21
CSMA/CD (Collision Detection)
The system will be having 3 states: transmission, contention and idle Transmission state is the state where one host sends data. After that host finishes, more than one of other hosts might be sending at the same time – a collision
22
CSMA/CD (Collision Detection)
On sensing a collision, all hosts involve would release the medium and they send a jamming signal to tell others that there is collision happened so that everyone releases the medium Then they will wait for a random duration and re-try if no one is sending The above two steps is the contention state
23
CSMA/CD (Collision Detection)
Once one of the competing host gains control the system is in transmission state again Idle state is just the state that no one is using the medium collisions transmission transmission transmission transmission contention contention idle
24
CSMA/CA (Collision Avoidance)
CSMA/CD is a persistence variation of CSMA – it handles collision when it happens CSMA/CA is a non-persistence variation CSMA CSMA/CA avoids collision by not sending jamming signal instead, just wait for a random duration then re-sends if no one is using
25
Collision-Free Protocol
26
Collision-Free Protocols
In collision free protocols, instead of sensing the medium, the hosts will tell if they want to transmit There is a special frame called contention frame whose content is contributed by all hosts
27
Collision-Free Protocols
Contention frame is slotted and the hosts will take turns at a very precise timing to write information into the frame A host sets a binary 1 at bit location reserved for it in contention frame if it wants to use the medium
28
Collision-Free Protocols
Once all hosts write the binary bits accordingly to its intention, the actual transmission will be granted to the requesting hosts in sequence. Once all transmissions finish, the hosts will then re-fill the contention frame This protocol is called basic bit-map protocol
29
Collision-Free Protocols
8 contention slots 8 contention slots 8 contention slots 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 2 3 4 5 6 7 1 1 1 1 3 7 1 1 1 5 1 2 frames frames frames
30
Ethernet Topology
31
Topology Bus Linear Bus – 2 ends Distributed Bus – more than 2 ends
32
Topology Star Ring
33
Topology Mesh Tree
34
Bus Topology Use of multipoint medium
All stations attach directly to transmission medium (bus) through appropriate hardware interfacing known as tap
35
Bus Topology A transmission from any station propagates the length of the medium in both directions & can be received by all other stations At each end of the bus is a terminator, which absorbs any signal, removing it from the bus
36
Tree Topology Use of multipoint medium
Transmission medium is a branching cable with no closed loops Tree layout begins at a point known as the headend
37
Tree Topology One or more cables start at the headend, and each of these may have branches The branches in turn may have additional branches to allow quite complex layouts A transmission from any station propagates throughout the medium & can be received by all other stations
38
Ring Topology Repeaters joined by point-to-point links in closed loop
Receive data on one link and retransmit on another Links are unidirectional Stations attached to repeaters
39
Ring Topology Data in frames
Circulate past all stations Destination recognizes address and copies frame Frame circulates back to source where it is removed Medium access control determines when station can insert frame
40
Star Topology Each station connected directly to central node
Usually via two point-to-point links Two alternatives operation of central node: Broadcast : Physical star, logical bus Frame-switching device : Only one station can transmit at a time
41
Star Topology Broadcast Frame-switching device
A transmission of a frame from one station to the central node is retransmitted on all of the outgoing links Central node is referred as hub Frame-switching device Incoming frame is buffered in the node & retransmitted on an outgoing link to the destination station
42
IEEE 802.3 Standard of Ethernet
43
IEEE Standard Defines Ethernet as CSMA/CD protocol on bus or ring topology Also defines the minimum frame length Also defines the cabling hardware Frame format: 7 1 6 6 0-1500 0-46 4 Bytes S O F Preamble Destination address Source address Length Data Pad Checksum
44
Frame Fields Preamble: 7 bytes of alternating 1-s and 0-s for synchronization Start of Frame (SOF): Sequence of Destination Address: 6 bytes of MAC address Source Address: 6 bytes of address Length: Total size of data and pad
45
Frame Fields Data: Packet from upper layer
Pad: Series of 0-s to make up a minimum total size of 46 bytes of data and pad – so that the min frame size is 64 bits Checksum: 32 bit CRC
46
MAC Address Identifying each individual network card uniquely
46 bits address in 48 bits string Binary 0 in MSB indicates ordinary address Binary 1 in MSB indicates the 46 bits address is a group address (for multicast)
47
MAC Address If all address bit are 1-s then it is a broadcast (all nodes are getting the message) If two MSB are 0-s then the 46 bits address is a combination of source and destination MAC address
48
MAC Address Examples of possible MAC addresses include:
00-0C-F AD 00-11-F5-4B-20-56 The first three bytes of this address identify the manufacture of this network device 00-0C-F1 for Intel Assigned by the IEEE and the database is available online at IEEE OUI and Company_id Assignments website
49
Need for Frame Minimum Size
In CSMA/CD, if there is a collision, the first node to detect it will send a jamming signal We need to calculate the maximum delay after a node sends a message until the first jamming signal is heard by all nodes Then from there we can calculate what is the minimum frame size so that NO nodes will finish transmitting before it hears the jamming signal
50
Need for Frame Minimum Size
The diagram below shows that there is a maximum of 2td delay before the first jamming signal is heard by every node (td = propagation delay) A B A B Frame sent at t = 0s At t ≈ td s, the frame almost reach the receiver collision A B A B At t ≈ td s, suddenly the receiver sends out frame Jamming signal sent out Jamming signal finishes propagating at t = 2td s
51
Need for Frame Minimum Size
(compare this calculation to link utilization calculation) Hence max delay is a function of bit rate, max distance allowed and velocity of propagation Given: Ethernet bit rate: 10 Mbps (802.3 Standard for 10Base5 and 10Base-T) Max distance: 500m (802.3 Standard) Velocity of propagation: 2 × 108 ms−1
52
Need for Frame Minimum Size
(compare this calculation to link utilization calculation) Hence: td = 2.5μs, hence 2td = 5μs Bit duration = 0.1μs No. bits traveling in 2td time = 50 Adding some gap for error, the best min frame size chosen is 64 bits 802.3 Std sets 512 bits as min, because it allows max distance of 2.5km with 4 passive repeaters
53
Ethernet Physical Standard
10Base5: 10 Mbps, Baseband transmission, 500m cable length 10Base2: 10 Mbps, Baseband transmission, 200m cable length 10Base-T: 10 Mbps, Baseband transmission, 500m UTP cable 100Base-TX: 100 Mbps, Baseband transmission, 200m UTP cable
54
Ethernet Physical Standard
Wiring: Unshielded Twisted Pair (UTP) Bundle of eight wires (only uses four) Terminates in RJ-45 connector
55
Ethernet Physical Standard
Hubs (10Base-T): A kind of passive repeater Used to connects nodes in bus topology Max length of UTP: 100m Max no. hubs in series: 4 Hence, max distance between farthest nodes: 500m 100m 10Base-T hubs 100m 100m 100m 500m, 4 hubs 100m
56
Repeaters Regenerates signal Used to extend the network coverage
Hubs are repeaters There will be a limit to the length of the farthest node due to physical signal limitation
57
Bridges Used to join LANs Results in local internet
May filter the data traffic
58
Switches More intelligent kind of bridges
Must be arranged in hierarchical arrangement – only one path from one switch to another Due to its intelligent close to a small node, there is no limit in number of switches in a LAN – as opposed to hubs
59
Hubs vs Bridges vs Switches
Has many ports Redistributes data to all nodes It depends on the receiver to process the data Almost no intelligence Used to extend connection within standard limit
60
Hubs vs Bridges vs Switches
Only two ports Transfers data from one end to the other only if the receiver address is at the other end Have intelligence to interpret MAC addresses Used to join two separate LANs
61
Hubs vs Bridges vs Switches
More than two ports Have intelligence to interpret MAC addresses Transfers data from one end to another only if the receiver address is at that end Extends LAN unlimitedly, but must conform to hierarchical (tree) structure Router: Switch that works on IP address instead of MAC For internet instead of LAN Smart enough to do protocol conversion
62
Hubs vs Bridges vs Switches
63
IEEE 802.11 Standard of Wireless Ethernet
64
IEEE 802.11 Uses CSMA/CA instead of CSMA/CD
Could not detect collision due to hidden nodes (target nodes beyond signal range) Sender listen to the medium (air) to see whether it is busy or not After the medium is free for a period of DIFS (Distributed Inter-Frame Space ~ 128μs), the sender sends RTS (request to send) signal to tell its intention, and others will make way
65
IEEE 802.11b Frequency = 2.4 GHz Maximum Speed = 11 Mbps
Range = about 38 meters (varies) Encoding Scheme = DSSS Modulation Technique = BPSK(1 Mbps), QPSK(2 Mbps), CCK(5.5 Mbps,11Mbps)
66
IEEE 802.11a Frequency = 5 GHz Maximum Speed = 54 Mbps
Range = about 35 meters (varies) Encoding Scheme = Orthogonal FDM (closely located frequencies but far enough not to interfere each other)
67
IEEE 802.11g Frequency = 2.4 GHz Maximum Speed = 54 Mbps
Range = about 38 meters (varies) Encoding Scheme = OFDM
68
IEEE 802.11n Frequency = 5 GHz, 2.4 GHz Modulation = OFDM
Maximum Speed = 150 Mbps Range = about 70 meters (varies) Encoding Scheme = OFDM Addition of MIMO (Multiple Input Multiple Output) sender and receiver have 2 antennas to send and receive 2 signals (one is modified redundancy) to improve performance
69
Token Based Protocol
70
IEEE 802.5 Token Ring The network is arranged in ring topology
There is a special frame to be passed around the nodes named TOKEN Whoever is having the token can transmit data into transmission medium, otherwise it passes the token to the next node
71
IEEE Token Ring
72
IEEE 802.4 Token Bus The network is arranged in bus topology
Just as token ring, there is a special frame TOKEN used Whoever is having the token can transmit data into transmission medium, otherwise it passes the token to the next node The use of this type of protocol is shown by the presence of coaxial cable connector on the network card instead of 8P8C
73
FDDI Fiber Distributed Data Interface Data rate = 100Mbps
Used as a backbone With multi-mode fiber any given ring segment can be up to 200 km in length A total of 500 stations can be connected with a maximum separation of 2 km Two complete rings to overcome failures
74
FDDI
75
FDDI Interface in High Speed LANs
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.