eda29e00ec0fc343c11eed948736eedd.ppt
- Количество слайдов: 29
Layer 2 Data Framing for Fun and Profit Eric L. Michelsen 4/27/2001 Inductive Logic
Where In the Stack Are We? OSI 7. Application 6. Presentation 5. Session Link Layer Sublayers 4. Transport 3. Network 2. Link 1. Physical 4/27/2001 1490 PPP Frame AAL 2 AAL 5 Relay HDLC Ether- 802. 2 Novell SNAP net II (LLC) IPX ATM Bit serial (V. 35, HSSI, DS 1, DS 3, etc. ) Inductive Logic Ethernet 2
Layers Upon Layers • • • Synchronous HDLC (SDLC) RFC 1662 (Asynchronous HDLC) Frame Relay RFC 1490 (Multiprotocol in Frame Relay) Four Flavors of Ethernet ATM (cells, AAL 5 packets) RFC 1483 (Multiprotocol in AAL 5) FUNI Reference formats: DSL, Frame Relay, ATM, DS 1, DS 3, SONET 4/27/2001 Inductive Logic 3
Synchronous HDLC (aka SDLC) 1 octet opening flag 2 or 4 CRC closing flag data flag 01111110. . . idle. . . 01111110 • Sends frames (packets) over a serial (synchronous) • • bit stream Frames are delimited by flags (8 bits: 01111110) Shared flag closes one frame and opens the next Idle is usually flags, but may be 1 s (mark idle) Shared zero flag is deprecated, and often banned: flag 011111101111110 flag 4/27/2001 Inductive Logic 4
HDLC Bit Stuffing bit stuffed 0 01111110. . . 111110. . 01111110 opening flag user data: five 1 s closing flag • Transparency is by “bit stuffing” everything between the • • • flags: any sequence of five 1 s has a 0 bit stuffed after it Stuffed frame length need not be a multiple of 8 bits Stuffing makes the “effective data rate” pattern sensitive 3 kinds of CRC: CRC-SDLC (aka CRC-CCITT), CRC-16, and CRC-32 (used by CCITT). CRC-16 detects errors better, but wasn’t known when CRC -SDLC was chosen. Rarely used. Hardware sends/detects flags, bit stuffing, CRC 4/27/2001 Inductive Logic 5
RFC 1662 (Asynchronous HDLC) • Sends frames over a synchronous or asynchronous octet • • • stream (e. g. , modem, X. 25, SONET) Based on ISO/IEC 3309: 1991 (HDLC framing) Frames delimited by flag octets: 01111110 (0 x 7 E) Byte stuffing: escape = 0 x 7 D, Following byte = (user data XOR 0 x 20) Flag and Escape bytes in user data MUST be escaped PPP Async Control Character Map (ACCM) specifies other values from 0 - 0 x 1 F to escape (Tx), and ignore (Rx) Byte stuffing is often done in software 1 octet opening flag 01111110 4/27/2001 2 or 4 data Inductive Logic CRC closing flag 01111110 idle. . . 6
Frame Relay • Uses synchronous HDLC framing sublayer • Data Link Control Identifier (DLCI) multiplexes virtual • • circuits. Usually only local significance. Uses Q. 922 header: Usually 2 -octet address (1024 DLCIs), extensions for 3 or 4 (EA=1 on last address octet) Max information length is configurable, 4096 max 1 octet 2 to 4 1 to max-length opening frame flag address information EA CR =0 DLCI[9: 4] 7 4/27/2001 6 5 4 3 2 1 0 2 1 CRC closing flag F E DLCI[3: 0] C N 7 6 5 4 3 B E DE EA C =1 N 2 1 0 Inductive Logic 7
Frame Relay (cont. ) • Link Management Interface (LMI) on fixed DLCI • Forward Explicit Congestion Notification (FECN) set by • • Frame Relay network if frame experienced congestion Backward ECN set if reverse direction is congested FECN & BECN set by network only è Q. 922 is not clear if user equipment can set them or not • Discard Eligible, set by network for overcommitted, or • user for low priority, frames C/R bit carried transparently by Frame Relay network frame address EA CR =0 DLCI[9: 4] 7 4/27/2001 6 5 4 3 2 1 0 F E DLCI[3: 0] C N 7 6 5 4 3 B E DE EA C =1 N 2 1 0 Inductive Logic 8
RFC 1490 Multiprotocol Encapsulation in FR • Allows a SNAP-like header in data field to encapsulate raw LAN frames (“bridged” mode) è è 1 Bridging header (OUI = 0 x 00 -80 -C 2 for 802. 1) encapsulates LAN frame PID specifies with or without LAN FCS 1 1 3 2 6 0 or 4 Ctl pad NLPID OUI PID dest. . . =3 =0 =0 x 80 MAC LAN data optional LAN FCS LAN frame Frame Relay information field • Also allows direct IP encapsulation (“routed” mode) Ctl NLPID = 3 = 0 x. CC IP packet Frame Relay information field 4/27/2001 Inductive Logic 9
Four Flavors of Ethernet • • • Ethernet II IEEE 802. 2 SNAP Novell IPX (“raw 802. 3”) All use a common hardware sublayer: è è This is the basis of the “ 64 -byte” minimum frame size Finally recognized by IEEE 802. 3 -1998 as the “MAC” layer frame size 64 to 1518 8 octets 6 6 S preamble F D destination MAC source MAC 48 (min) to 1502 (max) PID + data pad (if needed) 4 FCS CRC-32 1010. . . 1011 Ethernet Common HW sublayer 4/27/2001 Inductive Logic 10
Ethernet II • First widespread Ethernet standard • PIDs administered by IEEE • All IP on Ethernet is required to support this (RFC • • 1122), and almost all use it. All PIDs are >= 1536 (decimal) Exact packet length is not available from frame data alone, because of padding 8 octets preamble 6 S destination F MAC D 6 source MAC Common HW sublayer 4/27/2001 2 46 (min) to 1500 (max) PID data Ethernet II Inductive Logic pad (if needed) 4 FCS Common HW sublayer 11
Ethernet IEEE 802. 2 • Destination and Source Service Access Points (DSAP and • • SSAP) are essentially protocol IDs Used by IPX since Netware 3. 12 (SAP=0 x. E 0) Not used for IP Exact length available because ‘length’ specifies valid data, not including padding Don’t confuse Service Access Point (SAP) with Service Advertising Protocol (SAP) 8 octets preamble 6 6 2 1 1 1 dest source length DSAP SSAP Ctl MAC 43 to 1497 data 4 pad (if FCS needed) length 4/27/2001 Inductive Logic 12
IEEE 802. 2 SNAP • Sub. Network Access Protocol (SNAP) • OUI + PID allows vendors to define globally unique protocol identifiers è OUI = Organizationally Unique Identifier • OUI = 0 implies PID is an Ethernet II PID • Optional support in IP (RFC 1042) 8 octets preamble 6 6 2 1 1 1 3 2 dest source length DSAP SSAP Ctl OUI PID MAC 38 to 1492 data 4 pad (if FCS needed) length 4/27/2001 Inductive Logic 13
Novell IPX (“raw 802. 3”) • Defined by Novell before 802. 3 was complete • Phased out by Novell in Netware 3. 12 • “Checksum” is forced to 0 x. FFFF (=> none), takes • place of DSAP/SSAP Does not allow a real IPX checksum 8 octets 6 6 2 2 46 (min) to 1500 (max) IPX destination source preamble length checksum MAC = FFFF IEEE 802. 3 4/27/2001 data pad (if needed) 4 FCS IPX header Inductive Logic 14
How Can I Tell? • Check PID/length first, then DSAP/SSAP dest source PID >= preamble MAC data/pad 1536 dest source length DSAP SSAP Ctl preamble MAC 3 -1535 data/pad dest source length DSAP SSAP Ctl OUI PID preamble MAC 8 -1535 = AA dest source length preamble MAC 2 -1535 4/27/2001 FFFF Inductive Logic FCS Ethernet II data/pad FCS 802. 2 SNAP FCS Novell old IPX 15
ATM Cells • Synchronous bit stream • Bit stream may be framed (DS 3, OC 3) • Cells are 53 bytes: • • 5 header + 48 payload Idle with null or unassigned cells Cell delineation usually by Header Error Check (HEC) ATM switches operate primarily on cells, ignoring payload type (PT) VPI/VCI is virtual circuit identifier VPI is 8 bits (UNI) or 12 bits (NNI) VCI is 16 bits CLP is like Frame Relay DE 4/27/2001 Inductive Logic ¬ 8 bits ® GFC/ VPI. . . 2. . . VPI VCI. . . 1 3 . . . VCI. . . 4. . . VCI 5 PT CLP HEC (8 -bit CRC) 6 : : Payload 48 octets 53 16
ATM AAL 5 (Packets) • Packet framing above cell layer • ATM Adaptation Layer 5 (AAL 5) • includes Segmentation and Reassembly (SAR) of packets User-user bit in cell header payload-type (PTI) indicates last cell in packet cell header cell PTI = last cell 4/27/2001 packet layer packets SAR (AAL 5) cells ATM layer AAL 5 packet cell cell last cell Inductive Logic 17
ATM AAL 5 (Packets), cont. • • Control, length, and CRC-32 at end of last cell Control field currently unused ‘data length’ provides precise length Length in trailer allows starting to send packet before length is known è (cut through switches, e. g. frame to ATM) N x 48 0 to 65, 535 octets data length 4/27/2001 0 to 47 pad 1 1 UU ctl Inductive Logic 2 4 data length CRC-32 18
RFC 1483 Multiprotocol Encapsulation in ATM • Requires an 802. 2 SNAP-like header in data field • Allows for raw LAN frames (“bridged” mode) è è 1 Header (OUI = 0 x 00 -80 -C 2 for 802. 1) encapsulates LAN frames PID specifies with or without LAN FCS 1 1 3 2 2 6 . . . DSAP SSAP Ctl OUI PID pad dest. . . =AA =3 00 80 C 2 00 xx 00 -00 MAC LAN data AAL 5 or FUNI data field 0 or 4 optional LAN FCS LAN frame • Also allows direct IP encapsulation (“routed” mode) DSAP SSAP Ctl OUI PID AA 4/27/2001 AA 03 00 00 00 08 00 IP packet Inductive Logic 19
Classical IP Over ATM • RFC 1577 (Classical IP and ARP over ATM) è è è 4/27/2001 Specifies RFC 1483 Routed IP format (802. 2 SNAP) Defines Inverse-ARP for identifying your IP peer Defines a bunch of LAN Emulation (LANE) SVC stuff that no one uses Inductive Logic 20
FUNI • ATM standard for Frame User-Network Interface • Q. 922 HDLC frames to ATM AAL 5 interworking • Fully supports ILMI, OAM, SVCs: all ATM management Premise FUNI Interworking cells Device ATM Network Premise format HDLC flag Q. 922 VC payload CRC HDLC flag variable VC payload 4/27/2001 Inductive Logic pad ATM format AAL 5 trailer 21
Some Common Encapsulations 1483 FUNI (Ethernet) HDLC Q. 922 flag DLCI 528 AA AA 03 00 80 C 2 00 07 00 00 Ethernet frame CRC HDLC flag 1483 FUNI (IP) HDLC Q. 922 flag DLCI 528 AA AA 03 00 00 00 08 00 IP packet CRC HDLC flag 1490 (Ethernet) HDLC Q. 922 flag DLCI 16 03 00 80 C 2 00 07 Ethernet frame CRC HDLC flag VC payload CRC HDLC flag ISO protocol packet CRC HDLC flag 1490 (IP) HDLC Q. 922 flag DLCI 16 03 CC Q. 922 HDLC flag Q. 922 +1490 HDLC flag Q. 922 03 HDLC flag HDLC + PPP 4/27/2001 NLPID Optional 1 or 2 HDLC Adrs Ctl PPP-PID flag FF 03 IP packet HDLC payload PPP information Inductive Logic 22
Frame Relay Encapsulations 1483 FUNI (Ethernet) HDLC flag Q. 922 AA AA 03 00 80 C 2 00 07 00 00 Ethernet frame CRC HDLC flag 1483 FUNI (IP) HDLC flag Q. 922 AA AA 03 00 00 00 08 00 IP packet CRC HDLC flag 1490 (Ethernet) HDLC flag Q. 922 03 00 80 C 2 00 07 Ethernet frame CRC HDLC flag 1490 (IP) HDLC flag Q. 922 03 CC CRC HDLC flag “None” HDLC flag Q. 922 CRC HDLC flag PPP- HDLC Q. 922 RFC 1973 flag 4/27/2001 IP packet VC payload variable NL 03 PPP-PID PPP information Inductive Logic 23
ATM Encapsulations “None” (AAL 5) variable pad VC payload AAL 5 trailer variable 1483 AA AA 03 00 80 C 2 00 07 00 00 (Ethernet) Ethernet frame pad AAL 5 trailer variable 1483 IP AA AA 03 00 00 00 08 00 (ATM) IP packet pad AAL 5 trailer variable FRF. 5 Q. 922 Cisco. PPP Optional 1 or 2 Adrs Ctl PPP-PID FF 03 VC payload PPP information PPP-PID 4/27/2001 FE FE pad AAL 5 trailer variable 1 or 2 PPP-2364 LLC AAL 5 trailer variable 1 or 2 PPP-2364 NULL pad 03 CF PPP-PID pad AAL 5 trailer variable PPP information Inductive Logic pad AAL 5 trailer 24
DS 1 ESF Framing 193 -bit frame 192 -bit Payload M 2 F 1=0 M 3 C 2 M 4 F 2=0 M 5 C 3 M 6 F 3=1 M 7 C 4 M 8 F 4=0 C 5 M 10 F 5=1 M 11 Reference T 1. 107 C 1 M 9 DS 1 -ESF (unchannelized) M 1 C 6 M 12 F 6=1 6 -bit CRC 4 x 6 = 24 frames = 1 superframe Frame Alignment Signal (FAS) 4 kbps Facility Data Link (FDL) Framing is bit-oriented (rather than octet-oriented) 8 k frames/s x 193 = 1. 544 Mbps line rate (exactly) 8 k frames/s x 192 = 1. 536 Mbps payload rate (exactly) 8 k frames/s 24 333 superframes/s 4/27/2001 Inductive Logic Note: SF (aka D 4) framing is not usable for data transport 25
DS 3 Framing 680 -bit M-subframe X 1 84 -bit F 1=1 Payload C 1=1 F 2=0 C 2=1 F 3=0 FE AC F 4=1 X 2 F 1=1 C 1=1 F 2=0 C 2=1 F 3=0 C 3=1 F 4=1 P 1 F 1=1 CP F 2=0 CP F 3=0 CP F 4=1 P 2 F 1=1 FE BE F 2=0 FE BE F 3=0 FE BE F 4=1 M 1 =0 F 1=1 DL F 2=0 DL F 3=0 DL F 4=1 M 2 =1 F 1=1 C 1=1 F 2=0 C 2=1 F 3=0 C 3=1 F 4=1 M 3 =0 F 1=1 C 1=1 F 2=0 C 2=1 F 3=0 C 3=1 F 4=1 M-Frame Alignment M-subframe Alignment Framing is bit-oriented. C-bit-parity shown. M 23 mode sets C 1 in subframe-1 randomly, other C-bits per stuffing X 1 = X 2 = not Remote Alarm Indication (RAI) P 1 = P 2 = CP = XOR of previous M-frame payload bits CP are end-to-end parity bits 44. 736 Mbps line rate (exact) 44. 736 x (84 / 85) 44. 210 Mbps payload rate Inductive Logic 4/27/2001 7 M-subframes = 1 M-frame Reference T 1. 107 FEAC = Far End Alaram & Control FEBE = Far End Block Error DL = Data Link: HDLC EOC 26
STS-1 (component of OCn) 90 Columns Reference GR-253, chap 3. A 1 A 2 J 0/Z 0 STS-1 Payload Capacity (84 useable columns) 8000 x 84 x 9 x 8 = 48. 384 Mbps Section overhead B 1 E 1 F 1 D 2 D 3 H 1/H 2 point to the Synchronous Payload Envelope (SPE) at arbitrary byte offset J 1 C 2 Line D 4 D 5 D 6 overhead STS-1 Envelope Capacity ATM cells, etc. G 1 87 Columns D 7 D 8 D 9 F 2 D 10 D 11 D 12 H 4 S 1/ M 0 | E 2 M 1/ Z 1 Z 2 Fixed Stuff B 3 Fixed Stuff H 1 H 2 H 3 B 2 K 1 K 2 9 Rows Z 3 Transport overhead 810 Byte Frame Z 4 Z 5 Framing is byte-oriented. Line rate = 8000 frames/s x 90 x 9 x 8 bits= 51. 840 Mbps 4/27/2001 Path Overhead (POH) Inductive Logic 27
STS-Nc SPE STS-3 c SPE: 3 x 87 = 261 Columns STS-12 c SPE: 12 x 87 = 1044 Columns J 1 B 3 C 2 G 1 F 2 STS-3 c Payload Capacity: 8000 x 260 x 9 x 8 = 149. 760 Mbps H 4 260 Columns F 2 H 4 Z 3 1040 Columns Z 4 Z 5 STS-12 c Payload Capacity: 8000 x 1040 x 9 x 8 = 599. 040 Mbps Z 3 Z 4 Fixed Stuff J 1 Z 5 Path Overhead (POH) 4/27/2001 9 Rows Path Overhead (POH) Line Rate = N x 51. 840 Mbps Framing chosen to match STM-N STS-48 c (not shown) is exactly 4 times STS-12 c (POH + 15 Stuff) Inductive Logic 9 Rows Reference GR-253, chap 3. 28
This slide intentionally left blank 4/27/2001 Inductive Logic 29