Question

In: Computer Science

Could i please have some assistance with the following questions. a) When using the exponential weighted...

Could i please have some assistance with the following questions.

a) When using the exponential weighted moving average (EWMA) to calculate the running time of the RTT, what does the constant ‘x’ control?

b) Consider a TCP segment. What is sequence number? What is the range of the sequence number? What is the acknowledge number (ACK)?

Solutions

Expert Solution

a) When using the exponential weighted moving average (EWMA) to calculate the running time of the RTT, what does the constant ‘x’ control?

    The procedure generates exponentially weighted moving average (EWMA) control charts for variables. Charts for the mean and for the variability can be produced. The format of the control charts is fully customizable. The data for the subgroups can be in a single column or in multiple columns. This procedure permits the defining of stages. The target value can be entered directly or estimated from the data, or a sub-set of the data. Sigma may be estimated from the data or a standard sigma value may be entered. Means and ranges/standard deviations can be stored to the spreadsheet.

Exponentially Weighted Moving Average Control Charts

The EWMA chart is useful in detecting small shifts in the process mean. These charts are used to monitor the mean of a process based on samples taken from the process at given times (hours, shifts, days, weeks, months, etc.). The measurements of the samples at a given time constitute a subgroup. The EWMA chart relies on the specification of a target value and a known or reliable estimate of the standard deviation. For this reason, the moving average chart is better used after process control has been established.

Common Controls

Common control charts for detecting large process changes, or for establishing initial control of the process are the X-bar and R charts (or X-bar and s charts). Once a reliable estimate of the mean and standard deviation is available, the EWMA and CUSUM charts are useful in detecting smaller shifts in the process mean. The EWMA chart may also be used when only a single response is available at each time point. Another option for single responses are the individuals and moving range (I-MR) control charts.

Control formulas X control:

Suppose we have k subgroups, each of size n. Let xij represent the measurement in the jth sample of the ithsubgroup.

Formulas for the Points on the Chart

Estimating the EWMA Chart Center Line (Grand Mean)

b) Consider a TCP segment. What is sequence number? What is the range of the sequence number? What is the acknowledge number (ACK)?

Understanding TCP Sequence and Acknowledgment Numbers:

All bytes in a TCP connection are numbered, beginning at a randomly chosen initial sequence number (ISN). The SYN packets consume one sequence number, so actual data will begin at ISN+1. The sequence number is the byte number of the first byte of data in the TCP packet sent (also called a TCP segment). The acknowledgement number is the sequence number of the next byte the receiver expects to receive. The receiver ack'ing sequence number x acknowledges receipt of all data bytes less than (but not including) byte number x.

The sequence number is always valid. The acknowledgement number is only valid when the ACK flag is one. The only time the ACK flag is not set, that is, the only time there is not a valid acknowledgement number in the TCP header, is during the first packet of connection set-up.

The example capture contains a single HTTP request to a web server, in which the client web browser requests a single image file, and the server returns an HTTP/1.1 200 (OK) response which includes the file requested. You can right-click on any of the TCP packets within this capture and select Follow TCP Stream to open the raw contents of the TCP stream in a separate window for inspection. Traffic from the client is shown in red, and traffic from the server in blue.

The Three-Way Handshake

TCP utilizes a number of flags, or 1-bit boolean fields, in its header to control the state of a connection. The three we're most interested in here are:

  • SYN - (Synchronize) Initiates a connection
  • FIN - (Final) Cleanly terminates a connection
  • ACK - Acknowledges received data

As we'll see, a packet can have multiple flags set.

Select packet #1 in Wireshark and expand the TCP layer analysis in the middle pane, and further expand the "Flags" field within the TCP header. Here we can see all of the TCP flags broken down. Note that the SYN flag is on (set to 1).

Now do the same for packet #2. Notice that it has two flags set: ACK to acknowledge the receipt of the client's SYN packet, and SYN to indicate that the server also wishes to establish a TCP connection.

Packet #3, from the client, has only the ACK flag set. These three packets complete the initial TCP three-way handshake.

Sequence and Acknowledgment Numbers

