You are on page 1of 12

Y335: 2011-2012

,
:
: 10/11/2011
:

Problems & Questions on MAC Layer

1.

Ethernet Slotted Aloha ?

.
:
,
extra ( hardware, software)
, LAN. Slotted Aloha
, p.
, ,

( Ethernet,
CSMA/CD ).
CSMA/CD :
Efficiency = 1/(1 + 5dprop/dtrans),
dprop: max prop delay between two nodes in LAN
dtrans: time to transmit max-size frame
dprop 0, CSMA/CD 1.
slotted ALOHA :

eN(p) = N*p*(1-p)N-1
(N ), limN-> (N*p*(1-p)N-1) = 1/e =
0.37.

plot

slotted

ALOHA

e(p*)( ) ( ), p*
.

p*, e(p), ,
e(p) . .. e(pi) = 0

. (. e(pi) < 0 )
6.
Matlab :
function plot_figure(Nmax)
% plots the function e(N) for N=1,2,..., Nmax
x = 1:1:Nmax;
%setting the derivative of f(p) = N*p*[(1-p)^(N-1)] equal to 0

%we get that a local maximum of f(p) in the interval [0 1]


%lies at p* = 1/N. According to the above result we get:
%e(N) = (N/N)*((N-1)/N)^(N-1) = ((N-1)/N)^(N-1).
figure;
set(gcf,'color',[1 1 1]);
plot(x, ((x-1)./x).^(x-1), '*k');
ylabel('e(N)');
xlabel('N');
end

2.

hub/repeater, () bridge, router

(). .
:
Routers: .
( TTL).
Hosts routers .
Bridges (or layer-2 switches):
E link layer .
E : filtering forwarding
Filtering:
interface .
Forwarding: interface(s)

interface.
buffering ( hubs).
frames,
.
CSMA/CD ( hubs).
backoff
.
Hubs (68-73slides MAC-layer ppt):
repeater.
.
bits frames.
buffering .

bit ports,
.
ports single collision domain. CSMA/CD. ( adapters
).
: , LAN (
), restores signal,
buffer
: bandwidth (
collision domains collision domain)
3.

5 (collision)

Ethernet,

backoff

4 - (slots)?
:
1 , Ethernet adapter
{0,1}
.
2 , Ethernet adapter
{0,1,2,3}.
.
3 .
5 , Ethernet adapter
{0,1,2,,25-1}.
4 4 . 4
1/32.
:

1/32.
, - Ethernet adapter
x {0,1,,2-1},

backoff x, x slots
- .
4.

LAN slotted ALOHA (.

). As LAN

- .

slotted ALOHA, .
: (
), .
LAN . ,

slotted ALOHA LAN. .
:
slotted ALOHA:
frame,

, frame

, frame
p

LAN slotted ALOHA (


) : eN(p) = N*p*(1-p)N-1.
p.
p formula
slotted ALOHA.
.
p*
Np(1-p)N-1
(bonus points)
:
e:[0,1] -> R e(p) = N*p*(1-p) N-1 p*
(. eN(p*) = 0 )
(. eN(p*) < 0).
e(p)=0 p=1 p= 1/.
e(1) =0 e(1/N) < 0.

p=1 2 .
, . p = 1/N
p*=1/.
: hy335a_mac_F10-11 (MAC layer, slides 34, 35, 36 out of 87)
5.

LAN .


TDMA Ethernets CSMA/CD, ?
:
(. ),
TDMA , -
(. ). Ethernet
( ),

.
6.

A Ethernet

. Ethernet
.
slot 0
(packet collision).

slot


. /
/ ?
:
Slot 0: A ( )
Slot 1: (idle)
Slot 2: (idle)
Slot 3: , ( )
Slot 4: , ( )
:
Slot 0: A ( )

Slot 1: ()
Slot 2: (idle)
Slot 3: , ( )
Slot 4: (idle)
Slot 5: A , ( )
:
Slot 0: A ( )
Slot 1: , ( )
Slot 2: (idle)
Slot 3: (idle)
Slot 4: , ( )
:
. backoff 2 (backoff [0,1]),
0 . backoff
interval [0,3] slot1. 1, 3.
/backoff Ethernet.
7.

MAC ,

.
Attribute

Ethernet

(Collision
Detection)
Carrier Sense

Slotted
Aloha
x

Token
Passing

TDMA

FDMA

x
x

backoff


()

LAN

1.

2.

3.
4.
5.

6.

7.

:
Slotted Aloha backoff
, (
).
Token passing
capacity,
frame.
To Ethernet
, .
Ethernet exponential backoff
backoff interval.
token passing TDMA,
. FDMA,
,
.
T Token passing

.
avoid synchronization
. clock synchronization.
8. Ethernet,
, , frames A1, A2, , frames B1
B2. frames , frame
slot. A B A1
B1, , (collision).
collision,
frames 1, 2, 1, 2
?

:

(frame) collision, collision
, (exponential backoff).
frame 1 backoff,

{0,1}, ,
t1=*, K .
backoff
, {0,1}.
i,p(t)= i frame p t.
= ,1(t1)
,2(t2) ,1(t3) ,2(t4), t1<t2<t3<t4 t1 t2 t3 t4
,
t1 1,
t2 2,
t3 1
t4 2
frames A1, A2, B1, B2
, 1
1. 0 backoff
( ), t1
1 backoff (
), t1=t1 +1.
:
(a) 1, 2, 1, 2 (t1<t2<t3<t4)
() ( t1, t2, t3, t4
).
, 0 1,
, ,
( ).
1 0, ,
,
.
, : ,1(t1) ,1(t1).
, 1,
2 backoff . t1=t1+1
2. 1
. ,
, backoff {0,1}.
1, backoff set,
{0,1,2,3}, .

,
0 ( ,) t2,
1 ( ),
t3=t2+1.

.
,2(t2) ,1(t3).
1 ( ,
),
2, (
backoff).
2 t4=t3+1. ,
(
). , ,2(t4), 1.

,
:
Prob[E] = Prob [ ,1(t1) ,1(t1) ,2(t2) ,1(t3) ,2(t4) ] =
Prob [,1(t1)] * Prob[B,B1(t1)] * Prob[,2(t2)] * Prob[B,B1(t3)] * Prob[B,B2(t4)]=
1/2*1/2*1/2*1/4*1=1/32.

9.
(LAN),
media access protocols:
random access protocol, Slotted Aloha.

Token Passing protocol


. .
.
, .
, ?
) .
throughput ? (
)
random access protocol back-to-back .
Token Passing protocol,
( )
.
) LAN .
throughput ? (
)
Token Passing protocol
. random access protocol,
packets loss .
10.

To ARP end-host IP / MAC

? / ?
ARP.

:
ARP IP LAN.
MAC B, P ?
IP (Host, Router) LAN ARP .
ARP : P/MAC LAN
< IP , MAC ,TTL>
TTL (Time To Live):
( 20 ).
A B,
ARP .
A (query) ARP, IP
B.

LAN ARP packet.


B ARP , A MAC
MAC (unicast).

You might also like