Video Streaming with the Stream Control Transmission Protocol (SCTP) - - PowerPoint PPT Presentation

video streaming with the stream control transmission
SMART_READER_LITE
LIVE PREVIEW

Video Streaming with the Stream Control Transmission Protocol (SCTP) - - PowerPoint PPT Presentation

Chair for Network Architectures and Services Department of Informatics Technische Universitt Mnchen Video Streaming with the Stream Control Transmission Protocol (SCTP) Lothar Braun, Andreas Mller Internet Protocol Stack The Internet


slide-1
SLIDE 1

Chair for Network Architectures and Services

Department of Informatics Technische Universität München

Video Streaming with the Stream Control Transmission Protocol (SCTP)

Lothar Braun, Andreas Müller

slide-2
SLIDE 2

2

Internet Protocol Stack

 The Internet Protocol Stack  Why another transport layer protocol?

Network Interface (Ethernet, PPP, …) IP UDP TCP Application Physical + Data Link Layer Network Layer Transport Layer Session, Presentation, Application Layer UDP TCP SCTP

slide-3
SLIDE 3

3

Contents

 Recap: UDP and TCP  Problems with UDP/TCP  Stream Control Transmission Protocol (SCTP)

  • Association setup / stream setup
  • Message types
  • Partial Reliability
  • Multi-Homing support
  • Congestion control

 The Lab

slide-4
SLIDE 4

4

Contents

Recap: UDP and TCP

slide-5
SLIDE 5

5

User Datagram Protocol (1)

Network Interface IP UDP Application Network Interface IP UDP Application Hello World Hello World  Message oriented

  • Sending application writes a N byte message
  • Receiving application reads a N byte message

 Unreliable

  • Lost packets will not be retransmitted

 Unordered delivery

  • Packets may be re-ordered in the network

Hello World

slide-6
SLIDE 6

6

User Datagram Protocol (2)

31

Packet header Source Port Destination Port Length Checksum Data ...

16

Application address

  • n a host

Message Length: Header and Data Message

 Barely more features than IP

slide-7
SLIDE 7

7

Transmission Control Protocol (1)

 Connection/Stream oriented. Not message oriented  Reliable transmission

  • Lost packets are retransmitted
  • Retransmission will be repeated until acknowledgment is received

 In-order delivery

  • Segments n + 1, n + 2, n + 3, will be delivered after segment n

 Congestion control

  • TCP tries to share bandwidth equally between all end-points

Hello World Hello World

Message boundaries are not preserved

slide-8
SLIDE 8

8

Transmission Control Protocol (2)

 Much information encoded into a single header

  • Ports  Application addressing
  • Sequence Numbers  Used to identify/acknowledge segments
  • Flags/Window  Signaling

31

Packet header

16

Source Port Destination Port Sequence Number Acknowledgement

4 bit TCP header length

6 bit unused U R G A C K P S H R S T S Y N F I N

Window Checksum Urgent Pointer Options Daten ...

slide-9
SLIDE 9

9

Problems

 Certain applications observe problems due to UDP and TCP

properties

 TCP: Head-of-line blocking with video streaming

  • Frames 2,3,4 arrived but cannot be shown because frame 1 is missing

 Video will stop until frame 1 is delivered

 UDP:

  • Unordered delivery: Second image is delivered after first image
  • Packet loss: Certain frames get lost  low video/audio quality
  • No congestion control

 Example: Internet-Telephony

  • Two types of traffic:
  • Signalling traffic: should be delivered reliable and in-order (TCP)
  • Voice traffic: should not suffer from head-of-line blocking (UDP)

 Need to manage two sockets

 SCTP can deal with these problems

slide-10
SLIDE 10

10

Contents

SCTP Features

slide-11
SLIDE 11

11

 Connection and message oriented

  • SCTP builds an “association” between two peers  TCP connections
  • Association can contain multiple “streams”
  • Messages are sent over one of the streams

 Partial reliability

  • “Lifetime” defined for each message
  • Retransmission of a message is performed during its lifetime
  • Messages can be delivered unreliable, full reliable or partial reliable

 Multi-Homing

  • SCTP can use multiple IP addresses

SCTP Features at a glance

slide-12
SLIDE 12

12

Contents

SCTP Message Format

slide-13
SLIDE 13

13

 Common header format

  • 12 byte header
  • In front of every SCTP message

SCTP Message Format

Ports address the application Random number which Identifies a given association: Used to distinguish new from old connections Checksum on the complete SCTP message: Common header and “chunks”

31

Packet header Source Port Destination Port Verification tag

16

Checksum Data („Chunks“) ...

slide-14
SLIDE 14

14

 Data and signaling information is transported in chunks

  • One or more chunks in a SCTP message
  • Each chunk type has a special meaning:
  • INIT, INIT-ACK, COOKIE, COOKIE-ACK  Connection setup
  • DATA  Transports user data
  • SACK  Acknowledge Data
  • You will learn more about the different chunk types in the pre lab

 Common chunk format  Additional formats are defined for the different chunk types

