高級計(jì)算機(jī)網(wǎng)絡(luò)-zqfchapter4mac_第1頁
高級計(jì)算機(jī)網(wǎng)絡(luò)-zqfchapter4mac_第2頁
高級計(jì)算機(jī)網(wǎng)絡(luò)-zqfchapter4mac_第3頁
高級計(jì)算機(jī)網(wǎng)絡(luò)-zqfchapter4mac_第4頁
高級計(jì)算機(jī)網(wǎng)絡(luò)-zqfchapter4mac_第5頁
已閱讀5頁,還剩116頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

Chapter

4The

Medium

Access

Control

Sublayer(介質(zhì)

子層)21:55:0614.1

The

Medium

Access

Control

SublayerThe

categories

of

networks(based

on

Transmission

Technology)Point-to-point

connections(點(diǎn)到點(diǎn)連接)Broadcast

channels(廣播信道)Broadcast

channels(廣播信道網(wǎng)絡(luò)),也稱:Multiaccess

Channel(多路

信道)信道)控制,MAC)–

or:

Random

Access

Channel(隨機(jī)Medium

Access

Control(介質(zhì)–

The

bottom

part

of

the

data

link

layer21:55:0624.2

ALOHAALOHA(Additive

Link

On-Line

Hawaii

system)Pure

ALOHASlotted

ALOHAPure

ALOHA-[see

fig

4-1]The

basic

idea:let

users

transmit

whenever

they

have

data

to

be

sent.Assumed:Fixed

frame

length。基本思想:只要有待發(fā)數(shù)據(jù),就讓他們發(fā)After

collision,waiting

for

random

time,then

retransmitVulnerable

period

for

the

shaded

frame-[see

fig

4-2]The

throughput

of

system:

S=G*e-2GG---Load,total

generated

mean

fra mbers(old

and

new)per

frame

time,每幀時(shí)內(nèi)傳送的幀數(shù)S---successfully

transmitted

frames

per

frame

time,

S1The um

throughput

occurs

at

G=0.5,with

S=1/(2e),which

isabout

0.184.In

other

words

,the

best

we

can

hope

for

is

a

channel

utilization

of

18percent.21:55:06321:55:074Fig.

4-2.

Vulnerable

period

for

the

shaded

frameFig.

4-1.

In

pure

ALOHA,

frames

are

transmittedat

comple y

arbitrary

times21:55:085ALOHASlotted

ALOHAThe

basic

idea:divide

time

up

into

discrete

intervals

,eachinterval

corresponding

to

one

frame基本思想:把時(shí)間分為離散的時(shí)間片(slot),每段對應(yīng)一幀The

approach

requires

the

users

to

agree

of

slot

boundaries.Danger

of

collision

reduce

a

halfThe

throughput

:

S=Ge-GSlotted

ALOHA

at

G=1,with

a

throughput

s=1/e

or

about0.368,twice

that

of

pure

ALOHA.The

best

we

can

hope

for

using

slotted

ALOHA

is

37

percent

ofthe

slots.The

relation

between

the

offered

traffic

and

the

throughput

isshown

in

[Figure

4-3]ALOHAFig.4-3.Throughput

versus

offered

traffic

for

ALOHA

systems21:55:0864.2.2Carrier

Sense

Multiple

Access

Protocols協(xié)議)ng,adapt

their

behavior

accordingly,(載波偵聽多路Basic

Idea:detect

what

other

stations

areachieve

a

much

better

utilization基本思想:檢測其它站點(diǎn),調(diào)整自己的動(dòng)作,大大提高利用率Carrier

Sense

Protocols:

protocols

in

which

stations

listen

for

a

carrier(i.e.,

atransmission)

and

act

accordinglyBandwidth-delay

product:the

number

offrames

that

fit

on

thechannel.–

The

larger

the

bandwidth-delay

product,

the

more

important

thiseffect es,

and

the

worse

the

performance

of

the

protocol.Persistent

and

Nonpersistent

CSMA1-persistent

CSMAlisten

to

the

channel,

if

the

channel

is

busy,

the

station

waits

untilites

idle,

then

transmits

the

frame.

If

idle,

the

station

transmit

itimmedia

y.If

a

collision

occurs

,the

station

waits

a

random

amount

of

time

and

startsall

over

again.Nonpersistent

CSMAlistening,

if

the

channel

is

busy,waits

a

random

amount

of

timeand

startslistening.

If

idle,the

station

transmit

it

immedia

y.Better

Channel

utilizationthan

1-persistent

CSMA,

but

longer

delays.21:55:087p-persistent

CSMAApplies

to

slotted

channelslistening,if

it

is

idle,it

transmits

with

a

probability

p

,

and

deferswith

a

probability

1-p.If

busy,Continue

listening.Comparison

of

various

protocol-[see

fig

4-4]parison

of

the

channel

utilization

versus

loadfor

various

random

access

protocols21:55:0884.2.2

Carrier

Sense

Multiple

Access

ProtocolsCSMA

with

Collision

Detection(帶

檢測的CSMA

)Improvement:abort

their

transmissions

as

soon

as

they

detectacollision.Carrier

Sense

Multiple

Access

with

Collision

Detection(CSMA/CD)The

conceptual

model-[see

fig

4-5]Three

states:contention,transmission,or

idleCSMA/CD

is

an

important

protocol.

One

version

of

it:IEEE802.3(Ethernet),whichis

an

internationalstandard.21:55:089(補(bǔ)充)21:55:08104.2.3 Wireless

LAN

ProtocolsUnlike

cellular

ephone

systems,each

cell

has

only

onechannel,covering

the

entire

available

band

width,usually

itsbandwidth

is

11-54Mb/sHidden

station

problem-[see

fig

4-11(a)]–

A->B,

C

will

not

hear

A,thus

falsely

conclude

that

C

cantransmit,collision

occur.Exposed

station

problem-[see

fig

4-11(b)]–

B->A,

C

is

listening,falsely

conclude

that

it

may

no d

toDFig.4-11.A

wireless

LAN.(a)

A

transmitting.(b)

B

transmitting.21:55:0811Wireless

LAN

Protocols

(2)Multiple

Access

with

Collision

Avoidance(MACA)

-[see

fig

4-12]–

IEEE

802.11–

The

basic

idea:the

sender

stimulate

the

receiver(RTS),make

i d

a

frame(CTS),all

stations

nearby

can

detect

thistransmission

,avoid

collision.21:55:0812Fig.4-12.The

MACA

protocol.(a)

A

sending

an

RTS

to

B(b)

B

responding

with

a

CTS

to

AConclusion

CSMA/CA

Rule):If

station

X

received

RTS,but

did

not

receive

CTS,then

X

cantransmit

its

data

and

will

not

interfere

with

other

stations.。If

station

X

has

not

received

RTS,

but

received

CTS,then

X

maynot

transmit

itsdata.If

station

X

has

received

both

RTS

and

CTS,then

X

may

nottransmit

its

data.Although

the

use

of

RTS

and

CTS

will

decrease

the

efficiency

ofnetwork,but

the

influence

is

little

because

they

are

very

short.e.g,frame

length

of

RTS

is

30

byte

while

the al

length

of

data

frameis

2346

bytes.MACA

can

not

prevent

collision

from

happening.

e.g,

A

and

C

transmitRTS

to

B

in

the

same

time,

their

RTS

frame

will

collision.MACAW:

tune

MACA

to

improve

its

performance.MAC

for

Wirelessintroducing

an

ACK

after

each

successful

data

frame,

avoidlosing

the

frame21:55:0813WLANProtocolsIEEE

802.11–

1/2M2.4GHz,

1997IEEE

802.11b

2.4GHz,

1999–

11MIEEE

802.11a–

54MIEEE

802.11g–

11M/54M5GHz,

19992.4GHz,

July

2003IEEE802.11i(WLAN的802.1x)新一代WLAN安全標(biāo)準(zhǔn)IEEE802.11p智能交通ITS,用于車載通訊,Jul.2010IEEE802.11n2.4G/5GHz,

Sept.11,2009–

300,

600MbpsIEEE

802.11ac 5GHz,

Feb.

2012–

理論速率1G

bps21:55:08144.3

EthernetPhysical

layerMAC

sublayer

protocolEthernet

performanceSwitched

EthernetFast

EthernetGigabit

Ethernet10

Gigabit

EthernetIEEE

802.2:

Logical

Link

ControlRetrospective

on

Ethernet21:55:08154.3.1

Classic

Ethernet

Physical

LayerFigure

4-13.

Architecture

of

classic

EthernetClassic

EthernetSwitched

EthernetDIX

standardThick

EthernetThin

EthernetRepeaterFour

types

of

cabling

are

commonly

used:

(Figure

4-13,14,15)Figure

4-xx.

The

most

common

kinds

of

Ethernet

cabling.21:55:0817Figure

4-xxThree

kinds

of

Ethernet

cabling.

(a)

10Base5,

(b)

10Base2,

(c)

10Base-T.21:55:08184.3.2

Classic

Ethernet

MAC

SublayerProtocolFigure

4-14.

Frame

formats.

(a)

Ethernet

(DIX).

(b)

IEEE

80.2

Manchester

EncodingProblem:

bit

0--0

volts

,

bit

1--5

volts,

then

ambiguities

arise:

an

idlesender(0

volts)ora

0

bit

(0

volts).Method:

using

+1

voltsfor

a

1

and

–1

volts

for

a

0,

but

there

is

still

aproblem:

different

clock

speedskey

issue:

to

unambiguously

determine

the

start,

end,

or

middle

ofeach

bit

without

reference

to

an

external

clock.

Two

such

approaches:Manchester

encoding

and

differential

Manchester

encoding.Manchester

encoding:

Each

bit

period

is

divided

into

two

equalinterval

and

low

in

the

second

ervals(1—high

during

the0—just

the

reverse).Advantage:

easy

for

the

receiver

to

synchronize

with

the

senderDisadvantage:

twice

as

much

bandwidth

as

straight

binary

encoding21:55:08204.3.2

Manchester

EncodingDifferential

Manchester

encoding:1—absence

of

a

transition(跳變)

atthestart

of

the

interval,

0—presence

of

a

transition

at

the

start

of

the

interval–

The

differential

scheme

requires

more

complex

equipment

but

offers

betternoise

immunityAll

Ethernetsystems

use

Manchester

encoding

due

to

its

simplicity21:55:08

21Figure

4-16.

(a)

Binary

encoding,

(b)

Manchester

encoding,

(c)

DifferentialManchesterencoding.4.3.2

Classic

Ethernet

MAC

SublayerProtocolOriginal

DIX

framestructure-[see

fig

4-14(a)]Preamble

of

8

bytes,

containing

bit

pattern

10101010high-order

bit

of

destination

address:

0-ordinary,

1-groupminimum

frame

length:

64

bytes

(512bits)to

distinguish

valid

frames

from

garbagecollision

detection

-[see

fig

4-15]–

CRC

checktwo

changes

IEEE

made:

[seefig

4-14(b)]Preamble

of

7

bytes,

last

byte

for

a

Start

of

Frame(SOF)delimiter

(7+1=8)to

change

Type

field

into

Length

fieldMulticasting: Sending

to

a

groupBroadcasting:

Special

address,

all

1OUI(Organizationally

Unique

Identifier,

MAC)LLCDEC,

In ,

Xerox21:55:0822Figure

4-14.

Frame

formats.

(a)

DIX

Ethernet,

(b)

IEEE

802.3.Collision

detection

can

take

as

long

as

2.21:55:0823CSMA/CD

with

Binary

Exponential

Backoffdelay=k*2slot

time(round-trip

delay):

2=51.2

safter

i

collisions,

a

random

number

k

between

0

and

2i-1

is

chosen.After

10

collisions

have

been

reached,

therandomization

interval

is

frozen

at

a um

of

1023slots.

After

16

collisions,

the

controller

throws

in

thetowel

and

reports

failure

back

to

the

computer.21:55:08Goto

4.3.3CSMA/CD

協(xié)議最初的以太網(wǎng)是將許多計(jì)算機(jī)都連接到一根總線上。當(dāng)初認(rèn)為這樣的連接方法既簡單又可靠,因?yàn)榭偩€上沒有有源器件。D匹配電阻(用來吸收總線上的信號)匹配電阻E不接受C不接受A不接受BB向D發(fā)送數(shù)據(jù)接受只有D

