CHAPTER 1Network Protocols

prunelimitΔίκτυα και Επικοινωνίες

23 Οκτ 2013 (πριν από 4 χρόνια και 16 μέρες)

62 εμφανίσεις

CHAPTE
R

1

Network Protocols

CECS 474 Computer Network Interoperability

Notes for Douglas E. Comer,
Computer Networks and Internets (5
th

Edition)

Tracy Bradley Maples, Ph.D.

Computer Engineering & Computer Science

Cal
ifornia

State University, Long Beach


Protocol
S
uites and Layering Models



D
ef
n
:


P
r
o
t
o
c
o
ls

ar
e

a
g
ree
m
e
n
ts

a
bou
t

how

c
o
mm
un
i
ca
ti
o
n

s
hou
ld

t
a
k
e

p
l
ace
.



Th
ey

s
p
ec
i
f
y
:



Fo
r
m
a
t

o
f

m
essa
g
e
s



M
ea
n
i
n
g
o
f

m
e
s
sa
g
e
s



R
u
l
e
s

f
o
r

e
x
c
h
a
ng
i
n
g

m
essa
g
e
s



Pr
o
ce
du
re
s

f
o
r

h
a
nd
li
n
g

p
r
ob
l
e
m
s




N
e
t
w
o
rk

h
ar
d
w
ar
e

func
ti
on
s

a
t

a

very

l
ow

l
eve
l.



Hardware related p
ro
b
l
e
m
s

can

o
cc
u
r

t
h
a
t

n
eed

to

b
e

a
d
dressed

b
y

pro
t
o
c
o
l
s
:



B
its

can

b
e

c
o
rr
up
t
ed

o
r

d
es
t
r
oy
ed



En
ti
r
e

p
ac
k
e
ts

can

b
e

l
o
s
t



Pa
c
k
e
ts

can

b
e

dup
li
ca
t
ed



Pa
c
k
e
ts

can

b
e

d
e
li
v
ered

ou
t

o
f

o
r
d
e
r




2

S
ets of Protocols




Se
ts

o
f

p
r
otocol
s

a
re

designed

t
o

w
o
rk

togethe
r.



Ea
ch

p
r
o
t
o
c
o
l

s
o
l
v
e
s

a

s
m
a
l
l

p
ar
t

o
f

t
h
e

c
o
mm
un
i
ca
ti
on
s

p
r
ob
l
e
m



Se
ts

o
f

p
r
o
t
o
c
o
ls

ar
e

kno
w
n

as
:

-
-

Pro
t
o
c
o
l

Su
it
e
s

-
-

Pro
t
o
c
o
l

f
a
m
ili
e
s



Th
ey

ar
e

d
es
i
gn
ed

i
n

l
a
y
ers
.



3

Pr
o
t
o
c
o
ls

can

a
l
so

b
e

u
sed

to

d
i
s
ti
ngu
i
sh

a
m
ong
:



M
u
lti
p
le

c
o
m
pu
t
e
rs

o
n
a

n
e
t
w
o
rk



M
u
lti
p
le

a
pp
li
ca
ti
on
s

o
n
a

c
o
m
pu
t
e
r



M
u
lti
p
le

c
op
i
e
s

o
f

a

s
i
ng
le

a
pp
li
ca
ti
o
n
o
n
a

c
o
m
pu
t
e
r

The O
S
I

7
-
Layer Model



Th
e

7
-
La
y
e
r

M
od
e
l
:



W
a
s

d
ef
i
n
ed

fa
i
r
ly

ear
ly

in

t
h
e

d
e
v
e
l
op
m
e
n
t

o
f

n
e
t
w
o
r
ks



I
s

now

s
o
m
e
w
h
a
t

d
a
t
ed



D
o
e
s

no
t

i
n
c
l
ud
e

t
h
e

i
n
t
er
n
e
t

l
a
y
e
r

4

Protocol Design



Pr
o
t
o
c
o
ls

ar
e

d
i
v
i
d
ed

i
n
to

l
a
y
e
r
s



Ea
ch

l
a
y
e
r

is

d
e
vo
t
ed

t
o

on
e

s
ub
-
p
r
ob
l
e
m

E
xa
m
p
l
e
:

Th
e

I
SO

(I
n
t
er
n
a
ti
on
a
l

S
t
a
nd
ar
d
s

O
r
g
a
n
i
za
ti
on
)

O
S
I

(
O
p
en

Sy
s
t
e
m

I
n
t
erc
onn
ec
ti
on
)


7
-
l
a
y
e
r

R
efere
n
c
e

M
od
e
l

5

The O
S
I

7
-
Layers





L
ay
e
r

1
:

Phy
s
i
c
a
l



Th
e

und
er
l
y
i
n
g

h
ar
d
w
ar
e



L
ay
e
r

2
:

D
a
ta

L
i
n
k

(
m
e
d
ia

a
ccess
)



H
ar
d
w
ar
e

