Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

LANs

Local Area Networks: Ethernet


Prof. Jean-Yves Le Boudec Prof. Andrzej Duda Prof. Patrick Thiran ICA, EPFL
CH-1015 Ecublens Patrick.Thiran@epfl.ch http://icawww.epfl.ch

LANs
2

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

PART A: The CSMA/CD method PART B: Network Aspects (Ethernet) PART C: CSMA/CA and wireless 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.

LANs
3

Part A: Motivation for LANs


o goal: connect computers in same site (building, small campus) o experience from host centric networks:bursty traffic o 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

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).

LANs
4

Access Method
o multiaccess communication = share a communication medium o examples radio channel, cellular networks, satellite links machine bus local area cable o multiaccess communication (= shared medium) requires an Access Method deterministic: Time Division Multiple Access (TDMA) Token Passing (Token Ring, Token Bus, FDDI) DQDB non-deterministic Aloha CSMA/CD CSMA/CA

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.

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 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

ring:

o cabling topology = layout of cables = star in most cases


l

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).

LANs
6

ALOHA
data central host

ack

transmission procedure
i = 1 i = 1 while (i <= maxAttempts) do while (i <= maxAttempts) do send packet send packet wait for acknowledgement or timeout wait for acknowledgement or timeout if ack received then leave if ack received then leave wait for random time wait for random time increment i increment i end do end do

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.

LANs
7

Throughput of Aloha
o Assumptions
l l l l l

Frames of same length, take T time units to be successfully transmitted between any two nodes; Infinite number of stations; Fresh traffic arrival process is Poisson (); Fresh arrival traffic always attempts to go through upon arrival; Backlogged stations retransmit independently from each other and from the arrival process, waiting a random time exponentially distributed, with mean 1/v, between consecutive attemps

o Number of generated frames is therefore a Poisson process of rate g(n) = ( + nv) for n backlogged stations o 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(-2T). 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(2T), therefore the maximum utilization is : s exp(-2T)T / s = T exp(-2T) 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 2T =1, and the value of the maximum is 1/2e = ca. 0.18.

LANs
8

Detailed Analysis : Slotted Aloha


o The analysis is simpler for slotted ALOHA. o Assumptions
l l l l 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; Number of stations is m; 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); Fresh arrival traffic always attempts to go through upon arrival; 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 slot o 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.

LANs
9

Detailed Analysis : Slotted Aloha


o Define
l

l l

A(n) = number of fresh arrivals during the tth time slot knowing that X(t-1) = n. Then m n i m n i P( A( n) = i) = E[ A(n)] = ( m n)qa i q a (1 qa ) B(n) = number of attempts from the backlogged stations to retransmit during the tth time slot knowing that X(t-1) = n.Then n n i P (B (n) = i ) = q ir (1 q r ) E[ B(n)] = nqr i G(n) = A(n) + B(n) = total number of frames generated during the tth slot when X(t-1) = n. g(n) = E[G(n)] = average frame generating rate during the tth slot when X(t-1) = n.
g (n) = E[G (n)] = (m n)qa + nqr

(n) = number of frames successfully transmitted during the tth slot knowing that X(t-1) = n P(T (n) = 1) = P ( A(n) = 1)P (B (n) = 0) + P( A(n) = 0)P (B (n) = 1)

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

( ) (1 q ) + nq (1 q ) (1 q ) (m n) q (1 q ) (1 q ) + nq (1 q ) (1 q )
= (m n ) q a 1 q a
a a

m n 1 m n

m n

n 1

m n

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.

LANs
10

Numerical Examples
oThroughput is thus approximately = g exp(-g) oThe maximum utilization is bounded by 1/e 0.36

g
m = 10 stations m = 50 stations

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

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 q r as explained above. Every value of (m, qa, qr) gives one point on one curve. A point is defined by x = G = offered load y = achieved throughput The dots represent the exact values for our model. The curve is the ideal relation y = x exp(-x).

LANs
11

ALOHA Instability
o Define 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 average l D(n) < 0 Fewer arrivals than departures, on the average l D(n) = 0 Equilibrium oFor m = all states of the Markov chain are transient (n)
g(n)exp(-g(n))

( m n ) qa

mq a

g (n) = ( m n)qa + nqr

mqr

LANs
12

CSMA
o Improvement 1: Listen before you talk: Carrier Sense Multiple Access