接受B

發(fā)送的數(shù)據(jù)Optional21:55:082521:55:0826兩個(gè)標(biāo)準(zhǔn)DIX

Ethernet

V2

是世界上第一個(gè)局域網(wǎng)產(chǎn)品(以太網(wǎng))的規(guī)約。IEEE

的802.3

標(biāo)準(zhǔn)。DIX

Ethernet

V2

標(biāo)準(zhǔn)與IEEE

的802.3

標(biāo)準(zhǔn)只有很小的差別,因此可以將802.3

局域網(wǎng)簡稱為“以太網(wǎng)”。嚴(yán)格說來,“以太網(wǎng)”應(yīng)當(dāng)是指符合DIXEthernet

V2

標(biāo)準(zhǔn)的局域網(wǎng)1kmABt碰撞t

=

2

A

檢測到發(fā)生碰撞B

發(fā)送數(shù)據(jù)B

檢測到發(fā)生碰撞t

=

t

=

單程端到端時(shí)延記為t

=

021:55:0827爭用期的長度以太網(wǎng)取

51.2

s

為爭用期的長度。對于10

Mb/s

以太網(wǎng),在爭用期內(nèi)可發(fā)送512bit,即64字節(jié)。以太網(wǎng)在發(fā)送數(shù)據(jù)時(shí),若前

