More about TCP

Just finished the TCP course from **INE ** : CCIE R&S: Understanding Transmission Control Protocol (TCP) Really recommend this to anyone who is interested in a bit deeper dive of how TCP works, great quality content, **Keith Bogart **is doing amazing job as instructor ! Some TCP facts which I didn’t mentioned in my previous post : Before TCP connection is established TCP goes through the following steps: Closed Initial State Active Open (APP notifies the CPU and requests for service time) - client side Transmission Control Block setup process - CPU creates TCB to keep track of each new TCP connection - for each TCP session we create a new TCB with unique identifier (socket - SRC IP; SRC TCP Port; DST IP; DST TCP Port) Initial sequence number will be random to prevent attacks on TCP When TCB is ready we are sending SYN(x random Seq# number) - this is called a Syn Sent State Receiving Syn(y random seq# number from server) + ACK (seq# x + 1) Sending ACK(seq# y+1) for that TCP Client side state changes to Established This is Active Open - TCB creation process, initiated only per need of client. ...

February 22, 2018 · 4 min

Flowcontrol IEEE 802.3x

Old known stuff, probably for everybody who is somehow related to networking, but anyway, putting it here too. IEEE 802.3x - Wikipedia link If QoS is enabled and you like to prioritize the traffic, flow control needs to be disabled,as it doesn’t care about any higher level prioritization, just when ingress traffic is coming in faster than receiver can accept it, flow control will kick in and send pause frames until the ingress-egress rate will be equalized or ingress rate is lower than egress of that interface. ...

February 21, 2018 · 1 min

End to End delay

End to end delay is the time from when we sent the first bit of the first line until last bit arrives to destination. Basically everything can be determined except queuing delay - it’s an unpredictable variable.

December 9, 2017 · 1 min

Packetization delay

Packetization delay is basically how close together we can pack a bits. So it’s the time from when the first to the last bit of a packet is transmitted. Formula would be : Packetization delay = P(size) / R(transmit rate)

December 9, 2017 · 1 min

Propagation delay

Propagation delay - l is the amount of time it takes for a single bit to travel over a link at propagation speed c. Formula would be PropagationDelay=l(cable lenght)/c(speed)

December 9, 2017 · 1 min

TCP congestion control

As we know TCP is called reliable - connection-oriented protocol. But why ? Basically because it keeps the data in its buffer before and after sending it, it makes sure that data was delivered in sequence and receiver send the confirmation about received data (ack). Otherwise data will be re-transmitted there are different ways to re-send the data, let’s explore some of them. So what is happening under the hood of this massive (big overhead comparing to UDP protocol). ...

December 8, 2017 · 4 min

Finite State Machines (FSM)

Great approach of understanding how the protocol or program should work is to check it’s FSM - Finite State machine. It describes the processes of protocol, where it starts and how and where it ends. STATE 1 -> STATE2 -> STATE3. For example we can check the TCP FSM on tcpipguide.com. There you can see the procedure of syn, synack, ack. Also we can see how connection is being closed using Fin or timeouts. ...

December 8, 2017 · 1 min

ARP - Address Resolution Protocol

ARP resolves the mapping issue between two different size protocols. It allows to MAP an IP(32 bit) and MAC(48 bit) together. How does it work in a nutshell : Let’s assume that we have two hosts on different networks - A and B, we want them to communicate with each other, what will happen when host A will try reaching the host B for the first time (arp cache empty) : As we can determine by ip and subnet mask combination that host B is on another network , Host A will send a broadcast packet which will contain the following fields : HW : 1 (Ethernet) Protocol : 0x0800 IP HW length : (6) 48 bit Protocol length : (4) 32-bit OPCode : 1 (Request) H/W Source : aa:aa:aa:aa:aa:aa - MAC of host A Protocol source : 192.168.0.2 - IP of host A HW Dest - ff:ff:ff:ff:ff:ff - MAC of broadcast address Protocol dest 192.168.0.1 - **ip of gateway ** Gateway will respond with ARP reply ...

December 8, 2017 · 2 min

A bit of TCP history

1974: 3-way handshake 1978: TCP and IP split into TCP/IP 1983: Jan 1, ARPAnet switches to TCP/IP 1986: Internet begins to suffer a congestion collapse 1987-8: Van Jacobson fixes TCP, publishes seminal TCP paper (Tahoe) 1990: Fast recovery was added (Reno) Taken from Stanford university Networking course. Link : https://lagunita.stanford.edu/courses/Engineering/Networking-SP

December 4, 2017 · 1 min

Error Detection - Checksum

So how does the checksum works ? Both devices needs to agree on checksum number - will it be odd or even The higher the number is the more precise is the check Let’s take the example from one of YouTube videos with a great explanation of how Checksum is working. Taking the numbers which we want to transmit : 25 11 12 7 13 4 Both devices should agree on checksum - let it be number 16 ...

September 29, 2017 · 2 min