69
HUAWEI TECHNOLOGIES CO., LTD. All rights reserved www.huawei.com OSI Reference Model TCP/IP Rev 1.0

OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

  • Upload
    others

  • View
    37

  • Download
    2

Embed Size (px)

Citation preview

Page 1: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved

www.huawei.com

OSI Reference Model

TCP/IP

Rev 1.0

Page 2: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 2

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 3: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 3

Computer Network

SOHO

Server

IP Hotel

Intranet

Wireless

Internet

Page 4: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 4

Network Protocols

Network protocols are formal descriptions of equipment

communication rules.

5

4

3

2

1

5

4

3

2

1

TC

P/IP

Pro

toco

l Sta

ck

TC

P/IP

Pro

toco

l Sta

ck

Source Host A Destination Host B

Perfect! I

understand

TCP/IP.

Hello! Can I speak

TCP/IP?

Page 5: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 5

Datacom Equipment

Cable

Modem

Router

Switch

HUB

Access Servers

Page 6: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 6

Transmitting Parameters

Bandwidth: describes the information volume of the

network data transmitted from one node to any other

per time unit

Delay: describe the how much time need for

information transmitting from one node to any other

Page 7: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 7

Characteristic of Data Communication

Low requirement for delay

Accurate transmission

Connectionless

Packet switching

Page 8: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 8

Common Network Topologies

Topology:

● Bus, star and tree

● Ring and mesh

Page 9: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 9

Standardization Organization

International Organization for Standardization (ISO)

● Institute of Electrical & Electronic Engineers (IEEE)

● America National Standard Institute (ANSI)

● Electronic Industries Association/Telecom Industries

Association (EIA/TIA)

● International Telecom Union (ITU)

● INTERNET Action Board (IAB)

Page 10: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 10

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 11: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 11

What Is TCP/IP

OSI reference model

Application layer

Presentation layer

Conversation layer

Transport layer

Network layer

Data link layer

Physical layer

7

6

5

4

3

2

1

TCP/IP has simple hierarchical design

In clear corresponding relations with OSI reference model.

Application layer

Transport layer

Network layer

Physical layer

TCP/IP

Data link layer

Protocol

Interface

Page 12: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 14

Encapsulation & Decapsulation

Application layer

Transport layer

Network layer

Physical layer

Data link layer

Service Information

ALH

SI

SI

Application

Data TLH

SI

NLH

SI

DLH

11010101110110101011101011010

APDU

Segment

Packet

Frame

Bit Flow

ALH Data TLH NLH

ALH Data TLH

ALH Data

Data

Page 13: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 15

Structure of TCP/IP System

IP is one of the most important protocols in the TCP/IP family.

There are 3 other protocols used together with IP:

● Address Resolution Protocol (ARP)

● Reverse Address Resolution Protocol (RARP)

● Internet Control Message Protocol (ICMP)

TCP/UDP

ICMP

IP

ARP/RARP

Page 14: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 16

Structure of TCP/IP System IP provides a globally unified addressing mode, shields the

differences of the physical network addresses and makes

routing possible.

IP provides a globally unified message format, shields the

differences of the network link layers and makes network

interconnection possible.

TCP/IP

Ethernet Token Ring FR ATM X.25 PPP/SDH

Upper layer protocols

Page 15: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 17

Data Encapsulation

TELNET

23

FTP

20/21

SMTP

25

TFTP

69

TCP/UDP (Port)

6/17

IP PACKETS (Protocol)

0x0800

FRAMES (Type, VPI/VCI, DLCI, …)

BITS

Page 16: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 18

TCP/IP Protocol Stack

Provide application

program

network interfaces Application Layer

Transport Layer

Interconnection

Layer

Data link Layer

Establish terminal to

terminal connection

Addressing and routing

Physical media access

Binary data flow

transmission

HTTP, Telnet, FTP,

TFTP, Ping, etc

TCP/UDP

ARP/RARP

IP

ICMP

Ethernet, 802.3, PPP,

HDLC, FR, etc

Interfaces and

wires/cables Physical Layer

Page 17: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 19

TCP/IP Conceptual Layers

Application

Transport

Internet

Data link layer

Physical layer