64

字節(jié)沒有發(fā)生

,則后續(xù)的數(shù)據(jù)就不會發(fā)生

。21:55:0828最短有效幀長如果發(fā)生,就一定是在發(fā)送的前64

字節(jié)之內(nèi)。由于一檢測到

就立即中止發(fā)送,這時(shí)已經(jīng)發(fā)送出去的數(shù)據(jù)一定小于

64

字節(jié)。以太網(wǎng)規(guī)定了最短有效幀長為

64

字節(jié),凡長度小于

64字節(jié)的幀都是由于

而異常中止的無效幀。21:55:082921:55:0830強(qiáng)化碰撞當(dāng)發(fā)送數(shù)據(jù)的站一旦發(fā)現(xiàn)發(fā)生了碰撞時(shí),除了立即停止發(fā)送數(shù)據(jù)外,還要再繼續(xù)發(fā)送若干比特的人為干擾信號(jammingsignal),以便讓所有用戶都知道現(xiàn)在已經(jīng)發(fā)生了碰撞。人為干擾信號TJABTBtB

發(fā)送數(shù)據(jù)A

檢測到開始信道占用時(shí)間A

發(fā)送數(shù)據(jù)B

也能夠檢測到,并立即停止發(fā)送數(shù)據(jù)幀,接著就發(fā)送干擾信號。這里為了簡單起見,只畫出A發(fā)送干擾信號的情況。21:55:0831網(wǎng)卡上的硬件地址路由器1A-24-F6-54-1B-0E00-00-A2-A4-2C-0220-60-8C-C7-75-2A08-00-20-47-1F-E420-60-8C-11-D2-F6路由器由于同時(shí)連接到兩個(gè)網(wǎng)絡(luò)上,因此它有兩塊網(wǎng)卡和兩個(gè)硬件地址。21:55:08324.3.3

