63
1 SESSION 6 Dongsoo S. Kim ([email protected]) http://www.ece.iupui.edu/~dskim/ Electrical and Computer Engineering Indiana U. Purdue U. Indianapolis SESSION 6. LAN AND MAC PROTOCOLS Introduction Switched network Interconnect users with transmission lines, multiplexers, switches R i bl di h k f d i i Routing tables to direct the packets from source to destination Hierarchical addressing scheme Broadcast network Much simpler than the switched network All information is received by all users No need of routing A simple flat addressing scheme is enough Require a medium access control Require a medium access control To decide turns when each host can talk Choice of networks in Local Area Network Lowcost and simple Mostly based on the broadcast approach 6-2

SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

  • Upload
    others

  • View
    15

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

1

SESSION 6

Dongsoo S. Kim ([email protected])http://www.ece.iupui.edu/~dskim/Electrical and Computer EngineeringIndiana U. Purdue U. Indianapolis

SESSION 6.LAN AND MAC PROTOCOLS

Introduction

Switched networkInterconnect users with transmission lines, multiplexers, switchesR i   bl    di   h   k  f      d i iRouting tables to direct the packets from source to destinationHierarchical addressing scheme

Broadcast networkMuch simpler than the switched networkAll information is received by all usersNo need of routingA simple flat addressing scheme is enoughRequire a medium access controlRequire a medium access control

To decide turns when each host can talk

Choice of networks in Local Area NetworkLow‐cost and simpleMostly based on the broadcast approach

6-2

Page 2: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

2

Multiple Access Communication

M stations share a single transmission mediumThe transmission medium is broadcastAll station can hear what the medium is carryingWhen 2+ stations transmit simultaneously, their signals collide and interfere with each other

Sharing the mediumChannelization scheme: a static and collision‐free sharing

Partition the medium into channels and allocate dedicated channels to a particular userS it bl  t   l ti  b   f th   t d Suitable to real‐time because of the guaranteed resources

Medium access control scheme: a dynamic sharing on need‐basedMust achieve a reasonable utilization of the mediumSuitable to a bursty trafficRandom access or scheduling access

6-3

Examples of Multiple Access, 1

Satellite communicationUplink frequency – for transmitting to the satelliteDownlink frequency – for transmitting to ground stations

Cellular telephonyTwo frequencies to each mobile user – inbound/outbound channel

Multidrop telephone line – channel sharing in wiredA central host computer uses outbound line to broadcast informationInbound line is shared by many terminals.

Cable networksOutbound is shared by multiple content channelsInbound is shared for control channels

6-4

Page 3: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

3

Examples of Multiple Access, 2

Multi‐tapped busUsers transmit a signal in both direction, so all stations can listen and extract transmissions destined to themIf 2+ stations transmit simultaneously, the signal is garbled.  Need to coordinate access to the mediumEg) IEEE 802.3 (Ethernet), IEEE 802.4 (Token‐bus)

Ring networks A packet is created by any station, and all stations can monitor the passing signal and extract packets destined to themQuestion: Who will remove the packet from the ring?Eg) IEEE 802.5 (Token‐ring)

Unlicensed wireless communicationUnlicensed wireless communicationWireless LAN, cordless phone, bluetoothSmall coverage, but need some level of QoS controlCan use either techniques

Channelization – eg) frequency‐hopping for IEEE 802.11MAC – eg) ad hoc wireless LAN for IEEE 802.11

6-5

Local Area Networks, 1

Environment and requirementShort distance, High‐speed, Low costQuestion: Do you prefer a long frame or a short frame?Question: Do you prefer a switched or a broadcast network?

StandardsIEEE 802.1 – IntroductionIEEE 802.2 – Logical Link Control (LLC) IEEE 802.3 – CSMA/CD (Ethernet) from Xerox

802.2 LLC

802.4802.3 802.5 802.11

Network Layer

IEEE 802.4 –Token bus from GMIEEE 802.5 –Token ring from IBMIEEE 802.11 –Wireless LANIEEE 802.15 – Bluetooth, ZigbeeIEEE 802.16 –Wireless Metropolitan Area Networks

6-6

Token busCSMA/CD Token ring Wireless

Physical Layer

Page 4: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

4

Local Area Networks, 2

Topology – bus, ring or star

Definition of physical layer – connectors, maximum cable length, p y y , g ,digital transmission system, modulation, line encoding, transmission speed

Network interface card (NIC)Expansion slot, embedded into system, PCMCIA, USBParallel communication to the systemSerial communication to the cable (sort‐of, some exception for high‐speed LAN’s)Parallel‐to‐serial conversion or vice versaPhysical address

Correction: Some devices allow user to change the physical address.  Moreover, it doesn’t need to be globally unique as long as it is unique within a LAN.  (pp. 423)

6-7

MAC Sublayer

Deals with the coordination of the access to the shared mediumthe shared medium

Decides when it transmits the frames into the shared mediumPerforms recovery for a garbled frame

Provide unreliable connectionless transfer of d tdatagramRely on relatively error‐free transmission

No error control

6-8

Page 5: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

5

LLC Sublayer

Enhances the datagram service

Provides a bridge capability to exchange frames b/w two different MAC g p y g /protocols

Provides an encapsulation of data link layer to the network layerSupports IP, IPX and SNAP at the same time within a LAN by using SAP

IP or other

DestinationSAP addr1 byte

SourceSAP addr1 byte

Control1 or 2 byte

6-9

DATALLCheader

DATAMACHeader CRC

Individual/group access

Command/Response

Medium Access Protocols

Random AccessALOHASl d ALOHASlotted ALOHACarrier Sensing Multiple Access (CSMA)

1‐PersistentNon‐PersistentP‐Persistent

CSMA with Collision Detection (CSMA/CD)

Contention‐Free Protocols (scheduled access)Bit‐map protocolBinary countdownLimited‐contention protocolAdaptive tree walk protocolToken passing protocol

6-10

Page 6: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

6

ALOHA, 1

HistoryUniversity of Hawaii, 1970’sN d   i   i l        diff  i l dNeed to interconnect terminals at campuses on different islands

Very simple radio transmissionMethod

Each station transmit messages as soon as they are readyIf the packet is collide with others, the station can detect the collision and retransmit the messages after waiting a random amount of timeNote

The station simply transmit a message whenever it has  a request from the The station simply transmit a message whenever it has  a request from the upper layer, without monitoring the channel beforehand.  Once it starts transmitting a packet, it completes the transmission without monitoring the channelBut, it can detect the collision

Question: Why should the station wait a random time?

6-11

ALOHA, 2

Random waiting timeIf two or more stations use the same time‐out value, ,they will try to retransmit them at the same time, and the retransmission will also collideSpread out the retransmission and reduce the probability of additional collisions

AnalysisL Fixed frame size

R Bandwidth

6-12

L/R Frame time

S Arrival rate of new packet. The # of packet for L/Rseconds. All new packet eventually pass through the channel. So, S is the throughput of the system.

G The total load including new packets and retransmitted packets. The # of packets for L/R seconds.

Page 7: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

7

ALOHA, 3

My packet time

Vulnerable period = 2 L/RPacket (re)transmission has Poisson distribution

Average number of arrivals for 2 L/R seconds = 2G

Your packet Your packet

Vulnerable period

6-13

GG

Gk

GeeGG

PGPGS

L/RkekGkP

220

2