The client on either side of a TCP session maintains a 32-bit sequence number it uses to keep track of how much data it has sent. This sequence number is included on each transmitted packet, and acknowledged by the opposite host as an acknowledgement number to inform the sending host that the transmitted data was received successfully.

When a host initiates a TCP session, its initial sequence number is effectively random; it may be any value between 0 and 4,294,967,295, inclusive. However, protocol analyzers like Wireshark will typically display relative sequence and acknowledgement numbers in place of the actual values. These numbers are relative to the initial sequence number of that stream. This is handy, as it is much easier to keep track of relatively small, predictable numbers rather than the actual numbers sent on the wire.

For example, the initial relative sequence number shown in packet #1 is 0 (naturally), while the ASCII decode in the third pane shows that the actual sequence number is 0xf61c6cbe, or 4129057982 decimal.

The display of relative sequence numbers can optionally be disabled by navigating to Edit > Preferences... and un-checking Relative sequence numbers and window scaling under TCP protocol preferences. However, be aware that the remainder of this article will reference relative sequence and acknowledgement numbers only.

To better understand how sequence and acknowledgement numbers are used throughout the duration of a TCP session, we can utilize Wireshark's built-in flow graphing ability. Navigate to Statistics > Flow Graph..., select TCP flow and click OK. Wireshark automatically builds a graphical summary of the TCP flow.

Each row represents a single TCP packet. The left column indicates the direction of the packet, TCP ports, segment length, and the flag(s) set. The column at right lists the relative sequence and acknowledgement numbers in decimal. Selecting a row in this column also highlights the corresponding packet in the main window.

We can use this flow graph to better understand how sequence and acknowledgement numbers work.

Packet #1

Each side of a TCP session starts out with a (relative) sequence number of zero. Likewise, the acknowledgement number is also zero, as there is not yet a complementary side of the conversation to acknowledge.

(Note: The version of Wireshark used for this demonstration, 1.2.7, shows the acknowledgement number as an apparently random number. This believed to be a software bug; the initial acknowledgement number of a session should always be zero, as you can see from inspecting the hex dump of the packet.)

Packet #2

The server responds to the client with a sequence number of zero, as this is its first packet in this TCP session, and a relative acknowledgement number of 1. The acknowledgement number is set to 1 to indicate the receipt of the client's SYN flag in packet #1.

Notice that the acknowledgement number has been increased by 1 although no payload data has yet been sent by the client. This is because the presence of the SYN or FIN flag in a received packet triggers an increase of 1 in the sequence. (This does not interfere with the accounting of payload data, because packets with the SYN or FIN flag set do not carry a payload.)

Packet #3

Like in packet #2, the client responds to the server's sequence number of zero with an acknowledgement number of 1. The client includes its own sequence number of 1 (incremented from zero because of the SYN).

At this point, the sequence number for both hosts is 1. This initial increment of 1 on both hosts' sequence numbers occurs during the establishment of all TCP sessions.

Packet #4