Ethernet

PerformanceFigure

4-16.

Efficiency

of

Ethernet

at

10

Mbps

with

512-bit

slot

times.21:55:08334.3.4

Switched

EthernetFigure

4-17.

(a)

Hub.

(b)

Switch.21:55:0834Switched

Ethernet

(2)Figure

4-18.

An

Ethernet

switch.SwitchSwitch

portsTwisted

pairHubCollisioncollision.:In

a

hub,

all

stations

are

in

the

same;

while

in

a

switch,

each

port

is

a

collision4.3.5

Fast

EthernetFDDI

(Fiber

Distributed

Data

Interface)Fibre

Channel

(note:

Fibre,

not

Fiber,

as

British

editor)Disadvantage

of

optical

LANs(such

as

FDDI)

make

IEEE

come

up

withFast

Ethernet.

[802.3(1980)

based

on

Ethernet]The

basic

idea:

all

802.3u

(1995)

use

hubs

and

switchesWire

types

to

support:Category

3

twisted

pair:100Base-T4

(4

twisted

pairs)Advantage

and

disadvantageCategory

5

twisted

pair:100Base-TX

(2

twisted

pairs)Often

100Base-T4

and

100Base-TX

are

called

100Base-TFiber:100Base-FX21:55:093621:55:09374.3.5

Fast

Ethernet(2)Category

3

UTP

scheme:100Base-T4

(4

twistedpairs)25MHz

signaling

speedTransmitting

4

bits

in

each

of

the

25MHz

to

give

100Mbps10Base-T

Ethernet20MHz

signaling

speed,Manchester

encoding,Two

clock

periods

for

each

bit

of

the

10MbpsCategory

5

UTP

scheme:100Base-TX

(2

twistedpairs)125MHz

signaling

speed4B/5B:5

clock

periods,each

contain

one

of

twovalues,yields

32combinations16

of

thesecombinations

are

usedto

transmit

thefour

bit

groups0000,0001,…,1111Full

duplexAutonegotiation

(10

or

100Mbps,

half

or

full

duplex)4.3.6

Gigabit

EthernetGigabit

Ethernet

------802.3z

(1998)Goals(the

same

as

802.3u):

make

Ethernet

go

10

times

faster

yet

remain

backwardcompatible

with

existing

Ethernet

standards.All

configurations

of

gigabit

Ethernet

are

point-to-point

rather

than

multidropas

in

the

original

10Mbps

standard

(see

Fig.4-20)21:55:0938Fig4-20

(a)

A

two-station

Ethernet.(b)

A

multistation

Ethernet.4.3.6

Gigabit

Ethernet(3)Gigabit

Ethernet

supports

both

copper

and

fiber

cabling,

as

listed

in

Fig.4-21.21:55:0939Figure

4-21.

GigabitEthernet

cabling.Three

fiber

diameters

are

permitted:

10μm,50μm

and62.5μm

(microns).4.3.7 10

Gigabit

Ethernet10-Gigabit

Ethernet-----802.3ae

(2002)10

Gigabit以太網(wǎng)與10

Mb/s,100

Mb/s

和1

Gb/s以太網(wǎng)的幀格式完全相同。10Gigabit以太網(wǎng)還保留了802.3

標(biāo)準(zhǔn)規(guī)定的以太網(wǎng)最小和最大幀長,便于升級。10Gigabit以太網(wǎng)不再使用銅線而只使用光纖作為傳輸

。10Gigabit以太網(wǎng)只工作在全雙工方式,因此沒有爭用問題,也不使用CSMA/CD

協(xié)議。Coming

on

new

standard

for

40Gbps

and

100Gbps4.3.7 10

GigabitEthernet(2)Figure

4-22.

10-Gigabit

Ethernet

cabling4.3.8 40/100

Gigabit

EthernetTHE

IEEE

Standards

Association

has

ratifiedthe

IEEE

Standard

802.3ba

that

covers

40gigabit

and

100

gigabit

Ethernet

(40GbE

and100GbE).It

was

ratified

in

June

17,2010.21:55:094240GB/100GB

以太網(wǎng)的物理層標(biāo)準(zhǔn)物理層40GB

以太網(wǎng)100GB

以太網(wǎng)在背板上傳輸至少超過1

m40GBASE-KR4在銅纜上傳輸至少超過7

