Local Area Networks: Ethernet
Total Page:16
File Type:pdf, Size:1020Kb
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 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)d, id), [T+(i-1)d, T+ id), , [2T+(i-1)d, 2T +id), …, where T is the period and d 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 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 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 ack host transmission procedure ii == 11 whilewhile (i(i <=<= maxAttemptsmaxAttempts)) dodo sendsend packetpacket waitwait forfor acknowledgementacknowledgement oror timeouttimeout ifif ackack receivedreceived thenthen leaveleave waitwait forfor randomrandom timetime incrementincrement ii endend dodo • 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 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); 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 t exponentially distributed, with mean 1/v, between consecutive attemps o Number of generated frames is therefore a Poisson process of rate g(n) = (l + 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 q(n) = g(n)T exp (-2Tg(n)) o q(n) has maximum equal to 1/2e for gT=0.5 q 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. 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(l), one has thus qa = 1 - exp(- lT/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 slot o X(t) is a Markov chain (exercise).