Networking
UDP Packet Structure
Written by The Geekette on July 9, 2006 – 3:08 pmPosted in Networking | No Comments »
UDP does not perform any of the handshaking sequences that are seen with TCP. UDP is a lot less reliable than TCP, but UDP does offer more speed than TCP. This is ideal for data that does not require all packets to arrive and in order and needs fast delivery. Such services that use UDP are ones like DHCP and DNS. This protocol is the easier of the two protocols of TCP/IP to spoof since it does not use sequencing or acknowledgement numbers.
| Source Port |
Destination Port |
| Length | Optional Checksum |
TCP Packet Structure
Written by The Geekette on July 9, 2006 – 2:48 pmPosted in Networking | No Comments »
The diagram shown below demonstrates the fixed packet structure that is use by TCP/ This fixed packet structure is used to provide flow control, maintain the reliability of the communication and ensure that any data that is missing is resent buy sequencing and acknowledgement.
The Flag field is a 1 byte field. Common flags in this field include
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
TCP Handshakes
Written by The Geekette on July 9, 2006 – 2:38 pmPosted in Networking | No Comments »
To allow two hosts to communicate and exchange data reliably, TCP performs a three step handshake before any of the data is sent. This is when TCP guarantees that the data will arrive in tact by using a sequence and acknowledgement numbers. After all data is sent, TCP then performs a four step shutdown that concludes the session.
Three Step Startup
|
PC |
—————- SYN —————-> |
Server |
| <———— SYN ACK————– | ||
| —————- ACK —————-> |
Four Step Shutdown
|
PC |
—————FIN ACK ————-> |
Server |
| <—————ACK—————— | ||
| <———— FIN ACK————— | ||
| —————- ACK —————-> |
