Title: Midterm Exam Review
1Midterm ExamReview
2Communication Networks
- A communication network provides a general
solution to the problem of connecting many
devices - Connect each device to a network node (router)
- Network nodes exchange information and carry the
information from a source device to a destination
device - Note Network nodes do not generate information
- Connect devices to a single shared medium (LAN)
3Communication Networks
- A generic communication network
Other names for Device station, host,
terminal Other names for Node switch, router,
gateway
4Classification of Communications
- Communication networks can be classified based on
the way in which the nodes exchange information - Communication Network
- Switched Communication Network
- Circuit-Switched Communication Network
- Packet-Switched Communication Network
- Datagram Network
- Virtual Circuit Network
- Broadcast Communication Network
5Broadcast Network Examples
Packet Radio Network
Satellite Network
Bus Local Network
6Circuit Switching
- A node in a circuit-switching network
7Circuit Switching
8Packet Switching
9Datagram Packet Switching
10Virtual-Circuit Packet Switching
11Network Technologies
- Telephone Networks
- IP Networks
- ATM Networks
12Three Network Technologies
- Telephone Network
- The largest worldwide computer network,
specialized for voice - Switching technique Circuit-switching
- Internet
- A newer global and public information
infrastructure - Switching technique Datagram packet switching
- ATM
- Was intended to replace telephone networks and
data networks, but lost momentum due the success
of the Internet - Switching technique VC packet switching
13Telephone Networks
Starting in 1876, the public switched telephone
network (PSTN) has become a global infrastructure
for voice communications
14Addressing and Routing
- Each subscriber has an address (telephone number)
- Addresses are hierarchical
- The information contained in a telephone address
is exploited when establishing a route from
caller to callee
Country code
Number of local exchange
Subscriber number
Area code
852
2358
6984
My office number
15The Internet - A Network of Networks
- The Internet is a loose collection of networks
- Networks are organized in a (loose) multi-layer
hierarchy
16What defines the Internet
- Use of a globally unique address space (Internet
Addresses) - Support of the Transmission Control
Protocol/Internet Protocol (TCP/IP) suite for
communications - The physical networks widely differ (cable,
optical, wireless, radio, etc.) - IP on top of
ANYTHING.
17Internet Addresses
- Each network interface on the Internet has a
unique global address, called the IP address. - An IP address
- is 32 bits long
- encodes a network number and a host number
- IP addresses are written in a dotted decimal
notation. 128.142.136.146 means - 10000000 in 1 st Byte
- 10001110 in 2 nd Byte
- 10001000 in 3 rd Byte
- 10010011 in 4 th Byte
18Domain Names and IP Addresses
- Users and applications on the Internet normally
do not use IP addresses directly. No one says
http//128.142.136.29/ - Rather users and applications use domain names
http//www.cs.ust.hk - A service on the Internet, called the Domain Name
System (DNS) performs the translation between
domain names and IP addresses
19Traditional Network Infrastructure
20B-ISDN
21Protocol Architecture
- Layered Protocol Architectures
- OSI Reference Model
- TCP/IP Protocol Stack
22Need for Protocols
- The task of exchanging information between
devices - requires a high degree of cooperation between the
involved parties - can be quite complex
- Protocols are a set of rules and conventions. By
enforcing that communicating parties adhere to a
common protocol, communication is made possible. - The complexity of the communication task is
reduced by dividing it into subtasks - Each subtask is implemented independently.
- Each subtask provides a service to another
subtask.
23OSI Reference Model
- In 1977 the International Standardization
Organization (ISO) developed a model for a
layered network architecture - This effort was completed in 1983 and is known as
the Open Systems Interconnection (OSI) Reference
Model - The OSI model defines seven layers
- Layer 7 Application Layer
- Layer 6 Presentation Layer
- Layer 5 Session Layer
- Layer 4 Transport Layer
- Layer 3 Network Layer
- Layer 2 Data Link Layer
- Layer 1 Physical Layer
- (Layer 0 Interconnection Media)
24OSI Layers
25OSI Layers and Encapsulation
26OSI Model in a Switched Communication Network
27TCP/IP Protocol Suite
- The TCP/IP protocol suite was first defined in
1974 - The TCP/IP protocol suite is the protocol
architecture of the Internet - The TCP/IP suite has four layers Application,
Transport, Internet, and Network Interface Layer
28Encapsulation in the TCP/IP Suite
- As data is moving down the protocol stack, each
protocol is adding layer-specific control
information.
29Comparison of OSI Model and TCP/IP Suite
30Physical Layer
- Fundamentals
- Transmissions factors
- Transmission Media
31Physical Layer
- The physical layer deals with transporting bits
between two machines. - The goal is to understand what happens to a
signal as it travels across some physical media. -
32Theoretical Basis for Data Communication
- Fourier AnalysisFourier showed that a periodic
function g(t) can be represented mathematically
as an infinite series of sines and cosines - f is the function's fundamental
frequency -  T1/f     is the function's period
-  an and bn are the amplitudes of the nth
harmonics
33Theoretical Basis for Data Communication
- The series representation of g(t) is called its
Fourier series expansion. - In communications, we can always represent a data
signal using a Fourier series by imagining that
the signal repeats the same pattern forever.
34Theoretical Basis for Data Communication
- We can compute the coefficients  an and bn
- Suppose we use voltages (on/off) to represent
1''s and 0''s, and we transmit the bit string
011000010'. The signal would look as follows
35Theoretical Basis for Data Communication
36Theoretical Basis for Data Communication
- Points to note about the Fourier expansion
- The more terms in the expansion, the more exact
our representation becomes. - The expression represents the
amplitude or energy of the signal (e.g., the
harmonics contribution to the wave).
37Theoretical Basis for Data Communication
- Conclusion it's essentially impossible to
receive the exact signal that was sent. The key
is to receive enough of the signal so that the
receiver can figure out what the original signal
was. - Note bandwidth'' is an overloaded term.
Engineers tend to use bandwidth to refer to the
spectrum of signals a channel carries. In
contrast, the term bandwidth'' is often also
used to refer to the data rate of the channel, in
bps.
38Nyquist Theorem
- Noise-free channel
- Limiting factor on transmission is channel BW
- If bandwidth is B, highest signal rate is 2B
- Multi-level signaling
- C 2B log2 M where
- C is the data rate
- B is the bandwidth
- M is the number of levels
- For example, a noiseless 3-kHz channel cannot
transmit binary signals at a rate exceeding 6000
bps.
39Shannons Theorem
- If random noise is present, the situation
deteriorates rapidly. The amount of noise present
is measured by the ratio of the signal power to
the noise power, called the signal-to-noise ratio
(S/N). - Usually, the ratio itself is not quoted instead,
the quantity 10 log10S/N is given. These units
are called decibels (dB). - Maximum number of bits/secHlog2(1S/N)
- For telephone line 3000log2(130dB)?30000bps.
40Transmission Media
- The purpose of the physical layer is to transport
a raw bit stream from one machine to another. - Various physical media can be used for the actual
transmission. - Each one has its own niche in terms of bandwidth,
delay, cost, and ease of installation and
maintanence. - Media are roughly grouped into guided media, such
as copper wire and fiber optics, and unguided
media such as radio and lasers through air.
41Transmission Media
- Twisted Pair
- Coaxial Cable
- Fiber Optic
42Transmission MediaWireless Transmission
- Radio omnidirectional, AM, FM Radio, TV, ALOHA
data network - Microwave directional
- Terrestrial Microwave, long-haul common carrier,
government communications. - Satellite Microwave
- A communication satellite is a microwave relay
station.
43Data Link Layer
- Framing
- Error Detection
- Flow Control
- Error Control (via Retransmission)
44Introduction
- Main Task of the data link layer
- Provide error-free transmission over a physical
link
45Introduction
- The PDU at the Data Link Layer (DL-PDU) is
typically called a Frame. A Frame has a header, a
data field, and a trailer - Example
46Framing
- Problem Identify the beginning and the end of a
frame in a bit stream - Solution (bit-oriented Framing) A special bit
pattern (flag) signals the beginning and the end
of a frame (e.g., "01111110") use bit stuffing
- Problem The sequence 01111110 must not appear
in the data of the frame
47Error Control
- Two basic approaches to handle bit errors
- Error-correcting codes
- Too many additional bits are needed for
correction (used only in simplex communication
(e.g., satellite)) - Error-detecting codes plus retransmission
- Used if retransmission of corrupted data is
feasible - Receiver detects error and requests
retransmission of a frame.
48Cyclic-Redundancy Codes (CRC)
- General Method
- The transmitter generates an n-bit check sequence
number (known as Frame Checksum Sequence (FCS))
from a given k-bit frame such that the resulting
(kn)-bit frame is divisible by some number - The receiver divides the incoming frame by the
same number - If the result of the division does not leave a
remainder, the receiver assumes that there was no
error
49Step 2 CRC Encoding Method
- Define
- M(x) Data block is a polynomial ( Message,
Frame) - P(x) "Generator Polynomial" which is known to
both sender and receiver (degree of P(x) is n)
50Step 2 CRC Encoding Method
- (I) Append n zeros to M(x), i.e., M(x)xn
- (II) Divide M(x)xn by P(x) and obtain
- M(x)xn Q(x)P(x) R(x)
- (III) Set T(x) M(x)xn R(x). T(x) is the
encoded message - Note T(x) is divisible by P(x). Therefore, if
the received message does not contain an error
then it can be divided by P(x).
51Flow Control
- Flow Control is a technique for speed-matching of
transmitter and receiver. Flow control ensures
that a transmitting station does not overflow a
receiving station with data - We will discuss two protocols for flow control
- Stop-and-Wait Protocol
- Sliding Window Protocol
52Stop-and-Wait Flow Control
- Simplest form of flow control
- In Stop-and-Wait flow control, the receiver
indicates its readiness to receive data for each
frame - Operations
- 1. Sender Transmit a single frame
- 2. Receiver Transmit acknowledgment (ACK)
- 3. goto 1.
53Analysis of Stop-and-Wait
54Analysis of Stop-and-Wait
- Notation
- C Channel capacity in bps
- I Propagation delay
- H Number of bits in a frame header
- D Number of data bits in a frame
- F Total length of a frame (F DH)
- A Total length of an ACK frame
- F/C Transmission delay for a frame
55Analysis of Stop-and-Wait
56Analysis of Stop-and-Wait
- Transmission of a frame (in Stop-and-Wait)
57Analysis of Stop-and-Wait
- Efficiency of a protocol is the maximum fraction
of time when the protocol is transmitting data - Efficiency of Stop-and-Wait Flow Control (1)
- Assuming that H and A are negligible we obtain (2)
58Sliding Window Flow Control
- Major Drawback of Stop-and-Wait Flow Control
- Only one frame can be in transmission at a time
- This leads to inefficiency if agt1
- Sliding Window Flow Control
- Allows transmission of multiple frames
- Assigns each frame a k-bit sequence number
- Range of sequence number is 0...2k-1, i.e.,
frames are counted modulo 2k
59Operation of Sliding Window
- Sending Window
- At any instant, the sender is permitted to send
frames with sequence numbers in a certain range - The range of sequence numbers is called the
sending window
60Operation of Sliding Window
- Receiving Window
- The receiver maintains a receiving window
corresponding to the sequence numbers of frames
that are accepted
61Analysis of Sliding Windows
- Define
- We use the same parameters for as in
Stop-and-Wait - To simplify notation we set
- F/C 1
- I a (Normalization)
- W Maximum window size (identical for sender and
receiver)
62Analysis of Sliding Windows
63Analysis of Sliding Windows
- If the window size is sufficiently large the
sender can continuously transmit packets - W gt 2a1 Sender can transmit continuously
- normalized efficiency 1
- W lt 2a1Sender can transmit W frames every 2a1
time units - normalized efficiency W/(12a)
64ARQ Error Control
- Two types of errors
- Lost frames
- Damaged Frames
- Most Error Control techniques are based on
- (1) Error Detection Scheme (e.g., Parity checks,
CRC) - (2) Retransmission Scheme
- Error control schemes that involve error
detection and retransmission of lost or corrupted
frames are referred to as Automatic Repeat
Request (ARQ) error control
65ARQ Error Control
- All retransmission schemes use all or a subset of
the following procedures - Receiver sends an acknowledgment (ACK) if a frame
is correctly received - Receiver sends a negative acknowledgment (NAK) if
a frame is not correctly received - The sender retransmits a packet if an ACK is not
received within a timeout interval - All retransmission schemes (using ACK, NAK or
both) rely on the use of timers
66ARQ Schemes
- The most common ARQ retransmission schemes
- Stop-and-Wait ARQ
- Go-Back-N ARQ
- Selective Repeat ARQ
67Go-Back-N ARQ
- Go-Back-N uses the sliding window flow control
protocol. If no errors occur the operations are
identical to Sliding Window - Operations
- A station may send multiple frames as allowed by
the window size - Receiver sends a NAK i if frame i is in error.
After that, the receiver discards all incoming
frames until the frame in error was correctly
retransmitted - If sender receives a NAK i it will retransmit
frame i and all packets i1, i2,... which have
been sent, but not been acknowledged
68Selective-Repeat ARQ
- Similar to Go-Back-N ARQ. However, the sender
only retransmits frames for which a NAK is
received - Advantage over Go-Back-N
- Fewer Retransmissions.
- Disadvantages
- More complexity at sender and receiver
- Each frame must be acknowledged individually (no
cumulative acknowledgements) - Receiver may receive frames out of sequence
69Analysis of ARQ Protocols
- What is the efficiency of the discussed ARQ
protocols? - A number of assumptions
- ACKs and NAKs are never lost, and frames are not
dropped. - Sizes of ACKs, NAKs, and frame headers are
negligible.
70Analysis of Stop-and-Wait ARQ
- Parameters
- Uefficiency
- TtF/C (transmission delay of a frame)
- Ipropagation delay
- aI/Tt
- Pprobability that a frame is in error
- Without Errors (P0)
- UTt/(Tt2I)
71Stop-and-Wait ARQ With Errors
- Probability that k transmission attempts are
needed to successfully transmit a frame
- Expected number of attempts (EA)
- Expected efficiency with errors
72Analysis of Selective Reject ARQ
73Local Area Networks (LANs)
- Broadcast Networks
- Multiple Access Protocols
- Ethernet (IEEE 802.3)
- Token Ring (IEEE 802.5, FDDI)
74Examples of Broadcast Network
- If more than one station transmits at a time on
the broadcast channel, a collision occurs - Multi-access problem How to determine which
station can transmit?
75Multi-access Protocols
- Protocols that solve the resolution problem
dynamically are called Multiple Access
(Multi-access) Protocols - Different types of multi-access protocols
- Contention protocols resolve a collision after it
occurs. These protocols execute a collision
resolution protocol after each collision - Collision-free protocols ensure that a collision
can never occur
76Contention Protocols
- ALOHA Protocols
- (Pure) Aloha
- Slotted Aloha
- CSMA (Carrier Sense Multiple Access)
- persistent CSMA
- non-persistent CSMA
- CSMA/CD - Carrier Sense Multiple Access with
Collision Detection ( Ethernet) - There are many more
77Collisions in (Pure)ALOHA
78Slotted ALOHA (S-ALOHA)
- The Slotted Aloha Protocol
- Slotted Aloha - Aloha with an additional
constraint - Time is divided into discrete time intervals
(slot) - A station can transmit only at the beginning of a
frame - As a consequence
- Frames either collide completely or do not
collide at all - Vulnerable period 1
79Collisions in S-ALOHA
80Performance of (Pure)ALOHA
- Question What is the maximum throughput of the
ALOHA protocol? - Notation
- S Throughput Expected number of successful
transmissions per time unit. Normalization Frame
transmission time is 1, maximum throughput is 1 - G Offered Load Expected number of transmission
and retransmission attempts (from all users) per
time unit
81Modeling Assumptions
- All frames have a fixed length of one time unit
(normalized) - Infinite user population
- Offered load is modeled as a Poisson process with
rate G, that is, - Probk packets are generated in t frame times
82Throughput of Aloha
- Fundamental relation between throughput and
offered load - S G x Prob frame suffers no collision
83Performance of (pure)ALOHA
- Prob frame suffers no collision
- Prob no other frame is generated during the
vulnerable period for this frame - Prob no frame is generated during a 2-frame
period
Throughput in ALOHA
84Results
- Maximum achievable throughput
- Take the derivative and set
- Maximum is attained at G 0.5
- We obtain
- That is about 18 of the capacity!!!
85Performance of S-ALOHA
- Derivation is analogous to Aloha
- S G x Probframe suffers no collision
- Prob frame suffers no collision
- Prob no other frame is generated during a
vulnerable period - Prob no frame is generated during 1 frame
period
86Performance of S-ALOHA
- Total Throughput in ALOHA
- Maximum achievable throughput
87Comparison of ALOHA and S-ALOHA
88CSMA - Carrier Sense Multiple Access
- Improvement to ALOHA protocol
- If stations have carrier sense capability
(stations can test the broadcast medium for
ongoing transmission), and - if stations only transmit if the channel is idle,
- then many collisions can be avoided.
- Caveat This improves ALOHA only if the ratio a
is small.
89CSMA - Carrier Sense Multiple Access
- CSMA protocol
- A station that wishes to transmit listens to the
medium for an ongoing transmission - Is the medium in use?
- Yes Station back of for a specified period
- No Station transmits
- If a sender does not receive an acknowledgment
after some period, it assumes that a collision
has occurred - After a collision a station backs off for a
certain (random) time and retransmits
90Variations of CSMA Protocols
- There are a number of variations of CSMA
protocols - Each variant specifies what to do if the medium
is found busy - Non-Persistent CSMA
- 1-Persistent CSMA
- p-Persistent CSMA
91Comparison of ALOHA and CSMA
Load vs. Throughput Assumption propagation
delay ltlt transmission delay
92CSMA / CD
- Improvement to CSMA protocol
- Carrier Sense Multiple Access with Collision
Detection - Widely used for bus topology LANs (IEEE 802.3,
Ethernet) - Only works if propagation delay is small relative
to transmission delay (in other words, a must be
small)
93CSMA/CD
- CSMA has an inefficiency
- If a collision has occurred, the channel is
unstable until colliding packets have been fully
transmitted - CSMA/CD overcomes this as follows
- While transmitting, the sender is listening to
medium for collisions. Sender stops if collision
has occurred - Note
- CSMA Listen Before Talking
- CSMA/CD Listen While Talking
94CSMA/CD
- Question How long does it take to detect a
collision? - Answer In the worst case, twice the maximum
propagation delay of the medium
95Collision Detection in CSMA/CD
96CSMA/CD
- Restrictions of CSMA / CD
- Packet should be twice as long as the time to
detect a collision (2 maximum propagation
delay) - Otherwise, CSMA/CD does not have an ad-vantage
over CSMA - Example Ethernet
- Ethernet requires a minimum packet size and
restricts the maximum length of the medium
97Exponential Backoff Algorithm
- Ethernet uses the exponential backoff algorithms
to determine when a station can retransmit after
a collision - Algorithm
- Set "slot time" equal to 2a
- After first collision wait 0 or 1 slot times
- After i-th collision, wait a random number
between 0 and 2i -1 time slots - Do not increase random number range, if i10
- Give up after 16 collisions
98Performance of CSMA/CD
- Parameters and assumptions
- End-to-end propagation delay a
- Packet transmission time (normalized) 1
- Number of stations N
- Time can be thought of as being divided in
contention intervals and transmission intervals. - Contention intervals can be thought of as being
slotted with slot length of 2a (roundtrip
propagation delay).
99Performance of CSMA/CD
- Contention slots end in a collision
- Contention interval is a sequence of contention
slots - Length of a slot in contention interval is 2a
- We assume that the probability that a station
attempts to transmit in a slot is P
100Performance of CSMA/CD
Derivation of maximum throughput of CSMA/CD
- Let A be the probability that some station can
successfully transmit in a slot. We get - In the above formula, A is maximized when P1/ N.
Thus
101Performance of CSMA/CD
- Prob contention interval has a length of j
slots - Prob 1 successful attempt x Prob j-1
unsuccessful attempts
The expected number of slots in a contention
interval is then calculated as
102Performance of CSMA/CD
- Now we can calculate the maximum efficiency of
CSMA/CD with our usual formula
103IEEE 802 LAN Standard
104IEEE 802 LAN standard
105IEEE 802 LAN Architecture
- Functions of the LLC
- Similar to HDLC (sliding window protocol)
- Provides SAPs to higher layers
- Provides different services
- acknowledged connectionless service
- unacknowledged connectionless service
- connection-oriented service
- Framing
- Error control
- Addressing
106IEEE802.3 (CSMA/CD)
- Generally referred to as Ethernet
- Based on CSMA/CD
- Applies exponential back-off after collisions
- Data Rate 2 - 1,000 Mbps
- Maximum cable length is dependent on the data
rate - Uses Manchester encoding
- Bus topology
107Ethernet
- There are many different physical layer
configurations for 802.3 LANs - The following notation is used to denote the
configuration
108Ring Local Area Network
109States of the Ring Interface
- Listen State Incoming bits are copied to output
with 1-bit delay - Transmit State Write data to the ring
- Bypass State Idle station does not incur
bit-delay
110Ring LANs
- If a frame has traveled once around the ring it
is removed by the sender - Ring LANs have a simple acknowledgment scheme
- Each frame has one bit for acknowledgment.
- If the destination receives the frame it sets the
bit to 1. - Since the sender will see the returning frame, it
can tell if the frame was received correctly.
111What is the "Length" of a Ring?
- The length of a ring LAN, measured in bits, gives
the total number of bits which are can be in
transmission on the ring at a time - Note Frame size is not limited to the length of
the ring since entire frame may not appear on the
ring at one time. - Bit length propagation speed length of ring
data rate No. of stations bit delay at
repeater
112Ring LAN
- Advantages
- Can achieve 100 utilization
- No collisions
- Can achieve deterministic delay bounds
- Can be made efficient at high speeds
- Disadvantages
- Long delays due to bit-delays
- Solution Bypass state eliminates bit-delay at
idle station - Reliability Problems
- Solution 1 Use a wire center
- Solution 2 Use a second ring (opposite flow)
113Token Ring LANS
- Token is a small packet that rotates around the
ring - When all stations are idle, the token is free and
circulates around the ring - Possible Problem All stations are idle and in
the Bypass state. What is the problem?
114802.5(Token Ring) MAC Protocol
- In order to transmit a station must catch a free
token - The station changes the token from free to busy
- The station transmits its frame immediately
following the busy token - IF station has completed transmission of the
frame AND the busy token has returned to the
station THEN station inserts a new free token
into the ring
115Properties of the 802.5 Token Ring
- No collisions of frames
- Full utilization of bandwidth is feasible
- Transmission can be regulated by controlling
access to token - Recovery protocols is needed if token is not
handled properly, e.g., token is corrupted,
station does not change to "free" etc
116Priority of Transmission in 802.5
- Eight levels of priorities
- Priorities handled by 3-bit priority field and
3-bit reservation field - Define
- Pm priority of the message to be transmitted
- Pr token priority of received token
- Rr reservation priority of received token
117Token Ring Priority Scheme Example
118(No Transcript)
119Effect of propagation delay
- Effect of propagation delay on throughput
- Case 1 a lt 1 (Packet longer than ring)
- T2 time to pass token to the next station a/N
- Case 2 a gt 1 (Packet shorter than ring)
- Note Sender finishes transmission after T1 1,
but cannot release the token until the token
returns - T1T2 max(1, a) a/N
120FDDI
- FDDI distinguishes 4 Service Classes
- Asynchronous
- Synchronous
- Immediate (for monitor and control)
121Station Types - Class A Station
- Two PHY (and one or two MAC) entities
- Connects to another Class A station or to a
concentrator
122Station Types - Class B Station
- Class B station has one PHY (and one MAC) entity
- Connects to a concentrator
123dual attach node
c o n c e n t r a t o r
dual attach node
single attach nodes
FDDI Dual Ring Structure
124FDDI Media Access Control
- FDDI uses a Token Ring Protocol, similar to 802.5
- Differences of FDDI and 802.5
- To release a token, a station does not need to
wait until the token comes back after a
transmission. The token is released right after
the end of transmission - In FDDI, multiple frames can be attached to the
token - FDDI has a different priority scheme
125Timed Token Protocol
- FDDI has a timed token protocol which determines
how long a station can transmit - Each station has timers to measure the time
elapsed since a token was last received - TTRT Target Token Rotation Time
- Value of TTRT is negotiated during initialization
(default is 8 ms) - Set to the maximum desired rotation time
126Parameters of Timed Token Protocol
- Station Parameters
- TRT Token Rotation Time
- Time of the last rotation of the token.
- If TRT lt TTRT, then token is early,
asynchronous traffic can be transmitted - If TRT gt TTRT then token is late, asynchronous
traffic cannot be transmitted. - THT Token Holding Time
- Controls the time that a station may transmit
asynchronous traffic. - fi Percentage of the TTRT that is allocated for
synchronous traffic at station i.
127Timed Token Protocol
- If a station receives the token it sets
- THT TRT
- TRT TTRT
- Enable TRT (i.e., start the timer)
- If the station has synchronous frames are waiting
the transmit synchronous traffic for up to time
TTRTfi (with sum(fi) lt1) - If the station has asynchronous traffic
- enable THT
- while THT gt 0 transmit asynchronous traffic.
128FDDI MAC Operation
- When a token arrives each station follows this
procedure - THT TTRT TRT
- TRT 0
- Send Synchronous Data
- IF THT gt 0, enable THT and start sending
Asynchronous data as long as THT gt 0
129FDDI MAC Example
130FDDI MAC Example
131FDDI MAC Example
132FDDI MAC Example
133FDDI MAC Example-Sync. (TTRT 80)
Maximum Throughput 80 / 84 95.23
134FDDI MAC Example-Asyn. (TTRT100)
135FDDI MAC Example(Asyn. TTRT100)
Time 404, station 1 gets the token
136Analysis of FDDI
- Analysis of
- Synchronous traffic
- Asynchronous traffic
- Synchronous Traffic
- Recall that each station can transmit synchronous
traffic for up to time TTRTfi (with sum(fi)lt1) - If sum(fi)1, the maximum throughput of
synchronous traffic is 100. - One can show that the maximum delay until a frame
is completely transmitted is - Maximum Access Delay lt 2TTRT
137Analysis of FDDI
- Asynchronous Traffic
- Parameters
- D Ring latency
- n Number of active sessions (all heavily loaded)
- T Value of TTRT
- Assumption
- No synchronous traffic
138Analysis of FDDI
- From the Example we see
- Cycle in a system has a length of nT D
- Time in a cycle used for transmission n(T - D)
- We obtain for the maximum throughput for
asynchronous traffic is
- ... and the maximum access delay for asynchronous
traffic - Max. Access DelayT(n-1)2D
139IEEE 802.4 (Token Bus)
- Problems with 802.3
- Collisions of frames can lead to unpredictable
delays - In some real-time scenarios, collisions and
unpredictable delays can be catastrophic - Solution via Token Bus
- A control packet (Token) regulates access to the
bus - A station must have the token in order to
transmit - A station can hold the token only for a limited
time - The token is passed among the stations in a
cyclic order - This structures the bus as a logical ring
140IEEE 802.4 (Token Bus)
- Stations form a logical ring
- Each station knows its successor and predecessor
in the ring
141Feature of Token Bus
- Bandwidth is 1, 5, or 10 Mbps
- The token bus MAC protocol is very complex
- Typically, token bus is free of collisions
- Defines priority transmissions and can offer
bounded transmission delays
142IEEE 802.4 (Token Bus)
- 802.4 requires each station to implement the
following management functions - Ring Initialization
- Addition to ring
- Deletion from ring
- Fault management
143Adding a Station to the Token Bus
- Each node periodically sends a solicit successor
packet which invites nodes with an address
between itself and the next node to join the ring - Sending node waits for response for one round
trip - One of the following three cases apply
- (1) No Response
- Pass token
- (2) Response from one node
- Reset successor node
- Pass token to new successor node
- (3) Response from more than one node
- Collision has occurred
- Node tries to resolve contention
144Add a station to the Token Bus
- Assume Response from more than one node has
resulted in a collision. - Station sends a resolve contention packet and
waits for four windows - (window 1 round trip time) for a response
- In window 1, stations with address prefix 00 can
reply - In window 2, stations with address prefix 01 can
reply - In window 3, stations with address prefix 10 can
reply - In window 4, stations with address prefix 11 can
reply - If there is a another collision, procedure is
repeated for the second pair of bits. Only the
nodes which replied earlier can join the next
round - First successful reply joins the ring
145IEEE 802.4 (Token Bus)
- Four priority levels
- Levels 6, 4, 2, 0
- Priority 6 is the highest level
- Token Holding Time (THT)
- Maximum time a node can hold a token
- Token Rotation Time for class i (TRTi)
- Maximum time of a full token circulation at which
priority i transmissions are still permitted
146Token Bus Transmission Rules
- Each station can transmit class 6 data for a time
THT - For i 4, 2, 0
- Transmit class i traffic if all traffic from
class i2 or higher is transmitted - and the time of the last token circulation
(including the transmission time of higher
priority packets during the current holding of
the token) is less than TRT i .