49
LANs 1 Local Area Networks: Ethernet Prof. Jean-Yves Le Boudec Prof. Andrzej Duda Prof. Patrick Thiran ICA, EPFL CH-1015 Ecublens [email protected] http://icawww.epfl.ch

Local Area Networks: Ethernet - LCA/Members

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Local Area Networks: Ethernet - LCA/Members

LANs

1

Local Area Networks: Ethernet

Prof. Jean-Yves Le BoudecProf. Andrzej DudaProf. Patrick Thiran

ICA, EPFL

CH-1015 [email protected]://icawww.epfl.ch

Page 2: Local Area Networks: Ethernet - LCA/Members

LANs

The access method is a way of sharing a common transmission medium (cable, wireless link) between several hosts. Ethernet is built upon the medium access method called CSMA/CD (Carrier Sense Multiple Access/Collision Detection).

The network aspects explain how a local area network is built today. We will see that the resulting network is very far away from the original design.

2

Objective

o Understand shared medium access methods of Ethernet;o Describe network aspects of an Ethernet network;

PART A: The CSMA/CD methodPART B: Network Aspects (Ethernet)

PART C: CSMA/CA and wireless LANs

Page 3: Local Area Networks: Ethernet - LCA/Members

LANs

If you want to understand something in the world of local area networks, you should keep in mind the design requirements. Today, they are:•(1) interconnect many pieces of equipment without complex cabling, inside a limited geographical area, and inside one organization•(2a) be easy to manage, in particular, detect cable faults easily.

When Ethernet was first conceived, the requirements were a little bit different. The second requirement was replaced by:•(2b) use one shared cable for the entire network.

Today most people would agree that this is not necessarily a good idea, because fault isolation is difficult on a shared cable. Originally, it was believed to be good because it would reduce the amount of cabling, and because traffic is bursty.

Burstiness means that, most of the time, sources are idle; once in a while, they send a large amount of traffic. The response time is better with a shared medium system than if you allocate a fixed share to all (see exercise).

3

Part A: Motivation for LANs

o goal: connect computers in same site (building, small campus)o experience from host centric networks:bursty traffico basic idea: share a cable, no complex software in the end systems

o alternatives ?switch based LANs: connection oriented: ATM switch based LANs: connectionless. Switched Ethernet

Page 4: Local Area Networks: Ethernet - LCA/Members

LANs

• The purpose of the access method is to control access to the channel. If all stations talk at the same time, then no data can be understood by receivers (collision). Compare to a CB channel.• Deterministic access method require that stations talk only when they are authorized by the access protocol. With TDMA, time is divided into periodic slots; station i can use time intervals [(i-1)δ, iδ), [T+(i-1)δ, T+ iδ), , [2T+(i-1)δ, 2T +iδ), …, where T is the period and δ the slot duration. With n stations, only 1/n of the channel time is usable by one station. The scheme requires global synchronization; it does not support bursty traffic well (why ?), however it is simple to control. It is used in cellular and satellite systems.With a token passing schemes, there exists one global token that circulates among stations; in order to talk, a station must have the token; while talking, the token is kept by the station, which has to release it after a maximum token holding time. Token passing schemes allow a very high utilization even with sporadic traffic, as long as the bandwidth delay product is not too large (time is wasted while passing token from one station to the other).DQDB uses two buses on which endpoints generate trains of cells. To use a cell, a station must position a reservation bit in a cell on the opposite bus and use one of the empty cells going to the destination station.• Non deterministic (=collision based) schemes take an optimistic approach. Collisions are avoided if possible, but they may occur, and the schemes operate in such a way that they can be recovered from. Aloha is a primitive scheme which evolved to CSMA/CD, the access method of Ethernet. These schemes are simpler to implement than token passing schemes, but do not support as high utilization (time is wasted during collisions and during collision recovery times). Collision based schemes do not work well if the bandwidth delay product is high. A modified version is used in a wireless LAN such as WaveLAN: CSMA/CA (Collision Avoidance). In order to limit collisions, stations backoff a random interval before each transmission.

4

Access Methodo multiaccess communication = share a communication mediumo examples

radio channel, cellular networks, satellite linksmachine buslocal area cable

o multiaccess communication (= shared medium) requires an Access Methoddeterministic: Time Division Multiple Access (TDMA)

Token Passing (Token Ring, Token Bus, FDDI)DQDB

non-deterministic AlohaCSMA/CDCSMA/CA

Page 5: Local Area Networks: Ethernet - LCA/Members

LANs

5

Access Method Topology

o Logical Topology: l bus:

– all bits sent by one station are propagated to all stations– data die at the end of bus (terminators)– all stations see all frames (broadcast medium)– used by Ethernet, Token Bus, LocalTalk, Wireless LANs

l ring:– all bits pass from one station to the next one, then to its neighbour, etc– bits eventually return to the originating station that has to remove them– all stations see all frames– used by Token Ring and FDDI

o cabling topology = layout of cables = star in most casesl ring topology can be formed from the star layout of cables

CSMA/CD uses the bus logical topology, whereas token passing schemes such as Token Ring and FDDI use ring topologies.

The cabling topology is in general different from the logical topology. A simple network today uses a star topology: all cables go from a central point (the hub) to all end-systems. A more complex network uses a tree of stars.

It is the Token Ring network that first introduced a star based cabling topology; this because the designers of the Token Ring took requirement (2b) seriously. With the first Token Rings, cables from a station go to a hub containing electro-magnetic relays that would automatically bypass a station not correctly functioning (or powered off).