m40GBASE-CR4100GBASE-CR10多模光纖上傳輸至少100

m40GBASE-SR4100GBASE-SR10單模光纖上傳輸至少10

km40GBASE-LR4100GBASE-LR4單模光纖上傳輸至少40

km100GBASE-ER4以太網(wǎng)從10

Mb/s

到100

Gb/s

的演進(jìn)、全/半雙工、共享/以太網(wǎng)從10

Mb/s到100Gb/s

的演進(jìn)證明了以太網(wǎng)是:可擴(kuò)展的(從10

Mb/s

到100

Gb/s)。靈活的(多種傳輸交換)。易于安裝。穩(wěn)健性好。局域網(wǎng)對LLC

子層是透明的局域網(wǎng)站點(diǎn)1邏輯鏈路控制接入控制網(wǎng)絡(luò)層LLCMAC物理層網(wǎng)絡(luò)層LLCMAC物理層數(shù)據(jù)鏈路層站點(diǎn)2LLC

子層看不見下面的局域網(wǎng)21:55:0945以后一般不考慮LLC子層由于TCP/IP

體系經(jīng)常使用的局域網(wǎng)是DIX

Ethernet

V2

而不是

802.3標(biāo)準(zhǔn)中的幾種局域網(wǎng),因此現(xiàn)在

802

制定的邏輯鏈路控制子層

LLC(即

802.2標(biāo)準(zhǔn))的作用已經(jīng)不大了。很多廠商生產(chǎn)的網(wǎng)卡上就僅裝有MAC協(xié)議而沒有LLC

協(xié)議。21:55:094621:55:09474.3.8

Retrospective

on

EthernetSimple

and

flexiblecheapeasy

to

maintaininternetworking

easily

with

TCP/IP4.4

Wireless

LANs,

Linksys,The

802.11

Protocol

StackThe

802.11

Physical

LayerThe

802.11

MAC

Sublayer

ProtocolThe

802.11

Frame

StructureServicesProducts:

Cisco,

Aruba,

H3C,D-Link,

Netgear…21:55:09484.4.1 802.11

Architecture

and

ProtocolStack

(1)Figure4-23

802.11

architecture

(a)

infrastructure

modeTo

NetworkAccessPointClient4.4.1 802.11

Architecture

and

ProtocolStack

(2)Figure4-23

Figure4-23

802.11

architecture

(b)

ad-hoc

mode4.4.1

The

802.11

Architecture

andProtocol

Stack(3)Protocol

stack

structure

[see

fig.4-24]MAC

sublayer

determines

how

the

channel

is

allocatedLLC

sublayer

hide

the

difference

between

802

variantsFigure

4-24

Part

of

the

802.11protocol

stack.21:55:0951FHSS(FrequencyHop

Spread

Spectrum,跳頻擴(kuò)頻技術(shù))DSSS

(Direct

Sequence

Spread

Spectrum,直接序列擴(kuò)頻技術(shù))OFDM

(Orthogonal

Frequency

Division

Multiplexing,正交頻分復(fù)用)HR-DSSS

(High

Rate

Direct

Sequence

Spread

Spectrum,高速直接序列擴(kuò)頻技術(shù))MIMO

OFDM

(Multiple

Input

Multiple

Output

OFDM)

,

802.11n,ratifed

in

Oct.

2009,

use

4

antennas, rates

up

to

600Mbps21:55:09524.4.2

The

802.11

Physical

LayerInfrared:

diffused

transmission,

two

speeds:1

Mbps:

takes

2

bits

and

produces

a

16-bit

codeword

containing

fifteen

0sand

a

single

1,

Gray

code2

Mbps:

takes

2

bits

and

produces

a

4-bit

codeword,

alsoonly

a

single

1FHSS(Frequency

Hop Spread

Spectrum,跳頻擴(kuò)頻技術(shù)):uses

79

channels,

each

1

MHz

wide,

starting

at

the

low

end

of

the

2.4-GHz

ISM

band.

(ISM:

Industrial,

Scientific,Medical)Pseudorandom

number

generator,dwell

timeDSSS(Direct

Sequence

Spread

Spectrum,直接序列擴(kuò)頻技術(shù)):Each

bit

as

11

chips,

Barker

sequence,

phase

shift

modulationSimilar

to

the

CDMA

technology1

or

2Mbps21:55:095321:55:09544.4.2

The

802.11

Physical

LayerOFDM(Orthogonal

Frequency

Division

Multiplexing,正交頻分復(fù)用):–

IEEE

802.11aSplitting

signal

into

many

narrow

bands,

better

immunity

to

narrowbandinterference

and

possibility

of

using

noncontiguous

bandsUp

to

54Mbps

in

the

wider

5

GHz

ISM

band216

data

bits

are

encoded

into

288-bit

symbolsHR-DSSS(High

Rate

Direct

Sequence

Spread

Spectrum,高速直接序列擴(kuò)頻技術(shù)):IEEE

802.11bUses

11

million

chips/sec

to

achieve11

Mbps

in

the

2.4-GHz

bandData

rates

