service time evaluation (transfer) for a message sent over a lan through tcp protocol

25
Service time evaluation (transfer) for a message sent over a LAN through TCP protocol Network Routers service time

Upload: beyla

Post on 16-Jan-2016

36 views

Category:

Documents


0 download

DESCRIPTION

Service time evaluation (transfer) for a message sent over a LAN through TCP protocol Network Routers service time. PROTOCOL TCP/IP STRATIFICATION. NFS. HTTP. FTP. TELNET. DNS. SNMP. RPC. transport layer. TCP. UDP. network layer. IP. data link layer. DATAGRAM IP FORWARDING. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Network Routers service time

Page 2: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

PROTOCOL TCP/IP STRATIFICATION

IP

UDP

TELNETHTTP FTP

TCP

NFS DNS SNMP

data link layer

network layer

transport layer

RPC

Page 3: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

DATAGRAM IP FORWARDING

The router holds a routing table, used to find the following router or host which forward the datagram

Host A Host B

TCP

IP

Network layer

TCP

IP

Network layer

IP

Data layer

router

Page 4: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Layer n

Layer n -1

Layer n

Layer n -1

network

PROTOCOLSCommunication 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.

When data are transferred an header is added by each layer

Data layer nHeader layer n

Data layer n -1

Header layer n -1

Page 5: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

NETWORK PROTOCOLS

Protocol PDUname

Max PDUsize

Overhead Max dataarea

TCP Segment 65535 20 65515UDP Datagram Ltd by IP 8 Ltd by IPIPv4 Datagram 65535 20 65515IPv6 Datagram 65535 40 65495ATM Cell 53 5 48Ethernet Frame 1518 18 1500Ieee 802.3 Frame 1518 21 1497Ieee 802.5 TR Frame 4472 28 4444FDDI Frame 4500 28 4472

Page 6: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

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

• 3 segments are required to establish a connection

• 4 segments are required to end it in both directions

Host A Host B

syn

syn

ack

data

data

fin

ack

data

fin

ack

Page 7: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

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

Page 8: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

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.

Page 9: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

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.

Page 10: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Service times

Service Time of a message

Time to transmit the messageover the network

=

=

# of bytes (including protocolheader-trailer, and fragmentation if there is)

bandwidth

=

Page 11: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Example WITHOUT fragmentation300 byte message sent from a Client to a Server

TCP

IP

Network layer

client

TCP

IP

Network layer

Server

ethernetT.R.

FDDI

300

30020

3002020

300202018

300202028

300202028

300

30020

3002020

router1 router2

Page 12: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

LAN service time

4404202028

Service Time Eth =10.000.000

= =358 x 8

10.000.000

0.000286 sec.

Service Time FDDI =100.000.000

= =368 x 8

100.000.000

0.00002944 sec.

Service Time TR =16.000.000

= =368 x 8

16.000.000

0.000184 sec.

300202028

300202028

300 byte message sent from a Client to a Server

Page 13: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Example WITH fragmentation

TCP

IP

Network layer

client

TCP

IP

Network layer

Server

ethernetT.R.

FDDI

10000

440420 4424 1172

44042020

442420

117220

44042020

442420

117220

28

28

28

44042020

442420

117220

28

28

28

28 28- +

TR FDDI

28 28+-28 28+-

44042020

442420

117220

28

28

28

28-FDDI

28-28-

= 4424

4424=

= 119214802018

14802018

14642018

dataIPET

119218

dataET

The Server sends a 10.000 byte reply to ClientHypothesis: TCP does not know the local network MTU

20

20

Page 14: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

LAN Service Time

Service Time =16.000.000

The Server sends a 10.000 byte reply to ClientHypothesis: TCP does not know the local network MTU

Case of Token Ring

44042020 442420 11722028 28 28+ +

Service Time =16.000.000

(4472+4472+1220) x 8

= 0.005082 sec.

( ) x 8

Page 15: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

TCP

IP

Network layer

client

TCP

IP

Network layer

Server

ethernetT.R.

FDDI