Page 6: Local Area Networks: Ethernet - LCA/Members

LANs

• ALOHA is the basis of all non-deterministic access methods. The ALOHA protocol was originally developed for communication between islands (University of Hawaï) using radio channels at low bit rates. • The ALOHA protocol requires acknowledgements and timers.Collisions occur, and if a packet is lost, then source has to retransmit; the retransmission strategy is not specified here; many possibilities exist. We will see the one used for CSMA/CD.• There is no feedback to the source in case of collision (was too complex to implement at that time). The picture shows a radio transmission scenario; Aloha can also be used on a cable (bus). •The maximum utilization can be proven to be 18% (see below). This is assuming an ideal retransmission policy that avoids unnecessary repetitions of collisions.

6

ALOHA

centralhost

i = 1while (i <= maxAttempts) do

send packetwait for acknowledgement or timeoutif ack received then leavewait for random time

increment iend do

i = 1while (i <= maxAttempts) do

send packetwait for acknowledgement or timeoutif ack received then leavewait for random time

increment iend do

transmission procedure

data

ack

Page 7: Local Area Networks: Ethernet - LCA/Members

LANs

7

Throughput of Alohao Assumptions

l Frames of same length, take T time units to be successfully transmitted between any two nodes; l Infinite number of stations; l Fresh traffic arrival process is Poisson (λ);l Fresh arrival traffic always attempts to go through upon arrival ;l Backlogged stations retransmit independently from each other and from the arrival process, waiting a

random time τ exponentially distributed, with mean 1/v, between consecutive attempso Number of generated frames is therefore a Poisson process of rate g(n) = (λ + nv) for n

backlogged stationso P(a packet is transmitted | n backlogged stations) = P(no collision | n backlogged stations) =

P(no packets generated during 2 T | n backlogged stations) = exp (-2Tg(n))o Average throughput when there are n backlogged stations is θ(n) = g(n)T exp (-2Tg(n)) o θ(n) has maximum equal to 1/2e for gT=0.5

gT

θ

• The maximum utilization is difficult to obtain and depends on a large number of parameters. We provide an upper bound.• We observe packet arrivals at one point on the medium. We assume that packet arrivals (fresh + retransmissions) are Poisson, and call µ the parameter. This assumption is not obvious. It has been shown to be valid if fresh traffic is Poisson, and if the retransmission policy is optimal. Other retransmission policies lead to worse utilizations, or even to unstable systems.• We assume that packet transmission time is constant, equal to T.• Consider a packet arriving at time t. The packet will be transmitted without collision iff no other packet arrives during time interval [t-T, t+T]. The probability of this to happen is exp(-2µT). • Over a long time interval s, the total number of packet arrivals is close to µs, the fraction of packets transmitted without collision is close to exp(-2µT), therefore the maximum utilization is :

µs exp(-2µT)T / s = µT exp(-2µT)

• µ is unknown and depends on the retransmission policy. However we can compute the maximum value of the utilization over all possible values of µ. The function is maximum for 2µT =1, and the value of the maximum is 1/2e = ca. 0.18.

Page 8: Local Area Networks: Ethernet - LCA/Members

LANs

8

Detailed Analysis : Slotted Aloha

o The analysis is simpler for slotted ALOHA.o Assumptions

l Transmissions are synchronized to start at the beginning of a time slot and last for exactly one time slot. Let T denote its length;

l Number of stations is m; l Fresh arrival with probability qa per unbacklogged station, 0 otherwise. Assuming total fresh

arrival traffic for the m stations is Poisson(λ), one has thus qa = 1 - exp(- λT/m); l Fresh arrival traffic always attempts to go through upon arrival;l Backlogged stations retransmit independently from each other wit h probability qr at each slot;

o Let X(t) denote the number of backlogged stations at the end of the tth time sloto X(t) is a Markov chain (exercise).

In this and the following slides we do a more detailed analysis.

The analysis is considerably simpler for slotted Aloha, which we assume in the rest of this chapter.

Page 9: Local Area Networks: Ethernet - LCA/Members

LANs

9

Detailed Analysis : Slotted Aloha

o Define l A(n) = number of fresh arrivals during the tth time slot knowing that X(t-1) = n. Then

l B(n) = number of attempts from the backlogged stations to retransmit during the tth time slot knowing that X(t-1) = n.Then

l G(n) = A(n) + B(n) = total number of frames generated during the tth slot when X(t-1) = n.l g(n) = E[G(n)] = average frame generating rate during the tth slot when X(t-1) = n.

l Θ(n) = number of frames successfully transmitted during the tth slot knowing that X(t-1) = n

l θ(n) = E[Θ(n)] = P(Θ(n)=1) average throughput during the tth slot when X(t-1) = n.

( ) inmiaa

qqi

nminA −−−

