Starting from:
$30

$24

IT LAB 6 Introduction to TCP(Transmission Control Protocol) and Analysis using Netsim Solved

    • Introduction

NetSim provides various features to analyze mechanisms of TCP and di erent parameters. TCP is connection oriented, reliable, secure and bidirectional protocol. To provide this characteristics TCP have di erent mecha-nism like Connection Establishment and termination, ow control, congestion control, types of acknowledgement etc.

    • Connection Establishment and Connection Termination policy

As TCP Connection oriented protocol, TCP uses the Connection establishment before data transmission and Connection Termination after successful data transmission. Whenever session expires, TCP reestablish connec-tion for next session until both devices nish their communication.

2.1    How to analyze connection establishment using packet trace    le.

Whenever any device in wired network wants to communicate, Connection will be establish using three way handshaking as shown in gure 1. Mechanism of three way handshaking consider x set of ags for all devices,























Figure 1: Connection Establishment: Three way handshaking

who are going to participate in communication.

1. Device A, who wants to start communication, sends SYN    ag to Device B.

1
    2. Device B sends SYN  ag with an acknowledgement within a single packet to Device A.

    3. At last, Device A acknowledged by sending ACK to Device B.

2.1.1    Experiment

To encounter three way handshaking perform the steps mention below.



















Figure 2: Topology of Network


    1. Establish topology shown in gure 2, with two wired node, one router with HTTP application between two nodes.

    2. Set parameters for application: Application Method: Unicast and END Time(s): 10

    3. Run simulation for 5 second.

    4. Open packet trace  le and Consider following Columns: PACKET ID, PACKET TYPE,

CONTROL PACKET TYPE, DESTINATION ID, TRANSMITTER ID,RECEIVER ID, SEQ NO, is Syn,is Ack,is Fin, SEGMENT lEN, Remove rest of the columns.

    5. Filter PACKET TYPE by selecting only Control Packets.

    6. After lter, you can see the SYN ag transmitted from Node 2 to Node 1 through Router, analyze the value of is Syn and is Ack columns.


2.2    How to analyze Connection Termination using packet trace    le

After Successful data transmission, Connection will be terminate by all device as shown in    gure 3.

2.2.1    Experiment

To encounter connection termination, follow the steps mention below.

    1. After connection establishment, continue with the same packet trace le, Add one more lter, CONTROL PACKET TYPE: TCP ACK and TCP FIN.

    2. You can see the FIN ag transmitted over destination through router, analyze the value of is Fin and is Ack.



2





















Figure 3: Connection Termination of TCP


Data transmission have been done between these Establishment and Termination. TCP provides reliability and security via acknowledgement to each packet including control packets and re transmitting errored packets. To facilitate this mechanism uently TCP uses Sequence number for every packets and acknowledgement. Although TCP have its own mechanism for sequence number. To analysis this mechanism, attempt the following exercise.

2.3    Exercise

    1. What is the Sequence number of the 1st SYN control packet and its acknowledgement?

    2. What is the sequence number of the 1st FIN control packet and its acknowledgement?

    3. Draw the Diagram of Connection establishment and termination as shown in gure 1 and 3 only with sequence number of each packet in you log book..

    4. Why TCP uses 4 way  nishing for connection termination instead of 3way like connection establishment?

    5. How many sessions it takes to transfer all data in this application?

    6. Save this experiment as EX:1 for further lab session.

    7. Start new experiment.  Consider the same topology and con guration of EX: 1.  Modify the property

of link 1 according to this, Set Uplink Bit Error Rate and Download Bit Error Rate: 0.00001, Uplink

Propagation Delay and Download Propagation Delay: 10 microsecond. Run the simulation for 10 seconds. Observe all rows of PACKET ID:1 with SEGMENT ID 1,2. Draw the diagram of transmission of packet id 1 for segment no 1 and 2 until successfully received with sequence number and acknowledgement number.

    8. The data transfer initiated by from node 1 to node 2. If SYN packet have sequence number 5460, there were 5000 bytes of total data transmitted through network in one session, maximum segment size were 1500 bytes then what will be the sequence number of last packet and FIN packet?





3
    • Measuring throughput of TCP

TCP throughput, which is the rate that data is successfully delivered over a TCP connection, is an important metric to measure the quality of a network connection.

3.1    Experiment

    1. Open Experiment Ex:1

    2. Run simulation for 2 seconds.

    3. Open packet trace  le.  lter the  eld CONTROL PACKET TYPE: APP1 HTTP, HTTP REQUEST

    4. Consider PHYSICAL LAYER END TIME, APPLICATION LAYER ARRIVAL TIME,

PHY LAYER PAYLOAD

    5. Calculate throughput:

Fix throughput: Calculate total payload and divide by total di erence of time.

(APPLICATION LAYER ARRIVAL TIME - PHYSICAL LAYER END TIME) . Moving average throughput

            (a) Except APPLICATION LAYER ARRIVAL TIME, PHYSICAL LAYER END TIME, PHY LAYER PAYLOAD, you can clear all other columns for convince.

            (b) Calculate time di erence.

(APPLICATION LAYER ARRIVAL TIME - PHYSICAL LAYER END TIME) of 1st 10 rows and respectively sum of total payload of 1st 10 rows and copy both values in two separate columns A and B.

            (c) Similarly calculate time di erence for 2nd to 11th rows and total payload for same rows, then for 3rd to 12th, 4th to 13th, 5th to 14th, 6th to 15th up to 11th to 20th rows respectively.

            (d) In third column C calculate the throughput by dividing total payload bytes (column B) by time di erence (column A).

            (e) Select Column C and select the scatter graph with smooth lines and markers.


3.2    Exercise

    1. What is the maximum throughput value, consider the graph.

    2. Calculate average throughput for same experiment with simulation time 10 seconds. Is there any di er-ence? why?

    3. Consider data transmission between 2 device A and B. A have sent total 1000 bytes of data, Maximum segment size will be 150bytes. Sending rate of packet 10bytes/second will be Packet number 2, 4, and 5 got errored. But before termination, Device B have received all 1000 bytes. Calculate the average throughput in unit bits/second.












4

More products