inductive logic layer 2 data framing for fun and profit eric l. michelsen

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

Upload: margaret-stirk

Post on 14-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Inductive Logic

Layer 2

Data Framing forFun and Profit

Eric L. Michelsen

Inductive Logic4/27/2001 2

Where In the Stack Are We?

1. Physical

3. Network

5. Session

4. Transport

6. Presentation

7. Application

2. Link

OSI

Bit serial (V.35, HSSI, DS1, DS3, etc.)

HDLC ATM

AAL2Frame Relay

AAL5PPP

Ethernet

Ether-net II

802.2 (LLC)

SNAPNovell

IPX

1490

Link Layer Sublayers

Inductive Logic4/27/2001 3

Layers Upon Layers• Synchronous HDLC (SDLC)• RFC 1662 (Asynchronous HDLC)• Frame Relay• RFC 1490 (Multiprotocol in Frame Relay)• Four Flavors of Ethernet• ATM (cells, AAL5 packets)• RFC 1483 (Multiprotocol in AAL5)• FUNI• Reference formats: DSL, Frame Relay, ATM,

DS1, DS3, SONET

Inductive Logic4/27/2001 4

Synchronous HDLC (aka SDLC)

• 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 1s (mark idle)• Shared zero flag is deprecated, and often banned:

01111110 ... idle ...

0111111011111101111110flag

flag

flag

2 or 4

opening flag

1 octet

01111110

closing flag flag flagCRCdata

Inductive Logic4/27/2001 5

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 . . . . 01111110opening flag closing flaguser data:

five 1s

bit stuffed 0

Inductive Logic4/27/2001 6

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,

Following byte = (user data XOR 0x20)• 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...opening flag

2 or 41 octet

01111110

closing flagCRC

01111110

data

Inductive Logic4/27/2001 7

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

21 octet

frame address

1 to max-length2 to 4

7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0

DLCI[9:4] DLCI[3:0]CREA=0

FECN

BECN

DEEA=1

1

opening flag

closing flagCRCinformation

Inductive Logic4/27/2001 8

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 networkframe address

7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0

DLCI[9:4] DLCI[3:0]CREA=0

FECN

BECN

DEEA=1

Inductive Logic4/27/2001 9

RFC 1490Multiprotocol 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 FCS1 3 2 0 or 4

LAN frame

6

Frame Relay information field

1 1

• Also allows direct IP encapsulation (“routed” mode)Ctl= 3

Frame Relay information field

NLPID= 0xCC

destMAC

LAN dataoptional

LAN FCSCtl=3

OUI PID ...pad=0

NLPID=0x80

IP packet

Inductive Logic4/27/2001 10

Four Flavors of Ethernet• Ethernet II• IEEE 802.2• 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

preamble sourceMAC

PID + data FCS

1010 ... 1011

8 octets 6 6 48 (min) to 1502 (max) 4

CRC-32

frame size 64 to 1518

pad (ifneeded)

SFD

Ethernet Common HW sublayer

destinationMAC

Inductive Logic4/27/2001 11

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

preamble data

8 octets 6 6 42

pad (ifneeded)

SFD

Ethernet IICommon HW sublayer

46 (min) to 1500 (max)

Common HW sublayer

sourceMAC

destinationMAC

PID FCS

Inductive Logic4/27/2001 12

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 43 to 14971 1 1

length

pad (ifneeded)

preamble

8 octets 4

FCSdest

MACsourceMAC

6 6

length DSAP SSAP Ctl

Inductive Logic4/27/2001 13

IEEE 802.2 SNAP

• SubNetwork 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)

data

6 6

length

pad (ifneeded)

38 to 1492

preamble

8 octets 4

FCSdest

MACsourceMAC

2

length DSAP SSAP

111

Ctl OUI PID

3 2

Inductive Logic4/27/2001 14

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 0xFFFF (=> none), takes

place of DSAP/SSAP• Does not allow a real IPX checksum

preambledestination

MACdata

8 octets 6 6 4

IPX header

pad (ifneeded)

46 (min) to 1500 (max)2

IPXchecksum = FFFF

IEEE 802.3

FCS

2

sourceMAC

length

Inductive Logic4/27/2001 15

preamble

preamble

preamble

sourceMAC

destMAC

sourceMAC

destMAC

sourceMAC

destMAC

How Can I Tell?

• Check PID/length first, then DSAP/SSAP

data/pad FCS

data/padSSAP Ctl

data/pad

data/pad

preamblesourceMAC

length3-1535

