Network Protocals

June 19, 2019

Table of Contents

  1. TCP
  2. UDP

TCP (Transmission Control Protocal)

* Description :

    ``` 
    TCP provides reliable, ordered, and error-checked delivery of a stream of octets (bytes) between applications running on hosts communicating via an IP network
    ```
* Its a persistent connection
* Three way handshare(at the begining)
    ```
    step1 : Client sends -> I want to talk -> Server
    step2 : Client recieves <- "Sure. Are you Ready? <- Server
    step3 : Client sends -> "Yes I am Ready" -> Server

        <- TCP Connection established ->
    ```
* Its Dominant protocal & Used for
    * Web (http and https)
    * Telnet
    * FTP
    * email


UDP(User Datagram Protocal)

* Description - provides a connectionless datagram service that emphasizes reduced latency over reliability. 
* Sends Data to server; does not care whether it reached destination or not;
* Its faster.

    ![TCP vs IDP](https://techtaste.in/img/tcp-udp.png)
* Used for 
    * Live streaming audio or video
    * DNS Queries, VoiceOverIP(VoIP),  Dynamic Host Configuration Protocol (DHCP)