10000

440420 4404 1192

44042020

440420

119220

44042020

440420

119220

28

28

28

44042020

440420

119220

28

28

28

28 28- +

TR FDDI

28 28+-28 28+-

44042020

440420

119220

28

28

28

28-FDDI

28-28-

= 4424

4424=

= 123214602018

14802018

14642018

dataIPET

123218

dataET

20

20

20

20

20 20

20

20

20

20

20

2020

TCP

Example WITH fragmentationThe Server sends a 10.000 byte reply to ClientHypothesis: TCP knows the local network MTU

Page 16: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Service Time =16.000.000

44042020 440420 11922028 28 28+ +

Service Time =16.000.000

(4472+4472+1260) x 8

= 0.005102 sec.

( ) x 820 20

0.005082 sec.

0.005102 sec.20 sec different

LAN Service TimeThe Server sends a 10.000 byte reply to ClientHypothesis: TCP knows the local network MTU

Case of Token Ring

Page 17: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Average service timeEvaluation 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 requiredNsegments: number of TCP segments required (< or = Ndatagrams)N: number of networks

Page 18: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Average service timeWithout fragmentation

NDatagrams =

ServiceTimen =

MessageSize + NSegments x TCPOvhd

minn MTUn - IPOvhd

Overheadn = NSegments x TCPOvhd + Ndatagrams x (IPOvhd + FrameOvhdn)

8 x (MessageSize + Overheadn )

106 x Bandwidth

NSegments = MessageSize65495

NSegments = NDatagrams

TCP knows LAN MTUTCP does not know LAN MTU

(rough estimate)

Page 19: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Exercise - text

T.R.FDDI100 MbpsMTU: 4472 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.

router1 router2

Client DB server

Ethernet10 MbpsMTU: 1518 bytes

Token RingI16 MbpsMTU: 4444 bytes

Page 20: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

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 request

(8092+20)/(1500-20) = 6 short reply

(100000+40)/(1500-20) = 68 long reply

Page 21: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Exercise - solution

• Using

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

Overheadn = TCPOvhd+Ndatagrams x (IPOvhd + FrameOvhdn)

• Using

We can evaluate the Service Time (ethernet)

OverheadEth = 8 x (400 + 58) / 10.000.000 = 0.366 msec request

OverheadEth = 8 x (8092 + 248) / 10.000.000 = 6.67 msec short reply

OverheadEth = 8 x (100.000 + 2604) / 10.000.000 = 82.1 msec long reply

ServiceTimen =8 x (MessageSize + Overheadn )

106 x Bandwidth

Page 22: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Service times evaluation

Request Short reply

Long reply

Ndatagrams 1 6 68 Overhead (byte) 58 248 2604

Eth

ServiceTime(msec) 0.366 6.67 82.1 Ndatagrams 1 6 68

Overhead (byte) 68 308 3284 FDDI

ServiceTime(msec) 0.0374 0.672 8.26 Ndatagrams 1 6 68

Overhead (byte) 68 08 3284 TR

ServiceTime(msec) 0.234 4.2 51.6

Router Latency (134 usec/packet) 134 804 9.112

Page 23: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Network Router

Router queues

Page 24: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Service times at Routers

Router latency (sec per packet): time spent by the router to process a datagram, given by manufacturer.

RouterServiceTime: Ndatagrams * RouterLatency

Where

NDatagrams =MessageSize + TCPOvhd

minn MTUn - IPOvhd

Page 25: Service time evaluation (transfer) for a message sent over a LAN through TCP protocol

Exercise

• Router 1 and 2 process 400,000 packets/sec

Service time: 2.5 sec (=1/400,000) Service demand at router

T.R.FDDI100 MbpsMTU: 4472 bytesrouter1 router2

Client DB server

Ethernet10 MbpsMTU: 1518 bytes

Token Ring16 MbpsMTU: 4444 bytes

Client Request Short Reply Long Request

1 x 2.5 = 2.5 sec 6 x 2.5 = 15 sec 68 x 2.5 = 170 sec