1.4 – Explain TCP Operations

IPv4 & IPv6 (P)MTU

MTU or Maximum Transmission Unit determine the size of a payload. For ethernet segments, the default MTU is 1500. However when using other technologies such as IP/TCP headers need to be accounted for, an IP header is 20Bytes at its smallest as is TCP so this effectively reduces the MTU to 1460, when you start using other technologies such as frame relay, GRE or 802.1q this will all affect your overall payload size.

If MTU is not accounted for properly this can cause issues by fragmenting traffic or dropping it all together due to the DF bit. When there are many headers involved it is advised to ensure that your MTU is optimized for the environment, the trade-off for having larger MTU’s is that it reduces router overhead however if any data is lost or corrupted during transit, larger amounts of information need to be retransmitted.

To help assist with dropped traffic due to MTU sizes, Path MTU Discovery or pMTUd is used to help a device determine what the lowest MTU along a path is.

For IPv4 this is achieved by setting the DF bit in an IP header, this, in turn, should trigger an ICMP Type 3 Code 4 (Needs Fragmentation) being sent back to the sending device along with the required MTU.

For IPv6 packets are sent but when they reach a router where the MTU is too large and cannot be sent further the router drops the packet and sends an ICMPv6 Type 2 (Packet Too Big) message along with the required MTU.

Whilst both methods help mitigate packet drops and fragmentation there is the drawback that packets do not always take the same path to the destination which may well have different MTU’s along the way.

Cisco devices can alter the MTU in 2 ways, you can alter the ethernet MTU or the IP MTU

R1(config)# system mtu 1550
Changes to the system MTU will not take effect until the next reload done

R1# show system mtu

System MTU size is 1500 bytes
On next reload, System MTU will be 1550 bytes

System Jumbo MTU size is 1500 bvytes
On next reload, System Jumbo MTU will be 1500 bytes

Or alternatively, you can alter the IP MTU under the Interface configuration by using the below commands

R1(Config)# inteface fa1/1
R1(Config-if)# ip mtu ?
  <68-1500>   MTU (bytes)

As you can see when changing the IP MTU it cannot be larger than the configured system MTU for ethernet.

MSS

MSS (Maximum Segment Size) is the mechanism to further stop packets from being fragmented, hosts communicate the MSS so that they understand what the maximum size of a data they will accept. By defining how big the segment is it helpts to mitigate the fragmentation that can occur across the internet.

Cisco routers allow you to adjust the MSS to help account for tunnel interfaces etc. This can be enabled by issuing the following command

R1(config-if)# ip tcp adjust-mss <size>

Latency

TCP latency is typically defined by the RTT (Round Trip Time). The RTT is calculated on the time it takes for a packet to reach its destination and then back again. This value can be affected by almost everything along the path such as propagation delay, congestion, receiving device processing time, queueing, serialization etc. This latency has an inverse relationship with throughput, meaning that higher latency causes decreased throughput.

Windowing

Due to TCP’s connection orientated nature, acknowledgments are sent upon successful receipt of a packet, however, if this was done for everything single packet, the overhead would be increased dramatically. That’s where windowing fits in, it was developed to alleviate this additional overhead requirement.

Windowing allows acknowledgments to be sent for multiple packets as opposed to each packet. the “window” size determines how many bytes may be sent before an ACK is required. This is called a cumulative ACK. It is often referred to as a sliding window this because after a successful cumulative ACK the window can be made larger, meaning that more bytes can be transferred than previously.

Should an issue occur where packets are lost the window will reset its size and start from the beginning.

Bandwidth-delay product

The bandwidth-delay product or BDP refers to the amount of data that can be in transit on a segment at any time between hosts, This value is calculated by multiplying the capacity of the link in bps by the RTT in seconds.

bps x latency(RTT) = BDP 

Large BDP values are seen in networks which are often named Long Fat Networks, this is a reference to the large bandwidth available (Fat) but long delay (long) such as satellite links.

Global Synchronisation

Global Synchronisation is a condition that can affect a network where there are numerous TCP session ongoing, as more and more successful packets are sent per TCP session the windows are increased in size until eventually the network becomes congested and starts to drop traffic, this then causes all senders to reduce their window sizes, this process is repeated. When looking at on a graph this can be seen in a sawtooth fashion.

A mechanism to combat again this is WRED (Weighted Random Early Detection) can be used to avoid congestion.

TCP Options

There are many TCP options that can used in a TCP header, This options field can be variable in length from 0 to 320 bits. Many of the options that are used are only seen in the initial SYN packet.

  • 0: End of option list
  • 2: MSS Value
  • 3: Window Scale
  • 4: SACK Permitted
  • 8: Timestamp

Resources used

Packet Life

Cisco Press – WRED

Always Network

Ethernuno

Exam Collection

Advertisements