supported:

1,

2,

5.5,

and

11

Mbps.For

1

and

2Mbps,

run

at

1M

baud

with

1

and

2

bits

perbaudFor

5.5

and

11Mbps,

run

at

1.375M

baud

with

4

and

8

bits

per

baud21:55:09554.4.2

The

802.11

Physical

LayerIEEE

802.11g,

usesOFDM

modulation

method

of

802.11a

butoperates

in

thenarrow

2.4-GHz

ISM

band

along

with

802.11bOFDM

modulation

method

but

run

at

2.4GHz

ISM

bandAn

enhanced

version

of

802.11b,

compatible

with

802.11bIn

theory

it

can

operate

at

up

to

54

Mbps54Mbps,

11Mbps

…MIMO

(Multiple

Input

Multiple

Output)802.11n,

ratifed

in

Oct.

2009use

4

antennas,

40MHz4.4.3

The

802.11

MAC

Sublayer

ProtocolFigure

4-25

Sending

a

frame

with

CSMA/CA.21:55:09574.4.3

The

802.11

MAC

Sublayer

ProtocolTwo

modes

of

opertion

to

deal

with

hidden/

exposed

stationproblem

:DCF(Distributed

Coordination

Function分布式協(xié)調(diào)功能):not

usecentral

controlPCF(Point

Coordination

Function點(diǎn)協(xié)調(diào)功能):uses

the

base

station

tocontrol

all

activity

in

its

cell.All

must

support

DCF

but

PCF

is

optional.CSMA/CA(CSMA

with

Collision

Avoidence):

employs

DCF,

uses

bothphysical

and

virtual

channel

sensingmethod

1:

senses

channel,

if

idle,

just

starts

transmitting.

Does

notsense

channel

while

transmitting.

If

collision

occurs,

wait

random

time,using

Ethernet

binary

exponetial

backoff

algorithmmethod

2:

based

on

MACAW,

ues

virtual

channel

sensing[see

Fig.4-27]situation:A

wants

to

send

to

B.

C

is

a

station

within

range

of

A.

D

is

astation

within

range

of

B

but

not

within

rangeof

A.4.4.3

The

802.11

MAC

Sublayer

ProtocolA

sendsRTS

frame

to

B

to

request

permission,B

sendsCTS

frame

back

togrant

permission.Then

A

sends

data,

and

starts

an

ACK

timer.(假定:C在A附近,D在B附近)C

receives

RTS

frame

----->assert

NAV(Network

Allocation

Vector)D

hears

CTS----->assert

NAV(NAV

是大致估計(jì)的時(shí)間)Figure

4-27.

The

use

of

virtual

channel

sensing

using

CSMA/CA.21:55:09584.4.3

The

802.11

MAC

Sublayer

ProtocolWireless

networks

are

noisy

and

unreliable.

If

a

frame

is

too

long,

itis

very

difficult

to

getting

through

undamaged.Fragment:

individually

numbered

and

acknowledged

using

stop-and-wait

protocol.Fragment

burst.

[see

Fig.

4-xx.]Fragment

increases

the

throughput

by

restricting

retransmissionsto

bad

fragments

rather

than

the

entire

frame21:55:0959Figure

4-xx.

A

fragmentburst.4.4.3

The

802.11

MAC

Sublayer

ProtocolPCF

mode:

polling,

nocollisionsbase

station

broadcast

a

beacon

frame

periodicallypower

management: ls

a

station

to

go

to

sleepcoexistence

of

PCF

and

DCF:[see

Fig.

4-28](優(yōu)先等級)SIFS(Short

InterFrame

Spacing):

allow

the

parties

in

a

single

dialogthe

chance

to

goPIFS(PCF

InterFrame

Spacing):

the

base

station

may

send

a

beaconframe

or

poll

frame.

sends

data

frame

or

fragment

sequence

tofinish,

gives

base

station

a

chance

to

grab

the

channel

when

done.DICF(DCF

InterFrame

Spacing):

apply

usual

contension

rules,

binaryexponential

backoff

if

needed.EIFS(Extended

InterFrame

Spacing):

report

the

bad

frame21:55:09604.4.3

The

802.11

MAC

Sublayer

ProtocolFigure

4-28.

Interframe

spacing

in

802.11.21:55:0961802.11

的MAC

層MAC

層無爭用服務(wù)(選用)爭用服務(wù)(必須實(shí)現(xiàn))分布協(xié)調(diào)功能DCF(Distributed

Coordination

Function)(CSMA/CA)點(diǎn)協(xié)調(diào)功能(Point

CPCooFrdination

Function)MAC

層通過協(xié)調(diào)功能來確定在基本服務(wù)集BSS

中的移動(dòng)站在什么時(shí)間能發(fā)送數(shù)據(jù)或接收數(shù)據(jù)。物理層MAC

層無爭用服務(wù)爭用服務(wù)分布協(xié)調(diào)功能DCF(Distributed

Coordination

Function)(CSMA/CA)點(diǎn)協(xié)調(diào)功能(Point

CPCooFrdination

Function)DCF