SCTP Chunk Format

31

Chunk header Chunk Type Chunk Length

16

Chunk Flags Chunk Data ...

slide-15
SLIDE 15

15

Contents

SCTP Associations and Data Transmission

slide-16
SLIDE 16

16

Connection Setup

 TCP connection setup

Known Problem: TCP SYN-Flooding Client Server SYN SYN/ ACK ACK Create State for TCP connection: Store client information

slide-17
SLIDE 17

17

SYN Flodding

 Clients send SYN-Packets but do not respond to SYN-ACK

  • Usually done by a single client that performs IP address spoofing
  • Works because only a single forged packet is necessary

 Server has to store state until a TCP timeout occurs

 Leads to resource exhaustion  Server cannot accept any more connections Client 1 Client 2 Client 3 State: Client 1 Client 2 Client 3

SYN SYN SYN SYN/ACK SYN/ACK SYN/ACK

slide-18
SLIDE 18

18

SCTP Association Setup

 Solution to SYN-Flood problem: Cookies

Client Server INIT INIT-ACK Cookie-Echo Check if cookie is valid  Create state only on valid cookie Cookie-ACK Generate client specific cookie You will learn more about this in the Pre-Lab Send Cookie  Forget client Association is established

  • No SYN-floods with spoofed

addresses possible

slide-19
SLIDE 19

19

Data Transmission

 Application data is transmitted in Data Chunks

  • A data chunk is associated to a stream (Stream Identifier S)

 TSN (Transport Sequence Number)

  • Global Sequence Number
  • Similar to Sequence number in TCP  Necessary for retransmissions

 Stream sequence number

  • Necessary for per-stream transmission reliability
slide-20
SLIDE 20

20

Transmission reliability (1)

 TCP

  • Packets are transmitted fully reliable  retransmitted until received
  • Packets are delivered in-order to the application
  • Slow start and congestion avoidance for congestion control

 UDP

  • Packets are transmitted fully unreliable  never retransmitted
  • No re-ordering  packet order may be changed at the receiver
  • No congestion control

 SCTP can do both and more because of its streams

slide-21
SLIDE 21

21

Transmission reliability (2)

 Why multiple streams?

  • Solves head of line blocking
  • No firewall issues (only one port for several streams)
  • Partial Reliability Extension (PR-SCTP) for different reliability levels

 PR-SCTP

  • Allows to set a lifetime parameter for each message
  • Lifetime specifies how long the sender should try to retransmit a packet
  • Allows to create reliable and unreliable streams within an association

Fully reliable streams (TCP like) Partial reliable stream unreliable stream (UDP like)

slide-22
SLIDE 22

22

Contents

Multihoming

slide-23
SLIDE 23

23

Multi-Homing: Association setup

 SCTP chooses one IP address at association setup

  • IP can be specified by user

Server IP UMTS-IP DSL-IP SCTP Association DSL IP is used to setup the connection UMTS-IP is announced as backup IP at association setup

slide-24
SLIDE 24

24

Multi-Homing

 Heartbeat messages are periodically sent to check link

availability

Server IP UMTS-IP DSL-IP SCTP Association Heartbeat Heartbeat

slide-25
SLIDE 25

25

Multi-Homing

 Changes only occur when the default link is found to be broken

  • Is identified because of packet loss (data or heartbeat)
  • Consequence: SCTP will resume on the backup link

Server IP UMTS-IP DSL-IP SCTP Association No new association setup necessary

slide-26
SLIDE 26

26

Real World Deployment

 SCTP is cool -> but why don‘t we use it?  Why do we use HTTP over TCP for Video Streaming?  Why don‘t we use Multicast?  …

  • Because it just works „good enough“

 Firewall and NAT issues

  • Most home routers simply can‘t translate SCTP

 Implementations

  • No native Windows support (only userspace lib)

 BUT: mandatory for some newly developed protocols such as IPFIX

slide-27
SLIDE 27

27

Contents

The Lab

slide-28
SLIDE 28

28

The Lab

 Pre-Lab

  • Get to known SCTP in detail
  • Learn how things work
  • How to setup SCTP connections
  • How streams are used
  • What kind of SCTP chunks you have and what their purpose is

 Lab – Part 1

  • Observe SCTP traffic on the wire
  • Use “Wireshark” to observe the traffic from an unknown SCTP application

 Lab – Part 2

  • Build a SCTP video streaming application
  • Program an controller that allows to start, stop, pause, forward, rewind videos
  • Stream videos over a lossy network link

– “See” and “hear” the quality differences when streaming over SCTP compared to streaming over UDP and TCP

slide-29
SLIDE 29

29

Contributions to the lab

 The SCTP Lab was set up in summer term 2010 (SS 2010).  Students

  • Carl Denis
  • Alexandra Simon

 Supervisors

  • Lothar Braun
  • Andreas Müller

 You are invited to contribute as well by giving us comments and

suggestions for improvement!

slide-30
SLIDE 30

30

Questions?