i = 1 i = 1 while (i maxAttempts) do while (i maxAttempts) do listen until channel idle listen until channel idle transmit immediately transmit immediately wait for acknowledgement or timeout wait for acknowledgement or timeout if ack received then leave if ack received then leave wait random time /* collision*/ wait random time /* collision*/ increment i increment i end do end do

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 T the 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.

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
i = 1 i = 1 while (i <= maxAttempts) do while (i <= maxAttempts) do listen until channel is idle listen until channel is idle transmit and listen transmit and listen wait until (end of transmission) or (collision detected) wait until (end of transmission) or (collision detected) if collision detected then if collision detected then stop transmitting /* after 32 bits (jam)*/ stop transmitting /* after 32 bits (jam)*/ else else wait for interframe delay wait for interframe delay leave leave wait random time wait random time increment i increment i end do end do

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

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.

LANs
14

CSMA/CD Time Diagram 1


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

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)

A
0 T

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

LANs
16

CSMA / CD Time Diagram 3


o A waits random time t1 o B waits random time t2 o B senses channel idle and transmits o A senses channel busy and defers to B o A now waits until channel is idle

A
0 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.

LANs
17

Exponential Backoff
o random time before re-transmission is given by:
k = min (10, AttemptNb) k = min (10, AttemptNb) r = random (0, 2kk -1) * slotTime r = random (0, 2 -1) * slotTime
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 = slotTime

second retransmission attempt (if preceding one failed):


k = 2; r = 0, 1, 2 or 3 * slotTime o when AttemptNb = 15, then abort transmission

LANs
18

Minimum Frame Size


A B

t = 0: A begins transmission
A B

t = 1- : B begins transmission
A B

t = 1 : B detects collision, stops transmitting


A B

t = 2- : A detects collision

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 network
l l l

slotSize= bandwidth - delay product + jam size + safety margin = 512 bits at 10 and 100 Mb/s, = 512 bytes at 1 Gb/s slotTime = slotSize / 10Mb/s = 51.2 s

o rule: in Ethernet, all frames must be as large as slotSize


l

the minimum data field: 46 bytes

o properties: P1: all collisions are detected by sources while transmitting P2: collided frames are shorter than slotSize
Proof: P1 see previous slide P2 because collided frame are aborted by source at the latest after slotTime, including jam bits

LANs
20

CSMA / CD performance
o Maximum utilization of Ethernet is difficult to determine analytically.
l

Approximation:

1/(1+ C)

where = / L = 2Db / bT = 2D/T


l
l

L = frame size, = bandwidth-delay product, D = propagation delay, T = transmission time


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

o 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

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

LANs
21

Proof
o Assumptions
l l l l l l

Frames of same length, take T time units to be transmitted between any two nodes; 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); Infinite number of stations; Fresh traffic arrival process is Poisson (); Fresh arrival traffic always attempts to go through upon arrival; 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 stations o 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 T cyc = 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

LANs
22

Part B: Ethernet / IEEE 802.3


o Ethernet =

CSMA/CD with exponential backoff as shown in part A originally over a coaxial cable 10 Mb/s to 1 Gb/s local area only (<= 0.2 to 2 kms ) o Ethernet history
1980 : Ethernet V1.0 (Digital, Intel, Xerox) 1982 : Ethernet V2.0 1985 : IEEE 802.3 standard
small differences in both specifications; adapters today support both 1995 : IEEE 802.3 100Mb/s standard

802.3 frame

Ethernet V.2 frame

preamble SFD DA SA Length NSAP data pad FCS

7 B 1 B = 10101011 6 B 6 B 2 B [46,1500]B

preamble SFD DA SA Type

data

4 B

FCS

DA = destination address SA = source address

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.

LANs
23

Ethernet v2 / IEEE 802.3


o Data link layer divided in 2 sublayers:
IEEE/802.3 frame Network Layer Network Layer LLC Sub-Layer LLC Sub-Layer MAC Sub-Layer MAC Sub-Layer Physical Layer Physical Layer

o Medium Access Control (MAC):


l l

Manages access to the physical layer Independent of physical layer Identifies protocol user destination in the header Error , flow control possible Independent of MAC sub-layer

}
data

Data link Layer Data link Layer preamble SFD DA SA Length

o Logical Link Control (LLC):


l l l

LLC Type data

