<<

IEEE 802 Architecture

802.1 Network Connection Technology Lecture 07 IEEE802.2 and LLC Data 802.2 LLC Link Layer

Kuang-hua Chen 802.3 802.4 802.5 802.6 802.9 802.11 802.12 AX3T9.5 MAC CSMA Token- Token- DQDB Isochro- Wireless 100VG- FDDI Department of Library and Information Science /CD Bus Ring nous LAN AnyLAN Ethernet PHL National Taiwan University

Language & Information Processing System, LIS, NTU 7-1 Language & Information Processing System, LIS, NTU 7-2

Baseband IEEE 802.3 LANs IEEE 802.3 Cabling

10Base5 10Base2 10BaseT

Language & Information Processing System, LIS, NTU 7-3 Language & Information Processing System, LIS, NTU 7-4

Network Adapter in IEEE 802

Interface to station Higher • Data link layer is partitioned into two sublayers – Logical Link Control (LLC) Adapter Logic Control – (MAC) Encapsulation Data Link Layer • MAC is a protocol defining how to use the En/Decoding Physical transmission media Layer transceiver – CSMA/CD: bus structure transmit/receive – Token-Bus: token in bus structure – Token-Ring: token in ring structure

Language & Information Processing System, LIS, NTU 7-5 Language & Information Processing System, LIS, NTU 7-6 LLC Specifications of LLC

• The different MACs use the same LLC in IEEE • Interface between the protocol of network layer 802 • Interface between the protocol of MAC • This make the higher level protocol independent of the real structure of LAN • Protocol to the LLC of other machines • The main tasks of LLC Network Layer Network Layer – control the exchange of signal LLC LLC – control the data flow MAC MAC – interpret the requests from the higher level protocol Physical Layer and make responses transmission – overcome the transmission errors media

Language & Information Processing System, LIS, NTU 7-7 Language & Information Processing System, LIS, NTU 7-8

Service Access Point Example of SAP

• There are different protocols running in network Network Layer layer IP IPX • LLC should identify which protocol the incoming data unit belongs to • The use of SAP could smooth the process of SAPs data transfer LLC LLC Protocol Data Unit (LLC PDU) MAC 1 1 1 or 2 0 ~ n byte Physical Layer DSAP SSAP Control Field Message

Language & Information Processing System, LIS, NTU 7-9 Language & Information Processing System, LIS, NTU 7-10

Interface between Network Layer Primitives

• Four difference services • Request request response confirm Network – Type 1: does not provide connection oriented • Indication Layer Indication Service • Confirm • Datagram service LLC LLC – Type 2: provide connection-oriented service MAC MAC – Type 3: the same as Type 1, but will response an Physical Layer Physical Layer “acknowledgement” message

– Type 4: provide the above services transmission media

Language & Information Processing System, LIS, NTU 7-11 Language & Information Processing System, LIS, NTU 7-12 Type 1 Services Type 2 Services

• DL_UNITDAT.request • Connection establishment • DL_UNITDAT.indication – DL_CONNECT.request – DL_CONNECT.indication – DL_CONNECT.response – DL_CONNECT.confirm • Data transfer – DL_DATA.request – DL_DATA.indication

Language & Information Processing System, LIS, NTU 7-13 Language & Information Processing System, LIS, NTU 7-14

Type 2 Services (Continued) Type 3 Services

• Connection resetting • DL_DATA_ACK.request – DL_RESET.request • DL_DATA_ACK.indication – DL_RESET.indication • DL_DATA_ACK_STATUS.indication – DL_RESET.response • DL_REPLY.request – DL_RESET.confirm • DL_REPLY.indication • Connection flow control • DL_REPLY_STATUS.indication – DL_CONNECTION_FLOWCONTROL.request • DL_REPLY_UPDATE.request – DL_CONNECTION_FLOWCONTROL.indication • DL_REPLY_UPDATE_STATUS.indication

Language & Information Processing System, LIS, NTU 7-15 Language & Information Processing System, LIS, NTU 7-16

LLC/MAC Interface LLC Protocol

• LLC uses the services provided by MAC to • Unnumbered Commands transfer LLC PDU • Information Transfer Command • MAC uses the following primitives – used to transfer Type 2 services – MA_UNITDATA.request • Supervisory Commands – MA_UNITDATA.indication – used to manage the usage of connection – MA_UNITDATA.STATUS.indication

