Stream Control Transmission Protocol-Network Programming-Lecture Slides, Slides of Network Programming

This lecture was delivered by Dr. Ram Sai at Jaypee University of Engineering and Technology for Computers and Network Programming course. It includes: Stream, Protocol, Sctp, Control, Transmission, Congestion, Tcp, Udp, Multihoming, Feature, Robustness

Typology: Slides

2011/2012

Uploaded on 07/23/2012

gannesh
gannesh 🇮🇳

4.4

(12)

75 documents

1 / 28

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
NetworkProgramming
(Lec7)
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download Stream Control Transmission Protocol-Network Programming-Lecture Slides and more Slides Network Programming in PDF only on Docsity!

Network

Programming

(Lec

Stream

Control

Transmission

Protocol

(SCTP)

SCTP

is

designed

to

address

the

shortcomings

in

TCP.

It

uses

mechanisms,

such

as

four

way

handshake

to

prevent

DoS attacks.

The

SCTP

architecture

defines

packet

format

that

contains

additional

fields,

such

as

cookie

and

verification

tag

to

avoid

SYN

flooding.

The

SCTP

architecture

includes

improved

congestion

control

algorithms

that

are

effective

in

controlling

congestion

in

unstable

networks.

Stream

Control

Transmission

Protocol

(SCTP)

Provide

multiple

streams

between

connection

endpoints,

each

with

its

own

reliable

sequenced

delivery

of

messages

A

lost

message

in

one

of

these

streams

does

not

block

delivery

of

messages

in

any

of

the

other

streams

In

contrast

to

TCP,

where

a

loss

at

any

point

in

the

single

stream

of

bytes

blocks

delivery

of

all

future

data

on

the

connection

until

the

loss

is

repaired

Stream

Control

Transmission

Protocol

(SCTP)

The

term

multi

streaming

refers

to

the

capability

of

SCTP

to

transmit

several

independent

streams

of

chunks

in

parallel,

for

example

transmitting

Web

page

images

together

with

the

Web

page

text.

In

essence,

it

is

the

bundling

of

several

connections

into

a

single

SCTP

association,

operating

on

messages

(or

chunks)

rather

than

bytes.

docsity.com

SCTP

Four

Way

Handshake

Server

must

be

prepared

to

accept

an

incoming

association

By

calling

socket

bind

and

listen

and

is

called

a

passive

open

Client

issues

an

active

open

by

calling

connect

or

by

sending

a

message

which

implicitly

opens

the

association

SCTP

Four

way

Handshake

Host

A

initiates

an

association

by

sending

an

INIT

packet

to

Host

B.

Host

B

responds

with

an

INIT
ACK

packet

that

contains

the

following

fields:

A

Verification

tag

A

Cookie

The

TCP
SYN
‐ACK

packet

does

not

contain

these

fields.

The

cookie

contains

the

necessary

state

information,

which

the

server

uses

to

allocate

resources

for

the

association.

The

cookie

field

includes

a

signature

for

authenticity

and

a

timestamp

to

prevent

replay

attacks

using

old

cookies.

Unlike

TCP,

Host

B

in

SCTP

does

not

allocate

resources

at

this

point

in

the

connection.

The

verification

tag

provides

a

key

that

enables

Host

A

to

verify

that

the

SCTP

packet

belongs

to

the

current

association.

Host

A

sends

the

COOKIE
‐ECHO

packet

to

Host

B.

If

Host

A

has

a

forged

IP

address,

it

never

receives

the

INIT
‐ACK

chunk

.^

This

prevents

Host

A

from

sending

the

COOKIE
‐ECHO

packet.

As

a

result,

the

conversation

ends

without

the

server

allocating

any

resources

for

the

connection.

Host

B

responds

with

a

COOKIE
ACK

chunk

and

allocates

resources

for

the

connection.

The

connection

is

now

established

between

Host

A

and

Host

B.

Host

A

can

now

start

sending

data

to

Host

B.

SCTP

Association

Termination

Does

not

permit

a

"half

closed"

association

When

one

end

shuts

down

an

association,

the

other

end

must

stop

sending

new

data

Receiver

of

the

shutdown

request

sends

the

data

that

was

queued,

if

any,

and

then

completes

the

shutdown

SCTP does

not

have

a

TIME_WAIT

state,

due

to

its

use

of

verification

tags

All

chunks

are

tagged

with

the

tag

exchanged

in

the

INIT

chunks

A

chunk

from

an

old

connection

will

arrive

with

an

incorrect

tag

10

SCTP

Association

Termination

11

SCTP

Options

Dynamic

address

extension

Allows

cooperating

SCTP endpoints

to

dynamically

add

and

remove

IP

addresses

from

an

existing

association

Partial

reliability

extension

Allows

cooperating

SCTP endpoints,

under

application

direction,

to

limit

the

retransmission

of

data

When

a

message

becomes

too

old

to

send

(according

to

the

application's

direction),

the

message

will

be

skipped

and

thus

no

longer

sent

to

the

peer

This

means

that

not

all

data

is

assured

of

arrival

at

the

other

end

of

the

association

13

Port

Numbers

At

any

given

time,

multiple

processes

can

be

using

any

given

transport:

UDP,
SCTP,

or

TCP

All

three

transport

layers

use

16

‐bit

integer

port

numbers

to

differentiate

between

these

processes

When

a

client

wants

to

contact

a

server,

the

client

must

identify

the

server

with

which

it

wants

to

communicate

TCP,
UDP,

and

SCTP

define

a

group

of

well

‐known

ports

to

identify

well

known

services

FTP

servers

are

assigned

the

well

‐known

port

of

21

TFTP

servers

are

assigned

the

UDP

port

of

69

Clients

normally

use

ephemeral

ports,

that

is,

short

‐lived

ports,

normally

assigned

automatically

by

the

transport

protocol

to

the

client

Clients

normally

do

not

care

about

the

value

of

the

ephemeral

port;

the

client

just

needs

to

be

certain

that

the

ephemeral

port

is

unique

on

the

client

host

The

transport

protocol

code

guarantees

this

uniqueness

14

Port

Numbers

The

well

‐known

ports:

These

port

numbers

are

controlled

and

assigned

by

the

IANA. 

The

registered

ports:

not

controlled

by

IANA,
IANA

registers

and

lists

the

uses

of

these

ports

as

a

convenience

to

the

community. 

When

possible,

the

same

port

is

assigned

to

a

given

service

for

both

TCP

and

UDP.

For

example,

ports

through

are

assigned

for

an

X

Window

server

Upper

limit

was

introduced

to

range

ephemeral

ports.

Unix

systems

uses

reserved

port,

which

is

any

port

less

than

These

ports

can

only

be

assigned

to

a

socket

by

an

appropriately

privileged

process.

All

the

IANA

well

known

ports

are

reserved

ports;

hence,

the

server

allocating

this

port

(such

as

the

FTP

server)

must

have

superuser

privileges

when

it

starts.

allocated

ephemeral

ports

.fine

in

the

early

1980s,

but

it

is

easy

today

to

find

a

host

that

can

support

more

than

connections

at

any

given

time.

Therefore,

many

newer

systems

allocate

ephemeral

ports

differently

to

provide

more

ephemeral

ports,

either

using

the

IANA

‐defined

ephemeral

range

or

a

larger

range.

Port

Numbers

There

are

a

few

clients

(not

servers)

that

require

a

reserved

port

as

part

of

the

client/server

authentication:

the

rlogin

and

rsh clients

are

examples.

These

clients

call

the

library

function

rresvport to

create

a

TCP

socket

and

assign

an

unused

port

in

the

range

to

the

socket.

This

function

normally

tries

to

bind

port

and

if

that

fails,

it

tries

to

bind

and

so

on,

until

it

either

succeeds

or

fails

on

port

TCP

Port

Numbers

&

Concurrent

Servers

19

With a concurrent server, where the main server loop spawns achild to handle each new connection, what happens if the childcontinues to use the well-known port number while servicing a

long request?

TCP

Port

Numbers

&

Concurrent

Servers

server

client

listening socket

connection request to206.62.226.35, port 21

20