tryhackme: Packets & Frames: UDP/IP

 UDP: User Datagram Protocol.


UDP is a stateless protocol that does not require a constant connection between the two devices for data to be sent.

UDP is used in applications that can tolerate data being lost, or in an unstable connections is not the end-all.

----------------------------------------------------------------------------------------------------------------------------

Advantages of UDP: 


1. UDP is much faster than TCP.


2. UDP leaves the application to decide if there is any control over how quickly packets are sent. 


3. UDP does not reserve a continuous connection on a device as TCP does.

----------------------------------------------------------------------------------------------------------------------------

Disadvantages of UDP 


1. UDP does not care if the data received or not. 


2. It is quite flexible to software developers in this sense.


3. This means that unstable connections result in a terrible experience for the user.

----------------------------------------------------------------------------------------------------------------------------

UDP packets are much simpler than TCP packets and have fewer headers. Both protocols share some standard headers. 


The headers:


1. Time to Live (TTL)


This field sets an expiry timer for the packet, so it does not clog up your network if it never manages to reach a host or escape. 


2. Source Address.


The IP address of the device that the packet is being sent from, so that data knows where to return to.


3. Destination Address.


The device's IP address the packet is being sent to so that data knows where to travel next. 


4. Source Port.


This value is the port that is opened by the sender to send the TCP packet from. This value is chosen randomly. 0-65535


5. Destination Port 


This value is the port number that an application or service is running on the remote host, for example, a webserver running on port 80. Unlike the source port, this value is not chosen randomly.


6. Data.


This header is where the data, i.e. bytes of a files that is being transmitted, is stored.

----------------------------------------------------------------------------------------------------------------------------

 A UDP connection:


 Device 1 <========================================== REQUEST Device 2 

 Device 1 RESPONSE ========================================>  Device 2 

 Device 1 RESPONSE ========================================>  Device 2 

 Device 1 RESPONSE ========================================>  Device 2

 ----------------------------------------------------------------------------------------------------------------------------

Continue Your Learning Extending Your Network


Packets and frames are small pieces of data that, when forming together, make a larger piece of information or message.

 ----------------------------------------------------------------------------------------------------------------------------

Headers: 


- Time to Live => This field sets an expiry timer for the packet to not clog up your network if it never manages to reach a host or escape!


- Checksum => This field provides integrity checking for protocols such as TCP/IP. If any data is changed, this value will be different from what was expected and therefore corrupt.


- Source Address => The IP address of the device that the packet is being sent from so that data knows where to return to.


- Destination Address =>  The device's IP address the packet is being sent to so that data knows where to travel next.

 ----------------------------------------------------------------------------------------------------------------------------

Thanks for reading! 👨‍💻
Roger

Comments

Popular posts from this blog

Common Network Commands: Ping

Common Network Commands: Route

John The Ripper