Service time evaluation (transfer) for a message sent over a LAN through TCP protocol Network Routers service time
PROTOCOL TCP/IP STRATIFICATION IP UDP TELNETHTTPFTP TCP NFS DNSSNMP data link layer network layer transport layer RPC
DATAGRAM IP FORWARDING The router holds a routing table, used to find the following router or host which forward the datagram Host AHost B TCP IP Network layer TCP IP Network layer IP Data layer router
Layer n Layer n -1 Layer n Layer n -1 network 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. When data are transferred an header is added by each layer Data layer nHeader layer n Data layer n -1 Header layer n -1
NETWORK PROTOCOLS
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 ack data fin ack 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 TCP IP Network layer client TCP IP Network layer Server ethernet T.R. FDDI router1 router2
LAN service time Service Time Eth = == 358 x sec. Service Time FDDI = == 368 x sec. Service Time TR = == 368 x sec byte message sent from a Client to a Server
Example WITH fragmentation TCP IP Network layer client TCP IP Network layer Server ethernet T.R. FDDI TR FDDI FDDI = 4424 = = dataIPET dataET The Server sends a byte reply to Client Hypothesis: TCP does not know the local network MTU 20
LAN Service Time Service Time = The Server sends a byte reply to Client Hypothesis: TCP does not know the local network MTU Case of Token Ring Service Time = ( ) x 8 = sec. () x 8
TCP IP Network layer client TCP IP Network layer Server ethernet T.R. FDDI TR FDDI FDDI = 4424 = = dataIPET dataET 20 TCP Example WITH fragmentation The Server sends a byte reply to Client Hypothesis: TCP knows the local network MTU
Service Time = Service Time = ( ) x 8 = sec. () x sec sec. 20 sec different LAN Service Time The Server sends a byte reply to Client Hypothesis: TCP knows the local network MTU Case of Token Ring
Average service time Evaluation without fragmentation Let’s specify: MTU n : network n MTU (byte) XOvhd: X protocol overhead (byte) FrameOvhd n : network n overhead (byte) Overhead n : network n total overhead (TCP+IP+frame) (byte) Bandwidth n : 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 NDatagrams = ServiceTime n = MessageSize + NSegments x TCPOvhd min n MTU n - IPOvhd Overhead n = NSegments x TCPOvhd + Ndatagrams x (IPOvhd + FrameOvhd n ) 8 x (MessageSize + Overhead n ) 10 6 x Bandwidth NSegments = MessageSize NSegments = NDatagrams TCP knows LAN MTU TCP does not know LAN MTU (rough estimate)
Exercise - text T.R. FDDI 100 Mbps MTU: 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 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. router1router2 ClientDB server Ethernet 10 Mbps MTU: 1518 bytes Token RingI 16 Mbps MTU: 4444 bytes
Exercise - solution Using NDatagrams = MessageSize + Nsegment x TCPOvhd min n MTU n - IPOvhd We can evaluate the numbers of Datagrams required in each case (request, short reply and long reply) (400+20)/( ) = 1 request ( )/( ) = 6 short reply ( )/( ) = 68 long reply
Exercise - solution Using We can evaluate the network overhead (ethernet) Overhead Eth = ( ) = 58 request Overhead Eth = ( ) = 248 short reply Overhead Eth = ( ) = 2604 long reply Overhead n = TCPOvhd+Ndatagrams x (IPOvhd + FrameOvhd n ) Using We can evaluate the Service Time (ethernet) Overhead Eth = 8 x ( ) / = msec request Overhead Eth = 8 x ( ) / = 6.67 msec short reply Overhead Eth = 8 x ( ) / = 82.1 msec long reply ServiceTime n = 8 x (MessageSize + Overhead n ) 10 6 x Bandwidth
Service times evaluation
Network Router Router queues
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 min n MTU n - IPOvhd
Exercise Router 1 and 2 process 400,000 packets/sec Service time: 2.5 sec (=1/400,000) Service demand at router T.R. FDDI 100 Mbps MTU: 4472 bytes router1router2 ClientDB server Ethernet 10 Mbps MTU: 1518 bytes Token Ring 16 Mbps MTU: 4444 bytes Client RequestShort ReplyLong Request 1 x 2.5 = 2.5 sec6 x 2.5 = 15 sec 68 x 2.5 = 170 sec