Application

Transport

Internet

Data link layer

Physical layer

Internet

Data link layer

Physical layer

Data link layer

Physical layer

End system Router Router LAN switch End system

Internet

Data link layer

Physical layer

Page 18: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 20

Peer Layer

If two networks are identical in physical layers, they can

be interconnected with repeaters.

If two networks are different in physical layers but identical

in link layers, they can be interconnected with bridges.

If two networks are different in both physical layers and

link layers, but they are identical in network layers, then

they can be interconnected with routers.

If two networks have identical protocols, they can be

interconnected with protocol converters (gateway).

Page 19: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 21

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 20: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 22

Physical Layer

Physical layer: defines the voltage, interface, cable

standard and transmission distance etc.

Physical layer cable:

● Twisted pair : UTP , STP

● Coaxial cable: thin, thick

● Fiber

● Wireless radio: WLAN

Page 21: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 23

Physical Layer

LAN and Physical Layer

● Cable standard:10Base-T, 100Base-T and 1000Base-SX

etc.;

● Network equipment: repeater and hub etc.

WAN and Physical Layer

● DTE equipment: router and terminal host etc.;

● DCE equipment: WAN switch and Modem etc.;

● Common interface:RS-232, V.24 and V.35 etc.

Page 22: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 24

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 23: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 25

Data Link Layer Overview

Application

Transport

Network

Data link

Hardware

Ethernet Token Ring FDDI HDLC PPP ATM Frame Relay X.25

Page 24: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 26

Data Link Layer Data Link Layer divided into two sublayer:

● The LLC sublayer

● The MAC sublayer

The Function of Data Link Layer:

● Physical address definition

● Network topology

● Link parameter

● Error verification

● Physical media access

● Flow control (optional)

Page 25: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 27

LAN and Data Link Layer

IEEE802 Standard: the most popular LAN standard

nowadays

● IEEE802.1 Common LAN Conceptions

● IEEE802.2 Definition of LLC Sub-Layer

● IEEE802.3 Ethernet Standard

● IEEE802.4 Token Bus Network

● IEEE802.5 Token Ring Network

Ethernet switch

Page 26: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 28

WAN and Data Link Layer

WAN data link layer standard:

● HDLC

● PPP

● ISDN

● Frame Relay

WAN data link layer equipment

● Modem and ISDN terminal adaptor

● CSU/DSU and WAN switch

Page 27: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 29

MAC Address

Unicast

Broadcast (All bits equal “1”: 0xFFFFFFFFFFFF)

Multicast (8th bit equal “1”):

00E0FC 012345

Vender Code Serial Number

24 bits 24 bits

00000001 10111011 00111010 10111010 10111110 10101000

Page 28: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 30

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 29: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 31

Network Layer Overview

Internet Protocol (IP) Internet Control Message Protocol (ICMP) Address Resolution Protocol (ARP) Reverse Address Resolution Protocol (RARP)

Application

Transport

Internet

Network Interface

Hardware

Page 30: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved

Flat Network

Page 32

MAC PORT

A 1

B 2

C 1

D 2

E 3

F 2

G 1

A

B

C

D

E

F

Page 31: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 33

N3.H1

IP Forwarding (Routing)

N1.H1

N1.H2

N2.H1 N4

Page 32: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 34

IP Addressing

32 Bits

Network Host

8 Bits

128 . 1 . 255 . 254

10000000 00000001 11111111 11111110

8 Bits 8 Bits 8 Bits

Page 33: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 37

LAN 1

IP Forwarding Process

WAN LAN 2

Router Router

IP

ETH PPP

E1/0 S2/0

IP

PPP ETH

S2/1 E0/1

decap

su

lati

on

en

cap

su

lati

on

Routing

(selecting path)

Page 34: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 38

Address Resolution Protocol

PC B

LSW

PC A

PC C

Who has 10.1.1.5, tell 10.1.1.2

(00E0-FC01-2345)

IP:10.1.1.2

MAC: 00E0-FC01-2345

IP:10.1.1.3

MAC: 00E0-FC01-6789

IP:10.1.1.5

MAC: 00E0-FC01-ABCD

Page 35: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 39

Address Resolution Protocol

