9944e8b4c8df29f57d87da2d8a62795d.ppt
- Количество слайдов: 22
Repeaters can Mix 802. 3 PHY Standards Repeater RJ-45 10 Base-T UTP Repeater AUI Connectors BNC 10 Base 2 NIC Drop Cables 10 Base 5 Trunk Cable
802. 3 MAC Layer: Access Control • Media Access Control (MAC) Layer – Control over when a station may transmit – Only one station may transmit at a time with a hub – Otherwise, their signals would be scrambled Hub
802. 3 MAC Layer: Access Control • Access Control in Ethernet: CSMA/CD • Carrier Sense Multiple Access (CSMA) – Carrier sense = listen to traffic – Multiple access = control multiple stations
802. 3 MAC Layer: Access Control • Access Control in Ethernet: CSMA/CD • CSMA Operation – If no one else is transmitting, NIC may transmit – If anyone else is transmitting, NIC must wait until nobody is transmitting If No Incoming If Incoming Traffic, wait Traffic, send
802. 3 MAC Layer: Access Control • CSMA/CD • Collision Detection (CD) – If two stations transmit at the same time, each hears the other – Both stop, wait random amounts of time – Transmit after wait, but only if the line is free
802. 3 MAC Layer: Access Control • CSMA/CD • Collision Detection – If there is another collision – Stations back off a longer random time period – After 16 collisions, discard the frame
802. 3 MAC Layer: Access Control • Switches Do Not Need CSMA/CD – No danger of collision – Can even work in full duplex (802. 3 x), with NICs sending and receiving at the same time • However, Ordinary NICs Can Work With Switches – Only hear other traffic if the traffic is directed at them, so waits to transmit are rare and brief
802. 3 Ethernet MAC Layer Frame • MAC Standard Also Defines 802. 3 Ethernet MAC Frame – Header – Data Field – Trailer • Header Has Multiple Fields – Measure size in octets (bytes) Trailer Header Fields Data Field Ethernet Frame
802. 3 Ethernet MAC Layer Frame • Preamble and Start of Frame Delimiter – To synchronize receiver’s clock – Preamble is 56 -bit alternating 101010… pattern – SFD is 10101011 to end the synchronization – Together, 64 -bit synchronizing pattern FCS PAD Data Len SA DA Ethernet 802. 3 MAC Layer Frame SFD Pre
802. 3 Ethernet MAC Layer Frame • Destination Address Field – Address of destination device (receiver) • Source Address Field – Address of source device (sender) • 48 -bit MAC Addresses – Must be unique – All NICs are sold with unique MAC addresses FCS PAD Data Len SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Source and Destination Addresses are Expressed in Hexadecimal Notation (hex) – – Base 16 48 bits are divided into twelve 4 -bit units Each unit is represented by a hex symbol (0 -9, A-F) Grouped in pairs of symbols, followed by a lower-case h for Hex A 1 -BD-23 -0 C-09 -C 3 h FCS PAD Data Len SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Hex Symbols Bits 0000 0001 0010 0011 0100 0101 0110 Hex Symbol 0 1 2 3 4 5 6 Bits 1000 1001 1010 1011 1100 1101 1110 Hex Symbol 8 9 A B C D E
802. 3 Ethernet MAC Layer Frame • Length Field (2 Octets) – Length of the Data Field, not of the entire frame – Maximum data file size is 1500 octets PAD Data Len
802. 3 Ethernet MAC Layer Frame • Data Field – Frame of next higher layer, PAD Data LLC • PAD Field – 46 -octet minimum size for MAC data field plus PAD – If Data Field is smaller, add PAD field to bring data field plus PAD to 46 octets Len
802. 3 Ethernet MAC Layer Frame • Frame Check Sequence Field (2 Octets) – Error checking information – Sending computer computes FCS number and places it in FCS field – Uses cyclical redundancy check (CRC) method FCS PAD Data Len SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Frame Check Sequence (2 Octets) – Receiving NIC recomputes FCS number – If disagrees with transmitted FCS field, discards the frame! – Does not ask for a retransmission – A higher layer must do this FCS PAD Data Len SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Tag Fields Being Added – Added after address fields – To designate priority (frames with higher priority go first if there is congestion) – To designate VLANs (Ch. 8) – 802. 1 Q standardizes overall structure – 802. 1 p standardizes priority levels FCS PAD Data Len TCI TPID SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Tag Protocol ID (TPID) (2 Octets) – Located where length field normally goes – Identifies frame as tagged – If a length field, must be less than 1500, because the maximum length of the data field is 1500 octets – TPID field is given the value 81 -00 hex (33, 024 decimal) FCS PAD Data Len TCI TPID SA DA SFD Pre
802. 3 Ethernet MAC Layer Frame • Tag Control Information (TCI) (2 Octets) – Gives specific tagging information – Three priority bits (000 to 111) – Eight priority levels, with 111 being high – 12 -bit VLAN ID (see Chapter 8) – One bit canonical form indicator (rarely used) FCS PAD Data Len TCI TPID SA DA SFD Pre
Processing an Incoming MAC Frame • Receiving NIC reads Preamble and SFD – Synchronizes itself to the incoming bit stream • Receiving NIC reads Source and Destination Address – Discards frame if destination address is not its own – Saves addresses in RAM
Processing an Incoming MAC Frame • Reads Next two Octets – If Length field (values <= 1500), sets aside room in RAM for data field – If TPID, handles TCI information, then goes on and reads Length Field – Note: reads next two octets; Not “the length field” • Places Data Field in RAM • Discards PAD if Present – Note: sender adds the PAD, not the receiver
Processing an Incoming MAC Frame • Examines Frame Check Sequence – Recomputes the Value based on bits in other fields • If same value as transmitted, the frame is good – Passes deencapsulated data field to LLC layer • If different value than transmitted, frame is bad – Discards the frame – There is no error correction (retransmission)