This is the first packet in the stream which carries an actual payload (specifically, the client's HTTP request). The sequence number is left at 1, since no data has been transmitted since the last packet in this stream. The acknowledgement number is also left at 1, since no data has been received from the server, either.

Note that this packet's payload is 725 bytes in length.

Packet #5

This packet is sent by the server solely to acknowledge the data sent by the client in packet #4 while upper layers process the HTTP request. Notice that the acknowledgement number has increased by 725 (the length of the payload in packet #4) to 726; e.g., "I have received 726 bytes so far." The server's sequence number remains at 1.

Packet #6

This packet marks the beginning of the server's HTTP response. Its sequence number is still 1, since none of its packets prior to this one have carried a payload. This packet carries a payload of 1448 bytes.

Packet #7

The sequence number of the client has been increased to 726 because of the last packet it sent. Having received 1448 bytes of data from the server, the client increases its acknowledgement number from 1 to 1449.

For the majority of the capture, we will see this cycle repeat. The client's sequence number will remain steady at 726, because it has no data to transmit beyond the initial 725 byte request. The server's sequence number, in contrast, continues to grow as it sends more segments of the HTTP response.

Tear-down

Packet #38

After acknowledging the last segment of data from the server, the client processes the HTTP response as a whole and decides no further communication is needed. Packet #38 is sent by the client with the FIN flag set. Its acknowledgement number remains the same as in the prior packet (#37).

Packet #39

The server acknowledges the client's desire to terminate the connection by increasing the acknowledgement number by one (similar to what was done in packet #2 to acknowledge the SYN flag) and setting the FIN flag as well.

Packet #40

The client sends its final sequence number of 727, and acknowledges the server's FIN packet by incrementing the acknowledgement number by 1 to 22952.

At this point, both hosts have terminated the session and can release the software resources dedicated to its maintenance.


Related Solutions

Could i please have some assistance with the following questions. a) What is the purpose of...
Could i please have some assistance with the following questions. a) What is the purpose of port numbers? how are they used? b) Why does TCP probe the network continuously until it experiences a loss? c) What is the difference between the congestion window and the received window? d) What is the benefit of TCP Reno over TCP Tahoe?
Could i please have some assistance with the following questions. a) What are key features of...
Could i please have some assistance with the following questions. a) What are key features of UDP Services? b) What are some of the advantages of UDP compared to TCP? c) What is the aim of the connection setup Phase, ie, 3 way handshake, of TCP? d) What causes duplicate ACK's
Hello I have these questions, Can I please get some assistance, I need not so long...
Hello I have these questions, Can I please get some assistance, I need not so long or short answers please How to decide what job to take. Is that a marginal decision? What is an explicit cost? What is an implicit cost? How is accounting profit calculated? How is economic profit calculated?
Could i please have assistance with the following. A) TCP/IP protocol stack, how does a switch...
Could i please have assistance with the following. A) TCP/IP protocol stack, how does a switch differ from a hub? B) How does a switch/bridge know what station is on a given port? C) What does a switch/bridge do if it does not know the out-going port of a destination MAC address? D) How is a token ring similar to a Master-and-slave or polling channel access protocol?
Hi, I have some doubs about answers to following questions and I apprecite if someone could...
Hi, I have some doubs about answers to following questions and I apprecite if someone could help me with the answers: We want to investigate the following research problem: We have been developing a new learning and teaching application and want to know if this application is more efficient on a tablet or on a mobile phone. Efficiency is measured in the speed in which answers in the form of text are entered. i. Formulate the hypothesis H1 and the...
In need of assistance with questions 9 and 10 please Hardy Weinberg Lab When you have...
In need of assistance with questions 9 and 10 please Hardy Weinberg Lab When you have finished copy and past your answers into the submission box in the Hardy Weinberg Lab assignment. Equations: p + q = 1 p 2 + 2pq + q2 = 1 1. what is the hardy weinberg symbol for the frequency of the dominant allele? ________ 2. what is the hardy weinberg symbol for the frequency of the recessive allele __________ 3. what is the...
Hello I need some assistance with these questions I need not so long answers but not...
Hello I need some assistance with these questions I need not so long answers but not too short please Give some examples of How much decisions. What are the implicit costs of having an Airbnb in your neighborhood? What is marginal analysis? What is marginal cost? Under what conditions do marginal costs increase?
Hello! I have some questions related to using Ansys Fluent, I have read the instruction of...
Hello! I have some questions related to using Ansys Fluent, I have read the instruction of Ansys Book , but I still do not understand clearly, can you help me? They are as the following: 1. When do we need to use pressure inlet for B.C for the inlet boundary and pressure outlet B.C for the outlet boundary? 2. Can we use pressure inlet B.C for the inlet boundary and outlet B.C for the outlet boundary in one fluid flow...
I require some assistance with the following assignment as I belive I might be doing it...
I require some assistance with the following assignment as I belive I might be doing it wrong especially in step 2. Your assistance is much appreciated. Linux Shell Scripting Practice: Note: The following excercise requires the use of the nano text editor. Begin by starting a script called “m5a2_part2b” by issuing the following at the command in a open terminal: $ script m5a2_part2b Step 1: Using the nano text editor, edit the following “Hello World” program, save as hello.sh, change...
I could use some assistance with my 1600 word essay on McKay who was a Jamaican...
I could use some assistance with my 1600 word essay on McKay who was a Jamaican writer and poet. please provide any references thank you
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT