29
Inductive Logic Layer 2 Data Framing for Fun and Profit Eric L. Michelsen

Framing

Embed Size (px)

Citation preview

Layer 21. Physical
3. Network
5. Session
4. Transport
6. Presentation
7. Application
2. Link
HDLC
ATM
AAL2
Four Flavors of Ethernet
ATM (cells, AAL5 packets)
FUNI
Inductive Logic
Frames are delimited by flags (8 bits: 01111110)
Shared flag closes one frame and opens the next
Idle is usually flags, but may be 1s (mark idle)
Shared zero flag is deprecated, and often banned:
01111110 ... idle ...
HDLC Bit Stuffing
Transparency is by “bit stuffing” everything between the flags: any sequence of five 1s 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
01111110 . . . 111110 . . . . 01111110
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 (0x7E)
Byte stuffing: escape = 0x7D,
Flag and Escape bytes in user data MUST be escaped
PPP Async Control Character Map (ACCM) specifies other values from 0 - 0x1F to escape (Tx), and ignore (Rx)
Byte stuffing is often done in software
idle...
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
2
1 to max-length
2 to 4
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
DLCI[9:4]
DLCI[3:0]
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
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
DLCI[9:4]
DLCI[3:0]
Multiprotocol Encapsulation in FR
Allows a SNAP-like header in data field to encapsulate raw LAN frames (“bridged” mode)
Bridging header (OUI = 0x00-80-C2 for 802.1) encapsulates LAN frame
PID specifies with or without LAN FCS
1
3
2
Ctl
= 3
This is the basis of the “64-byte” minimum frame size
Finally recognized by IEEE 802.3-1998 as the “MAC” layer
preamble
source
MAC
4
CRC-32
pad (if
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
preamble
data
Common HW sublayer
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=0xE0)
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)
data
2
OUI + PID allows vendors to define globally unique protocol identifiers
OUI = Organizationally Unique Identifier
Optional support in IP (RFC 1042)
data
6
6
length
“Checksum” is forced to 0xFFFF (=> none), takes place of DSAP/SSAP
Does not allow a real IPX checksum
preamble
destination
MAC
data
2
IPX
preamble
preamble
preamble
source
MAC
dest
MAC
source
MAC
dest
MAC
source
MAC
dest
MAC
data/pad
FCS
data/pad
SSAP
Ctl
data/pad
data/pad
preamble
source
MAC
length
3-1535
Ethernet
II
802.2
802.2
SNAP
Novell
Cells are 53 bytes:
5 header + 48 payload
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
GFC/
VPI...
VCI...
...VCI...
...VCI
VPI...
...VPI
Packet framing above cell layer
ATM Adaptation Layer 5 (AAL5) includes Segmentation and Reassembly (SAR) of packets
User-user bit in cell header payload-type (PTI) indicates last cell in packet
SAR (AAL5)
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)
CRC-32
4
2
ctl
1
pad
Allows for raw LAN frames (“bridged” mode)
Header (OUI = 0x00-80-C2 for 802.1) encapsulates LAN frames
PID specifies with or without LAN FCS
dest
MAC
...
DSAP
AA
SSAP
AA
Ctl
03
OUI PID
IP packet
Inductive Logic
Defines Inverse-ARP for identifying your IP peer
Defines a bunch of LAN Emulation (LANE) SVC stuff that no one uses
Inductive Logic
Q.922 HDLC frames to ATM AAL5 interworking
Fully supports ILMI, OAM, SVCs: all ATM management
Interworking Device
NL-
PID
193-bit frame
= 1 superframe
8k frames/s x 193 = 1.544 Mbps line rate (exactly)
8k frames/s x 192 = 1.536 Mbps payload rate (exactly)
8k frames/s 24 333 superframes/s
Reference T1.107
SF (aka D4) framing is not usable for data transport
192-bit Payload
Inductive Logic
C1=1
C2=1
C3=1
C1=1
C2=1
C3=1
Framing is bit-oriented. C-bit-parity shown.
M23 mode sets C1 in subframe-1 randomly, other C-bits per stuffing
X1 = X2 = not Remote Alarm Indication (RAI)
P1 = P2 = 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
M3
=0
Inductive Logic
Line rate =
8000 frames/s x 90 x 9 x 8 bits= 51.840 Mbps
Reference GR-253, chap 3.
8000 x 84 x 9 x 8 = 48.384 Mbps
Fixed Stuff
Fixed Stuff
J1
STS-3c SPE: 3 x 87 = 261 Columns
Reference GR-253, chap 3.
= 599.040 Mbps
9 Rows
Framing chosen to match STM-N
STS-48c (not shown) is exactly 4 times STS-12c
(POH + 15 Stuff)