TCP and UDP explained

TCP---Transmission Control Protocol, provides connection-oriented, reliable byte stream service. When a client and a server exchange data with each other, a TCP connection must be established between the two parties before data can be transmitted. TCP provides functions such as timeout retransmission, discarding duplicate data, checking data, and flow control to ensure that data can be transmitted from one end to the other.

UDP---User Datagram Protocol, is a simple datagram-oriented transport layer protocol. UDP does not provide reliability, it just sends out the datagrams that the application passed to the IP layer, but there is no guarantee that they will reach their destination. Because UDP does not need to establish a connection between the client and the server before transmitting the datagram, and there is no mechanism such as timeout and retransmission, the transmission speed is very fast.

 

The difference between TCP and UDP:

1. Connection-based and connectionless

2. Requirements for system resources (more TCP, less UDP)

3, UDP program structure is relatively simple

4. Stream mode and datagram mode

5. TCP guarantees data correctness, UDP may lose packets, TCP guarantees data order, UDP does not guarantee

 

ICMP (Internet Control Message Protocol, Internet Control Message Protocol) protocol is used to provide control services to the IP protocol, allowing routers or target hosts to provide feedback information to the sender of the data. Situations that need to send feedback information include: the packet cannot be sent to the destination host, the router buffer overflow causes the packet to be deleted, the router wants to redirect the traffic to another shorter route, etc. The ICMP protocol is a part of the IP protocol, and any device that implements the IP protocol is also required to implement the ICMP protocol.
IGMP (Internet Group Management Protocol) is an Internet protocol that provides a way for a host on the Internet to report its broadcast group membership to neighboring routers. Broadcasting enables a host on the Internet to send information to computers on the Internet that have identified an interest in what the source host is sending.


IGMP (Internet Group Message Protocol): Internet group management protocol, providing the function of internet multicast, that is, copying an ip packet to multiple hosts, the windows series adopts this protocol, because this technology is not yet mature, so it is used by some People use to attack windows system, especially for win98, because there is oob attack on win95.


User Datagram Protocol (UDP) is a connectionless transport layer protocol in the ISO reference model that provides a simple transaction-oriented unreliable messaging service. The UDP protocol is basically the interface between the IP protocol and the upper-layer protocol. UDP protocol is suitable for port identification of multiple applications running on the same device

 

Reference: http://blog.51cto.com/misujun/850439