−== 1))((P

( ) inirr

qqin

inB −−

== 1))((P

aqnmnA )()]([E −=

rnqnB =)]([E

ra nqqnmnGng +−== )()]([E)(

( ) ( ) ( ) ( )( ) ( ) ( ) ( )

( ))(exp)(

1111)(

1111)(

)1)((P)0)((P)0)((P)1)((P)1)((P11

ngng

qqnqqqqnm

qqnqqqqnm

nBnAnBnAnT

nr

nm

rn

r

nm

nr

nm

rn

r

nm

aaa

aaa

−≈

−−+−−−≈

−−+−−−=

==+====

−−

−−−−

In this and the following slides we do a more detailed analysis.

The analysis is considerably simpler for slotted Aloha, which we assume in the rest of this chapter.

Page 10: Local Area Networks: Ethernet - LCA/Members

LANs

10

Numerical Examples

m = 50 stationsm = 10 stations

o The figure illustrates that the relation throughput ≈ g exp(-g) holds well for large m

oThroughput is thus approximately θ = g exp(-g)

oThe maximum utilization is bounded by 1/e ≈ 0.36

θ θ

gg

The figure shows results of the Markov chain analysis.

We have considered a number of possible values for the parameters m, qa and qr. For a given value of m, we vary qa and qr as explained above. Every value of (m, qa, qr) gives one point on one curve. A point is defined by

x = G = offered loady = achieved throughput

The dots represent the exact values for our model. The curve is the ideal relation y = x exp(-x).

Page 11: Local Area Networks: Ethernet - LCA/Members

LANs

11

ALOHA InstabilityoDefine D(n) = E[A(n)] - θ(n) = (m-n)qa – g(n)exp(-g(n)) as the “drift” in the system

l D(n) > 0 ⇒ More arrivals than departures, on the averagel D(n) < 0 ⇒ Fewer arrivals than departures, on the averagel D(n) = 0 ⇒ Equilibrium

oFor m = ∞ all states of the Markov chain are transient

aqnm )( −

ra nqqnmng +−= )()(

θ(n)

amq rmq

g(n)exp(-g(n))

Page 12: Local Area Networks: Ethernet - LCA/Members

LANs

CSMA improves on Aloha by requiring that stations listen before transmitting (compare to CB radio).Some collisions can be avoided, but not completely. This is because of propagation delays. Two or more stations may sense that the medium (= the channel) is free and start transmitting at time instants that are close enough for a collision to occur. Assume propagation time between A and B is 2 ms and that all stations are silent until time 0. At time 0, station A starts transmitting for 10 ms, at time 1 ms, station B has not received any signal from A yet, so it can start transmitting. At time 2ms, station B senses the collision but it is too late according to the protocol.The CSMA protocol requires that stations be able to monitor whether the channel is idle or busy (no requirements to detect collisions). It is a simple improvement to Aloha, at the expense of implementing the monitoring hardware.The effect of the CSMA protocol can be expressed in the following way. Call Tthe maximum propagation time from station A to any other stations; if no collision occurs during a time interval of duration T after A started transmitting, then A has seized the channel (no other station can send). CSMA works well only if the transmission time is much larger than propagation, namely bandwidth-delay product << frame size. It has the same stability problems as Aloha.In order to avoid repeated collisions, it is required to wait for a random delay before re-transmitting. If all stations choose the random delays independently, and if the value of the delay has good chances of being larger than T, then there is a high probability that only one of the re-transmitting stations seizes the channel.

12

CSMAo Improvement 1: Listen before you talk: ”Carrier Sense Multiple Access“

i = 1while (i ≤ maxAttempts) do

listen until channel idletransmit immediatelywait for acknowledgement or timeoutif ack received then leavewait random time /* collision*/increment i

end do

i = 1while (i ≤ maxAttempts) do

listen until channel idletransmit immediatelywait for acknowledgement or timeoutif ack received then leavewait random time /* collision*/increment i

end do

Page 13: Local Area Networks: Ethernet - LCA/Members

LANs

13

CSMA/CD

o improvement 2: detect collisions as soon as they occur :“Carrier Sense Multiple Access / Collision Detection”

o improvement 3: acknowledgments replaced by CD

o This is Ethernet (­ 802.3, the standard conformant version of Ethernet)

i = 1while (i <= maxAttempts) do

listen until channel is idletransmit and listenwait until (end of transmission) or (collision detected)if collision detected then

stop transmitting /* after 32 bits (“jam”)*/else

wait for interframe delay leave

wait random timeincrement i

end do

i = 1while (i <= maxAttempts) do

listen until channel is idletransmit and listenwait until (end of transmission) or (collision detected)if collision detected then

stop transmitting /* after 32 bits (“jam”)*/else

wait for interframe delay leave

wait random timeincrement i

end do

CSMA/CD is the protocol used by Ethernet. In addition to CSMA, it requires that a sending station monitors the channel and detects a collision.

The benefit is that a collision is detected within a propagation round trip time.

Collisions may still occur.

Page 14: Local Area Networks: Ethernet - LCA/Members

LANs

14

CSMA/CD Time Diagram 1

o A senses idle channel, starts transmitting

o shortly before T, B senses idle channel, starts transmitting

BA0

T

Page 15: Local Area Networks: Ethernet - LCA/Members

LANs

15

CSMA / CD Time Diagram 2

o A senses collision, continues to transmit 32 bits (“jam”)

o B senses collision, continues to transmit 32 bits (”jam“)

BA0

T

Jam bits are simply there to make sure the collision is long enough to be detected by the hardware.

Page 16: Local Area Networks: Ethernet - LCA/Members

LANs

16

CSMA / CD Time Diagram 3

o A waits random time t1o B waits random time t2o B senses channel idle and

transmitso A senses channel busy

and defers to Bo A now waits until

channel is idle

BA0

T

t2

t1

• CSMA/CD improves on CSMA by requiring that stations detect collisions and stop transmitting (after 32 bits, called jam bits, in order to ensure that all circuits properly recognize the presence of collisions).• CSMA/CD has better performance than Aloha or CSMA, but suffers from the same stability problems• After a collision is detected, stations will re-attempt to transmit after a random time.• Acknowledgements are not necessary because absence of collision means that the frame could be transmitted (see ”Minimum Frame Size“).• The interframe delay (“gap”) is 9.6 µs. It is used to avoid blind times, during which adapters are filtering typical noise at transmission ends.• The random time before retransmission is chosen in such a way that if repeated collisions occur, then the time increases exponentially. The effect is that in case of congestion (too many collisions) the access to the channel is slowed down.

Page 17: Local Area Networks: Ethernet - LCA/Members

LANs

17

Exponential Backoff

o random time before re-transmission is given by:

“AttemptNb” is the number of the re-transmission attempt that will be attempted after the random time (k=1 for the first retransmission);“random” returns an integer, uniformly distributed between the two bounds given in argument;

o examples:first retransmission attempt: k = 1; r = 0 or r = slotTimesecond retransmission attempt (if preceding one failed):k = 2; r = 0, 1, 2 or 3 * slotTime

o when AttemptNb = 15, then abort transmission

k = min (10, AttemptNb)r = random (0, 2k -1) * slotTimek = min (10, AttemptNb)r = random (0, 2k -1) * slotTime

Page 18: Local Area Networks: Ethernet - LCA/Members

LANs

18

Minimum Frame Size

t = 0: A begins transmission

t = 1- ε: B begins transmission

t = 1 : B detects collision, stops transmitting

t = 2- ε: A detects collision

A B

A B

A B

A B

Page 19: Local Area Networks: Ethernet - LCA/Members

LANs

19

Minimum Frame Size

o a minimum frame size equal to number of bits transmitted during one round trip is required to detect all collisions

o slotSize = number of bits transmitted by a source during the maximum round trip time for any Ethernet networkl slotSize= bandwidth - delay product + jam size + safety marginl = 512 bits at 10 and 100 Mb/s, = 512 bytes at 1 Gb/sl slotTime = slotSize / 10Mb/s = 51.2 µs

o rule: in Ethernet, all frames must be as large as slotSizel the minimum data field: 46 bytes

o properties:P1: all collisions are detected by sources while transmittingP2: collided frames are shorter than slotSize

Proof:

P1 see previous slideP2 because collided frame are aborted by source at the latest after slotTime, including jam bits

Page 20: Local Area Networks: Ethernet - LCA/Members

LANs

The formula with C= 3.1 is proven in the next slide. It is a pessimistic estimate.

20

CSMA / CD performance

o Maximum utilization of Ethernet is difficult to determine analytically. l Approximation:

θ ≈ 1 / ( 1 + C α )

where α = β / L = 2Db / bT = 2D/Tl L = frame size, β = bandwidth-delay product, D = propagation delay, T = transmission time

of a frame of size L, b = bit rate of the channel.l C is a constant : C = 3.1 is a pessimistic value; C = 2.5 is an approximate value based on

simulationso for a large network, β is close to 60 Bytes; for traffic with small frames (L = 64 bytes),

the utilization is less than 30 %. For large frames (1500 Bytes), it is around 90%.

o Key for high utilization is: bandwidth delay product << frame size

Page 21: Local Area Networks: Ethernet - LCA/Members

LANs

21

Proofo Assumptions

l Frames of same length, take T time units to be transmitted between any two nodes; l Maximal propagation delay D = αT/2 (worst case assumption: arrivals are always at alternate ends of the

network, namely, separated by the maximum propagation delay);l Infinite number of stations; l Fresh traffic arrival process is Poisson (λ);l Fresh arrival traffic always attempts to go through upon arrival ;l Backlogged stations retransmit independently from each other and from the arrival process, waiting a

random time τ exponentially distributed, with mean 1/v, between consecutive attempts

o Number of frames is therefore a Poisson process of rate g(n) = (λ + nv) for n backlogged stationso P(a generated packet is transmitted | n backlogged stations) = P(no collision | n backlogged

stations) = P(no packets generated during D | n backlogged stations) = exp (-Dg(n)) o Tcyc = E[Cycle time starting from a successful or aborted transmission | n backlogged stations] =

D + E[Time until next frame generated] + E[Time until transmission completes|success] P(successful transmission | n backlogged stations) +E[Time until transmission aborted|collision] P(collision | n backlogged stations) = T + 1/g(n) + T exp (-Dg(n)) + 2D (1 - exp (-Dg(n)))

o Average throughput when there are n backlogged stations is θ(n) = Tusefu l/Tcyc= T exp (-Dg(n))/Tcyc

o θ(n) has maximum for gD = 0.43, from which we get the formula

Page 22: Local Area Networks: Ethernet - LCA/Members

LANs

22

Part B: Ethernet / IEEE 802.3

o Ethernet = CSMA/CD with exponential backoffas shown in part Aoriginally over a coaxial cable10 Mb/s to 1 Gb/slocal area only (<= 0.2 to 2 kms)

o Ethernet history1980 : Ethernet V1.0 (Digital, Intel, Xerox)1982 : Ethernet V2.01985 : IEEE 802.3 standardsmall differences in both specifications; adapters today support both1995 : IEEE 802.3 100Mb/s standard

DA

SA

Type

data

FCS

DA

SA

Length

data

FCS

pad

802.3 frame Ethernet V.2 frame

DA = destination addressSA = source address

SFD

preamble

SFD

preamble

1 B =10101011

7 B

6 B

6 B

2 B

[46,1500]B

4 B

NSAP

The preamble is used for the receivers to synchronize (01010101… terminated by 0). With Ethernet, transmission starts asynchronously (stations start independently), and between transmissions, the channel is idle.SFD (start frame delimiter) is used to validate the beginning of a frame.Destination length is used to indicate the total length before padding. Padding is required if the minimum frame size of 512 bits = 64 bytes is not reached. With the Ethernet proprietary (=non standard) format, this field is not present. It is up to the layer using Ethernet to know that frames have to be at least 512 bits, and perform the padding. Maximum size of data part is 1500 Bytes (limitation imposed by buffer size considerations in adapters).The type field indicates the type of upper layer that uses the protocol (for example: IP or Appletalk). With 802.3, either the field length indicates the type user instead of the frame length, either this field is absent. It is replaced by an intermediate layer, called LLC that provides mainly this multiplexing function. LLC is not needed with the non-standard Ethernet. Type values are larger than the maximum size so both formats can exist on the same network (even on the same station). The FCS (frame check sequence) is a 32-bit cyclic redundancy check. It can detect all single, double, triple errors, all error bursts of length <= 32, most double bursts of length up to 17. The probability that a random collection of bit errors is undetected is 2e-10.

Ethernet works for a local area only. This is because the CSMA/CD protocol has poor utilization as the bandwidth-delay product becomes large compared to the frame sizes.

Page 23: Local Area Networks: Ethernet - LCA/Members

LANs

23

Ethernet v2 / IEEE 802.3

o Data link layer divided in 2 sub-layers:

o Medium Access Control (MAC):l Manages access to the physical

layerl Independent of physical layer

o Logical Link Control (LLC):l Identifies protocol user

destination in the header l Error , flow control possiblel Independent of MAC sub-layer

IEEE/802.3 frame

Network LayerNetwork Layer

LLC Sub-LayerLLC Sub-Layer

MAC Sub-LayerMAC Sub-Layer

Physical LayerPhysical Layer

} Data link LayerData link Layer

DA

SA

Length

data

FCSpad

SFD

preamble

NSAP(LLC)LLC Type

datadata

Network Layer LLC Sub-Layer MAC Sub-Layer

Page 24: Local Area Networks: Ethernet - LCA/Members

LANs

• Ethernet addresses are known as MAC addresses. Every Ethernet interface has its own MAC address, which is in fact the serial number of the adapter, put by the manufacturer.MAC addresses are 48 bit-long. The 1st address bit is the individual/group bit, used to differentiate normal addresses from group addresses. The second bit indicates whether the address is globally administered (the normal case, burnt-in) or locally administered. Group addresses are always locally administered.• When A sends a data frame to B, A creates a MAC frame with source addr = A,dest addr = B. The frame is sent on the network and recognized by the destination.• Some systems like DEC networks require that MAC addresses be configured by software; those are so-called locally administered MAC addresses. This is avoided whenever possible in order to simplify network management.• Data on Ethernet is transmitted least significant bit of first octet first (a bug dictated by Intel processors). Canonical representation thus inverts the order of bits inside a byte(the first bit of the address is the least significant bit of the first byte); examples of addresses:

01:00:5e:02:a6:cf (a group address)08:00:20:71:0d:d4 (a SUN machine)00:00:c0:3f:6c:a4 (a PC )00:00:0c:02:78:36 (a CISCO router)FF:FF:FF:FF:FF:FF the broadcast address

24

Addressing

o MAC address: 48 bits (6 bytes) = adapter nameo MAC addresses are provided by manufacturer.

l Examples. CISCO: 00:00:0C:::, 3COM: 02:60:8C:::

o sender puts destination MAC address in the frameo all stations read all frames; keep only if destination address matcheso all 1 address (FF:FF:FF:FF:FF:FF) = broadcast

MAC address A08:00:20:71:0d:d4

B C D00:00:c0:3f:6c:a4

01:00:5e:02:a6:cf (group address)

Page 25: Local Area Networks: Ethernet - LCA/Members

LANs

Contrary to the original design requirement, Ethernet cabling is today mainly point to point.

Why do network managers prefer point to point cabling?- because fault isolation is simpler- because configuration management is simpler

How is point to point cabling possible with a shared medium protocol?- using repeaters (shown on the next slide)- or using bridges (called Ethernet Switches)

25

Ethernet Cabling

o Ethernet cabling is originally shared cableo Today: mainly point to point UTP - twisted pairo How is that possible ?

l repeatersl bridges

Thick Coax

Thin Coax

UTP

Page 26: Local Area Networks: Ethernet - LCA/Members

LANs

26

Repeaterso Extend network beyond cable length

limito Function of a simple, 2 port repeater:

- repeat bits received on one port to other port- if collision sensed on one port, repeat random bits on other port

o One network with repeaters = onecollision domain

o Even with repeaters, network is limitedl propagation timel 51.2µs slotTime includes repeatersl at most 4 repeaters in one path

o Repeaters perform only physical layer functions (bit repeaters)

Repeater

From ethernet.faq:

There are limitations on the number of repeaters and cable segments allowed between any two stations on the network. There are two different ways of looking at the same rules:

1. The Ethernet way: A remote repeater pair (with an intermediate point-to-point link) is counted as a single repeater (IEEE calls it two repeaters). You cannot put any stations on the point to point link (by definition!), and there can be two repeaters in the path between any pair of stations. This seems simpler to me than the IEEE terminology, and is equivalent.

2. The IEEE way: There may be no more than five (5) repeated segments, nor more than four (4) repeaters between any two Ethernet stations; and of the five cable segments, only three (3) may be populated. This is referred to as the "5-4-3" rule (5 segments, 4 repeaters, 3 populated segments).

From 3Com, for 10 Mb/s Ethernet:

The 100BASE-T standard defines two classes of repeaters, called Class I and Class II repeaters. A collision domain can include at most one Class I or two Class II repeaters. Key topology rules are as follows:

• Using two Class II repeaters, the maximum diameter of the collision domain is 205 meters (typically 100m + 5m + 100m). With just a single Class II repeater in the collision domain, the diameter can be extended to 309 meters using fiber (typically 100m UTP + 209m fiber downlink). With a single Class I repeater in the collision domain, the diameter can be extended to 261 meters using fiber (typically 100m UTP + 161m fiber downlink). • Connecting from MAC to MAC (switch to switch, or end-station to switch) using half-duplex 100BASE-FX, a 412-meter fiber run is allowed. • For very long distance runs, a nonstandard, full-duplex version of 100BASE-FX can be used to connect two devices over a 2-kilometer distance. The IEEE is currently working on a standard for full duplex, but at this time all full-duplex solutions are proprietary.

Page 27: Local Area Networks: Ethernet - LCA/Members

LANs

27

From Repeaters to Hubs

o Multiport repeater (n ports)logically equivalent to:

- n simple repeaters - connected to one internal Ethernet segment

o Multi-port repeaters make it possible to use point-to-point segments (Ethernet in the box)

o Value of point to point cabling ?- ease of management- fault isolation

S1

S2

S3

to other hub

UTP segment

Multi-portRe-

peater

MultiportRepeater

Ethernet Hub

Repeaters are the first building block that made it possible to have point-to-point star based cabling.

Page 28: Local Area Networks: Ethernet - LCA/Members

LANs

The figure shows the “tree of stars topology” which is now typical for a large shared medium Ethernet.

However, we see on the next slides that large shared medium Ethernet are not common anymore, due to the introduction of switching or bridging.

28

From Bus to Star and Tree

IntermediateHub

Headhub

IntermediateHub

NMA

fiber console

coax

UTP

NM Application

coax

transceivercable

NMA

NMA

IntermediateHub

NMA

o Ethernet today = active concentrators allow star wiring

o UTP on point-to-point configurations only

o remote network managemento How many frames can be

transmitted in parallel in this network ? ______

Page 29: Local Area Networks: Ethernet - LCA/Members

LANs

A bridge is an intermediate system for the MAC layer. It receives MAC frames and forwards them further.

29

Bridges

o Bridges are intermediate systems, or switches, that forward MAC frames to destinations based on MAC addresses

o Bridges perform connectionless data forwardingo Bridges separate collision domains

l a bridged LAN maybe much larger than a repeated LANl there may be several frames transmitted in parallel in a bridged LAN

BridgeA

B

C

D

port 1

port 2

port 3MAC Port addr nbrMAC Port addr nbr

A 1B 2C 3D 2

A 1B 2C 3D 2

Forwarding Table

Repeater

Page 30: Local Area Networks: Ethernet - LCA/Members

LANs

30

Repeaters and Bridges in OSI Model

o Bridges are layer 2 intermediate systemso Repeaters are in layer 1 intermediate systemso There also exist layer 3 intermediate systems (IP routers) -> see next chapter

Transport

Network

Physical

ApplicationPresentation

Session

5 to 7

4

3

2

1

MAC

Physical Physical

MAC

Transport

Network

Physical

ApplicationPresentation

Session 5 to 7

4

3

2

1

MAC

L2 PDU(MAC Frame)

L2 PDU(MAC Frame)

End System Repeater Bridge End System

LLC LLC

Page 31: Local Area Networks: Ethernet - LCA/Members

LANs

31

Bridge learning

o Bridges build their forwarding tables by themselves (plug-and-play devices : management very easy). They are called transparent bridges.

o Initially: empty table

BridgeA

B

C

D

port 1

port 2

port 3MAC PortAddr NbrMAC PortAddr Nbr

Forwarding Table

Repeater

Page 32: Local Area Networks: Ethernet - LCA/Members

LANs

32

Bridge learning (2)o Frame arrives at one of the ports, destination not in the forwarding table : bridge

forwards copies of the frame to all its other portso Bridge stores

l the source number of the incoming framel the port from which the frame arrived l the current time

BridgeA

B

C

D

port 1

port 2

port 3MAC Port Timeaddr NbMAC Port Timeaddr Nb

A 1 10:37A 1 10:37

Forwarding Table

Repeater

Page 33: Local Area Networks: Ethernet - LCA/Members

LANs

33

Bridge learning (3)

o Frame arrives at one of the ports, destination address is in the forwarding table : bridge forwards copies of the frame only to the port

o Bridge stores l the source number of the incoming framel the port from which the frame arrived l the current time

BridgeA

B

C

D

port 1

port 2

port 3MAC Port Timeaddr NbMAC Port Timeaddr Nb

A 1 10:37B 2 10:43A 1 10:37B 2 10:43

Forwarding Table

Repeater

Page 34: Local Area Networks: Ethernet - LCA/Members

LANs

34

Bridge learning (4)

o No frame arrived from a particular source after some period of time (the aging time): this address is purged from the table.

BridgeA C

D

port 1

port 2

port 3MAC Port Timeaddr NbMAC Port Timeaddr Nb

A 1 11:45A 1 11:45

Forwarding Table

Repeater

Page 35: Local Area Networks: Ethernet - LCA/Members

LANs

35

Spanning treeo Works well as long as there is no loops.o If there is a loop: learning will cause a broadcast storm.o Bridges need to run a spanning tree algorithm first. The spanning tree will keep all

the nodes reahable by disabling some ports of some bridges to prevent loops.o Why is it useful to have loops in the connection of different LA Ns ?

Br AA

C

D

port 1

port 2

port 3

Repeater

Br B

BEport 3

port 2

port 1

Blockedport

Connectedport

Page 36: Local Area Networks: Ethernet - LCA/Members

LANs

36

Switched Ethernet

o Switched Ethernet = Bridge in the boxo Total bandwidth is not shared: parallel frame transmissiono An Ethernet Switch = Multiport Bridge is a connectionless data switcho Ethernet used as a point-to-point mechanism!

A

Bridge

B C D U

Bridge

V W X

1 2 3 4 5 1 2 3 4 5

Frame Switching Hub Frame Switching Hub

B1 B2

Page 37: Local Area Networks: Ethernet - LCA/Members

LANs

37

Today’s Concentrators

concentrators (=hub) combine frame switching and port switching o frame switching = bridgingo port switching = assign repeater ports to collision domainsHow many Ethernet segments (=collision domains) on the picture ?

A

Bridge

B C D U

Bridge

V W X

1 2 3 4 5 1 2 3 4 5

Frame Switching Hub Frame Switching Hub

B1 B2

repeater

3a

LAN concentrators perform both bridging and repeating. They can be configured by a network management application.

Page 38: Local Area Networks: Ethernet - LCA/Members

LANs

38

Today’s Concentrators

concentrators (=hub) combine frame switching and port switching o frame switching = bridgingo port switching = assign repeater ports to collision domains

example: ports 3 and 4 at H2 are on one Ethernet segment

A

Bridge

B C D U

Bridge

V W X

1 2 3 4 5 1 2 3 4 5

Frame Switching Hub Frame Switching Hub

B1 B2

repeater

3a

H2H1

Page 39: Local Area Networks: Ethernet - LCA/Members

LANs

39

Today’s Concentrators

concentrators (=hub) combine frame switching and port switching o frame switching = bridgingo port switching = assign repeater ports to collision domains

example: port 5 is switched to same Ethernet segment as 3 and 4

A

Bridge

B C D U

Bridge

V W X

1 2 3 4 5 1 2 3 4 5

Frame Switching Hub Frame Switching Hub

B1 B2

repeater

3a

H2H1

Page 40: Local Area Networks: Ethernet - LCA/Members

LANs

40

VirtualLAN

Concen-trator

Virtual LANs

o several bridged LANs consolidated on one physical layero uses ATM or proprietary methods

VirtualLAN

Concen-trator

VirtualLAN

Concen-trator

A

B

C

D

VU

L

M

N

P

X1 X2

X3

The picture shows two virtual LANs: (ACLNV) and (BDMPU). For each of the virtual LANs, there exists one or more collision domains per concentrator, plus one per inter-concentrator link. The concentrators perform bridging between the different collision domains of the same virtual LAN. Between X1 and X2, the two virtual LANs use the same physical link. If ATM is used, there is one VCC per virtual LAN.The advantage is that physical location becomes independent of LANs. For example, all servers and routers can be concentrated in the same rooms (ex: U and V)There is no communication between the different virtual LANs at layer 2.

Page 41: Local Area Networks: Ethernet - LCA/Members

LANs

41

Full duplex Ethernet

o A shared medium Ethernet cable is half duplexo Full duplex Ethernet = a point to point cable, used in both directions

l no access method, no CSMA/CD

o 100 Mb/s and Gigabit Ethernet switches use full duplex links to avoid distance limitations and to guarantee bandwidth for stations

Page 42: Local Area Networks: Ethernet - LCA/Members

LANs

42

Congestion Control

o A network of buffers require some form of congestion controll otherwise congestion collapse may occur

o Known forms of congestion control arel reservations (ex: ATM)l end-to-end (ex: TCP)l hop by hop (ex: machine bus)

o Ethernet concentrators use hop-by-hop flow controll STOP signal can be simulated by collisions on half

duplex linksl on full duplex links: PAUSE ( n ) frames, where n is the

duration of required stopping time

P=0P0

P=1P=2P=3

STOP

P1P2P3

STOP

GO

P=5P=6P=7

P=4

Page 43: Local Area Networks: Ethernet - LCA/Members

LANs

43

Architecture versus Products

o architecture = set of protocols and functionsdefined by standards or proprietary specifications (SNA, Decnet, AppleTalk)

examples: MAC layer, Ethernet Physical LayerBridge, Repeater

o Products = implementations of various architecture componentsexamples:

a concentrator that performs repeating, bridgingan adapter that performs MAC + PHY frame switching performed

store and forwardcut through

Bridging is a well defined architecture concept. Switching is a commercial name with different meanings depending on the context. In a LAN context, a switching Ethernet concentrator is simply a bridge.

Page 44: Local Area Networks: Ethernet - LCA/Members

LANs

44

Part C: CSMA/CA / IEEE 802.11

o Wireless LANs IEEE 802.11 architecturel Basic block = BSS (Basic Service Set)l All stations within a BSS share the same

mediuml No central control, no connections to the

outside world: ad-hoc networkl With a central control, connection to the

outside world: base station = AP (Access Point)

l Multiple APs are interconnected by a distribution system (DS) to form anESS (Extended Service Set)

BSS

BSS

BSS

AP

AP

DS

IEEE 802.11 is the standardized protocol for wireless LANs. Nodes can be fixed or mobile: it supports mobility, handover

Bit Rate: 1 to 2 Mbps. Much less than in any Ethernet !

Page 45: Local Area Networks: Ethernet - LCA/Members

LANs

45

Why not just wireless Ethernet ?

o Problems with CSMA/CD: l Difficult for the transmitting station to

detect collision in a radio environment, and therefore to abort due to collision

l Even if transmitter detects collision, it can be hidden by physical obstruction from other stations, which can not detect its transmission. A collision may then occur at the receiver.

l Fading can cause the same problem as a hidden terminal. Time and space varying.

l Transmissions by users in other LANs can interfere with CSMA/CD operations.

Page 46: Local Area Networks: Ethernet - LCA/Members

LANs

46

CSMA/CA (DCF)o Source:

i = 1while (i <= maxAttempts) do

set frame duration length in duration fieldlisten until (channel is idle + DIFS)transmitwait for acknowledgement or timeoutif ack received then leavewait random time /* collision*/increment i

end do

i = 1while (i <= maxAttempts) do

set frame duration length in duration fieldlisten until (channel is idle + DIFS)transmitwait for acknowledgement or timeoutif ack received then leavewait random time /* collision*/increment i

end do

if data received thenwait SIFS /* SIFS < DIFS */send ack

end if

if data received thenwait SIFS /* SIFS < DIFS */send ack

end if

o Destination:

o Others: add virtual CSMA to physical CSMA:

if data heard thenset NAV = frame duration + SIFS + Ack durationdefer access until now + NAV

end if

if data heard thenset NAV = frame duration + SIFS + Ack durationdefer access until now + NAV

end if

The first network of Apple (Appletalk) was CSMA/CA (collision avoidance) at 230.4 kb/s.

The mode of CSMA/CA described here is valid for the Distributed Coordination Function (DCF), which is the contention (best-effort) service always implemented in IEEE 802.11. The contention-free service, called Point Coordination Function (PCF), is optional.

SIFS = Short Interframe SpaceDIFS = Distributed Interframe Space

CS (carrier sensing) is done at the physical and MAC layers:Physical CS is performed by stations at the air interface, by analyzing the presence of all detected packets and relative strength of signals from other sources. Virtual CS is used at by a source station to inform all stations (except maybe those hidden to the source) inside a BSS the time during which the channel will be busy. The frame duration of the source is set in a field contained in the header. The stations adjust their NAV (Network Allocation Vector), which indicate the amount of time that will elapse before the current transmission is complete.

Page 47: Local Area Networks: Ethernet - LCA/Members

LANs

47

CSMA / CA (1)

o Because SIFS < DIFS, acks have priority over data packets

o NAV does not solve completely the hidden terminal (and fading) problems

o Retransmissions use exponential backoff

B (destination)A (source)

DIFS

others

SIFS NA

V

Data

ACK

The NAV is helpful for stations hidden from the receiver, but not from the transmitter.

Page 48: Local Area Networks: Ethernet - LCA/Members

LANs

48

CSMA / CA (2)

o To solve the hidden terminal problem, use a handshake procedure: l RTS (Request-to-send)l CTS (Clear-to-send)

o CTS reserves the channel to the source for the duration indicated in duration field.

o Collisions can only occur during the short RTS and CTS

o All stations in the range of A adjust their NAV thanks to duration field indicated in RTS.

o All stations in the range of B adjust their NAV thanks to duration field indicated in CTS.

o Stations can choose to use CTS/RTS or not.

B (destination)A (source)

DIFS

others

SIFS NA

V (

RT

S)Data

ACK

DIFS

SIFS

RTS

CTS

NA

V (

CT

S)

Page 49: Local Area Networks: Ethernet - LCA/Members

LANs

Further recommended reading:

Ethernet[Walrand Varaiya]chapter 3.1-3.2[Halsall] chapters 6.3.2 and 7.3.2[BG] chapter 4Big-LAN FAQEthernet FAQ

Token Bus, Token Ring, FDDI, 100VG, Wireless LANs, other LANs[Walrand Varaiya]chapter 3.3-3.8[Halsall] chapters 6 and 7[BG] chapters 4.5.3 and 4.5.5Token Ring Network Architecture reference (IBM doc number SC30-3374-02)

49

Facts to Remember

o Computers communicate in a local area network using Ethernet and MAC addresseso A MAC address is the serial number of the Ethernet adapter o Original Ethernet is a shared medium: one collision domain per LANo Using bridging we can have several collision domains per LANo An Ethernet switch uses bridgingo Repeaters are bit-forwarding devices inside one Ethernet segmento Bridges are connectionless intermediate systems that separate Ethernet segmentso IEEE 802.11 (wireless LANs) : no collision detection and hidden terminal problemo Concepts you should know

l Alohal CSMA/CDl CSMA/CAl shared medium access protocol