ch2

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

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

98 εμφανίσεις


Introduction

1
-
1

message

segment

datagram

frame

source

application

transport

network

link

physical

H
t

H
n

H
l

M

H
t

H
n

M

H
t

M

M

destination

application

transport

network

link

physical

H
t

H
n

H
l

M

H
t

H
n

M

H
t

M

M

network

link

physical

link

physical

H
t

H
n

H
l

M

H
t

H
n

M

H
t

H
n

H
l

M

H
t

H
n

M

H
t

H
n

H
l

M

H
t

H
n

H
l

M

router

switch

Encapsulation


Introduction

1
-
2

TCP segment structure

source port #

dest port #

32 bits

application

data

(variable length)

sequence number

acknowledgement number

Receive window

Urg data pnter

checksum

F

S

R

P

A

U

head

len

not

used

Options (variable length)

URG: urgent data

(generally not used)

ACK: ACK #

valid

PSH: push data now

(generally not used)

RST, SYN, FIN:

connection estab

(setup, teardown

commands)

# bytes

rcvr willing

to accept

counting

by bytes

of data

(not segments!)

Internet

checksum

(as in UDP)


Introduction

1
-
3

IP datagram format

ver

length

32 bits

data

(variable length,

typically a TCP

or UDP segment)

16
-
bit identifier

Internet


checksum

time to

live

32 bit source IP address

IP protocol version

number

header length


(bytes)

max number

remaining hops

(decremented at

each router)

for

fragmentation/

reassembly

total datagram

length (bytes)

upper layer protocol

to deliver payload to

head.

len

type of

service

“type” of data

flgs

fragment


offset

upper


layer

32 bit destination IP address

Options (if any)

E.g. timestamp,

record route

taken, specify

list of routers

to visit.

how much overhead
with TCP?


20 bytes of TCP


20 bytes of IP


= 40 bytes + app
layer overhead


Introduction

1
-
4

Ethernet Frame Structure


Preamble:



7 bytes with pattern 10101010 followed by one byte with
pattern 10101011 to synchronize receiver, sender clock rates


Addresses:

6 bytes


if adapter receives frame with matching destination
address, or with broadcast address (eg ARP packet), it
passes data in frame to net
-
layer protocol


otherwise, adapter discards frame


Type:

indicates the higher layer protocol (mostly IP but
others may be supported such as Novell IPX and AppleTalk)


CRC:

checked at receiver, if error is detected, the frame is
simply dropped