!0)2(

]0[]collision no[

seconds 2in ion transmiss ,!)2(][

−−

==

⋅=⋅=

=

ALOHA, 4

dS/dG=e-2G(1-2G)S =1/2e=0 184 at G= 5Smax=1/2e=0.184 at G=.5

0.15

0.2

0.25

0.3

0.35

0.4

S=Ge-2GS

0.184

6-14

0

0.05

0.1

0.15

0.01

563

0.03

125

0.06

25

0.12

5

0.25 0.

5 1 2 4 8

G

Page 8: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

8

Slotted ALOHA, 1

Improve the ALOHA by reducing the collision probability

S h i   ll  t ti   ith  t   l kSynchronize all stations with master clockEach station is allowed to start transmission only at the beginning of a time slotThe vulnerable period is L/R, that is half of the pure ALOHA

seconds in ion transmiss ,!

][ = − L/Rkek

GkP Gk

6-151at ,368.0/1

)1(

!0

]0[]collision no[!

max

0

===

−=

==

⋅=⋅=

−−

GeS

GedGdS

GeeGG

PGPGSk

G

GG

Slotted ALOHA, 2

0 35

0.4

me) 0.368

0.05

0.1

0.15

0.2

0.25

0.3

0.35

thro

ughp

ut p

er fr

ame

tim

Pure ALOHA: S=Ge-2G

Slotted ALOHA: S=Ge-G

0.184

6-16

0

0.05

0.0 0.5 1.0 1.5 2.0 2.5 3.0

G (attempts per packet time)

