Transcript Document

Service time evaluation (transfer) for a
message sent over a LAN through TCP
protocol
Network Routers service time
PROTOCOL TCP/IP STRATIFICATION
HTTP
transport layer
network layer
data link layer
FTP
NFS
RPC
TELNET
TCP
DNS
UDP
IP
SNMP
DATAGRAM IP FORWARDING
The router holds a routing table, used to find the following
router or host which forward the datagram
Host A
TCP
Host B
IP
TCP
IP
IP
Network
layer
Network
layer
Data layer
router
PROTOCOLS
Communication protocol design is based on a layer architecture.
Every layer n entity communicates, exchanging Physical Data Unit (PDU), only
with layer n remote entities, using the services provided by layer n-1 and offers
services to layer n+1.
Layer n
Layer n
Layer n -1
Layer n -1
network
When data are transferred an header is added by each layer
Data layer n -1
Header layer n -1 Header layer n
Data layer n
NETWORK PROTOCOLS
Protocol
TCP
UDP
IPv4
IPv6
ATM
Ethernet
Ieee 802.3
Ieee 802.5 TR
FDDI
PDU
name
Segment
Datagram
Datagram
Datagram
Cell
Frame
Frame
Frame
Frame
Max PDU Overhead Max data
size
area
65535
Ltd by IP
65535
65535
53
1518
1518
4472
4500
20
8
20
40
5
18
21
28
28
65515
Ltd by IP
65515
65495
48
1500
1497
4444
4472
TCP
• TCP provides a service: connection
oriented, reliable, end-to-end, with
flow control. It assures the data
delivery in the same sending order,
without losses.
• TCP implements a connection
reliable mechanism called Three
way handshake
Host B
Host A
syn
syn
ack
data
data
fin
ack
• 3 segments are required to establish
a connection
• 4 segments are required to end it in
both directions
data
fin
ack
IP
• IP defines the format of the packets sent in Internet
• The service is unreliable, isn’t end-to-end like, and the
datagrams can be lost
FRAGMENTATION
• Protocol entities at each layer communicate with each other
by exchanging PDUs composed of a header and a data area.
• PDUs have a maximum dimension for the data area (named,
for the network layer, Maximum Transmission Unit ((MTU))
• Being MTUs lengths variable for different protocols, router
has to be able to fragment datagrams, that will be
reassembled at the IP level by the destination host.
Fragmentation disadvantages
• The router has to be able to divide PDU
• Destination node must reassemblate the fragments
• WARNING:
IP standard tells to fragment from source node, in
anticipation of the path to make.
Service times
Service Time
of a message
=
Time to transmit the message
over the network
# of bytes (including protocol
header-trailer, and fragmentation if there is)
=
bandwidth
=
Example WITHOUT fragmentation
300 byte message sent from a Client to a Server
300
20 300
client
Server
TCP
TCP
IP
IP
Network
layer
Network
layer
20 20 300
20 300
20 20 300
T.R.
18 20 20 300
28 20 20 300
ethernet
FDDI
router2
router1
28 20 20 300
300
LAN service time
300 byte message sent from a Client to a Server
28 20 20 4404
Service Time Eth =
10.000.000
358 x 8
=
=
10.000.000
368 x 8
28 20 20 300
Service Time FDDI =
100.000.000
=
16.000.000
0.00002944 sec.
=
100.000.000
368 x 8
28 20 20 300
Service Time TR =
0.000286 sec.
=
=
16.000.000
0.000184 sec.
Example WITH fragmentation
The Server sends a 10.000 byte reply to Client
Hypothesis: TCP does not know the local network MTU
client
Server
TCP
TCP
IP
IP
Network
layer
Network
layer
10000
20 4404 4424 1172
20 20 4404
20 4424
20 1172
28 20 20 4404
T.R.
28 20 4424
ethernet
28 20 1172
FDDI
28 20 20 4404
28 20 4424
28 20 1172
- 28
- 28
- 28
FDDI
=20 4424
=20 4424
= 1192
ET data
18 1192
FDDI
TR
ET IP data
18 20 1480
18 20 1480
18 20 1464
28 20 20 4404
28 20 4424
28 20 1172
-
28
28
28
+
+
+
28
28
28
LAN Service Time
The Server sends a 10.000 byte reply to Client
Hypothesis: TCP does not know the local network MTU
Case of Token Ring
(
28 20 20 4404
+
28 20 4424
+
28 20 1172
Service Time =
16.000.000
(4472+4472+1220) x 8
Service Time =
= 0.005082 sec.
16.000.000
)
x8
Example WITH fragmentation
The Server sends a 10.000 byte reply to Client
Hypothesis: TCP knows the local network MTU
client
Server
TCP
TCP
IP
IP
Network
layer
Network
layer
10000
20 4404
20 4404
20 1192
20 20 4404
20 20 4404
20 20 1192
28 20 20 4404
T.R.
28 20 20 4404
ethernet
28 20 20 1192
FDDI
- 28
28 20 20 4404 - 28
28 20 20 1192 - 28
28 20 20 4404
FDDI
= 20 4424
= 20 4424
= 1232
ET data
18 1232
FDDI
TR
ET IP TCP data
18 20 20 1460
18 20
1480
18 20
1464
28 20 20 4404
28 20 20 4404
28 20 20 1192
-
28
28
28
+
+
+
28
28
28
LAN Service Time
The Server sends a 10.000 byte reply to Client
Hypothesis: TCP knows the local network MTU
Case of Token Ring
(
28 20 20 4404
+
28 20 20 4404 +
28 20 20 1192
Service Time =
16.000.000
(4472+4472+1260) x 8
Service Time =
= 0.005102 sec.
16.000.000
0.005102 sec.
0.005082 sec.
20 msec different
)
x8
Average service time
Evaluation without fragmentation
Let’s specify:
MTUn: network n MTU (byte)
XOvhd: X protocol overhead (byte)
FrameOvhdn: network n overhead (byte)
Overheadn: network n total overhead (TCP+IP+frame) (byte)
Bandwidthn: network n bandwidth (Mbps)
Ndatagrams: number of IP datagrams required
Nsegments: number of TCP segments required (< or = Ndatagrams)
N: number of networks
Average service time
Without fragmentation
TCP does not know LAN MTU
NSegments
= MessageSize
65495
NDatagrams =
TCP knows LAN MTU
NSegments = NDatagrams
MessageSize + NSegments x TCPOvhd
minn MTUn - IPOvhd
(rough estimate)
Overheadn = NSegments x TCPOvhd + Ndatagrams x (IPOvhd + FrameOvhdn)
ServiceTimen =
8 x (MessageSize + Overheadn )
106 x Bandwidth
Exercise - text
Client
Ethernet
10 Mbps
MTU: 1518 bytes
DB server
router1
FDDI
100 Mbps
MTU: 4472 bytes
T.R.
router2
Token RingI
16 Mbps
MTU: 4444 bytes
• The client sends 3 transactions per minute (0.05 tps), whose
messages average lenght is 400 bytes. The 80% of replies are 8092
bytes lenght and the 20% are 100.000 bytes
• Assuming that no fragmentation exists and the TCP layer does not
know the netwotk MTU, evaluate the average service time for
requests and replies for each network.
Exercise - solution
•
Using
NDatagrams =
MessageSize + Nsegment x TCPOvhd
minn MTUn - IPOvhd
We can evaluate the numbers of Datagrams required in each case
(request, short reply and long reply)
(400+20)/(1500-20) = 1
(8092+20)/(1500-20) = 6
(100000+40)/(1500-20) = 68
request
short reply
long reply
Exercise - solution
•
Using
Overheadn = TCPOvhd+Ndatagrams x (IPOvhd + FrameOvhdn)
We can evaluate the network overhead (ethernet)
OverheadEth = 20 + 1 (20 + 18) = 58
request
OverheadEth = 20 + 6 (20 + 18) = 248
short reply
OverheadEth = 20 + 68 (20 + 18) = 2604
long reply
•
Using
ServiceTimen =
8 x (MessageSize + Overheadn )
106 x Bandwidth
We can evaluate the Service Time (ethernet)
OverheadEth = 8 x (400 + 58) / 10.000.000 = 0.366 msec
OverheadEth = 8 x (8092 + 248) / 10.000.000 = 6.67 msec
OverheadEth = 8 x (100.000 + 2604) / 10.000.000 = 82.1 msec
request
short reply
long reply
Service times evaluation
Eth
FDDI
TR
Router
Ndatagrams
Overhead (byte)
ServiceTime(msec)
Ndatagrams
Overhead (byte)
ServiceTime(msec)
Ndatagrams
Overhead (byte)
ServiceTime(msec)
Latency (134 usec/packet)
Request
Short
reply
Long
reply
1
58
0.366
1
68
0.0374
1
68
0.234
134
6
248
6.67
6
308
0.672
6
08
4.2
804
68
2604
82.1
68
3284
8.26
68
3284
51.6
9.112
Network Router
Router queues
Service times at Routers
Router latency (msec per packet): time spent by the router to process
a datagram, given by manufacturer.
RouterServiceTime: Ndatagrams * RouterLatency
Where
MessageSize + TCPOvhd
NDatagrams =
minn MTUn - IPOvhd
Exercise
Client
Ethernet
10 Mbps
MTU: 1518 bytes
•
DB server
router1
FDDI
100 Mbps
MTU: 4472 bytes
T.R.
router2
Token Ring
16 Mbps
MTU: 4444 bytes
Router 1 and 2 process 400,000 packets/sec
 Service time: 2.5 msec (=1/400,000)
 Service demand at router
Client Request
Short Reply
Long Request
1 x 2.5 = 2.5 msec
6 x 2.5 = 15 msec 68 x 2.5 = 170 msec