EthernetII

802.2

802.2SNAP

Novellold IPX

length2-1535

SSAP = AA

length8-1535

destMAC

DSAP

FFFF

DSAP = AA

PID >= 1536

FCS

FCS

FCS

FCS

Ctl OUI PID

Inductive Logic4/27/2001 16

ATM Cells• Synchronous bit stream• Bit stream may be framed (DS3, OC3)• 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

GFC/VPI...

VCI...

...VCI...

...VCI

VPI...

...VPI

PT CLP

HEC (8-bit CRC)

Payload48 octets

1

2

3

4

5

6

:

:

53

8 bits

Inductive Logic4/27/2001 17

ATM AAL5 (Packets)

• 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)

cells

ATM layer

packet layer

packets

cell cell cell cell cell cell

AAL5 packet

last cellPTI =

last cell

cell header

Inductive Logic4/27/2001 18

ATM AAL5 (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)

CRC-32

42

ctl

1

pad

0 to 65,535 octets 0 to 47

N x 48

UU

1

data length

datadata

length

Inductive Logic4/27/2001 19

destMAC

LAN dataDSAP=AA

SSAP=AA

Ctl=3

pad00-00

1 1 1 3 2 2

LAN frame

6 ...

AAL5 or FUNI data field

...

RFC 1483 Multiprotocol Encapsulation in ATM

optionalLAN FCS

0 or 4

• Requires an 802.2 SNAP-like header in data field• 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

• Also allows direct IP encapsulation (“routed” mode)

DSAPAA

SSAPAA

Ctl03

OUI PID00 00 00 08 00

OUI PID00 80 C2 00 xx

IP packet

Inductive Logic4/27/2001 20

Classical IP Over ATM

• RFC 1577 (Classical IP and ARP over ATM) 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 Logic4/27/2001 21

FUNI• ATM standard for Frame User-Network Interface• Q.922 HDLC frames to ATM AAL5 interworking• Fully supports ILMI, OAM, SVCs: all ATM management

Interworking Device

cellsPremise

VC payload pad AAL5 trailer

variable

VC payloadHDLC flag CRC HDLC

flagQ.922

Premise format

ATM format

ATM Network

FUNI

Inductive Logic4/27/2001 22

VC payloadHDLC flag CRCQ.922

Q.922 +1490 ISO protocol packetHDLC

flag CRC

1490 (IP)

1483 FUNI (IP)

IP packetHDLC flag CRC03 CC

IP packetHDLC flag CRC

HDLC flag

HDLC flag

HDLC flag

HDLC flag

1483 FUNI (Ethernet) Ethernet frameHDLC

flagQ.922

DLCI 528 CRCAA AA 03 00 80 C2 00 07HDLC

flag

Q.922 DLCI 528 AA AA 03 00 00 00 08 00

00 00

1490 (Ethernet) Ethernet frameQ.922

DLCI 16 03 00 80 00 80 C2 00 07 CRC HDLC flag

Some Common Encapsulations

HDLC flag

Q.922 DLCI 16

Q.922

Q.922 03 NL-PID

HDLC payloadHDLC flag CRCHDLC HDLC

flag

HDLC + PPP PPP informationHDLC

flagAdrs CtlFF 03 CRC HDLC

flag

Optional

PPP-PID

1 or 2

Inductive Logic4/27/2001 23

VC payloadHDLC flag CRC“None”

HDLC flag

PPP informationHDLC flag CRC

PPP-RFC1973

HDLC flag 03 PPP-PID

v a r i a b l e

NL-PID

Frame Relay Encapsulations

1490 (IP)

1483 FUNI (IP)

IP packetHDLC flag CRC03 CC

IP packetHDLC flag CRC

HDLC flag

HDLC flag

1483 FUNI (Ethernet) Ethernet frameHDLC

flag CRCAA AA 03 00 80 C2 00 07HDLC

flag

AA AA 03 00 00 00 08 00

00 00

1490 (Ethernet) Ethernet frame03 00 80 00 80 C2 00 07 CRC HDLC

flagHDLC

flag

Q.922Q.922

Q.922

Q.922

Q.922

Q.922

Q.922

Inductive Logic4/27/2001 24

VC payload“None”(AAL5)

pad AAL5 trailer

1483 IP(ATM) IP packet pad AAL5 trailer

variable

variable

1483 (Ethernet) Ethernet frameAA AA 03 00 80 C2 00 07 00 00 pad AAL5 trailer

variable

ATM Encapsulations

AA AA 03 00 00 00 08 00

