Ethernet Savera Tanwir Ethernet • • • • • • • • • • Ethernet Cabling Manchester Encoding The Ethernet MAC Sublayer Protocol The Binary Exponential Backoff Algorithm Ethernet Performance Switched Ethernet Fast Ethernet Gigabit Ethernet IEEE 802.2: Logical Link Control Retrospective on Ethernet 1 Ethernet Cabling The most common kinds of Ethernet cabling. Ethernet Cabling (2) Three kinds of Ethernet cabling. (a) 10Base5, (b) 10Base2, (c) 10Base-T. 2 Ethernet Cabling (3) Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented. Ethernet Cabling (4) (a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding. 3 Ethernet MAC Sublayer Protocol Preamble Start of Frame = 7 bytes of 10101010 = 1 byte of 10101011 Alternating pattern of ones and zeros, ending with two consecutive 1-bits indicating that the next bit is the left-most bit in the left-most byte of the destination address Dest Source Length Data Pad Checksum = 6 bytes of MAC address = 6 bytes of MAC address = number of bytes of data = comes down from network layer = ensures 64 bytes (from Dest to checksum) = 4 bytes of CRC Why we need minimum Packet Size All frames must take more than 2t to send As soon as a station detects a collision, it sends a 32 bit jamming sequence and then stops transmission A station will minimally transmit 12 Bytes in case of collision (8 Byte Preamble + 4 Byte Jamming Sequence) 4 Binary Exponential Backoff Algorithm After a collision, time is divided into discrete slots with length equal to the worst-case delay (2τ) AFTER THE FIRST COLLISION, each station waits for 0 or 1 time slot before trying again If two stations pick up the same random number, they collide again, P(collision) = 0.5 AFTER THE SECOND COLLISION, each station now picks up either 0, 1, 2 or 3 slot times, P(collision) = 0.25 Binary Exponential Backoff Algorithm IF THE THIRD COLLISION OCCURS, each station picks the number of slots to wait at random, from ‘0’ to 23-1 In general, after ‘i ’ collisions, the random number between 0 to 2 i - 1 is chosen However, after 10 collisions, the expansion process is halted at a maximum of 1023 slots After 16 collisions, the NIC reports a failure to the computer 5 Binary Exponential Backoff Algorithm If the randomization interval for all collisions was 1023 max, the chances of collision would have been negligible But the average wait time be hundred of time slots, resulting into a significant delay On the contrary, if the stations delayed for either zero or one time slot, for say 100 stations, the only possibility of success would have been when 99 of the stations chose ‘1’ and one station chose ‘0’ or vice versa The randomization interval grows exponentially, offering pros of the two extremes and avoiding their bottlenecks Ethernet Performance If the mean frame takes t sec to transmit, when many stations have frames to send, channel efficiency η= t t + Tw We denote the frame length, F, the network bandwidth, B, the cable length, L, and speed of signal propagation, c, for the optimal case of e contention slots per frame. With t = F/B, we have (infinite stations) η= F /B 1 = F /B + 2e(L /c) 1+ 2BLe /cF 6 Ethernet Performance Efficiency of Ethernet at 10 Mbps with 512-bit slot times. Switched Ethernet A simple example of switched Ethernet. 7 Switched Ethernet Switch uses a high speed backplane between the connectors Each card forms its own collision domain Local (on-card) destinations are sent there directly Off-card are sent to the backplane Collisions among cards are impossible Each port forms its own collision domain (Using buffers) Collisions are impossible Ethernet Improvements Four data rates are currently defined for operation over optical fiber and twisted-pair cables 10 Mbps 100 Mbps 1000 Mbps 10 Gbps - Classical/Legacy Ethernet (IEEE 802.3) - Fast Ethernet (IEEE 802.3u) - Gigabit Ethernet (IEEE 802.3z) - 10-G Ethernet (IEEE 802.3ae) 8 Fast Ethernet Fully backward compatible with Legacy Ethernet Even minimum frame size is same (64 Bytes) Maximum collision diameter is 250 meters instead of 2500 meters The original fast Ethernet cabling. Gigabit Ethernet Supports two modes of operation Full-Duplex (default) All lines are buffered Therefore, CSMA/CD is not used in Full-Duplex mode (Just like in Fast Ethernet) Half-Duplex As Hubs don’t buffer, so collisions are possible Reducing the maximum collision diameter again was not attractive, so the minimum frame size was increased Gigabit Ethernet Carrier Extension Non-data, variable extension field used to extend the frame to 512 bytes 9 Gigabit Ethernet Frame Bursting extension Optionally allows a station to transmit a series of frames without relinquishing control of the transmission medium A station operating in burst mode may continue to initiate transmission of additional frames until it reaches a "burst limit" of 65,536 bits (8192 bytes) The transmitting MAC fills each inter-frame gap with extension bits Gigabit Ethernet (a) A two-station Ethernet. (b) A multistation Ethernet. 10 Gigabit Ethernet (2) Gigabit Ethernet cabling. IEEE 802.2: Logical Link Control (a) Position of LLC. (b) Protocol formats. 11 LLC Working The network layer on the sending machine passes a packet to LLC The LLC sublayer then adds an LLC header, containing DSAP, SSAP and a Control field which has sequence and acknowledgement numbers The first address indicates a Destination Service Access Point and the second address a Source Service Access Point Control field support the three modes These identify the higher-layer protocol which is using the LLC service Type 1 (Unacknowledged connectionless service) Type 2 (Reliable Connection-oriented service) Type 3 (Acknowledged Connectionless service) The resulting structure is then inserted into the payload field of an 802 frame and transmitted 12