子層在每一個(gè)結(jié)點(diǎn)使用CSMA

機(jī)制的分布式接入算法,讓各個(gè)站通過爭用信道來獲取發(fā)送權(quán)。因此DCF

向上提供爭用服務(wù)。物理層MAC

層無爭用服務(wù)爭用服務(wù)分布協(xié)調(diào)功能DCF(Distributed

Coordination

Function)(CSMA/CA)點(diǎn)協(xié)調(diào)功能(Point

CPCooFrdination

Function)PCF子層使用集中控制的接入算法把發(fā)送數(shù)據(jù)權(quán)輪流交給各個(gè)站從而避免了碰撞的產(chǎn)生物理層幀間間隔IFS所有的站在完成發(fā)送后,必須再等待一段很短的時(shí)間(繼續(xù)

)才能發(fā)送下一幀。這段時(shí)間的通稱是幀間間隔IFS

(InterFrame

Space)。幀間間隔長度取決于該站欲發(fā)送的幀的類型。高優(yōu)先級幀需要等待的時(shí)間較短,因此可優(yōu)先獲得發(fā)送權(quán)。若低優(yōu)先級幀還沒來得及發(fā)送而其他站的高優(yōu)先級幀已發(fā)送到,則變?yōu)槊B(tài)因而低優(yōu)先級幀就只能再推遲發(fā)送了。這樣就減少了發(fā)生碰撞的機(jī)會。時(shí)間DIFS空閑SIFS時(shí)間爭用窗口NAV(

忙)發(fā)送下一幀推遲接入等待重試時(shí)間有幀要發(fā)送源站時(shí)間目的站ACKDIFSSIFS其他站有幀要發(fā)送SIFS,即短(Short)幀間間隔,是最短的幀間間隔,用來分隔開屬于一次 的各幀。一個(gè)站應(yīng)當(dāng)能夠在這段時(shí)間內(nèi)從發(fā)送方式切換到接收方式。使用SIFS

的幀類型有:ACK

幀、CTS

幀、由過長的MAC

幀分片后的數(shù)據(jù)幀,以及所有回答AP

探詢的幀和在PCF

方式中接入點(diǎn)

AP

發(fā)送出的任何幀。發(fā)送第1

幀課件制作人:謝CSMA/CA

協(xié)議的原理欲發(fā)送數(shù)據(jù)的站先檢測信道。在

802.11

標(biāo)準(zhǔn)中規(guī)定了在物理層的空中接口進(jìn)行物理層的載波

。通過收到的相對信號強(qiáng)度是否超過一定的門限數(shù)值就可判定是否有其他的移動(dòng)站在信道上發(fā)送數(shù)據(jù)。當(dāng)源站發(fā)送它的第一個(gè)MAC

幀時(shí),若檢測到信道空閑,則在等待一段時(shí)間DIFS

后就可發(fā)送。為什么信道空閑還要再等待這是考慮到可能有其他的站有高優(yōu)先級的幀要發(fā)送。,就要讓高優(yōu)先級幀先發(fā)送。假定沒有高優(yōu)先級幀要發(fā)送源站發(fā)送了自己的數(shù)據(jù)幀。目的站若正確收到此幀,則經(jīng)過時(shí)間間隔SIFS

后,向源站發(fā)送確認(rèn)幀ACK。若源站在規(guī)定時(shí)間內(nèi)沒有收到確認(rèn)幀ACK(由重傳計(jì)時(shí)器控制這段時(shí)間),就必須重傳此幀,直到收到確認(rèn)為止,或者經(jīng)過若干次的重傳失敗后放棄發(fā)送。虛擬載波虛擬載波

(VirtualCarrierSense)的機(jī)制是讓源站將它要占用信道的時(shí)間(包括目的站發(fā)回確認(rèn)幀所需的時(shí)間)通知給所有其他站,以便使其他所有站在這一段時(shí)間都停止發(fā)送數(shù)據(jù)。這樣就大大減少了碰撞的機(jī)會?!疤摂M載波”是表示其他站并沒有監(jiān)聽信道,而是由于其他站收到了“源站的通知”才不發(fā)送數(shù)據(jù)。虛擬載波的效果這種效果好像是其他站都

了信道。所謂“源站

”就是源站在其

MAC幀首部中的第二個(gè)字段“持續(xù)時(shí)間”中填入了在本幀結(jié)束后還要占用信道多少時(shí)間(以微秒為單位),包括目的站發(fā)送確認(rèn)幀所需的時(shí)間。網(wǎng)絡(luò)分配向量當(dāng)一個(gè)站檢測到正在信道中傳送的MAC

幀首部的“持續(xù)時(shí)間”字段時(shí),就調(diào)整自己的網(wǎng)絡(luò)分配向量

NAV(Network

AllocationVector)。NAV

了必須經(jīng)過多少時(shí)間才能完成數(shù)據(jù)幀的這次傳輸,才能使信道轉(zhuǎn)入到空閑狀態(tài)。爭用窗口信道從忙態(tài)變?yōu)榭臻e時(shí),任何一個(gè)站要發(fā)送數(shù)據(jù)幀時(shí),不僅都必須等待一個(gè)

