Flashcards
TCP - Test 1 Revision

Cards in this deck (83)
- 1What is the bandwidth delay product?The bandwidth delay product is a limitation on what is the maximum speed you can transmit data between two points in a network
Basically the WindowSize and the delay between the two points - 2What is a Send Window?Data that youve put into the network, youve given it to the operating system to forward it to an end host, data that hasnt been acknowledged yet by that end host
- 3What is a Receive Window?A Receive Window is just a buffer that the receiver puts data in when it arrives and re-orders the data if necessary if packets arrive out of order before delivering it to the application in the other end
- 4What is TCP?It is this reliable, connection oriented, network friendly, stream-based transport protocol which just about every application uses in the internet
- 5How is TCP useful to applications?It provides reliability with checksums and retransmissions and it provides interactivity
There are applications that dont use TCP because it would be un-useful - 6What are two ways a sender with a TCP implementation could go about things?Stop and Wait
Sliding window - 7What is stop and wait?Could send one packet and wait for acknowledgement before sending the next one
- 8What is a sliding window?Sending more than one packet at a time,
a sender has a window of packets that it sends and the receiver can receive packets more than one at a time even if they're out of order
We send as many packets as we can based on a value
It has a defined size - 9Which is faster and better out of 'Stop and Wait' and 'Sliding Window'?s
- 10Stop and Wait: What is the that it takes a sender to put the packet on the network one bit at a time?Serialisation Delay Ts
- 11Stop and Wait: What is the time that it takes for the packet to get from sender to receiver (once it is fully loaded onto the net)?Propagation Delay Tp
- 12What is the Serialisation Delay?The time that it takes the sender to put the packet on the network one bit at a time
- 13What is the Propagation Delay?The time that it takes the packet to get from the sender to receiver (once all of its bits have been loaded onto the wire)
- 14What is the time that it will take in the best case scenario for a packet to be received and acknowledged?Two propagation delays (assuming that the delays from the sender to receiver and receiver to sender for ack are the same) and what ever time it took to serialise the packet onto the wire
- 15Stop and Wait: When is the only time when there is being any useful work done?When we have been serialising the bits one bit at a time onto the network, at this point we are just waiting for the bits (packet/frame) to get all the way to receiver and then to be acknowledged
- 16When to use Stop and Wait?When the two systems are directly connected (same LAN) but it doesnt work that well if the systems are across the world from eachother because we have to wait a longer amount of time before we can send the next packet
- 17Sliding Window: How many bytes is a sender allowed to send?They are allowed to send up to as many as the window size (frames) is without stopping and waiting for an acknowledgement
- 18Sliding Window: The source receives an acknowledgement for a packet n it has sent, what happens then?It can then increase its window size to
n + W - 19Where do packets go when they are received?A packet arrives, the kernel looks inside the ports and addresses to identify which socket this data corresponds to, it takes the data out of the packet and puts it into the sockets receive buffer and then eventually the application will read from that buffer
- 20What happens when a sender sends some data?When you call write or send in your application, the kernel/operating system will keep a copy of that data that you send until the receiver sends an acknowledgement for it incase it needs to be resent
- 21What happens when a receiver receives some data?When an application reads from the socket, data comes out of the buffer and gets put into the application, making space for more data in the receive buffers
As long as the application is reading from the kernel quickly enough its unlikely that the buffer will fill - 22What is a limit for the Sending Window?Limits the amount of data - it is a window size limit
Senders buffer space - 23What is a limit for the Receive Window?Receivers buffer space because the sender cant send more data than it knows that the receiver can cope with (in a period of time)
- 24What does a smaller buffer size mean?It can limit the amount the sender can transmit
- 25What is the congestion window?The amount of data you can have out in the network at any one time
- 26What manages a Congestion Window?Slow Start and Congestion Avoidance
- 27What is the limit of the Congestion Window?- The send buffer size:
- The receivers window size thats been advertised and how much space is available in it
- The calculated congestion window size (network capacity) - 28How do we get max performance in the sliding window? (Bandwidth delay product)So long as by the time we have finished transmitting our limit of packets (i.e if the window size if 4 then 4 as long as when we've finished transmitting 4 packets)
an acknowledgement for the first packet we send has arrived then we can get use all of the resource in the network (transmit as fast as the network can sustain) - 29What is the appropriate window size between two points (sender and receiver) in the network?It depends on the product of the Round Trip Time, how long it takes for acknowledgements to arrive and the capacity between the two points
- 30How do we calculate the window size and throughput (bandwidth delay product)?

- 31What is TCP Tuning?Process of setting buffer sizes appropriate for the expected network connections, because before modern TCP implementations there were fixed buffer sizes that were often quite small by default because the amount of memory in a device was quite small
- 32E.g. We send a receiver some data, the OS of the receiver receives that data and sends an acknowledgement. When does space become available in that window?Once the receiver reads the data
- 33What is a redundant acknowledgement? How do we avoid these when sending acknowledgementsWhen the receiver gets a packet, space doesn't become available in their window size until they read the data, if they send an acknowledgement packet immediately after receiving the packet, then read the data and send another acknowledgement to say that there is more space in the window size, then that first acknowledgement packet automatically becomes redundant, the same happens if any packets are sent after, all but the most recent one will be redundant
- 34How can we avoid sending redundant acknowledgements?What we want to do is delay TCP Acknowledgements,
by waiting a small length of time (a few milliseconds) from when they receive a piece of data in the order, before they send an acknowledgement back - 35What does delaying acknowledgements allow the receiver to do?It allows the operating system to do is to wait a small length of time for the application to get some time to read from the socket which will cause an update of the Window value and then also allow the application to craft some data in response to thats what its gonna do
- 36Why do we need to delay acknowledgements?Because it allows us to send one acknowledgement packet after the receiver has read the data rather than send multiple acknowledgement packets that will become redundant when another packet with the same acknowledgement number is sent after it,
- 37What affects does delaying acknowledgements have?It means that the current round trip time we have will be increased because of the delay
- 38How far away in RTT could two systems be before the window size is a limitation?RTT = WS/BW
- 39What is window scaling option?It allows us to encode a much larger value than 65,000 in that 16-but window size field,
e.g. 32 bit value for our window internally, we tell the receiver, which of the bits we are not going to send, LSF RHS,
the largest we can increase our window size is by 14 bits which allows us to advertise a receive window of up to 1GB in size - 40What is the issue with the window scaling option?The sender and the receiver can only tell each other about the window scaling factor they use at the connection establishment time, you cant do it later on in the connection if you find that the receiver detects that the connection is limited by its window size buffer, they cant do anything about it
- 41How do you tell the receiver about the window scaling option?You send your 20 bytes header plus some variable length TCP HLEN of 6 since we are wanting Window Scaling in the TCP Options section
- 42What happens when we have a TCP option that we know nothing about?We can use the length of the option to skip over it
- 43What packets can you use the TCP window scale option?Only in the SYN packet because you must setup the window scaling factor when starting the connection, it cannot be done at any other time
- 44So what happens when a TCP scaling factor option is received by the receiver?The receiver then shifts their window value by the amount send in the window scaling factor
e.g if the sender sends a window scaling factor of 2
and the receiver has a window value of
111010100110000000
then they will shift their window value by 2
1110101001100000 - 45What is the maximum scaling factor allowed? Why? How much would that be (max)?14
it means we run the rick that if a
packet is delayed a long time, retransmitted and then acknowledged, we could then corrupt the packet because it we've received a packet that has the correct sequence number but it already has been received and we may use it incorrectly, that is why theres a limit of 14
Would be maximum about 1GB because that will reduce the chances of this occurring - 46What does having a larger scale factor mean?It means we can send up to that many bits of data before receiving an acknowledgement
- 47When do we set TCP window scale factor option?You MUST set it BEFORE establishing the connection (in the 3 packet handshake) in the SYN packet because you cannot change buffer sizes after the initial connection has been made
- 48Write in the TCP the values for a TCP option of Type (win scale) 3 Length (3 byes) 3 Value (s/f 2) 2

- 49What is Maximum Segment Size?What the maximum size a packet can be, so the other end host knows what the maximum sized segment you can send is
If it is not set then TCP has a default value of 536 bytes - 50Which packets are more efficient to transmit? Bigger or smaller ones?Bigger ones because the network can carry them without fragmenting them
- 51Should we fragment a packet? (Send it in pieces instead of a whole)No, because it will suffer a performance issue especially if the fragmentation happens in the middle of the network
- 52What is the default segment size?536 Bytes
576 - 20 bytes (IP header) - 20 bytes (TCP header) is 536 bytes - 53What is a maximum transmission unit?Historically, ethernet has MTU's of 1500 bytes,
- 54Why do we use timestamps for RTT?Because it tells us the exact time when the packet was sent and when it was acknowledged, but this takes alot of storage, time and effort, so it is easier to store the timestamps in the packets themselves
- 55What does the TCP timestamp option do?It puts a timestamp into the packet when you send it
- 56Where does the sender and receiver have to choose if they want the timestamp option?They can set the option on the SYN and SYN/ACK packets and then can use the option in the rest of the connection
- 57What option number is the TCP timestamp option? What is its length?Option 8 Length 10
- 58What option number is the TCP no-op option? What is its length?Option 1 Length only 2 bytes for the option type
- 59What option number is the TCP MSS option? What is its length?Option 2 Length 4
- 60What option number is the TCP Window Scale option? What is its length?Option 3 Length 3
- 61Why would we use option 1?As a padding option in the TCP options portion of the TCP Header
- 62What is useful about the timestamp option?Can use it to calculate an accurate RTT
It can be used as protection against Wrapped Sequence numbers (PAWS)
and if we receive a packet that has been delayed a long time and it turns up, we can tell if it is the wrong data if we've already received that packet when it was thought to be lost and retransmitted - 63What is congestion collapse?When the network enters a state where the total throughput speed decreases at high load
Think of it like a busy road where cars are trying to get on but as more cars enter the road the slower things move - 64Why does TCP use congestion control?To avoid overwhelming the network and slowing down the total throughput speed
- 65How can we use congestion control work to slow things down to avoid overwhelming the network?Can use Slow-Start, starts off by sending one packet and then waits for an acknowledgement, then sends two and waits and so on...
- 66What is congestion avoidance?Eventually gets to a point (if the network is congested) where some packets are lost and when a packet is lost it remembers how fast it was going, divides it into two and once it gets back up to that level it remembered (where the packet was lost) it doesnt keep doubling it, it slowly adds more packets into the network
- 67How does TCP detect when there is congestion?When a packet is lost
- 68What is additive increase?After slow start just going one at a time
- 69What is multiplicative decrease?When you lose something you halve the threshold
- 70What are delayed acknowledgements?Because TCP sends acknowledgements immediately, we want to add in a delay of sending them to allow time for the data to be read and instead of sending multiple ack packets with the same ack number, we can send them all in one to avoid redundant acknowledgements
- 71Why would we use a delayed acknowledgement?Because we dont want to acknowledge a packet straight away if we are going to be sending them same packet with data in it, it will just become redundant, so if we delay the acknowledgement we can send it all together
- 72What is an exception to delaying an acknowledgement?If data is received out of order(a packet has been lost) it is required to generate an immediate acknowledgement
- 73What do duplicate acknowledgement packets tell us?That a packet was lost
- 74What happens after we have received multiple acknowledgements?We know a packet has been lost (because the duplicate acks) we use a fast retransmit it will retransmit the first segment that it has not yet had acknowledged then the receiver will acknowledge all packets it e has received past that lost packet so we dont have to resend everything again
- 75What is fast recovery?Always goes with fast retransmit
We increase the congestion window each time a duplicate ack is received because we know that that is the amount after the lost segment that was received and we take it they have been acknowledged
after this we step 3 is congestion avoidance - 76What is Fast Retransmit + Fast Recoveryafter we've detected a packet has been lost through duplicate acknowledgements, we retransmit the first segment that was lost, then we will receive an acknowledgement for all other packets that were received, then we will increase the congestion window each time a dup-ack is received, then enter congestion avoidance
- 77Draw a diagram for Fast Retransmit + Fast Recovery

- 78Why is th SACK option useful?Because fast retransmit + fast recovery only detects one packet loss, if more than one packet is lost we need another way to figure it out, how? With SACK Selective Acknowledgements Option, this tells the receiver which segments its received and which its lost.
This should be setup in the SYN packets, and only used if both of them have permitted it - 79What is SACK?A TCP Option Selective Acknowledgements Option
Type 4 Length 2 No Data Setup
OR
Type 5 Length variable - 80What is DSACK?It states that its received 'this segment' twice used in the SACK option and it allows the sender to infer it retransmitted unnecessarily, and allows the sender to increase the number of duplicate acks
- 81What is Initial Congestion?We give the window a value, and it will send that amount if the first packet is lost, but not the other packets, subsequent packets will trigger dub-acks and fast-retransmit
- 82Why is initial congestion useful?Because some companies are determined to send the data fast as possible otherwise users might leave the site and go somewhere because of wait times, so if the transfer completes quickly then people are happy
- 83Why does modern TCP's use a relatively larger Initial Window value?Because if its 1, then if the first packet is lost, there would be a wait time before we can retransmit, same goes with if we set it to 2-4, if we set it higher, we can avoid longer wait times, get the data to the receiver as fast as possible (especially if it is a user application) so we can avoid making the user wait a long time initially and becoming distinterested
Information
- Description
- Flashcards on TCP - Test 1 Revision, created by Cherese Eriepa on 09/04/2018.
- Created by
- Cherese Eriepa
- Views
- 5
- Rating