Language & Information Processing System, LIS, NTU 7-17 Language & Information Processing System, LIS, NTU 7-18 Information Transfer Command Unnumbered Commands (U-Command) (I-Command) • N(S): the sequence of this data DSAP SSAP Control Field Message • N(R): the sequence of data should be received next time from DSAP 1 1 0 0 P/F 0 0 0 Unnumbered Information Command (UI) 1 1 0 1 P/F 1 0 1 Exchange Identification Command (XID) DSAP SSAP Control Field Message 1 1 0 0 P/F 1 1 1 Test Command (TEST) 1 1 1 1 P/F 1 1 0 Set Asynchronous Balanced Mode Extended Command (SABME) 1 1 0 0 P/F 1 1 0 Unnumbered Acknowledgement (UA) 1 1 1 1 P/F 0 0 0 Disconnected Mode response (DM) 1 1 0 0 P/F 0 1 0 Disconnect Command (DISC) 1 1 0 0 P/F 0 0 1 Frame Reject Response (FRMR) 0 Send Count-N(S) P/F Receive Count-N(R)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Language & Information Processing System, LIS, NTU 7-19 Language & Information Processing System, LIS, NTU 7-20

Sliding Window Example

• N(S): sequence number of the data unit A B 7 0 7 0 • N(R): sequence number of the next data unit Send 6 1 Receive 6 1 Window Window which be sent 5 2 5 2 N(R) N(S) 4 3 4 3 A 5 3 B 7 0 7 0 • The data transmitted by A is 3 and A hopes that Receive 6 1 Send 6 1 Window Window it will receive the data with sequence number 5 5 2 5 2 from B 4 3 4 3

Language & Information Processing System, LIS, NTU 7-21 Language & Information Processing System, LIS, NTU 7-22

Example (2) Example (3)

A B A B 7 0 7 0 7 0 7 0 Send 6 1 Receive 6 1 Send 6 1 Receive 6 1 Window Window Window Window 5 2 5 2 5 2 5 2 4 3 4 3 4 3 N(S) N(R) 4 3 N(R) N(S) 0 1 0 0 N(S) N(R) 1 1 7 0 7 0 7 0 7 0 Receive 6 1 Send 6 1 Receive 6 1 Send 6 1 Window Window Window Window 5 2 5 2 5 2 5 2 4 3 4 3 4 3 4 3

Language & Information Processing System, LIS, NTU 7-23 Language & Information Processing System, LIS, NTU 7-24 Example (4) Example (5) #1 message lost A B A B 7 0 7 0 7 0 7 0 Send 6 1 Receive 6 1 Send 6 1 Receive 6 1 Window Window Window Window 5 2 N(R) N(S) 5 2 5 2 5 2 4 3 2 1 4 3 4 3 4 3 N(S) N(R) N(R) N(S) 2 1 2 2

7 0 N(R) N(S) 7 0 7 0 7 0 6 1 2 3 6 1 6 1 6 1 Receive 5 2 Send 5 2 Receive 5 2 Send 5 2 Window 4 3 Window 4 3 Window 4 3 Window 4 3

Language & Information Processing System, LIS, NTU 7-25 Language & Information Processing System, LIS, NTU 7-26

Supervisory Commands Example (6) (S-Command) • Receive Ready (RR): receive side is ready A B 7 0 7 0 • Receive Not Ready (RNR): receive side is not Send 6 1 Receive 6 1 Window Window ready to receive data 5 2 5 2 4 3 4 3 • Reject (REJ): reject the request N(R) N(S) 3 1 DSAP SSAP Control Field Message 7 0 7 0 6 1 6 1 0 0 0 P/F 1 Receive Count-N(R) RR Send 1 0 0 1 P/F Receive 5 2 5 2 Receive Count-N(R) RNR Window Window 1 0 1 0 P/F 4 3 4 3 Receive Count-N(R) REJ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Language & Information Processing System, LIS, NTU 7-27 Language & Information Processing System, LIS, NTU 7-28

Construct Connection: An Overall View IEEE 802.3 CSMA/CD

• Construct a connection via U-command • Sublayer of Data Link Layer – DL_CONNECT.request (s3-s2) – SAMBE (s2-d2) – MAC Service Specification – MA_UNIDATA.request (s2LL-s2MAC): encapsulate SAMBE LLC FRAME to MAC FRAME – CSMA/CD Protocol – MA_UNIDATA.indication (d2MAC-d2LLC): decapsulate MAC • Physical Layer FRAME to SAMBE LLC FRAME – DL_CONNECT.indication (d2-d3) – Physical Layer Signaling (PLS) – DL_CONNECT.response (d3-d2) – UA (d2-s2) – Attachment Unit Interface (AUI) • The connection between SSAP and DSAP is constructed – Medium Attachment Unit (MAU) • N(S) and N(R) are set to be 0 – DL_CONNECT.confirm (s2-s3)

Language & Information Processing System, LIS, NTU 7-29 Language & Information Processing System, LIS, NTU 7-30 MAC Data Unit of MAC

