TCP, UDP, and ICMP (interview questions)

1.TCP
Transmission Control Protocol, provides a connection-oriented, reliable byte stream service. When former client and server to exchange data with each other, it must first establish a TCP connection between the two sides, in order to transmit data after. TCP provides a retransmission timeout, discards the duplicate data, test data, and other flow control functions, to ensure that data transmitted from one end to another end.
2.UDP
user datagram protocol is a transport layer protocol simple datagram-oriented. UDP does not provide reliability, it just passed to the application layer IP datagram sent, but does not guarantee that they can reach their destination. Because UDP without establishing a connection between the client and the server before transmitting the data reported, and no timeout retransmission mechanisms, and therefore the transmission speed quickly.
3.ICMP
(the Internet Control Message Protocol, Internet Control Message Protocol) protocol used to control the IP protocol provides services that allow the destination host or router provides feedback information to the sender of the data. If necessary send feedback information includes: the packet can not be sent to the target host, router buffer overflow resulting in data packet is deleted, the router want to redirect traffic to another shorter route finest. ICMP protocol is part of the IP protocol, any device implements IP protocol is also required to achieve the ICMP protocol.

Guess you like

Origin blog.51cto.com/12942223/2402917