NSAP(LLC) data pad FCS

Network Layer

LLC Sub-Layer MAC Sub-Layer

LANs
24

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

Examples. CISCO: 00:00:0C:::,

3COM: 02:60:8C:::

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

MAC address A
08:00:20:71:0d:d4

D
00:00:c0:3f:6c:a4

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

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 08:00:20:71:0d:d4 00:00:c0:3f:6c:a4 00:00:0c:02:78:36 FF:FF:FF:FF:FF:FF (a group address) (a SUN machine) (a PC ) (a CISCO router) the broadcast address

LANs
25

Ethernet Cabling
o Ethernet cabling is originally shared cable o Today: mainly point to point UTP - twisted pair o How is that possible ?
l l

Thick Coax

repeaters bridges

Thin Coax

UTP

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)

LANs
26

Repeaters
o Extend network beyond cable length limit o 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 = one collision domain o Even with repeaters, network is limited
l l l

Repeater

propagation time 51.2s slotTime includes repeaters at most 4 repeaters in one path

o Repeaters perform only physical layer functions (bit repeaters)

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-topoint 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 halfduplex 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.

LANs
27

From Repeaters to Hubs


o Multiport repeater (n ports) logically equivalent to: - n simple repeaters - connected to one internal Ethernet segment
Multiport Repeater

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

Ethernet Hub S1 S2 S3 to other hub Multiport ReUTP segment peater

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

LANs
28

From Bus to Star and Tree


o Ethernet today = active concentrators allow star wiring fiber o UTP on point-to-point configurations only Intermediate o remote network management Hub NMA o How many frames can be transmitted in parallel in this UTP network ? ______
Head hub NMA

coax console Intermediate Hub NMA coax Intermediate Hub NMA transceiver cable

NM Application

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.

LANs
29

Bridges
port 1 A
Repeater

port 3 Bridge C

Forwarding Table MAC MAC Port Port addr nbr addr nbr A A B B C C D D 1 1 2 2 3 3 2 2

port 2

B D

o Bridges are intermediate systems, or switches, that forward MAC frames to destinations based on MAC addresses o Bridges perform connectionless data forwarding o Bridges separate collision domains
l l

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

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

LANs
30

Repeaters and Bridges in OSI Model


Application 5 to 7 Presentation Session 4 3 2 1 Transport Network LLC MAC Physical Physical L2 PDU (MAC Frame) MAC Physical L2 PDU (MAC Frame) Application Presentation Session 5 to 7 Transport Network LLC MAC Physical 4 3 2 1

End System

Repeater

Bridge

End System

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

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

port 1 A
Repeater

Bridge

port 3 C

Forwarding Table MAC MAC Port Port Addr Nbr Addr Nbr

port 2

B D

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 ports o Bridge stores
l l l

the source number of the incoming frame the port from which the frame arrived the current time Forwarding Table MAC MAC Port Time Port Time addr Nb addr Nb A A B D 1 1 10:37 10:37

port 1 A
Repeater

Bridge

port 3 C

port 2

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 l l

the source number of the incoming frame the port from which the frame arrived the current time port 1 A
Repeater

Bridge

port 3 C

Forwarding Table MAC MAC Port Time Port Time addr Nb addr Nb A A B B 1 1 2 2 10:37 10:37 10:43 10:43

port 2

B D

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.

port 1 A
Repeater

Bridge

port 3 C

Forwarding Table MAC MAC Port Time Port Time addr Nb addr Nb A A 1 1 11:45 11:45

port 2

LANs
35

Spanning tree
o 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 ?
Connected port Blocked port

port 1 A
Repeater

Br A

port 3

port 2 port 2 B port 3 D port 1 Br B E

LANs
36

Switched Ethernet
o o o o Switched Ethernet = Bridge in the box Total bandwidth is not shared: parallel frame transmission An Ethernet Switch = Multiport Bridge is a connectionless data switch Ethernet used as a point-to-point mechanism!
Frame Switching Hub B1 Bridge Frame Switching Hub B2 Bridge 1 2 3 4 5

LANs
37

Todays Concentrators
concentrators (=hub) combine frame switching and port switching o frame switching = bridging o port switching = assign repeater ports to collision domains How many Ethernet segments (=collision domains) on the picture ?
Frame Switching Hub
B1

Frame Switching Hub


B2

Bridge

Bridge
3a