7 1 2,6 2,6 2 4 byte • Responsible for fulfill CSMA/CD task Preamble SFD DA SA LEN LLC PAD FCS • Encapsulation – Encapsulate the data unit from LLC Preamble: 7 bytes, 101010...1010, synchronization SFD (Start Frame Delimiter): 1 byte, 10101011 – Attach the header: SFD, DA, SA, Length DA (Destination Address): 2 or 6 bytes – Attach the tailor: PAD, FCS SA (Source Address): 2 or 6 bytes LEN: 2 bytes, the length of LLC PDU • Decapsulation LCC: at most 1500 bytes PAD (Padding): if the length of LLC is less than 46 bytes, this field is stuffed with some meaningless data FCS (Frame Check Sequence): CRC-32

Language & Information Processing System, LIS, NTU 7-31 Language & Information Processing System, LIS, NTU 7-32

Collision Detection Length Consideration

Packet starts Packet almost • To detect the collision, the at time 0 at B at τ-ε –2τ=51.2µsec – 10Mbps – 51.2*10-6*107= 512 bits = 64 bytes

Noise burst gets • DA+SA+LEN+FCS = 18 bytes back to A at 2τ – LLC < 46, stuff it with some data

Collision at • Avoid a machine occupies resource, a PDU is time τ restricted to 1518 bytes (1500+18 bytes)

Language & Information Processing System, LIS, NTU 7-33 Language & Information Processing System, LIS, NTU 7-34

Destination and Source Address Multicast and Broadcast

• IEEE 802.3 allows DA and SA to be 2 bytes or • Destination Address 6 bytes long • I/G = 1: Group Address • All stations in networks should use the same • Multicast: each station in the group will receive scheme I/G 15-bit Address the data I/G U/L 46-bit Address • Broadcast: all stations in the network will I/G = 0 Individual Address receive the data (all bits in DA are set to be 1) I/G = 1 Group Address U/L = 0 Globally Administered Address U/L = 1 Locally Administered Address

Language & Information Processing System, LIS, NTU 7-35 Language & Information Processing System, LIS, NTU 7-36 Checksum Algorithm International Standard Polynomials

• Assume the frame to be sent is M(x) • CRC-12 =+++++XXXXX12 11 3 2 1 • Let r be the degree of G(x) (here CRC-32). • Append r zero bits to the low-order end of the frame, • CRC-16 =+++XXX16 15 2 1 so it now contains m+r bits and corresponds to the r polynomial x M(x) =+++++++XXXXXXX32 26 23 22 16 12 11 r • CRC-32 •Divide xM(x) by G(x) using modulo 2 division 1087542 • Subtract the remainder from the bit string X+++++++ XXXXXX1 corresponding to xrM(x) using modulo 2 subtraction. 16 15 5 • The result is the checksummed frame to be transmitted • CRC-CCITT =+++XXX1

Language & Information Processing System, LIS, NTU 7-37 Language & Information Processing System, LIS, NTU 7-38

Polynomial Code Checksum CSMA/CD Protocol

• When a station has data to send, it first listens to the channel to see if anyone else is transmitting • When it detects an idle channel, it transmits frames Frame: 1 1 0 1 0 1 1 0 1 1 Generator: 1 0 0 1 1 • While transmitting frames, it continues detecting to Message after appending 4 zero bits: 1 1 0 1 0 1 1 0 1 1 0 0 0 0 see if any collision occurs. • If collision occurs, it sends a jamming signal to Transmitted Frame: 1 1 0 1 0 1 1 0 1 1 1 1 1 0 force the collision worse and to make all stations know the collision • It then waits a random period of time, and tries again

Language & Information Processing System, LIS, NTU 7-39 Language & Information Processing System, LIS, NTU 7-40

CSMA/CD State Binary Exponential Backoff Algorithm

• After a collision, time is divided up into discrete Contention t0 Slots slots, whose length is equal to the 2τ • After the first collision, each station waits either 0 or 1 slot times before trying again Frame Frame Frame Frame • After the second collision, each station waits

Transmission Contention Idle either 0, 1, 2, or 3 slot times at random Period Period Period

Time • After the nth collision, the number of slots to wait is chosen at random from the interval 0 to 2n-1

Language & Information Processing System, LIS, NTU 7-41 Language & Information Processing System, LIS, NTU 7-42 Heavy Collision How to Listen to the Media

• In general, after ten collisions have been • 1-Persistent reached, the randomization interval is frozen at – keep on listen to the medium a maximum of 1023 slots. – while channel is idle, transmitting data immediately • After 16 collisions, the controller throws in the • P-Persistent towel and reports failure back to the computer – while channel is idle, whether transmitting data is based on a probability p • Further recovery is up to higher layers • 0-Persistent – sense a busy channel, back off immediately, and do not sense until an interval selected at random

Language & Information Processing System, LIS, NTU 7-43 Language & Information Processing System, LIS, NTU 7-44