S (t

Page 9: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

9

CSMA, 1

Avoid collisionImprove the ALOHA by avoiding transmissions that are certain to cause collisionscollisionsSense the medium before a station transmits a frame. Transmit a packet only if the channel is idleAll stations are able to determine if there is a transmission within tpropThe vulnerable period becomes the propagation delay, but not a packet timeQuestion: What if the channel is busy?

St ti A b i

6-17

A

Station A capturesChannel at t=tprop

A

Station A begins transmission at t=0

CSMA, 2

1‐PersistentIf the channel is busy, the station continuously sense the channel.  A       h   h l i   d idl   h   i   i   h   kAs soon as the channel is sensed idle, the station transmits the packetIf 2+ station were waiting, a collision will happen

Non‐PersistentIf the channel is busy, the station reschedule a future sensing time by using random backoff algorithm.

p‐PersistentIf the channel is busy, the station persists with sensingIf the channel becomes idle  the station transmits its packet with If the channel becomes idle, the station transmits its packet with probability p, it waits another propagation delay with probability 1‐pTry to spread the transmission of the waiting stations, so reduce the possibility of collision after the busy channel 

Note that collisions involve an entire packet time, once there is a collision

6-18

Page 10: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

10

Performance of CSMA Protocols

1.0Non-persistent

0 2

0.4

0.8

0.6

Slotted ALOHA

1-persistent

0.5-persistent0.1-persistent

0.01-persistent

6-19

0.2

1 5432

ALOHA

CSMA‐CD, 1

What if a station can determine whether its frame is collided?Stop the transmission when a collision is detected. So, reduce the wasted bandwidthbandwidth

How it works Station A starts transmitting a frame at t=0The frame reaches the station B at t=τ

If no other station starts transmission until this time, A captures the channelIf station B starts transmission just before this time, station A doesn’t know the collision until t=2τ

6-20

A begins to transmit at t=0

B begins to transmit at t=τ-δB detects collision at t= τA detects

collision at t= 2 τ-δ

A B

A B

A B

Page 11: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

11

CSMA‐CD, 2

How it works, continuedA station senses the channel and transmits if it is idleIf the channel is busy, 

Persist with sensing (1‐persistent), orBackoff (non‐persistent), orPersist and transmit with probability p (p‐persistent)

If a collision is detected, transmit a short jamming signal to make sure the collisionThree states of channel

Busy – transmitting a frameIdleIdleContention – colliding with other frame

Question: If the frame time is smaller than 2τ, what will be happened?

6-21

frame frame frame

contentions

CSMA‐CD, 3

A begins to transmit at

A Bt=0

B begins to transmit at t<τ

A detectscollision at t< 2 τ

A B

A B

Is this collision involved with my

f t?

The frame time must be at least 2τ so that station A can distinguish the collision is with its frame or not

6-22

frame or not?

Page 12: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

12

CSMA‐CD, 4

frame frame frame

contentions

Probability of successFor a contention minislot, each station transmit with prob. pPsuccess=np(1‐p)n‐1

Psuccess has a maximum 1/e at p=1/n

P[jminislots in a contention period]=(1‐Psuccess)jPsuccess

Expected number of minislots E[J]

6-23

max

maxmax

0

max 1)1(][success

successsuccess

i

isuccess P

PPPiJE −=−=∑

=

Expected number of trials until a successful frame: E[N]=E[J]+1=1/Psuccess=e=2.718

CSMA‐CD, 5

Performance

The smaller a, the more efficient network

τ/E[X]aaeeXE

XE

=++

=++

=

where

,)12(1

12][

][max ττ

ρ

The smaller a, the more efficient networkSmall propagation delay, ie. Short distanceLarge frame timeLow speedLarge frame size

6-24

Page 13: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

13

Contention‐Free Protocols (Scheduled access)

Stations schedule their medium access prior to real  transmissionProduce an ordered access to medium

ProsNo waste of bandwidth due to collisionCapable of controlling Quality‐of‐Service

ConsData communication is random in natureComplicated

ExampleExampleReservation: bit‐map protocols, Polling : binary countdown, limited contention, adaptive tree walkToken passing

6-25

Bit‐map protocol

A variable length frame consists of a reservation interval and data transmissions

The reservation interval consists of nminislots, one for each stationEach station use its minislot to indicate whether it has a packet or not.By listening the minislot, all stations know other station’s intention and decide the order packet transmission

It is an asymmetric protocol

6-26

D0 D3D2 D71 0 1 1 0 0 0 1

One frame

Reservation Interval

0 0 0 0 0 0 1 0 D6

One frame

Page 14: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

14

Bit‐map protocol, Efficiency

AssumptionM i   h h     i  h  Maximum throughputs – every stations have packetssize of minislot=m, number of station=n

The smaller v, the more throughput

m/E[X]vXEnS ==×

= where1][

“v” is proportional to the propagation delay

6-27

m/E[X]vvmXEn

S =+

=+×

= where,1)][(

Binary Countdown

Problem in the bit‐map protocolTh   h d i   bit    t tiThe overhead is 1‐bit per stations

Binary CountdownA station broadcasts its address as a binary bit string, starting with the high‐order bit.Assume that all addresses are the same length.The bits in each address position from different stations are Boolean Ored together. 

6-28

Page 15: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

15

To avoid conflicts, As soon as a station sees that a high order bit position that is 0 in 

Binary Countdown, Arbitration

As soon as a station sees that a high‐order bit position that is 0 in its address has been overwritten with a 1, the station gives up. 

Station 2

Station 4

Station 9

0 0 1 0

0 1 0 0

1 0 0 1

0 - - -

0 - - -

1 0 0 -

Bit Time

6-29

Station 10 1 0 1 0 1 0 1 0

Result 1 0 1 0

Station 2 and 4 give up

Station 9 gives up

Binary Countdown, Performance

Efficiency:Th   b    f  t ti  The number  of stations: nThe frame size: d‐bitEfficiency : d/(d+log2n)

Fairness? High numbered stations have preference over low numbered stationsVirtual station numberA station change its ID to a lowest number once it successfully transmits. 

6-30

Page 16: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

16

Adaptive Tree Walk Protocol (ATW)

ProcedureStations are logically considered as g yleaves of a binary tree. After a successful TX , all stations are allowed to try to acquire the channel. (slot 0)If there is only one such station, fine. If there is a collision,

Only stations under node 2 may compete 

1

2

4 5

3

6 7Only stations under node 2 may compete during slot 1If no collision during slot 1, the slot following the frame will be reserved for the stations under node 3If collision during slot 1, recursively apply this process for node 4.  

6-31

BA DC FE HG

ATW, Improvement

For  heavy traffic, it is worthless to start the process from the root, because it will p ,cause a collision all the time.For the same argument, node 2 and 3 can be skipped as well. What is the proper level to start with for maximizing the efficiency? 

Probe skipping.Assume that node 1 has a collision. So, it will probe node 2.  Assume that it turns out that node 2 is idle.  Then, it is very sure that node 3 will have a collision. So, don’t need to probe node 3.  Instead, skip to node 6 and 7.   

6-32

Page 17: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

17

Polling

Central controlThe central controller polls its client stations using a The central controller polls its client stations using a certain resource for outbound message, and stations share a different resource for the inbound messageFrequency division duplex (FDD), time division duplex (TDD)

Distributive controlEach station has “polling order list”After a station is done transmitting, it is responsible for transferring a polling message to the next station in the polling list

6-33

Token passing protocol, 1

Interface connected by point‐to‐point transmission lineM d   f i t fModes of interface

Listen mode – reproduce each bit received at its input to its output after some constant delay (usually 1‐bit delay)

To monitor the destination address.  Once it detects the address, the packet is copied to the stationTo monitor a free‐token.  If the station has a frame to send, the interface changes the token to a busy‐token.  The station is then changed to the transmit mode  

Transmit mode – transmit a packet from the station

6-34

Listen Mode

To Station From Station

Output to ring

Input from ring

Transmit mode

To Station From Station

Output to ring

Input from ring

Page 18: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

18

Ring and Packet at token ring

Relation of ring latency and packet timeIf ring < packet time,g p ,A station receives its own packet at the input line.  So, the packet can be discarded.

If ring > packet timePossible to present more than one packet simultaneouslyBut, the station is in the transmit mode.  So, it must buffer the packet for later transmission

Removal of PacketThe destination station removes the packetQuestion: How can it handle the multicast?

The source station removes the packetUse the packet as an indication of acknowledgement

6-35

Operation of token ring

Multitoken operationA free token is transmitted immediately after the last bit of the data packetSeveral packets may be in transitQuestion: How many tokens do we need to have in the ring?  Especially, after many short packets, the ring will contain many tokens

Single tokenA free token is transmitted after receiving back the last bit of the busy tokenIf the packet time is longer than the ring latency, the free token is inserted immediately after the last bit of the packet (identical to the multitoken)

Single packetA free token is inserted after the station receives the last bit of its packet.  The station can check an error in transmission before giving up the token

EfficiencyMultitoken ≥ single token > single packet

6-36

Page 19: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

19

Token hold time

Limit on the time that a station can transmit at a timeat a timeMethods

Unlimited token holdingMinimized delay, but unbounded on two consecutive tokens

E f  th   b   f  k t th t   b  Enforce the number of packet that can be transmitted for each token

Question: Which station will insert the very first token?

6-37

Efficiency of token ring

Parameters= delayn propagatioτ Multitoken protocol

1][XME

Mb

L/RE[X]LR

Mb

===

====

delayn propagatio effective'epacket timmean

sizepacket mean speedon transmissi

stations ofnumber theinterfacean in delaysbit ofnumber the

τ

][/'11

'][][

max XMEXMEXME

ττρ

+=

+=

Single token protocol

1'}'],[max{

][max XEM

XMEττ

ρ+

=

6-38

Rτ += ][/']}[/',1max{ XMEXE ττ +

=

Single packet protocol

][/')1(11

')'][(][

1max XEMXEMXME

τττρ −++

=++

=

Page 20: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

20

Efficiency of token ring, 2

1.2

M=50

Max

imum

Thr

ough

put Multiple Token

Operation

0.4

0.6

0.8

1

Single PacketOperation

M=50

M=10

Single Token

M=50M=10

6-39

τ ′/E[X]0

0.2

0 0.4 0.8 1.2 1.6 2 2.4 2.8 3.2 3.6 4 4.4 4.8

Operation Single TokenOperation

Performance of token ring

Parameters timecycle mean token][CE =

stations of rate arrivalstation a of messages ofnumber average][

MNE=

τλτ

λ

+⎭⎬⎫

⎩⎨⎧=

+==

'][][

'][][][formula sLittle'],[)/(][

XECEM

M

XENMECECEMNE

E[C]

6-40

ρτ

λτ

−=

−=

⎭⎩

1'

][1'][

XECE

M

ρ

E[C]

1

Page 21: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

21

Delay of token ring

Components of transmission timeQueuing delayToken waiting time delayPacket time : E[X]Propagation delay from the source to the destination

ρρτ

ρρ

−=

+−−

+−

=

ii ili d/][][][

][1

)/1('][1

][ 21

XETEWE

XEMaXEaTE

E[X

]6-41

ρρτ

ρρ

−−

+−

=

=

1)/1('

1

time waitingnormalized][/][

'21

Maa

XEWE

E[W

]/Eρ

Each model produces different characteristic. See details in the text book

FDMA

Divide the medium into M separate frequency rangeEach station transmits information using only the assigned bandwidthIn practice, guard bandwidths are assigned between the assigned bandwidth in order to reduce interference

Proper to connection‐oriented fixed bandwidth communication

1Frequency

Guard bands2

6-42

WFrequency 2

MM-1

Time

Page 22: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

22

TDMA

Stations take turns to make an entire transmission frame, which consists of M time slots,

Guard time – ensure the transmission from different stations do not overlapPreamble – allow receiver to synchronize to the transmitted bit stream

Synchronization intervals

6-43

Time

1W

Frequency

…2 3 4 5 M 1 2 3 4

One frame

Code Division Multiple Access

The transmission occupy an entire frequency band at the same timeSeparated by the different codesTo transmit binary information

Each user bit is transformed into G bits by multiplying the user bit by G‐bit “chip” value called a spreading factorThe chip value is uniquely assigned to the station and The chip value is uniquely assigned to the station and appears to be randomOther station transmits in the same manner at the same time (all the frequency band and all the time), but use a different binary random chip value

6-44

Page 23: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

23

CDMA, 2

Radio

Transmitter from one user

Binary Info Radio Antenna

Signal plus residualinterference

Binary InfoR1 bpsW1 Hz

Unique User BinaryRandom Sequence

DigitalModulation

R >> R1bpsW >> W1 Hz

XX

6-45

Signalsfrom alltransmitters

Correlate toUser BinaryRandom Sequence

X

DigitalDemodulation

BinaryInformation

X

Operation of CDMA, 1 

Spreading factorUser data information is a binary symbol from {+1, ‐1}Th  f  i     d d  bi     f { }*    C    The factor is a pseudo‐random binary sequence of {+1,‐1}*, say C=c1, c2, c3, c4,… cGSymbol +1 chip +1×C= (c1,c2,…,cG)Symbol –1 chip ‐1×C= (‐c1,‐c2,…,‐cG)

Power of signalThe arrived chips are applied a dot‐product with the known factor

Correlated output for symbol +1  ⇒ c12+c22+…+cG2=GCorrelated output for symbol ‐1  ⇒ ‐c12‐c22‐…‐cG2=‐G

If you have a different spreading factor D=(d1,d2,…,dG)Correlated output = c1d1+ c2d2+…+ cGdG

Expected value of cidi =.25×(1×1) + .25×(‐1×‐1)+ .25×(1×‐1)+ .25×(‐1×1) = 0

A station with a correct factor receives an amplified signal, but a station with an incorrect factor receives no signal 

6-46

Page 24: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

24

Characteristics of CDMA

PowerRequires all the signals at the receiver to have 

i l   h    approximately the same powerOtherwise, a powerful transmission from a nearby station could overwhelm the desired signal from a distant stationImplement a dynamic power control mechanism

InterferenceThe more users, the more interferenceGradual trade‐off between the # of users and the bit error rateFlexibility to provide differentiation of traffic types

Better quality of using synchronous transmissionMake the spreading factors to be independent to each other  

6-47

Orthogonal factor of CDMA

Two sequences of a and b are orthogonal if a•b=0a•b = Σajbj=a1b1+ a2b2+…+ anbn=0j j

Example: a=(‐1,+1,‐1,+1), b=(‐1,+1,+1,‐1)a•b=(‐1)×(‐1)+(+1)×(+1)+(‐1)×(+1)+(+1)×(‐1)=1+1‐1‐1=0

Transmission 

Ch1: 110⇒(-1,+1,-1,+1) (-1,+1,-1,+1) (+1,-1,+1,-1)

Ch2: 011⇒

6-48

(+1,-1,-1,+1) (-1,+1,+1,-1) (-1,+1,+1,-1)

Transmitted signal(0,0,-2,+2) (-2,+2,0,0) (0,0,+2,-2)

Page 25: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

25

Signal recovery of CDMA

Received signal(0 0 -2 +2) (-2 +2 0 0) (0 0 +2 -2)

Ch1: Speading factor (-1,+1,-1,+1)

(0,0, 2,+2) ( 2,+2,0,0) (0,0,+2, 2)

6-49

Ch1: Correlated output and integrated output

Walsh‐Hadamard Matrix of CDMA

Systematic approach to obtain orthogonal sequence ⎥

⎤⎢⎣

⎡== −− 11

0 ],0[ nnn WW

WWWWobtain orthogonal sequence

Replace 0 by –1, and 1 by +1Each row provides a spreading sequenceProve it!

⎥⎦

⎢⎣ −− 11

0 ],[nn

n WW

⎥⎥⎥⎤

⎢⎢⎢⎡

=

⎥⎦

⎤⎢⎣

⎡==

110010100000

,1000

],0[

2

10

W

WW

6-50

⎥⎥

⎦⎢⎢

⎣ 011011002

Page 26: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

26

Evolution of Wireless Comm. 

NMT450 (1981)

AMPS (1983)Inmarsat-A (1982)

CT0 (1982)

CT1 (1984)

Cordless

NMT900 (1986)

GSM (1992)

DCS1800 (1994)

CDMA (1991)

D-AMPS (1991)

PDC (1993)

Inmarsat-B (1988)

Inmarsat-BInMarsat-M

(1992)

CT1 (1984)

CT1+ (1987)

CT2 (1989)

DECT (1991)

802.11 (1997)

WirelessLAN

6-51

GPRS (2000)

IMT-2000 (2001)

Iridium (1998)802.11b,

Blutooth (1997)

802.11a (2000)Cellular

Satellites

LAN and MAN Standards 

IEEE StandardsIEEE 802.1 (Introduction)IEEE 8  (LLC)  h       f  h  d  li k lIEEE 802.2 (LLC) – the upper part of the data link layerCoexist several standards for MAC/LAN

IEEE 802.3 (CSMA/CD, Ethernet) ‐ Initiated by Xerox. Proposed by Xerox, DEC, and Intel. To connect office devices and workstationsIEEE 802.4 (Token bus) ‐ Proposed by General Motors. Factory automation – real‐time, priority scheme. Physical bus, but logical ring  IEEE 802.5 (Token ring) ‐ Proposed by IBM. Fairness and distributive

IEEE 802.6 (DQDB: Distributed Queue Dual Bus) for MANIEEE 802.11 (Wireless LAN) 

FDDI (Fiber Distributed Data Interface) ‐ANSI standard for MAN

Others HIPPI: High‐Performance Parallel InterfaceFibre Channel

6-52

Page 27: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

27

IEEE 802.3 (Ethernet)

Bus‐based coaxial cableBroadcast over the bus medium using CSMA/CDOperate at 10 Mbps over a maximum distance of 2.5Km, and allow 4 repeatersThe maximum end‐to‐end delay is 51.2 microsec, ie. 512 bits or 64 bytes at 10 Mbps, which is the minimum frame sizeUse Manchester encoding

CSMA/CDA station waits until the channel is silentOnce the channel goes silent, the station transmits but continues to listen the channel to detect collisionIf a collision occurs, the station stops the transmission immediately and schedules a later random timeIf no collision for 2τ, it knows that it captured the channel

6-53

Baseband Manchester Encoding

Baseband here means that no carrier is modulated; instead bits are encoded using Manchester encoding and transmitted directly by modified voltage of a DC signalmodified voltage of a DC signalManchester encoding ensures that a voltage transition occurs in each bit time which helps with receiver and sender clock synchronization

6-54

Page 28: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

28

Binary Exponential Backoff Algorithm

To reschedule retransmission after a collision

After the first collision, each station waits either 0 or 1 slot times ,before trying again

If 2 stations choose same random number, they will collide again

After the second collision, each station picks either 0, 1, 2 or 3 at random

In general, after k collisions, a random number between 0 to 2k‐1 is chosen

However  after 10 collisions  the random interval is fixed to 0 1023However, after 10 collisions, the random interval is fixed to 0‐1023

After 16 collisions, the station gives up and reports failure to the upper layer

Correction> pp 399, the last 4th line must read as “…of 210”

6-55

Efficiency of Ethernet

The status of channelSuccessful transmission (L/R)Contention periods (E[N] × round‐trip‐time)

E[N] = expected number of retrial until a successful transmissionIdle 

Time to detect idle (propagation delay)

Efficiency of Ethernet

RLE /= 0.6

0.70.80.9

6-56

a

LRe

eRL

44.611

/)21(11

2/

+=

++=

++

τ

ττ

00.10.20.30.40.5

0 500 1000 1500 2000 2500

L (bytes)

Eff

, where a=τR/L, or the number of packets in the propagation delay

Page 29: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

29

E[T] of Ethernet

The short frame, the long propagation delay and the high bandwidth make them worseg

CSMA-CD

15

20

25

30

ansf

er D

elay

a=0.2 a=0.1 a=0.01

6-57

0

5

10

0

0.06

0.12

0.18

0.24 0.3

0.36

0.42

0.48

0.54 0.6

0.66

0.72

0.78

0.84 0.9

0.96

Load

Avg.

Tr

Frame Structure of Ethernet

7‐byte preamble of repeative 1010…10In Manchester encoding, this pattern generates a sine waveThe receiver uses it to synchronize to the beginning of the frame The receiver uses it to synchronize to the beginning of the frame 

1‐byte Start Delimiter of 10101011After the preamble, the two consecutive 1’s indicates the start of frame

6‐byte Destination and Source addressesQuestion: Can we exchange the order of destination and source addresses?

2‐byte Length fieldThe number of bytes in the payload including 18‐byte overhead (DA,SA,FCS), but excluding Preamble and SD

8 b t   i1518‐byte maximum

Pad (variable length) – to Maintain the frame size at least 64 bytes4‐bytes FCS ‐CCITT 32‐bit CRC

6-58

Preamble SD Dest.Addr

Src.Addr Length Payload Pad FCS

7 1 2 or 6 2 or 6 2 4

Page 30: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

30

Destination Address Field of Ethernet

IndicatorsThe first bit – 0:single address, 1:group addressThe second bit  0 local address  1 global addressThe second bit – 0:local address, 1:global address

Types of addressUnicast address – unique address assigned a NIC deviceMulticast address – the host computer can configure its NIC device to accept specific multicast addressBroadcast address – indicated by all 1’s. All stations are to receive a given packetQuestion: What is the application of the broadcast address?

6-59

Single address

Group address

Local address

Global address1

0

1

0

Physical Layer of Ethernet, Coaxial

10base5Thick (10mm) coaxial yellow cableBase‐band transceiversBase bandMaximum segment 500mUse of tranceiver

Vampire tap to the cableSend a special invalid signal when it detects a collision

10base2Thin(5mm) coaxial cableMaximum segment 200mT‐shaped BNC connector

Repeater

transceivers

RepeaterTo combine two segmentsForward signal from a segment to another

Question: how can we detect a broken cable? How can we locate the problem?

6-60Figure 6.55

Page 31: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

31

Physical Layer of Ethernet, Twisted 

10BaseTT   hi ld d  i d  i   i      h bTwo unshielded twisted pairs, connection to a hubLow cost but the shorter distance (maximum 100 m)Star topology instead of bus

The central controller using a hub or a switch k h lto make a point‐to‐point channel

6-61

Fast Ethernet

PropertyIEEE 802.3u, 1995, Operating at 100MbpsC ibili     h   i i  E h   F  f  i f   d Compatibility to the existing Ethernet ‐ Frame format, interface, and procedures are same100BaseT does not use Manchester encoding; it uses 4B5B for better coding efficiency

IssuesThe minimum frame size was derived from the bandwidth and the maximum distanceThroughput = (1+6.44τR/L)‐1, increasing the bandwidth 10 times, you will 

t  /  th h tget 1/10 throughputSolution

Alternative 1: increase the minimum frame size 10 times (640 byte)Alternative 2: reduce the maximum distance by the factor of 10 (250 meters)Question: Which one do you like better?

6-62

Page 32: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

32

Fast Ethernet, 2

DecisionKeep the minimum frame size, but reduce the maximum distance to 250 meters  to maintain the compatibility with the existing Ethernetmeters, to maintain the compatibility with the existing EthernetHow we can build a LAN only with 250 meters?

Hub connection only in a star topologyUTP cable only (The coaxial cable forms a bus topology which requires a long distance)

100BaseT: use 2 “category 5 UTP wires”. One pair for TX, anther pair for RX in full‐duplex100BaseT4: use 4 “category 3 UTP wires”. 3 pairs for data in a half‐duplex. Note that this cable is also used for the telephone line.100BaseFX: use 2 strands of multimode optic in full‐duplex.  Can reach reach 2000m.Question: How it can support the longer distance?Buffered switch

Note that the maximum distance between two stations is 250m so that the length of the cable must be smaller than 125m.  The standard restricts the maximum segment as 100m

6-63

Hubs

Physical Layer devices: essentially repeaters operating at bit levels: repeat received bits on operating at bit levels: repeat received bits on one interface to all other interfacesHubs can be arranged in a hierarchy (or multi‐tier design), with a backbone hub at its top

Single collision domain

6-64

Page 33: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

33

Hubs, 2

Hub Limitations:Monitor all transmission from the stationWhen there is a single transmission, it repeats the signal on the other linesIf there is collision, the hub sends a jamming signal to all the stationsAlways broadcasts packets (i.e., no smarts about which link to send on)Single collision domain results in no increase in max throughput; the multi‐tier throughput same as the the single segment throughputIndividual LAN restrictions pose limits on the number of nodes in the same collision domain (thus  per Hub); and on the total allowed same collision domain (thus, per Hub); and on the total allowed geographical coverage Cannot connect different Ethernet types (e.g., 10BaseT and 100baseT)

6-65

Hubs, 3

Each connected LAN is referred to as a LAN segment

Hubs do not isolate collision domains: a node may collide with any y ynode residing at any segment in the LAN 

Hub Advantages:Simple, inexpensive deviceMulti‐tier provides graceful degradation: portions of the LAN continue to operate if one of the hubs malfunctionExtends maximum distance between node pairs (100m per Hub)can disconnect a “jabbering adapter”; 10base2 would not work if an can disconnect a  jabbering adapter ; 10base2 would not work if an adapter does not stop transmitting on the cablecan gather monitoring information and statistics for display to LAN administrators

6-66

Page 34: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

34

Ethernet Switch

A switch is a device that incorporates bridge functions as well as point‐to‐point ‘dedicated connections’ point ‘dedicated connections’ Each input port buffers incoming transmissions. The incoming frames are examined and transferred to the proper outgoing ports

No collision if each port has a single device.If a port is connected to another hub 

i   li k  th   t h  it    

High-Speed Backplane or Interconnection fabric

using uplink, the port has its own collision domainCan support a larger number of stationsA host attached to a switch via a dedicated point‐to‐point connection; will always sense the medium as idle; no collisions ever!

6-67

Ethernet Switch, 2

Full duplex modeIf each port is connected to a single host in the switch, the t ti   ill  t      lli i  b   i i    d di t d li  station will not see any collision by assigning a dedicated line for each direction

Ethernet Switches provide a combinations of shared/dedicated, 10/100/1000 Mbps connectionsSome Ethernet switches support cut‐through switching: frame forwarded immediately to destination without awaiting for assembly of the entire frame in the switch buffer  slight reduction in entire frame in the switch buffer; slight reduction in latencyEthernet switches vary in size, with the largest ones incorporating a high bandwidth interconnection network

6-68

Page 35: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

35

Ethernet Switch, 3

FileWide Area

Dedicated link

router

switch

Webserver

Mailserver

serverWide Area Network

Shared uplink

6-69

hub hub hub

ECESL 143 SL 113

Gigabit Ethernet

IEEE 802.3z, 1998U  th   t d d Eth t f  f tUse the standard Ethernet frame format

But, the minimum frame size is 512 bytes

Allows for Point‐to‐point links (switches) and shared broadcast channels (hubs)

Uses Hubs called here “Buffered Distributors”Full‐Duplex at 1 Gbps for point‐to‐point links

6-70

Page 36: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

36

IEEE 802.4 (Token Bus)

Access MethodA token controls the right of access to the physical 

Not in the textbook

A token controls the right of access to the physical medium;  the station which holds (possesses) the token has momentary control over the mediumThe token is passed by stations residing on the mediumSteady state operation consists of a data transfer phase and a token transfer phasephase and a token transfer phaseRing maintenance functions include ring initialization, lost token recovery, new station addition and general housekeeping of the logical ring

6-71

Logical Ring on Physical Bus

DF EH

6-72

I A B CG

Page 37: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

37

Frame of Token Bus

Frame formatPreamble – to set receiver’s modem clock and level ( 1+ octets)SD – start delimiter (1 octet)FC – frame controlDA – destination addressSA – source addressPayload – 0+ octets  FCS – frame check sequence ( 4 octets)ED – end delimiter (1 octet)

The maximum frame size = 8191 bytes between SD and ED  exclusiveThe maximum frame size = 8191 bytes between SD and ED, exclusive

6-73

preamble SD FC DA SA Payload FCS ED

Question: Why do we need the “ED”?

Characteristics of Token Bus

Speed – 1 Mbps, 5 Mbps, 10 Mbps3 different Analog modulation

Phase continuous frequency shift keyingPhase coherent frequency shift keyingMultilevel duobinary amplitude modulated phase shift keying

Control frameClaim_token: claim token during ring initializationSolicit_successor_1: allow station to enter the ringSolicit_successor_2: allow station to enter the ringWho follows: recover from lost tokenWho_follows: recover from lost tokenResolve_contention: used when multiple stations want to enter the ringToken: pass the tokenSet_successor: allow stations to leave the ring

6-74

Page 38: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

38

Normal Operation of Token Bus

Token passing is done from high to low address

Each station knows the addresses of its predecessor and successor

Each time a station acquires the token, it can transmit frames for certain amount of time. Then it must pass the token to its successor. If a station has no data, it passes the token immediately upon receiving it.

There are 4 priority classes, 0, 2, 4, and 6 for traffic with 0 the lowest and 6 the highest

When the token comes to a station, it is passed internally to the priority 6 substation, which may begin transmitting frame if it has any. When it is done or when its timer expires  the token is passed internally to priority 4 or when its timer expires, the token is passed internally to priority 4 substation, which may transmit frames until its timer expires, at which point the token is passed to priority 2 substation. This process is repeated until priority 0 substation has sent all its frames or its timer expires.  Either way the token is passed to the next station

6-75

Logical Ring Maintenance

Join the ringPeriodically, the token holder solicits bids from stations not currently in the ring that wish to join by sending SOLICIT_SUCCESSOR_1 frame.  The frame, gives the senders’ address and the successor’s address.  Stations inside the range may bid to enterIf no station bids to enter within a slot time, the response window is closed and the token holder continues with its normal businessIf two or more stations bid to enter, the token holder then run an arbitration algorithm, starting with the broadcast of a resolve contention frame. The algorithm is a variation of binary countdown scheme

Leave the ringA station X, with successor S and predecessor P, leaves the ring by sending P a SET_SUCCESSOR frame telling it that henceforth its successor is S instead of X. Then X just stops transmitting

6-76

Page 39: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

39

IEEE 802.5 (Token‐Ring)

MethodMedium access control is provided via a small frame called a token  The token circ lates aro nd a  nicalled a token. The token circulates around a uni‐directional ring‐topology network. The station that acquires the token can transmit its frameOperate at 4 Mbps and 16 Mbps using differential Manchester encoding.  The maximum number of stations is 250

Advantage of ringFairnessCapable of providing priority

Disadvantage of ringA single fault impacts the whole networkQuestion: How can we make it robust to a component fail?

6-77

Star Topology of Token Ring

Connect stations to a wiring center in both directionscenter in both directionsA relay can bypass the wires of stations if they are considered as failed

Wiring Center

6-78

Page 40: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

40

Token‐ring Protocol

How it worksA station waits for a “free” token. When a free token arri es  the station acq ires the token b  remo ing it arrives, the station acquires the token by removing it from the ring (Actually, the station converts a single bit from 0 to 1 for making it as a “busy” token)The station transmit its frame into its outgoing lineEach station examines the destination address in each passing frame to see whether it  matches the station’s own addressIf it is, the frame is copied to a local buffer, several status bits in the frame are set and forwarded to along the ringbits in the frame are set,and forwarded to along the ringIf not, the frame is forwarded to the next link after a few bits delay

The sending station has the responsibility of removing the frame from the ring and reinsert a free token

6-79

Efficiency of Token‐ring

When a station inserts a free tokenAfter receiving the last bit of the frame

Use the returned frame as a sort of acknowledgement

After receiving the header of the frameTo obtain a benefit for a long frame

After completing the frame transmissionHigh efficiency in high speed and a long turn‐around time

How long a station can hold the tokenFor a single frame transmission

Too strict. Spend most of time in the token circulation

As‐it‐wishThe best efficiency, but the worst quality control

Limited timeIntermediate between those two approaches

6-80

Page 41: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

41

Frame Structure of Token‐ring, 1

SD – Start delimiterDifferential Manchester encodingJK0JK000  J and K are nondata symbolsJK0JK000 – J and K are nondata symbolsJ – begin with 0, and no transition in the middleK – begin with 1, and no transition in the middle

AC –Access control3 bit – priority (8 levels)1 bit – token

0 – token frame1 – data frame 

1 bit – monitor1 bit  monitorUse for eliminating orphan frames

3 bit – reservation of priority

6-81

SD AC FC DestAddr

SrcAddr Payload FCS ED FS

1 1 1 2 or 6 2 or 6 6 1 1

Frame Structure of Token‐ring, 2

FC – Frame Control2 bit – frame type

01  data frame01 – data frame00 –MAC control frame

6 bit – control bit (type of control frame)

Destination Address and Source Address2 bytes or 6 bytes

FCS (Frame Check Sequence) – CCITT‐32 CRCED (Ending Delimiter)

6 bits – JK1JK11 bits  intermediate frame bit to indicate the last frame in a sequence 1 bits – intermediate‐frame bit to indicate the last frame in a sequence 1 bit – error‐detection bit to indicate the detection of errors 

FS (Frame status)  continues…

6-82

SD AC FC DestAddr

SrcAddr Payload FCS ED FS

1 1 1 2 or 6 2 or 6 6 1 1

Page 42: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

42

Frame Structure of Token‐ring, 3

Frame StatusT   ll   h  d i i     d  f    i f  To allow the destination to send transfer status info back to the senderA & C bits are repeated (Question: Why?)A=1 : the destination address was recognized by the recipientC 1   the data was received by the recepient C=1 : the data was received by the recepient 

6-83

A C NA NAA C

A C

0 0

1 0

1 1

Maintenance of Token‐ring

PriorityTo send a frame of a given priority, a station must capture a token of equal or lower priorityReserve a token priority by setting the reservation field in passing frames if the current reservation field is lower than its intended priority. So, the stations bids for the token priority using the reservation fieldA station clears the reservation field and transmits data frame of the same priority

Ring MonitoringProblems

A circulating frame whose destination is not aliveA missing tokenCorruption of frame structureLink break

SolutionActive monitor – monitor the ring and solve the problemsQuestion: Who will be the active monitor?

6-84

Page 43: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

43

FDDI

OverviewToken‐based MAN standard by ANSI

b f b100 Mbps, 200 Km, +500 stations, fiber optic in multimode or single‐mode4B5B binary encode NRZ125 Msymbol/secNo self‐clock as Manchester encodingNo global clock as telephone systemUsage

16 combinations for data16 combinations for data3 for delimiters2 for control3 for hardware signaling8 unused

Question: How can the receiver synchronize the transmission?

6-85

Synchronization of FDDI

A long long preamble High accurate clock: 125MHz ± 0.005%High accurate clock: 125MHz ± 0.005%

The worst case difference = 0.01% (10‐4)(125 MHz × 10‐4)‐1 sec = 80 usec for 1‐bit distortion5‐bit elastic buffer can handle up to 400 usec400 usec × 125 MHz = 50,000 symbols = 40,000 bits in 4B5B, which limits the maximum frame size (4500 bytes)frame size (4500 bytes)

ReliabilityDual ring in opposite directionUp on failure, the dual ring is converted into a single long ring

6-86

Page 44: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

44

Frame Structure of FDDI

Similar to IEEE 802.5k fToken frameInstead of a token bit10000000 or 11000000 in FC field

6-87

Pre SD FC DestAddr

SrcAddr Payload FCS ED FS

8 1 1 2 or 6 2 or 6 4 1 1

Pre SD FC ED

Data Frame

Token Frame

FDDI Protocol

Background500 stations, 10‐bit delay per each, 200 KmDelay= 500 (station) × 10 (bit/station) 

+ 200 (Km) / 200,000 (Km/sec) x 100 Mbps= 105,000 bits

ImprovementInsert a token immediately after completing frame transmissionMultiple tokens at the same time optionallyd l ffAdaptive real‐time trafficCompute “token hold time” when it receives a tokenIf the traffic is heavy, transmit only sync trafficIf the traffic is light, transmit both sync and async traffic

6-88

Page 45: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

45

IEEE 802.11 (Wireless LAN)

Private cellular systemVery low‐power radio transmissionVery low‐power radio transmissionUnlicensed radio frequency

ISM Band: 902 – 928 MHz, 2.4 – 2.4835 GHz, 5.725 –5.850 GHz (in US) Share the resources with the neighbor (security)Assigned by a government (different for different 

t )country)

ArchitecturesInfrastructure – with wireless access pointsAd hoc wireless LAN – no access points

6-89

Hidden Station Problem

SituationWhile A transmits to B, Cwill not hear A because A is out of rangeIf C starts transmitting, the frame will interfere at BCSMA works if there is one transmissionIn low‐power radio transmission, there could be multiple transmission

Solution

A transmits data frame

B

C senses medium, station A is hidden

from C

Data FrameCA

CSMA‐CA (Collision Avoidance)Two stations exchange RTS and CTS management info which contain the length of data frame

6-90

Data Frame Data FrameA B C

C transmits data frame and collides

with A at B

Page 46: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

46

Terminology of Wireless LAN

BSS (Basic Service Set)B i  b ildi  bl k      ll i   ll l   tBasic building block as a cell in cellular systemDefined as a group of stations that coordinate their access to the mediumBSA – a geographical area covered by the BSS

ESS (Extended Service Set)A set of BSS interconnected by a distribution systemsA gateway to outside

6-91

Networking Wireless LAN

Gateway to

Internet

Distribution SystemServer

Internet

portalportal

6-92

A2 B2B1A1

AP1 AP2

BSS A

BSS B

Figure 6.66

Page 47: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

47

IEEE 802.11 Frame Structure, 1

Three types of FramesM t fManagement frameStation association and disassociation with APTiming and synchronizationAuthentication and deauthentication

Control frameHandshaking  and acknowledgement of dataHandshaking, and acknowledgement of data

Data frame

6-93

IEEE 802.11 Frame Structure, 2

2 2 6 6 6 2 6 0~2312 4

MAC Header (bytes)

Framecontrol

Duration/ID

Address1

Address2

Address3

SequenceControl

Address4

FrameBody

CRC

ProtocolVersion

Type SubtypeToDS

FromDS

MoreFrag

RetryPwr.Mgt.

MoreData

WEP Rsvd

2 2 2 1 1 1 1 1 1 1 1 (bits)

6-94

Page 48: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

48

IEEE 802.11 Frame Structure, 3

Frame ControlProtocol version: currently, it is zeroy,Type: management(00), control(01), or data(10)Subtype: type specificTo DS, From DS: Indicate the meaning of 4 addresses in the headerMore Frag: set to 1 if another frame follows.Pwr. Mgt.: indication of station’s power management modeMore Data: 1 if a station in power save mode that more MAC SDUs are buffered for it at the APWEP: 1 if the frame body contains info encrypted

6-95

ProtocolVersion

Type SubtypeToDS

FromDS

MoreFrag

RetryPwr.Mgt.

MoreData

WEP Rsvd

2 2 2 1 1 1 1 1 1 1 1 (bits)

IEEE 802.11 Frame Structure, 4

Duration/ID: Duration value (NAV, net allocation vector), or( , ),Station’s ID for control type and PS‐poll subtype

4 Addresses:Destination address, source address, Transmit address, receiver address, Source/destin BSS ID

Sequence Control: Sequence Control: 4 bits: the number of each fragment of a MAC SDU12 bits: sequence numbering

CRC: 32‐bit CRC for MAC header and Frame body

6-96

Framecontrol

Duration/ID

Address1

Address2

Address3

SequenceControl

Address4

FrameBody

CRC

2 2 6 6 6 2 6 0~2312 4

Page 49: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

49

IEEE 802.11 Medium Access Control

Goals:Ch l   Channel access PDU addressingFrame formattingError checkingFragmentation and reassemblySecurity, authentication, privacy issues

6-97

IEEE 802.11 Two Types of MAC

DCF (Distributed Coordination Function): Support for asynchronous transfer on best‐effort Support for asynchronous transfer on best‐effort basis (in contention mode)PCF (Point Coordination Function): 

Impremented by an APSupport connection‐oriented time‐bounded transferTwo periodsTwo periods

Contention period (CP):Contention Free Period (CFP): the medium is controlled by the AP

6-98

Page 50: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

50

IEEE 802.11 DCF

All station must support DCF at least

Only MAC for ad‐hoc networksOnly MAC for ad hoc networks

Based on CSMA/CA IFS (Interframe Space) : All stations must remain quiet for a certain time period after transmissionThe length of IFS

SIFS (Short IFS): for short control message (ACK, Polling response, highest priority)PIFS (PCF IFS): for support real‐time PCFDIFS (DCF IFS): for support asynchronous transfer in DCFEIFS (Extended IFS): used for resynchronization when PHY detects incorrect MAC frames (lowest priority)

The higher priority frame, the shorter waitingSIFS < PIFS < EIFS < EIFS

6-99

IEEE 802.11 DCF, Procedure

A station can transmit an initial MAC PDU under the DCF if the staion detects the under the DCF if the staion detects the medium idle for a DIFS or longer.

If the medium is busy, re‐schedule using a random backoff.

A station can transmit when its backoff timer e pires d ring the contention periodexpires during the contention period.After a successful transmission, the station must execute the backoff procedure before sending the next frame.

6-100

Page 51: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

51

IEEE 802.11 CSMA/CA

If a station (A) has a frame to be transmitted, it first sends request‐to‐send(RTS) frame containing the duration.  All listening nodes within the range of A know the expected duration. 

Once a destine station (B) receives an RTS, it sends a clear‐to‐send(CTS) frame containing the duration.  All listening nodes within the range of B know the expected duration.  

A proceed with its data frame. 

If B receives the frame without error, it responds with an ACK.

It is still possible  for two RTS’s frame collides.  Resolve the collision using the exponential backoff. 

The Collision of RTS’s is better than a collision with a data frame, because the length of RTS is much shorter than the length of data frame.

6-101

IEEE 802.11 NAV

Duration field in a MAC header indicates the amount of time (in micro‐second)

Aft  th   d  f th   t f  th   h l  ill b   tili d t   l t  After the end of the present frame, the channel will be utilized to complete successful TX. 

Stations listening the duration field adjust their network allocation vector (NAV), for indicating the amount of time elapsed until the current TX is complete and the channel can be sampled again for idle status. 

DataDIFS

SIFSSource

6-102

ACK

NAV

DIFS

SIFS

Destination

Other

Defer access Wait for backoff

Page 52: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

52

IEEE 802.11 RTS/CTS/Data/ACK

SData

ACK

NAV (RTS)

DIFS

DIFS

SIFSSource

Destination

Other

RTS

CTSSIFS SIFS

NAV (CTS)

6-103

Defer access

( )

NAV (Data)

IEEE 802.11 Exponential Backoff

A station with a frame first waits until the channel is idle at least DIFS period, and then computer a random backoff time. 

IEEE 802.11 uses a slotted time unit (an integer value), much smaller than the size of MAC PDU.

Initially the backoff counter is chosen in [0, 2m‐1]

For each DIFS period, the counter decrements by 1. 

Note that a station freezes its timer during a busy channel time. 

If the counter reaches zero, it transmits its frame. 

For each collision, the contention window (CW) doubles until [0, 2M‐1].  

6-104

Page 53: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

53

IEEE 802.6 (DQDB)

OverviewDistributed Queue Dual Bus

Not in the textbook

Distributed Queue Dual BusFor MANTwo parallel unidirectional buses passing thru the city

Slotgenerator

6-105

S1 Si SN… …

DQDB

S1 Si SN… …

Slotgenerator

Channel A

One new frame every 125 usecTwo types of slots

Queued arbitrated slot (QA) – for packet‐switch serviceNon‐arbitrated slot (NA) – for circuit‐switch service

Slotgenerator

Channel B

6-106

AccessControl (8 bit) Segment (52x8 bit)

Busy(1)

Type(1)

resrvd)(1)

PSR(1)

Request(1)

Page 54: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

54

DQDB Protocol

TransmissionA station must know whether the destination is to the A station must know whether the destination is to the left or the rightIf it is to the right, use the bus A

Distributive queuingA method to build fair access to the mediumEach station queued their frame to a conceptual global q p gqueue, without having a central queueEach station maintains 2 counter, RC and CDRC counts the number of pending downstream requestsReserve slots thru in the reverse direction

6-107

Consideration for MAC

Efficiency ‐Depends on distance, bandwidth, packet lengthp gFairness ‐Stations acquire a reasonable portion of resources (bandwidth, delay, and so on)Reliability ‐ Robustness with failure or faults in equipments QOS 

Different types of trafficDifferentiate services

Scalability ‐Maximum number of usersCost 

6-108

Page 55: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

55

Performance of MAC

Throughput – the actual transmission rate through the shared mediumthrough the shared medium

Frame/sec or bit/secFor R‐bps medium and L‐bit frame, the maximum possible throughput is R/LThe real achievable throughput is much small than R/L

h h dThe overheads are In collision,For coordinating the collision, and For transmitting coordination information

6-109

LAN Bridges

Interconnection of networksRepeater – Layer‐1 (physical device)

Amplifying or reproducing signals without understanding what they mean

Bridge – Layer‐2 (MAC or data link layer)Router – Layer‐3 (network layer), also called a gatewayMost of network devices are not dealing with L4 or higherQuestion: Why not?

Why Bridges?As the number of stations increases, a single LAN may not able to handle ll ffall traffic

A different department wants to maintain its own LANECE wants Ethernet and ME wants Token‐ring. But they want to share a file server in ENGR.BE has two LAN’s: one in SL building, the other in WX building 

6-110

Page 56: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

56

LAN Bridges at a glance

Two or more MAC’s share an LLCl bNo layer above LLC

Bridge

Host BHost A

LLC

Network orabove

LLC

Network orabove

LLC

6-111

Physical

802.x

LLC

Physical

802.y

LLC

Physical

802.x

LLC

Physical

802.y

Network Topology with Bridges

Local traffic: S1‐S3Broadcast only on L1B1 and B2 do not forward the 

S1 S3S2B1 and B2 do not forward the frame to other LANsL2 and L3 work independently

Remote traffic: S1‐S4B1 forwards the frame and makes L1 and L2 busy, but L3 is independent

If repeaters are used instead of the bridges, all LANs are busy with one f

Bridge2

S6

Bridge1

S5S4

L1

L2

L3

P1

P2P1

P2

frame transmissionB2 cannot be replaced by a repeaterQuestion: What are the problems in converting 802.x to 802.y?

6-112

S6

S7

S5S4 L3

Page 57: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

57

Conversion of MAC Protocols, 1

Common ProblemsDifferent frame formatDiff  d  Different data rateBottleneck at the bridge – timeout and retransmissionDifferent maximum frame length 

Remember that the fragmentation is none of business in this layerThe bridge may split the long frame, but the recipient cannot reassemble the fragmented frame in this layer

Order of address bits: big endian (802.5) and little endian (802.3)

802.3 to 802.3No additional problem except the different data rate and bottleneck problems

802.3 to 802.5The bridge must create priority bitsThe checksum must be re‐calculated

6-113

Conversion of MAC Protocols, 2

802.5 to 802.3Re‐caluculating the checksumDiscard the prioritySet A and C bits in the FS (by cheating)E bit in the EDA frame longer than 1500 bytes

802.5 to 802.5Set A and C bits in the FS (by cheating)

6-114

Page 58: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

58

Transparent Bridge

ObjectivesA station doesn’t need to know the presence of the bridgeSo, the bridge doesn’t need to be configured

FunctionsForwards frames from one LAN to another LAN

S1 S3S2

Bridge2Bridge1

L1

L2 P1

P2P1

P2one LAN to another LANLearns where stations are attached to the LANPrevent loops in the topology

6-115

S6

S7

S5S4 L3

Address Table of Transparent Bridge 

When a frame arrives on one of the ports, the bridge must decide whether or not to forward the incoming frame to another port by looking at its destinationlooking at its destinationThe bridge must have a knowledge which port the station is attached to, whether directly or indirectlyQuestion: What does the “indirect” mean?To do so, the bridge needs information associated a destination address with a port, called address table, address translation table or forwarding tableQuestion: How we can fill in the table?

6-116

B1

B2

1

9

3P2

P1

P1

P2P29

P23

P11

PortAddr

P29

P13

P11

PortAddr

AT for B1 AT for B2

Page 59: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

59

Maintaining the Address Table

The sysop records entries and load them up when the bridge is power onGood, but How does the sysop know all MAC addresses?How does the sysop know all MAC addresses?How does the sysop know the entire network topology? Especially when it is dynamicIf I move my station, I have to notify it to the sysop.  The sysop will update the entries.  (Oops, the sysop is on vacation)

Backward learningThe bridge is operating in “promiscuous” modeIf it receives a frame but it doesn’t know where the destination is, then “floods (broadcast)” the frame to all ports.  But, it records its source address and port number to the address tablenumber to the address tableThe bridge receives a frame and knows where the destination is by looking at the address table:  

If its source port # is same as the destination port number in the AT, ignore the frame. The bridge knows that no forwarding needsIf its source port # is different from the destination port #, forward the frame to the destination port

6-117

Illustration of Backward Learning

1 2 3 4 5 61 2 3 4 5 6

7 8

B1 B2P1

P2

P3P1 P2

Addr PortAddr Port

D5 S2 D5 S2

D5 S2

D5 S2D2 S6D2 S6D2 S6D2 S1

6-118

2 1 2 1

6 26 2

Page 60: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

60

Memory for Address Table

If the bridge operates for a long time, both tables store all the addresses of each stations in LAN’s.Q estion Question 

How can it handle a station which moved from one LAN to another?What if the space for tables is not large enough to store all address?

AgingEach entry is associated with a timer. Whenever hit, set the timer to the current timePeriodically, the bridge scans each entry. If it is x‐minute old, erase it.  

6-119

LANs LANsBridge 1

Bridge 2

Infinite flood -> network down

Spanning Tree Bridges

Broadcast stormA loop in bridges LANs causes a catastrophe because of flooding a frame whose destination is unknownwhose destination is unknownDisable a certain portion of bridges to construct a logical tree for the flooding operation

MethodsTransform the bridged LAN to a graph G=(V,E)Select a root bridge with the lowest serial numberAssign a cost to each edge

Based on speed, distance, or the number of stationsFrom each bridge, find a path to the root bridge with the minimum costSelect a designated bridge for each LANBreak tie with arbitrary rules such as the serial number and/or the port number  Forward an unknown frame only through the spanning tree

6-120

Page 61: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

61

Illustration of Spanning Tree

L1 (3)

B1 B2

B4

B5

B3L2 (2)

L3 (5)

B1

B5

B2 B3

B4

L1

L2L3

L4

33

3

5

5 5

4

4

2

2

2

Spanning Tree AlgorithmsKrushal’s algorithmPrim’s algorithm

6-121

B5

L4(4)

Source Routing Bridge

For IEEE 802.5Simple bridge  but complicated end stationsSimple bridge, but complicated end stations

Each station determine the route to the destination when it want to send a frameInclude the route info in the header of the frame

Insert only if two stations are on different LANIndicated by I/G bit in source address is 12‐byte routing control + consecutive 2‐byte route designator

R ti   t l  t   f f  l th  f  ti  i f ti  Routing control: type of frame, length of routing information, direction of the route (LR or RL)Route designator: 12‐bit LAN number and 4‐bit bridge number

Load balancing – the route is distributed over all networkAlternative path in the case of failure

6-122

Page 62: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

62

Illustration of Source Routing

LAN 2 B4 LAN 4S1

S2

B1

B2

S1

B6

B3 B5 B7LAN 1

LAN 5LAN 3

6-123

S3

B6 LAN 5LAN 3

From S1 to S2: LAN1→B1→LAN2→B4→LAN4

Routing Table for Source Routing

Each station has a routing tableTo transmit a frame to a different LAN  the To transmit a frame to a different LAN, the station first refers its routing tableIf the route info is found, the station insert the routing info into the frame.Otherwise the station starts a route discovery procedureprocedureOnce the route is found, the station stores the route info to its routing table for future use

6-124

Page 63: SESSION 6 LAN AND MAC PROTOCOLS - Indiana Universityet.engr.iupui.edu/~dskim/Classes/ECE547/ln-network-ch06.pdf · LAN AND MAC PROTOCOLS Introduction ... Channelization –eg) frequency‐hopping

63

How to Discover the Route

Single‐route broadcastA station broadcast the special frame, which visits every LAN exactly once, eventually to the destination using a spanning treeWhenever an first bridge sees this frame, it inserts its LAN number, the bridge number and the outgoing LAN number An intermediate bridge inserts its bridge number and the outgoing LAN

All‐routes broadcast frameUp receiving the single‐route frame, the destination responds with the h    i l f   hi h    ll  ibl    b k    h  other  special frame, which generates all possible routes back to the 

source stationAfter collecting all routes, the source station chooses the best route

6-125