PC B

LSW

PC A

PC C

I have 10.1.1.5 (00E0-FC01-ABCD)

IP:10.1.1.2

MAC: 00E0-FC01-2345

IP:10.1.1.3

MAC: 00E0-FC01-6789

IP:10.1.1.5

MAC: 00E0-FC01-ABCD

Page 36: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 40

ICMP

129.6.1.0/24 10.2.2.0/24 10.1.1.0/24

.1 .1 .2 .1 .2 .2 E0/0 E0/1 E1/0 E1/1

ping 10.2.2.1

Dest./Mask NextHop Interface

10.1.1.0/24 10.1.1.1 E0/0

10.2.2.0/24 129.6.1.2 E0/1

129.6.1.0/24 129.6.1.1 E0/1

Dest./Mask NextHop Interface

10.1.1.0/24 129.6.1.1 E1/0

10.2.2.0/24 10.2.2.1 E1/1

129.6.1.0/24 129.6.1.2 E1/0

GW:10.1.1.1 GW:10.2.2.1

Echo Request

Echo Reply

Reply from 10.2.2.1: bytes=32 time<1ms TTL=252

Page 37: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 41

ICMP

129.6.1.0/24 10.2.2.0/24 10.1.1.0/24

.1 .1 .2 .1 .2 .2 E0/0 E0/1 E1/0 E1/1

ping 10.2.2.1

Dest./Mask NextHop Interface

10.1.1.0/24 10.1.1.1 E0/0

129.6.1.0/24 129.6.1.1 E0/1

Dest./Mask NextHop Interface

10.1.1.0/24 129.6.1.1 E1/0

10.2.2.0/24 10.2.2.1 E1/1

129.6.1.0/24 129.6.1.2 E1/0

GW:10.1.1.1 GW:10.2.2.1

Echo Request

Echo Reply

Reply from 10.1.1.1: Destination host unreachable

Page 38: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 42

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 39: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 43

Transport Layer Overview

Transmission Control Protocol (TCP) User Datagram Protocol (UDP) SCTP (Session Control Transmission Protocol)

Application

Transport

Internet

Network Interface

Hardware Transport layer provides end-to-end data

transfer.

TCP provides a reliable exchange of

information and UDP is not.

Page 40: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 44

TCP and UDP

TCP:

● connection-oriented

● reliable transmission.

● The relevant application layer protocols include TELNET,

FTP and HTTP.

UDP:

● connectionless

● unreliable transmission.

● The relevant application layer protocols include RIP,

SNMP, RADIUS and VOD.

Page 41: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 45

TCP/UDP Header Format

0 8 16 24 31

16 bits source port 16 bits destination port

32 bits sequence number

32 bits acknowledge number

UR

G

AC

K

PS

H

RS

T

SY

N

FIN