DIFS

的間隔,而且還要進(jìn)入爭用窗口,并計(jì)算隨機(jī)退避時(shí)間以便再次重新試圖接入到信道。在信道從忙態(tài)轉(zhuǎn)為空閑時(shí),各站就要執(zhí)行退避算法。這樣做就減少了發(fā)生碰撞的概率。802.11

使用二進(jìn)制指數(shù)退避算法。圖例

凍結(jié)剩余的退避時(shí)間幀幀幀幀幀DIFSDIFSDIFSDIFS爭用窗口爭用窗口爭用窗口爭用窗口退避退避退避退避ABCDEttttt凍結(jié)凍結(jié)凍結(jié)凍結(jié)凍結(jié)802.11的退避機(jī)制二進(jìn)制指數(shù)退避算法第i

次退避就在22+i

個(gè)時(shí)隙中隨機(jī)地選擇一個(gè),即:第I

次退避是在時(shí)隙{0,1,…,22+i

–1}中隨機(jī)地選擇一個(gè)。。第1

次退避是在8

個(gè)時(shí)隙(而不是2

個(gè))中隨機(jī)選擇一個(gè)。第2

次退避是在16個(gè)時(shí)隙(而不是4個(gè))中隨機(jī)選擇一個(gè)。退避計(jì)時(shí)器(backoff

timer)站點(diǎn)每經(jīng)歷一個(gè)時(shí)隙的時(shí)間就檢測一次信道。這可能發(fā)生兩種情況。若檢測到信道空閑,退避計(jì)時(shí)器就繼續(xù)倒計(jì)時(shí)。若檢測到信道忙,就凍結(jié)退避計(jì)時(shí)器的剩余時(shí)間,重新等待信道變?yōu)榭臻e并再經(jīng)過時(shí)間

DIFS

后,從剩余時(shí)間開始繼續(xù)倒計(jì)時(shí)。如果退避計(jì)時(shí)器的時(shí)間減小到零時(shí),就開始發(fā)送整個(gè)數(shù)據(jù)幀。退避算法的使用情況僅在下面的情況下才不使用退避算法:檢測到信道是空閑的,并且這個(gè)數(shù)據(jù)幀是要發(fā)送的第一個(gè)數(shù)據(jù)幀。除此以外的所有情況,都必須使用退避算法。即:在發(fā)送第一個(gè)幀之前檢測到信道處于忙態(tài)。在每一次的重傳后。在每一次的成功發(fā)送后。2.對信道進(jìn)行預(yù)約tDIFSSIFStNAV推遲接入源站t目的站其他站數(shù)據(jù)幀SIFSSIFSt802.11

局域網(wǎng)的MAC

幀字節(jié)

2266

6260

~

2312幀控制持續(xù)期地址1地址2地址3序號控制地址4幀主體FCS協(xié)議版本類型子類型去往AP來自AP分片重試功率管理數(shù)據(jù)順序位2241111111MAC

首部802.11

幀共有三種類型,即控制幀、數(shù)據(jù)幀和管理幀。下面是數(shù)據(jù)幀的主要字段。MAC尾部4802.11

數(shù)據(jù)幀的三大部分MAC

首部,共30字節(jié)。幀的復(fù)雜性都在幀的首部。幀主體,也就是幀的數(shù)據(jù)部分,不超過2312

字節(jié)。這個(gè)數(shù)值比以太網(wǎng)的最大長度長很多。不過802.11

幀的長度通常都是小于1500

字節(jié)。幀檢驗(yàn)序列FCS

是尾部,共4

字節(jié)1.關(guān)于802.11

數(shù)據(jù)幀的地址802.11數(shù)據(jù)幀最特殊的地方就是有四個(gè)地址字段。地址

4

用于自組網(wǎng)絡(luò)。

在這里只前三種地址。去往AP來自AP地址1地址2地址3地址401目的地址AP

地址源地址——10AP

地址源地址目的地址——AP1BSS1AB去往AP=1來自AP=0因特網(wǎng)RBSS2AP2C012站點(diǎn)A

向B發(fā)送數(shù)據(jù)幀但數(shù)據(jù)幀必須經(jīng)過AP

轉(zhuǎn)發(fā)2.

序號控制字段、持續(xù)期字段和幀控制字段序號控制字段占16

位,其中序號子字段占12位,分片子字段占4

位。持續(xù)期字段占16

位。幀控制字段共分為11

個(gè)子字段。協(xié)議版本字段現(xiàn)在是0。類型字段和子類型字段用來區(qū)分幀的功能。

分片字段置為1時(shí)表明這個(gè)幀屬于一個(gè)幀的多個(gè)分片之一。–

有線等效

字段=1,就表明采用了占1

位。若加密算法。分片的發(fā)送舉例ttt源站目的站其他站RTSCTS分片0ACK0分片1ACK1分片

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論