repeater

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

LANs
38

Todays Concentrators
concentrators (=hub) combine frame switching and port switching o frame switching = bridging o port switching = assign repeater ports to collision domains example: ports 3 and 4 at H2 are on one Ethernet segment
Frame Switching Hub
B1

Frame Switching Hub H1


B2

Bridge

Bridge
3a 3 4 5

H2

repeater

LANs
39

Todays Concentrators
concentrators (=hub) combine frame switching and port switching o frame switching = bridging o port switching = assign repeater ports to collision domains example: port 5 is switched to same Ethernet segment as 3 and 4
Frame Switching Hub
B1

Frame Switching Hub H1


B2

Bridge

Bridge
3a

H2

repeater

LANs
40

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

A B C D

X1 Virtual LAN Concentrator

X2 Virtual LAN Concentrator

L M N P

Virtual LAN Concentrator U V

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.

LANs
41

Full duplex Ethernet


o A shared medium Ethernet cable is half duplex o 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

LANs
42

Congestion Control
o A network of buffers require some form of congestion control P0
l

otherwise congestion collapse may occur reservations (ex: ATM) end-to-end (ex: TCP) hop by hop (ex: machine bus) STOP signal can be simulated by collisions on half duplex links on full duplex links: PAUSE ( n ) frames, where n is the duration of required stopping time

o Known forms of congestion control are


l l l

P1 P2 P3

P=0 P=1 P=2 STOP P=3 P=4 STOP GO

o Ethernet concentrators use hop-by-hop flow control


l l

P=5 P=6 P=7

LANs
43

Architecture versus Products


o architecture = set of protocols and functions defined by standards or proprietary specifications (SNA, Decnet, AppleTalk) examples: MAC layer, Ethernet Physical Layer Bridge, Repeater o Products = implementations of various architecture components examples: a concentrator that performs repeating, bridging an adapter that performs MAC + PHY frame switching performed store and forward cut 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.

LANs
44

Part C: CSMA/CA / IEEE 802.11


o Wireless LANs IEEE 802.11 architecture
l l l l

Basic block = BSS (Basic Service Set) All stations within a BSS share the same medium No central control, no connections to the outside world: ad-hoc network With a central control, connection to the outside world: base station = AP (Access Point) Multiple APs are interconnected by a distribution system (DS) to form an ESS (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 !

LANs
45

Why not just wireless Ethernet ?


o Problems with CSMA/CD:
l

l l

Difficult for the transmitting station to detect collision in a radio environment, and therefore to abort due to collision 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. Fading can cause the same problem as a hidden terminal. Time and space varying. Transmissions by users in other LANs can interfere with CSMA/CD operations.

LANs
46

o Source:

CSMA/CA (DCF)

i = 1 i = 1 while (i <= maxAttempts) do while (i <= maxAttempts) do set frame duration length in duration field set frame duration length in duration field listen until (channel is idle + DIFS) listen until (channel is idle + DIFS) transmit transmit wait for acknowledgement or timeout wait for acknowledgement or timeout if ack received then leave if ack received then leave wait random time /* collision*/ wait random time /* collision*/ increment i increment i end do end do

o Destination:
if data received then if data received then wait SIFS /* SIFS < DIFS */ wait SIFS /* SIFS < DIFS */ send ack send ack end if end if

o Others: add virtual CSMA to physical CSMA:


if data heard then if data heard then set NAV = frame duration + SIFS + Ack duration set NAV = frame duration + SIFS + Ack duration defer access until now + NAV defer access until now + NAV end if 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 Space DIFS = 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.

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

A (source) B (destination) others


DIFS

Data

SIFS

ACK

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

NAV

LANs
48

CSMA / CA (2)
o To solve the hidden terminal problem, use a handshake procedure:
l l

A (source) B (destination)
DIFS RTS SIFS CTS DIFS

others

RTS (Request-to-send) 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.

SIFS ACK

NAV (RTS) NAV (CTS)

Data

LANs
49

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

Aloha CSMA/CD CSMA/CA shared medium access protocol

Further recommended reading: Ethernet [Walrand Varaiya]chapter 3.1-3.2 [Halsall] chapters 6.3.2 and 7.3.2 [BG] chapter 4 Big-LAN FAQ Ethernet 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.5 Token Ring Network Architecture reference (IBM doc number SC30-3374-02)

You might also like