Introduction To Tcp/Ip Ii: - Essentially Adapted From Kurose and Ross
Introduction To Tcp/Ip Ii: - Essentially Adapted From Kurose and Ross
Introduction To Tcp/Ip Ii: - Essentially Adapted From Kurose and Ross
TCP/IP II
7th edition
Jim Kurose, Keith Ross
Pearson/Addison Wesley
April 2016
transport
network
link
physical
provide logical
transport
network
data link
communication between app physical
processes running on
lo
different hosts
gi
ca
le
transport protocols run in
nd
-
end systems
en
d
tra
• send side: breaks app
ns
po
messages into segments,
rt
passes to network layer
• rcv side: reassembles
application
transport
network
segments into messages, data link
physical
passes to app layer
more than one transport
protocol available to apps
• Internet: TCP and UDP
Transport Layer 3-3
Internet transport-layer protocols
reliable, in-order
application
transport
network
lo
data link physical
gi
physical
• flow control
ca
network
le
data link
nd
• connection setup physical
-en
network
d
unreliable, unordered
tra
data link
physical
ns
delivery: UDP
po
network
rt
data link
physical
• no-frills extension of network
data link application
“ best-effort” IP physical
network
data link
transport
network
data link
services not available: physical
physical
• delay guarantees
• bandwidth guarantees
application
P3
transport
network
link
physical
application application
application
P3 P1 P2 P4
Host 1 Host 3
3-8
UDP demux: example
application port
6428
application port P1
port
5775
application
P3 9157
P4
sport 5775
sport 9175 dport 6428
dport 6428 s-ip: C
s-ip: A d-ip: B
d-ip: B
dport 6428
sport 5776
d-ip: B
s-ip: C
Transport Layer 3-11
UDP: User Datagram Protocol [RFC 768]
“ no frills,” “ bare bones” UDP use:
transport protocol streaming multimedia
“ best effort” service, UDP apps (loss tolerant, rate
segments may be: sensitive)
• lost DNS
• delivered out-of-order to SNMP
app reliable transfer over
connectionless: UDP:
• no handshaking between add reliability at
UDP sender, receiver application layer
• each UDP segment application-specific error
handled independently of recovery!
others
length checksum
why is there a UDP?
no connection
application establishment (which can
data add delay)
(payload) simple: no connection state
at sender, receiver
small header size
no congestion control:
UDP segment format
UDP can blast away as fast
as desired
Acknowledge number:
• ack_num=seq# of next packet expected from
other side source port # dest port #
received.
User
types
‘C’
Seq=42, ACK=79, data = ‘C’
host ACKs
receipt of
‘C’, echoes
Seq=79, ACK=43, data = ‘C’ back ‘C’
host ACKs
receipt
of echoed
‘C’ Seq=43, ACK=80
SendBase=92
Seq=92, 8 bytes of data Seq=92, 8 bytes of data
timeo
ACK=100
ut
ut
X
ACK=100
ACK=120
SendBase=120
X
ut
ACK=120
cumulative ACK
Transport Layer 3-21
TCP flow control
application
application may process
remove data from application
TCP socket buffers ….
TCP socket OS
receiver buffers
… slower than TCP
receiver is delivering
(sender is sending) TCP
code
IP
flow control code
receiver controls sender, so
sender won’t overflow receiver’s
buffer by transmitting too much, from sender
too fast
receiver protocol stack
SYNSENT
SYN RCVD
ESTAB
ESTAB
transport
network
link
physical
network-layer functions:
forwarding: move packets from router’s input to
appropriate router output
routing: determine route taken by packets from
source to destination
• routing algorithms
Routing
Algorithm
control
plane
data
plane
values in arriving
packet header
0111 1
2
3
routing, management
routing control plane (software)
processor operates in millisecond
time frame
forwarding data plane
(hardware) operttes
in nanosecond
timeframe
high-seed
switching
fabric
physical layer:
bit-level reception decentralized switching:
data link layer: destination-based forwarding: forward based
e.g., Ethernet only on destination IP address (traditional)
(chapter 5) generalized forwarding: forward based on
any set of header field values
queuing: if datagrams arrive faster than
forwarding rate into switch fabric
• if queue is full, the arriving packet is dropped.
otherwise 3
examples:
DA: 11001000 00010111 00010110 10100001 which interface?
DA: 11001000 00010111 00011000 10101010 which interface?
Network Layer: Data Plane 4-32
Switching via memory
first generation routers:
traditional computers with switching under direct control of
CPU
packet copied to system’s memory
input output
port memory port
(e.g., (e.g.,
Ethernet) Ethernet)
system bus
datagram
switch buffer link
fabric layer line
protocol termination
queueing (send)
…
large IP datagram divided in: one large datagram
out: 3 smaller datagrams
(“ fragmented” ) within net
• one datagram becomes
several datagrams
• “ reassembled” only at reassembly
final destination
• IP header bits used to
identify, order related
…
fragments
223 1 1 1
is called a subnet
223.1.3.0/24
DHCP
223.1.1.0/24
server
223.1.1.1 223.1.2.1
223.1.2.0/24
223.1.3.1 223.1.3.2
223.1.3.0/24
Network Layer: Data Plane 4-41
DHCP client-server scenario
DHCP server: 223.1.2.5 DHCP discover arriving
client
src : 0.0.0.0, 68
Broadcast: is there a
dest.: 255.255.255.255,67
DHCPyiaddr:
server 0.0.0.0
out there?
transaction ID: 654
DHCP offer
src: 223.1.2.5, 67
Broadcast: I’m a DHCP
dest: 255.255.255.255, 68
server!
yiaddrr:Here’s an IP
223.1.2.4
transaction ID: 654
address
lifetime:you
3600can
secs use
DHCP request
src: 0.0.0.0, 68
dest:: 255.255.255.255, 67
Broadcast: OK. I’ll take
yiaddrr: 223.1.2.4
that IP address!
transaction ID: 655
lifetime: 3600 secs
DHCP ACK
src: 223.1.2.5, 67
dest: 255.255.255.255,
Broadcast: 68
OK. You’ve
yiaddrr: 223.1.2.4
got that IPID:
transaction address!
655
lifetime: 3600 secs
Network Layer: Data Plane 4-42