Cisco-PPP PPP informationAdrs Ctl

FF 03

Optional

pad AAL5 trailer

variable

PPP-PID

1 or 2

PPP-2364-NULL

PPP information pad AAL5 trailer

variable

PPP-PID

1 or 2

FE FE 03 CFPPP-2364-LLC

PPP information pad AAL5 trailer

variable

PPP-PID

1 or 2

VC payloadQ.922 pad AAL5 trailer

variable

FRF.5

Inductive Logic4/27/2001 25

M11 M12 F6=1C6

DS1 ESF Framing

DS1-ESF (unchannelized)

M1 C1 M2 F1=0

M3 C2 M4 F2=0

M5 C3 M6 F3=1

M7 C4 M8 F4=0

M9 C5 M10 F5=1

192-bit Payload

Frame Alignment Signal (FAS)

6-bit CRC

4 kbps Facility Data Link (FDL)

193-bit frame

4 x 6 = 24 frames = 1 superframe

Framing is bit-oriented (rather than octet-oriented)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

Note:SF (aka D4) framing is not usable for data transport

Inductive Logic4/27/2001 26

C1=1 C2=1 C3=1

C1=1 C2=1 C3=1

FEBE

FEBE

C1=1F1=1 C2=1F2=0 FEACF3=0 F4=1

C1=1F1=1 C2=1F2=0 C3=1F3=0 F4=1

CPF1=1 CPF2=0 CPF3=0 F4=1

FEBEF1=1 F2=0 F3=0 F4=1

DLF1=1 DLF2=0 DLF3=0 F4=1

F1=1 F2=0 F3=0 F4=1

F1=1 F2=0 F3=0 F4=1

M2=1

DS3 Framing

X1

X2

P1

P2

M1=0

84-bit Payload

M-subframe Alignment

680-bit M-subframe

7 M-subframes = 1 M-frame

Framing is bit-oriented. C-bit-parity shown. M23 mode sets C1 in subframe-1 randomly, other C-bits per stuffingX1 = X2 = not Remote Alarm Indication (RAI)P1 = P2 = CP = XOR of previous M-frame payload bits

CP are end-to-end parity bits44.736 Mbps line rate (exact)44.736 x (84 / 85) 44.210 Mbps payload rate

M3=0

M-Frame Alignment

Reference T1.107

FEAC = Far End Alaram & ControlFEBE = Far End Block ErrorDL = Data Link: HDLC EOC

Inductive Logic4/27/2001 27

STS-1 (component of OCn)90 Columns

810 Byte Frame

Framing is byte-oriented.Line rate = 8000 frames/s x 90 x 9 x 8 bits= 51.840 Mbps

Reference GR-253, chap 3.

A1 A2 J0/Z0

B1 E1 F1

D1 D2 D3

H1 H2 H3

B2 K1 K2

D4 D5 D6

D7 D8 D9

D10 D11 D12

S1/Z1

M0 | M1/Z2

E2

9 Rows

STS-1 Envelope Capacity87 Columns

Section overhead

Line overhead

Path Overhead

(POH)

STS-1 Payload Capacity (84 useable columns) 8000 x 84 x 9 x 8 = 48.384 Mbps

Fix

ed S

tuff

Fix

ed S

tuff

ATM cells, etc.

H1/H2 point to the Synchronous Payload Envelope

(SPE) at arbitrary byte offset

J1

Transport overhead

J1

B3

C2

G1

F2

H4

Z3

Z4

Z5

Inductive Logic4/27/2001 28

STS-Nc SPE

STS-3c Payload Capacity:8000 x 260 x 9 x 8 = 149.760 Mbps

STS-3c SPE: 3 x 87 = 261 Columns

Reference GR-253, chap 3.

9 Rows

260 Columns

J1

B3

C2

G1

F2

H4

Z3

Z4

Z5

STS-12c Payload Capacity:8000 x 1040 x 9 x 8 = 599.040 Mbps

STS-12c SPE: 12 x 87 = 1044 Columns

9 Rows

1040 Columns

Path Overhead

(POH)

J1

B3

C2

G1

F2

H4

Z3

Z4

Z5

Fix

ed S

tuff

Fix

ed S

tuff

Fix

ed S

tuff

Path Overhead

(POH)Line Rate = N x 51.840 MbpsFraming chosen to match STM-NSTS-48c (not shown) is exactly 4 times STS-12c (POH + 15 Stuff)

Inductive Logic4/27/2001 29

This slide intentionally left blank