ethernet/íðnet Nobody is heard correctly. NET0183 Networks and Communications Lectures 5 and 6 Ethernet “Ethernet is named for the historical luminiferous ether through which electromagnetic radiations were once alleged to propagate.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 1 Historical Case Study http://portal.acm.org/beta/citation.cfm?id=360253 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 2 1. Background • “One can characterize distributed computing as a spectrum of activities varying in their degree of decentralization, with one extreme being remote computer networking and the other extreme being multiprocessing.” • “Remote computer networking is the loose interconnection of previously isolated, widely separated, and rather large computing systems.” – e.g. ALOHANET of 1970... • “Multiprocessing is the construction of previously monolithic and serial computing systems from increasingly numerous and smaller pieces computing in parallel.” – e.g. dual or multi-core processors in laptop computers of 2010... • “Near the middle of this spectrum is local networking…” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 3 The distributed computing spectrum in 1976. Mbps here is mega bit per second. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 4 http://en.wikipedia.org/wiki/Data_rate_units 3 10 6 10 MBps here is mega byte per second. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 5 http://en.wikipedia.org/wiki/Data_rate_units 9 10 12 10 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 6 http://www.ntt.co.jp/news/news06e/0609/060929a.html 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 7 Local Area Network http://en.wikipedia.org/wiki/Local_area_network A local area network (LAN) is a computer network covering a small physical area, like a home, office, or small group of buildings, such as a school, or an airport. The defining characteristics of LANs, in contrast to wide-area networks (WANs), include their usually higher data-transfer rates, smaller geographic area, and lack of a need for leased telecommunication lines. ARCNET, Token Ring and many other technologies have been used in the past, and G.hn may be used in the future, but Ethernet over twisted pair cabling, and Wi-Fi are the two most common technologies currently in use. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 8 “Just as computer networks have grown across continents and oceans to interconnect major computing facilities around the world, they are now growing down corridors and between buildings to interconnect minicomputers in offices and laboratories .” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 9 3. Design Principles • The network should be able to grow smoothly to accommodate several buildings. • The communication system must be inexpensive. • Control should be distributed to avoid the reliability problems of a central controller. – If a central controller goes down, the whole network is down. • The initial design of the Ethernet was based on ALOHANET. Ethernet is a broadcast packet switching network, and not a store and forward network like ARPANET. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 10 coaxial cable/samása strengur fibre optics/ljósþráðatækni 3. Design Principles • Like ALOHANET, Ethernet was expected to carry bursty traffic so that “conventional synchronous time-division multiplexing (STDM) would be inefficient”. – Allocating each node a time slot would be wasteful. Many time slots would go unused. • “The Ether is a logically passive medium for the propagation of digital signals and can be constructed using any number of media including coaxial cables, twisted pairs, and optical fibers.” • Several design innovations were also necessary, including the idea of detecting interference with a packet as it is being transmitted. – When we start to speak, if we hear many other voices speaking, we stop speaking because we know we will not be heard properly. We wait for a quieter moment. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 11 topology/grannfræði 3.1 Topology • A topology was chosen to make it easy to meet the changing needs of office and laboratory buildings. – “Any station wishing to join an Ethernet taps into the Ether at the nearest convenient point.” • The topology is that of an unrooted tree. – There is only one path between any source and destination, so avoiding multipath interference. – Being unrooted, the network can be extended from any point in any direction. – The tree is a logically passive medium. A failure of an active element should affect communications at a single node only. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 12 “Unlike an Aloha Network, which is a star network with an outgoing broadcast channel and an incoming multi-access channel, an Ethernet supports many-to- many communication with a single broadcast multi-access channel.” Some high-level network topologies. http://www.11h11.com/hugobox/chaku/NetworkTopologies.png 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 13 Terminator transceiver/sendiviðtæki Figure 1. A two-segment Ethernet. ©ACM Tap Segment #1 might be in one corridor with the network cable run under the floor or in the ceiling. Segment #2 might represent the cable being run down another corridor. A transceiver is a device that both transmits and receives signals. “A tap is a device for physically connecting to the Ether while disturbing its transmission characteristics as little as possible.” #1 #2 8/25/2009 Andy comments: This figure illustrates that a high-level topological map of a network can disguise the relationship between the nodes and the network cable. Ethernet is an unrooted tree regarding the cable. Stations tap into this unrooted tree. NET0183 Networks and Communications by Dr Andy Brooks 14 3.2 Control • Stations might attempt to transmit a packet at roughly the same time resulting in packets which overlap and which are unrecognisable to receivers. Packets are said to collide. • A station abandons a transmission when a collision has been detected. • Stations then attempt to retransmit packets after a random period of time. • Ethernet controllers in each station adjust the mean retransmission interval in proportion to the count of collisions. – As collisions increase, the random time intervals before retransmission increase. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 15 3.2 Control • “A station could usurp the Ether by not adjusting its retransmission interval with increasing traffic or by sending very large packets. Both practices are now prohibited by low-level software in each station.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 16 3.3 Addressing • Each packet has a source and destination specified in the packet´s header. • Any station can read a packet into its memory but normally only the destination station would do this. • A zero destination address is a wildcard which matches all addresses. – “A packet with a destination of zero is called a broadcast packet”. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 17 reliability/áreiðanleiki 3.4 Reliability • Packets may be lost because of noise or a downed receiver at a packet´s intended destination. – The Ethernet does not guarantee error-free communication. • “Protocols used to communicate through an Ethernet must assume that packets will be received correctly at intended destinations only with high probability.” – Applications have to deal with error recovery. • “This policy becomes more important as Ethernets are interconnected in a hierarchy of networks through which packets must travel farther and suffer greater risks.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 18 3.5.1 Carrier detection • A packet´s bits are phase encoded which means there is at least one transition each bit time. • Receivers can listen to the passing of a packet. • “... we speak of the presence of a carrier as a packet passes a transceiver.” • “With carrier detection we are able to implement deference: no station will start transmitting while hearing carrier.” • “With carrier detection, collisions should occur only when two or more stations find the Ether silent and begin transmitting simultaneously: within an Ether end-to-end propagation time.” – It takes time for signals to travel the length of the network cable. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 19 3.5.2 Interference detection • “Interference is indicated when the transceiver notices a difference between the value of the bit it is receiving from the Ether and the value of the bit it is attempting to transmit.” • A packet can be scheduled for retransmission as soon as it is found to have been damaged. • Only a fraction of packet time is wasted since damaged packets are truncated, in contrast to ALOHANET where colliding packets ran to completion. • The frequency of collisions is used to adjust retransmission intervals to help make better use of the communication channel. – As collisions increase, the random time intervals before retransmission increase. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 20 checksum/prófsumma 3.5.3 Packet error detection • During transmission a checksum is computed and added to a packet. When the packet is read from the Ether, the checksum is recomputed. – hardware checksum • Packets are discarded if the checksums are inconsistent. • “In this way transmission errors, impulse noise errors, and errors due to undetected interference are caught at a packet's destination.” Andy comments: A simple checksum breaks a message down into fixed-sized words and then adds the numeric value of these words together. Zero bits may have to be appended at the end of the message to have a properly-sized word. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 21 3.5.4 Truncated packet filtering • To reduce the processing load at listening stations, truncated packets (only a few bits) are filtered out in hardware. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 22 3.5.5 Collision consensus enforcement • “When a station determines that its transmission is experiencing interference, it momentarily jams the Ether to insure that all other participants in the collision will detect interference and, because of deference, will be forced to abort.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 23 4. Implementation • Parameters of the experimental Etherenet were: 1 kilometre, 3 megabits per second, and 256 stations. – 28 = 256 • The first byte of a packet was the destination address field. • The second byte of a packet was the source address field. • “256 is a number small enough to allow each station to get an adequate share of the available bandwidth and approaches the limit of what we can achieve with current techniques for tapping cables.” • Higher level protocols “can accommodate extended address spaces with additional fields inside the packet and software to interpret them”. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 24 4.1 Ether • The experimental ethernet was implemented using lowloss coaxial cable with off-the-shelf CATV taps and connectors. – CATV Community Antenna Television • A smaller-diameter coax was used within station clusters and a larger-diameter coax for low-loss runs between clusters. – Larger-diameter coax suffers less signal attenuation. • “The cost of coaxial cable Ether is insignificant relative to the cost of the distributed computing systems supported by Ethernet.” coaxial 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 25 4.2 Transceivers • The transceivers can tolerate everyday electrical noise from typewriters and electric drills. • “When unpowered, the transceievr disconnects itself electrically from the Ether.” • A broken transceiver should not bring down the whole Ethernet. – A watchdog circuit shuts down the transceiver if the output stage “acts suspiciously”. • “Even though our experimental transceivers are very simple and can tolerate only limited signal attenuation, they have proven quite adequate and reliable. A more sophisticated transceiver design might permit passive branching of the Ether and wider station separation.” – passive branching : without repeaters 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 26 4.3 Interface • The interface serializes and deserializes the parallel data used by its station. – bit bit bit...<->16-bit word, 16-bit word, 16-bit word • Interfaces have hardware to compute a 16-bit cyclic redundancy checksum (CRC) on serial data as it is transmitted and received. – CRCs provide protection against errors in the Ether and not against errors in the parallel portions of the interface hardware or station. • “Higher-level software checksums are recommended for applications in which a higher degree of reliability is required.” Andy comments: More and more checks to ensure that data has been transmitted correctly and that data has not be compromised by malware, means that more and more of the bandwidth is used just for checking. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 27 4.3 Interface • “When carrier goes away, the interface checks that an integral number of 16-bit words has been received and that the CRC is correct. The last word received is assumed to be the CRC and is not copied into the packet buffer.” – The packet buffer is in the station´s main memory. • “These interfaces ordinarily include hardware for accepting only those packets with appropriate addresses in their headers.” – Hardware address filtering reduces packet processing in software. • Interfaces had to be built for several different stations on the experimental ethernet. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 28 Fig. 2. Ethernet packet layout. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 29 4.4 Controller • A controller is station-specific firmware or software which controls getting packets on or off the Ether. • Retransmission intervals are multiples of a slot, “the maximum time between starting a transmission and detecting a collision.” – end-to-end round trip delay • “Each time a transmission attempt ends in collision, the controller delays for an interval of random length with a mean twice that of the previous interval,…” – “This heuristic approximates an algorithm we have called Binary Exponential Backoff.” • “When the network is unloaded and collisions are rare, the mean seldom departs from one and retransmissions are prompt.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 30 5. Growth 5.1 Signal Cover • To support growth of the network, a simple unbuffered packet repeater can be used to extend signal cover. • Using repeaters, however, makes the Ether active rather than passive. – When a transceiver goes down, only its station ceases communication. When a repeater goes down, communications are severed with a whole section of the network. • “We operate an experimental two-segment packet repeater, but hope to avoid relying on them.” – More sophisticated transceivers can be used instead of relying on repeaters to extend the signal cover. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 31 5. Growth 5.2 Traffic Cover • Adding more stations will eventually put too much load on the network. • One solution is to use packet filters. – An unbuffered traffic-filtering repeater. – A packet filter also extends the signal cover. • Packet filters only pass packets from one Ether segment to the other if the destination station is located on the new segment. Andy comments: Security firewalls can use packet filtering. Packets are inspected according to various rules and are passed through the firewall only if they do not break any rule. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 32 5. Growth 5.3 Address Cover • Experimental Ethernet has only an 8-bit address. Continued growth of the network will mean the number of stations will exceed 256. • Addresses can be extended down into a station by adding fields to identify ports or processes within a station. • Addresses can be extended up into the internetwork by adding fields to identify destination stations on remote networks. • Address cover can be extended using packet gateways. “A gateway repeats packets addressed to itself as an intermediary”. 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 33 5. Growth 5.3 Address Cover • A gateway also extends the signal and traffic cover. • “Failure of the single repeater connecting two segments partitions the network; failure of a gateway need not partition the net if there are paths through other gateways between the segments.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 34 protocol/samskiptareglur 7. Protocol “There is more to the construction of a viable packet communication system than simply providing the mechanisms for packet transport. Methods for error correction, flow control, process naming, security, and accounting must also be provided through higher-level protocols implemented on top of the Ether control protocol described in Sections 3 and 4 above.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 35 file transfer/skráaflutningur 7.2 EFTP • EFTP (Ethernet File Transfer Protocol) is one simple error-controlling packet protocol. – The first 16 bits are the destination and source addresses. – The second 16 bits contain the packet type. • data, ack, abort, end, endreply – The next 16 bits are a sequence number. – The next 16 bits are a length. – After a number of optional 16-bit data words, there is a 16-bit software checksum. • “The Ethernet´s hardware checksum is present only on the Ether and is not counted at this level of protocol.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 36 Fig. 4. EFTP packet layout ©ACM 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 37 7.2 EFTP • The software checksum protects against failures in parallel data paths within stations that are not checked by the CRC. • A file´s data packets are numbered from 0. • “Each data packet is retransmitted periodically by the sender until an ack packet with a matching sequence number is returned from the receiver.” • “When a packet arrives with a sequence number one less than that expected, it is acknowledged and discarded; the presumption is that its ack was lost and needs retransmission.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 38 7.2 EFTP • “When all the data has been transmitted, an end packet is sent with the next consecutive sequence number and than the sender waits for a matching endreply.” • “At any time during all of this, either side is free to decide communication has failed and just give up, it is considered polite to send an abort packet to end the communication promptly in the event of, say, a user-initiated abort or a file system error.” 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 39 7.2.3 EFTP shortcomings • The protocol only provides for file transfer between stations in a single network. – The protocol does not deal with processes within stations or with gateways between networks. • Different users of a station are not distinguished. • Files are unnamed. • Data is transmitted in integral numbers of 16-bit words. – What happens when the file is an odd number of bytes? 8/25/2009 NET0183 Networks and Communications by Dr Andy Brooks 40