Upload
ashlyn-mccoy
View
220
Download
0
Embed Size (px)
Citation preview
Multiple Access
INTRODUCTION The medium access sub layer is the bottom part of data link
layer. The medium access sub layer is known as MAC(Medium access control) sub layer.
When common medium shared by many stations MAC layer plays very important role. Without MAC Control several station transmits simultaneously could produce garbled message.
The basic function of MAC sublayer is the media access control,error detection and station addressing.
Media access control procedure are ensure that every station get a fair chance to transmit and avoid the collision
When a number of user station share a single transmission medium. this is called as Multiple access communication.
2
3
Outline Multiple access mechanisms Random access Controlled access Channelization
4
Sublayers of Data Link Layer
5
Multiple Access Mechanisms
Random Access
7
Random Access Also called contention-based access No station is assigned to control
another
ALOHA The ALOHA protocol was developed at University of Hawaii
in the early 1970s.ALOHA was developed for packet radio network. ALOHA is applicable to any shared transmission medium.
In a system when multiple users try to send a message to other station through a common broadcast channel random access technique are used.
Random access means there is no scheduled time for any station to transmitt.
The basic idea of ALOHA system is applicable to any system in which uncoordinated users competing for the use of a single shared channel.
When a station send a data another station may attempt to do so at same time so the data from two station are collide. to avoid collision each station simply wait a random time and try it again
8
9
ALOHA Network
Pure ALOHA
10
The original ALOHA protocol is called pure ALOHA. In pure ALOHA each station send a frame whenever it has a frame to send. since there is the chance of collision between frame from different station
The below figure in next slide shows the pure aloha The pure ALOHA Protocol relies on acknowledgement from
the receiver. When user send a frame it except the receiver to send an acknowledgement. if the acknowledgement does not arrive after a time out period the station assume that the frame has been destroyed and resend the frame.
Whenever two frames try to occupy the channel at same time there is the chance of collision and both will be garbled.if the first bit of new frame overlaps with last bit of a frame almost finished both frame will be destroyed and both will be retransmit later.
11
Pure ALOHA dictate that when the time out period passes ,each user wait random amount of time before resending the frame .the randomness will help to avoid more collision.the time is called back-off time (TB)
12
Frames in Pure ALOHA
13
ALOHA Protocol
14
ALOHA: Vulnerable Time
15
ALOHA: Throughput Assume number of stations trying to
transmit follow Poisson Distribution The throughput for pure ALOHA is
S = G × e−2G
where G is the average number of frames requested per frame-time
The maximum throughput Smax = 0.184 when G= 1/2
16
Slotted ALOHA
17
Slotted ALOHA: Vulnerable Time
18
Slotted ALOHA: Throughput The throughput for Slotted ALOHA is
S = G × e−G
where G is the average number of frames requested per frame-time
The maximum throughput Smax = 0.368 when G= 1
19
Example A Slotted ALOHA network transmits
200-bit frames on a shared channel of 200 kbps. What is the throughput if the system (all stations together) produces 1000 frames per second 500 frames per second 250 frames per second
20
CSMA Carrier Sense Multiple Access
"Listen before talk" Reduce the possibility of collision
But cannot completely eliminate it
21
Collision in CSMA
B
C
22
CSMA: Vulnerable Time
23
Persistence Methods What a station does when channel is idle or
busy
Non-persistent CSMA In non-persistent CSMA when a station
having a packet(frame)to transmit and find that channel is busy it back off for a fixed interval of time.it then check it if channel is free then it transmitts
24
1-Persistence CSMA Any station wishing to transmit monitor
the channel continuously until the channel is idle and then transmit immediately with probability one hence the name 1-persistent
When two or more station are waiting to transmitt a collision is guaranteed.since each station will transmitt immediately at the end of busy period.in this case each will wait random amount of time and then reattempt to transmit.
25
P-persistence CSMA To reduce the probability of collision in 1-
persistent CSMA not all waiting station are allowed to transmit immediately after the channel is idle.
When a station become ready to send and it senses the channel to be idle it either to transmit with a probability p or it defer transmission by one time slot with a probability q=1-p if deferred slot is idle the station either transmit with probability p or defer again with a probability q this process is repeated until either packet are transmitted or channel become busy
26
27
Persistence Methods
28
CSMA/CD Carrier Sense Multiple Access with
Collision Detection Station monitors channel while
sending a frame
29
Energy Levels
30
CSMA/CD: Flow Diagram
31
CSMA/CA Carrier Sense Multiple Access with
Collision Avoidance Used in a network where collision
cannot be detected E.g., wireless LAN
IFS – Interframe Space
32
CSMA/CA: Flow Diagram
contention window size is 2K-1
After each slot:- If idle, continue counting- If busy, stop counting
Controlled Access
34
Control Access A station must be authorized by
someone (e.g., other stations) before transmitting
Three common methods: Reservation Polling Token passing
35
Reservation Method
36
Polling Method
37
Token Passing
Channelization
39
Channelization Similar to multiplexing Three schemes
Frequency-Division Multiple Access (FDMA)
Time-Division Multiple Access (TDMA) Code-Division Multiple Access (CDMA)
40
FDMA
41
TDMA
42
CDMA One channel carries all transmissions
at the same time Each channel is separated by code
43
CDMA: Chip Sequences Each station is assigned a unique chip
sequence
Chip sequences are orthogonal vectors Inner product of any pair must be zero
With N stations, sequences must have the following properties: They are of length N Their self inner product is always N
44
CDMA: Bit Representation
45
Transmission in CDMA
46
CDMA Encoding
47
Signal Created by CDMA
48
CDMA Decoding
49
Sequence Generation Common method: Walsh Table
Number of sequences is always a power of two
50
Example: Walsh Table Find chip sequences for eight
stations
51
Example: Walsh Table There are 80 stations in a CDMA
network. What is the length of the sequences generated by Walsh Table?
WIRED LAN ETHERNET
52
IEEE STANDARDS
In 1985, the Computer Society of the IEEE started a project, called Project 802, to set standards to enable intercommunication among equipment from a variety of manufacturers. Project 802 is a way of specifying functions of the physical layer and the data link layer of major LAN protocols.
Data Link LayerPhysical Layer
Topics discussed in this section:
Figure 13.1 IEEE standard for LANs
13-2 STANDARD ETHERNET
The original Ethernet was created in 1976 at Xerox’s Palo Alto Research Center (PARC). Since then, it has gone through four generations. We briefly discuss the Standard (or traditional) Ethernet in this section.
MAC SublayerPhysical Layer
Topics discussed in this section:
Figure 13.3 Ethernet evolution through four generations
13.57
Figure 13.4 802.3 MAC frame
13.58
Figure 13.5 Minimum and maximum lengths
13.59
Frame length:Minimum: 64 bytes (512 bits)
Maximum: 1518 bytes (12,144 bits)
Note
13.60
Figure 13.6 Example of an Ethernet address in hexadecimal notation
13.61
Figure 13.7 Unicast and multicast addresses
13.62
The least significant bit of the first byte defines the type of address.
If the bit is 0, the address is unicast;otherwise, it is multicast.
Note
13.63
The broadcast destination address is a special case of the multicast address in which all bits are 1s.
Note
13.64
Define the type of the following destination addresses:a. 4A:30:10:21:10:1A b. 47:20:1B:2E:08:EEc. FF:FF:FF:FF:FF:FF
SolutionTo find the type of the address, we need to look at the second hexadecimal digit from the left. If it is even, the address is unicast. If it is odd, the address is multicast. If all digits are F’s, the address is broadcast. Therefore, we have the following:a. This is a unicast address because A in binary is 1010.b. This is a multicast address because 7 in binary is 0111.c. This is a broadcast address because all digits are F’s.
Example 13.1
13.65
Figure 13.8 Categories of Standard Ethernet
13.66
Figure 13.9 Encoding in a Standard Ethernet implementation
13.67
Figure 13.10 10Base5 implementation
13.68
Figure 13.11 10Base2 implementation
13.69
Figure 13.12 10Base-T implementation
13.70
Figure 13.13 10Base-F implementation
13.71
Table 13.1 Summary of Standard Ethernet implementations
13.72
13-3 CHANGES IN THE STANDARD
The 10-Mbps Standard Ethernet has gone through several changes before moving to the higher data rates. These changes actually opened the road to the evolution of the Ethernet to become compatible with other high-data-rate LANs.
Bridged EthernetSwitched EthernetFull-Duplex Ethernet
Topics discussed in this section:
13.73
Figure 13.14 Sharing bandwidth
13.74
Figure 13.15 A network with and without a bridge
13.75
Figure 13.16 Collision domains in an unbridged network and a bridged network
13.76
Figure 13.17 Switched Ethernet
13.77
Figure 13.18 Full-duplex switched Ethernet
13.78
13-4 FAST ETHERNET
Fast Ethernet was designed to compete with LAN protocols such as FDDI or Fiber Channel. IEEE created Fast Ethernet under the name 802.3u. Fast Ethernet is backward-compatible with Standard Ethernet, but it can transmit data 10 times faster at a rate of 100 Mbps.
MAC SublayerPhysical Layer
Topics discussed in this section:
13.79
Figure 13.19 Fast Ethernet topology
13.80
Figure 13.20 Fast Ethernet implementations
13.81
Figure 13.21 Encoding for Fast Ethernet implementation
13.82
Table 13.2 Summary of Fast Ethernet implementations
13.83
13-5 GIGABIT ETHERNET
The need for an even higher data rate resulted in the design of the Gigabit Ethernet protocol (1000 Mbps). The IEEE committee calls the standard 802.3z.
MAC SublayerPhysical LayerTen-Gigabit Ethernet
Topics discussed in this section:
13.84
In the full-duplex mode of Gigabit Ethernet, there is no collision;the maximum length of the cable is determined by the signal
attenuation in the cable.
Note
13.85
Figure 13.22 Topologies of Gigabit Ethernet
13.86
Figure 13.23 Gigabit Ethernet implementations
13.87
Figure 13.24 Encoding in Gigabit Ethernet implementations
13.88
Table 13.3 Summary of Gigabit Ethernet implementations
13.89
Table 13.4 Summary of Ten-Gigabit Ethernet implementations
Figure 11-13
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Figure 11-14
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Configuration
Figure 11-14-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Configuration
Figure 11-14-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Configuration
Figure 11-15
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Modes
Figure 11-16
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Frame Types
Figure 11-16-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Frame Types
Figure 11-16-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Frame Types
Figure 11-17
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Flag Field
Figure 11-18
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Bit Stuffing
Figure 11-19
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Address Field
Figure 11-20
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Control Field
Figure 11-21
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Poll/Final
Figure 11-22
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC Information Field
Figure 11-23
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
HDLC FCS Field
Figure 11-24
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Figure 11-25
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Use of P/F Field
Figure 11-25-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Use of P/F Field
Figure 11-25-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Use of P/F Field
Figure 11-25-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Use of P/F Field
Figure 11-25-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Use of P/F Field
Figure 11-26
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
U-Frame Control Field
Figure 11-26-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
U-Frame Control Field
Figure 11-27
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Polling Example
Figure 11-28
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Selecting Example
Figure 11-29
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Peer-to-Peer Example
Figure 11-29-continued
WCB/McGraw-Hill The McGraw-Hill Companies, Inc., 1998
Peer-to-Peer Example
Point-to-PointAccess:
PPP
PPP In a network, two devices can be connected by a
dedicated link or a shared link. In the first case, the link can be used by the two devices at any time. We refer to this type of access as point-to-point access. In the second case, the link is shared between pairs of devices that need to use the link. We refer to this type of access as multiple access.
One of the most common protocols for point-to-point access is the Point-to-Point Protocol (PPP).
PPP services
It defines the format of the frame to be exchanged between devices.
It defines how two devices can negotiate the establishment of the link and the exchanged of data.
It defines how network layer data are encapsulated in the data link frame.
It defines how two devices can authenticate each other.
PPP FRAME
PPP FRAME Flag field. The flag fields identify the boundaries
of a PPP frame. Its value is 01111110. Address field. Because PPP is used for a point-to-
point connection, it uses the broadcast address of HDCL, 11111111, to avoid a data link address in the protocol.
Control field. The control field uses the format of the U-frame in HDCL. See pages 285-286.
Protocol field. The protocol field defines what is being carried in the data field: user data or other information.
Data field. This field carries either the user data or other information.
Frame check sequence (FCS) field. This field is used for error detection.
Transition states
A PPP connection goes through different phases called transition sates.
Transition States Idle state. The idle state means that the link is
not being used. There is no active carrier, and the line is quiet.
Establishing link. When one of the end point starts the communication, the connection goes into the establishing state. In this state, options are negotiated between the two parties. If the negotiation is successful, the system goes to the authenticating state (if authentication is required) or directly to the networking state.
Authenticating state. The authenticating state is optional. If the result is successful , the connection goes to the networking state; otherwise, it goes to the terminating state.
Transition States Networking State. When a connection reaches
this state, the exchange of user control and data packets can be started. The connection remains in this state until one of the endpoints wants to terminate the connection.
Terminating state. When the connection is in the terminating state, several packets are exchanged between the two ends for house cleaning and closing the link.
PPP Stack
PPP is a data-link layer protocol, PPP uses a stack of other protocols to establish the link, to authenticate the parties involved, and to carry the network layer data.
Three sets of protocols are used by PPP: Link control protocol, authentication protocols, and network control protocol.
Protocol stack
Link Control Protocol (LCP)
It is responsible for establishing, maintaining, configuring, and terminating links.
It also provides negotiation mechanisms to set options between endpoints. Both endpoints of the link must reach an agreement about the options before the link can be established.
When PPP is carrying an LCP packet, it is either in the establishing state or in the terminating state.
All LCP packets are carried in the data field of the PPP frame. What defines the frame as one carrying an LCP packet is the value of the protocol field, which is set to C021 (base 16).
LCP packet encapsulated in a frame
Link Control Protocol (LCP)
Code. This field defines the type of LCP packet. ID. This field holds a value used to match a
request with reply. One endpoint inserts a value in this field, which will be copied in the reply packet.
Length. This field defines the length of the entire LCP packet.
Information. This field contains extra information needed for some LCP packets.
Link Control Protocol (LCP)
Configuration packets are used to negotiate the options between the two ends. There are four different types of packets for this purpose: configure-request, configure-ack, configure-nak, and configure-reject.
Link termination packets. The link termination packets are used to disconnect the link between two endpoints.
There are two types: terminate-request and terminate-ack.
Link monitoring and debugging packets. These packets are used for monitoring and debugging the link. There are five types: code-reject, protocol-reject, echo-reply, discard-request.
LCP packets and their codes
Code Packet Type Description
0116 Configure-request Contains the list of proposed options and their values
0216 Configure-ack Accepts all options proposed
0316 Configure-nak Announces that some options are not acceptable
0416 Configure-reject Announces that some options are not recognized
0516 Terminate-request Requests to shut down the line
0616 Terminate-ack Accepts the shut down request
0716 Code-reject Announces an unknown code
0816 Protocol-reject Announces an unknown protocol
0916 Echo-request A type of hello message to check if the other end is alive
0A16 Echo-reply The response to the echo-request message
0B16 Discard-request A request to discard the packet
Authentication Protocols
Authentication plays a very important role in PPP because PPP is designed for use over dial-up links where verification of user identity is necessary.
Authentication means validating the identity of a user who needs to access a set of resources.
PPP uses two protocols for authentication: Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP)
PAP The PAP is a simple authentication procedure
with two steps:1. The user who wants to access a system sends
an ID (identification) and a password.2. The system checks the validity of the
identification and password and either accepts or denies a connection.
For those systems that require greater security, PAP is not enough. A third party with access to the link can easily pick up the password and access the system resources.
PAP
PAP packets
CHAP The CHAP protocol is a three-way handshaking
authentication protocol that provides greater security than PAP.
In this method, the password is kept secret; it is never sent on-line.
Steps The system sends to the user a challenge packet
containing a challenge value, usually a few bytes. The user applies a predefined function that takes
the challenge value and the user’s own password and creates a result. The user sends the result in the response packet to the system.
CHAP
The system does the same. It applies the same function to the password of the user and the challenge value to create a result. If the result created is the same as the result sent in the response packet, access is granted; otherwise, it is denied.
CHAP
CHAP packets
Network Control Protocol (NCP)
After the link is established and authentication (if any) is successful, the connection goes on the networking state.
NCP is a set of control protocols to allow the encapsulation of data coming from network layer protocols into the PPP frame.
The set of packets that establish and terminate a network layer connection is called Internetwork Protocol Control Protocol (IPCP).
IPCP packet encapsulated in PPP frame
Table 12.3 Code value for IPCP packets
Code IPCP Packet
01 Configure-request
02 Configure-ack
03 Configure-nak
04 Configure-reject
05 Terminate-request
06 Terminate-ack
07 Code-reject
An example