offset Reserved(6 bits 16 bits window size

16 bits TCP checksum 16 bits urgent pointer

Options

Data

0 8 16 24 31

16 bits source port 16 bits destination port

16 bits UDP checksum

Data

UDP header format

TCP header format

16 bits UDP length

Page 42: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 46

End to End Communication

Transport Layer Virtual Circuit

Host WWW.HUAWEI.COM

FTP.HUAWEI.COM

Application WWW FTP

Transport 21 1028 80 1027 Data Data

Page 43: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 47

TCP Connection

Internet

client server

Page 44: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 48

Acknowledgement Technology

Transport Layer Virtual Circuit

Host

Source Equipment Destination Equipment

Send 1,2,3

Acknowledge 4 Send 4,5,6

Acknowledge 5

Send 5,6,7

Host

1 2 3

4 5 6

5 6 7

Page 45: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 49

Flow Control

Three method of flow control:

● Buffering: burst data buffered, forward when idle.

● Source quench message: send the source quench message

by ICMP

● windowing: use to control how many data be sent at one time

Page 46: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 50

Slide Window

To modify the

widows size

The sender

is too fast

Page 47: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 51

Why SCTP – TCP defects

●TCP---- connection-oriented and

transmission-reliable

●UDP---- connectionless, packet-based,

and without transmission-reliable

●SCTP-- connection-oriented, packet-

based, and transmission-reliable

TCP Defects

●Line header block

●Poor real-time ability

●Difficult multi-homing implementation

●Vulnerable to denial of service (DOS)

attacks

Page 48: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 52

Comparison of UDP, TCP and SCTP

Connection-oriented, packet-based, optimized

real-time performance

Use streams to solve line header block

Adopt 4-step startup to avoid DOS attack

Supports the multi-homing function

appropriate congestion avoidance behavior and

resistance to flooding and masquerade attacks

Page 49: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 53

SCTP Terminology

SCTP Endpoint A

SCTP connection

SCTP

stream

(uni-directional)

SCTP Endpoint B

Multiple

IP/SCTP-port

Pairs are available

Multiple

IP/SCTP-port

Pairs are available

Page 50: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 54

SCTP Functions

Association

startup

and

takedown

Sequenced delivery within streams

User data fragmentation

Acknowledgement and congestion avoidance

Chunk bundling

Packet validation

Path management

Page 51: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 55

Association Startup

INIT(Tag_A)

T1-init INITACK

endpoint A endpoint Z

T1-cookie

COOKIE ECHO+ DATA

COOKIE ACK+ DATA+ SACK established

established SACK

T3-rtx

Avoid attack of DOS and IP address cheating

Page 52: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 56

SCTP Delivery in Streams

Example: There are two streams in the association from A

to B. And there are 4 data package: A,B,C,D to send. The

arrangement is like this: A on stream 1, B on stream 2, C

on stream 1, D on stream 2. D is quite big so it’s divided

to D1 and D2.

A, B, C, D C

TSN=3,SSN=2

A

TSN=1,SSN=1

B

TSN=2,SSN=1

D1

TSN=4,SSN=2

D2

TSN=5,SSN=2

Stream1

Stream2

Page 53: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved

Page 57

SCTP Delivery in Streams TSN (Transmission Sequence Number)

●A 32-bit sequence number assigned by an endpoint, which is based on

an initial TSN, to each data chunk sent by the local end to permit the

receiving SCTP endpoint to acknowledge its receipt.

●TSN is maintained on the basis of association.

SSN (Stream Sequence Number)

●A 16-bit stream sequence number assigned by SCTP to each data chunk

sent in a stream by the local end, to ensure sequenced transmission in the

stream.

The assignments of TSN and SSN are independent to each other.

Page 54: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 58

SCTP Delivery in Streams—

Message Structure

Page 55: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 59

SCTP Delivery in Streams—DATA

Message Structure

SSN

Type = 0

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

Reserve U B E Length

TSN

Stream ID

Payload Protocol Identifier

User Data

0 1 2 3

Page 56: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 60

SCTP Delivery in Streams—DATA

Message Structure U bit: The unordered bit, if set to “1”, indicates that this is an

unordered DATA chunk, and there is no stream sequence number assigned to this DATA chunk.

B bit: The beginning fragment bit.

E bit: The ending fragment bit.

Length: from the beginning of the type field to the end of the user data field

TSN: 0~4294967295

Stream Identifier

Stream sequence number: 0 to 65535

B E Meaning

1 0 First piece of a fragmented user message

0 0 Middle piece of a fragmented user message

0 1 Last piece of a fragmented user message

1 1 Unfragmented message

Page 57: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 61

SCTP Acknowledgement

Cumulative TSN Ack: 2

Number of Gap Ack Blocks: 2

● Gap 1: start=4, end=5

● Gap 2: start=7, end=9

When sender received 4 such

SACK continually, resend will

start.

Usually, receiver will send a

SACK every two data package

or after 200ms on receiving.

Data (TSN=2)

Data (TSN=5)

SACK

Data (TSN=1)

Data (TSN=3)

Data (TSN=4)

Data (TSN=6)

Data (TSN=7)

Data (TSN=8)

Data (TSN=9)

x

x

Sender Receiver

Page 58: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 62

SCTP Acknowledgement — SACK Message Structure

Page 59: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 63

SCTP Delivery Mechanism

Sliding window:

● Receiver window (RWND)

● Congestion window (CWND)

Cumulative and selective acknowledgement

Packet retransmission

Multi-homing function

Actually, except multi-homing function and

selective acknowledgement, SCTP has similar

features as TCP.

Page 60: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 64

SCTP Delivery — Real-time

Feature Package-based feature. Normally message will be delivered

immediately without being bundled. The bundle usually used

in retransmission case.

SCTP can deliver message in sequence or with no sequence.

In no sequence case, the receiver can report the data to

upper layer immediately after receiving.

SCTP’s sequence delivery is acted in the stream. If disorder

happened in one stream, the stream will wait till all packages

in order before reporting to next section. And this won’t

effect other stream.

So SCTP ensures the real-time feature on sender and

receiver.

Page 61: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 65

SCTP Delivery — Sliding Windows

Receiver window (RWND): indicates the size of the receiver’s inbound buffer in

an association.

● The two RWND values will vary with data transmission and

acknowledgement.

● If the RWND is equal to 0, the data sender can always have one packet in

flight to the receiver.

● Before sending packages, SCTP will check the number of unacknowledged

package to sure it’s smaller than RWND.

● The retransmission data has higher priority than new data.

Congestion window (CWND):

● maintained on the basis of each destination address and will be adjusted

according to the network condition.

● Once the length of the unacknowledged message sent from the destination

address is greater than the CWND value, the endpoint will stop transmitting

data to this address.

RWND and CWND are maintained on different object.

Page 62: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 66

SCTP Delivery — Retransmission

SCTP starts a T3 timer for each destination

address (or each package).

● After receiving SACK, if all data are acknowledged, T3 will

be stopped. If only partial acknowledged, then SCTP will

restart T3 timer.

● If T3 timeout, SCTP will check the PMTU, then bundle all

unacknowledged data into one package, send it to

destination address and start T3.

Page 63: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 67

SCTP Delivery — Multi-homing

An SCTP association might include several

paths but has only one primary path.

● CWND, T3 timer are based on transmission address

● An endpoint should always transmit SCTP packets

through the primary path from a local transport address

A to the peer endpoint.

● The acknowledgement will always choose the original

source address as the destination address first.

● Retransmission may choose a different address if

possible.

Page 64: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 68

SCTP Congestion Avoidance

SCTP congestion controlling is similar with TCP:

● Slow start-up

● Congestion avoidance

● Congestion control

● Fast retransmission

Actually, except fast retransmission, the other

three methods are describing CWND.

Page 65: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 69

SCTP Path Management

Managing the state of the SCTP association (endpoint)

● There is a counter for each endpoint. The counter records the number of

retransmission. If there are multi-address, then all the retransmission times are

included. If the counter exceeds “Association.Max.Retrans”, then the endpoint

will be regarded as unreachable and SCTP will enter “CLOSED” state with a

report to upper layer. The counter will be reset when one data is acknowledged

by the receiver.

Managing the state of the path

● A counter for each transmission address records the T3-expiring-number and

the number of heartbeat without response. If the counter exceeds

“Path.Max.Retrans”, then this address will be regarded as unreachable. If the

acknowledgement of data or heartbeat are received on this address, then the

counter will be reset.

Page 66: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 70

SCTP Path Management

Hearbeat

● When a path is idle, the local SCTP user requires the

SCTP to generate a heartbeat message and sends the

message through that path to the peer endpoint which

must immediately return a heartbeat acknowledgement

message.

● This mechanism serves to precisely measure the round-

trip time (RTT) and helps to monitor the reachability of

the association as well as holding the active state of the

SCTP association.

● The interval of heartbeat can be configured.

Page 67: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 71

Objectives

Data Communication Overview

TCP/IP Model

Physical Layer

DataLink Layer

Network Layer

Transport Layer

Application Layer

Page 68: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

HUAWEI TECHNOLOGIES CO., LTD. All rights reserved Page 72

Application Layer Overview

Application

Transport

Network

Data link

Hardware

File Transfer - TFTP - FTP E-Mail - SMTP Remote Login - Telnet Network Management - SNMP Name Management - DNS Routing - OSPF - BGP

Page 69: OSI Reference Model TCP/IP - Honor Cup · What Is TCP/IP OSI reference model Application layer Presentation layer Conversation layer Transport layer Network layer Data link layer

Thank you www.huawei.com