fra
m
e

d
ef
i
n
iti
on
s



L
ay
e
r

3
:

N
et
w
o
rk



Pa
c
k
e
t

f
o
r
w
ar
d
i
n
g



L
ay
e
r

4
:

T
r
an
s
po
r
t



R
e
li
a
b
ility





L
ay
e
r

5
:

S
ess
i
o
n



Log
in

a
n
d

p
ass
w
o
r
d
s



L
ay
e
r

6
:

P
rese
n
t
a
t
i
o
n



D
a
ta

re
p
rese
n
t
a
ti
o
n



L
ay
e
r

7
:

A
pp
li
c
a
t
i
o
n



In
d
i
v
i
du
a
l

a
pp
li
ca
ti
o
n

progra
m
s

The Layering Model



Pr
o
t
o
c
o
l

s
o
f
t
w
ar
e

f
o
ll
o
w
s

t
h
e

l
a
y
er
i
n
g

m
od
e
l
, with:



O
n
e

s
o
f
t
w
ar
e

m
odu
le

p
e
r

l
a
y
e
r



M
odu
l
e
s

that
w
o
rk

t
og
e
t
h
e
r



Inc
o
m
i
n
g

o
r

ou
t
go
i
n
g

d
ata

p
ass
ing

fr
om on
e

m
odu
le

to

a
no
t
h
e
r

The entire set of
protocol
layers (or
modules
)

is known
as a
stac
k
.

6

Layers and

Packet Headers

Ea
ch

l
a
y
er
:



Pre
p
e
nd
s

a

h
ea
d
e
r

to

t
h
e

ou
t
go
i
n
g

p
ac
k
e
t



R
e
m
ov
e
s

a

h
ea
d
e
r

fr
om
t
h
e

i
n
c
o
m
i
n
g

p
ac
k
e
t




Th
is

p
r
o
ces
s

is

kno
w
n

a
s

data
encap
s
u
l
a
ti
on
.

7

Layering Principle



Sof
t
w
ar
e

i
m
ple
m
enting

laye
r

N a
t

th
e

des
t
ination

rece
i
ve
s

exac
tly

t
h
e

m
ess
ag
e

se
n
t

b
y

s
o
ft
w
a
r
e

i
m
p
l
e
m
e
n
ti
n
g

l
a
ye
r

N a
t

t
h
e

s
ou
rce
.

--
C
o
m
e
r

8

TCP/IP La
y
ering




Notwithstanding

the

push

by

researchers

to

adopt

the

OSI

model,

it

became

clear

that

TCP/IP was

technically more flexible and superior. TCP/IP is the primary protocol
stack used today.

N
o
te
:

Th
is

T
C
P
/
IP

l
ayer
i
n
g

is

an

ac
t
u
a
l

i
m
p
l
e
m
e
n
t
a
ti
o
n

o
f

p
r
o
t
o
c
o
l
s
,

un
li
k
e

t
h
e

I
SO
m
od
e
l
.

9

10

TCP/IP La
y
ers




L
ay
e
r

1
:

Phy
s
i
c
a
l



B
as
ic

n
e
t
w
o
rk

ha
r
d
w
a
re


Si
m
i
la
r

t
o

O
S
I

Lay
e
r

1



L
ay
e
r

2
:

N
et
w
o
rk

I
n
terf
a
c
e



MA
C
fr
a
m
e

f
o
r
m
a
t


MA
C
a
dd
r
ess
i
n
g


In
t
erfac
e

b
e
t
w
een

c
o
m
pu
t
e
r

a
n
d

t
h
e

n
e
t
w
ork

(
i.
e
.,

t
h
e

N
I
C
)


Si
m
i
la
r

t
o

O
S
I

Lay
e
r

2


L
ay
e
r

3
:

I
n
ter
n
e
t



Fo
r
m
a
t

o
f

p
ac
k
e
ts


M
ec
h
a
n
i
s
m
s

f
o
r

f
o
r
w
a
r
d
i
n
g
p
ac
k
e
ts


N
o
t

in

th
e

O
S
I

M
ode
l




L
ay
e
r

4
:

T
r
an
s
po
r
t



Sp
ec
i
f
i
e
s

how

to

p
r
ov
i
d
e

re
li
a
b
le

t
ra
n
sfe
r

fr
om

on
e

a
pp
li
ca
ti
o
n

o
n

on
e

c
o
m
pu
t
e
r

to

an

a
pp
li
ca
ti
o
n

o
n

an
o
t
her


Si
m
i
la
r

t
o

O
S
I

Lay
e
r

4



L
ay
e
r

5
:

A
pp
li
c
a
t
i
o
n



Ev
eryt
h
i
n
g

e
l
s
e

(
i
.
e
.,

how on
e

a
pp
li
ca
ti
o
n

u
se
s

t
h
e

I
n
t
er
n
e
t)


Si
m
i
la
r

to

O
S
I

La
ye
r

6

an
d

7