I understand that UDP resides on the transport layer and IP on the internet layer. I also get that they're both connectionless and unreliable. Then what is the point of UDP when we already have IP? The distinction is not very clear. Any help on this is greatly appreciated. Thanks!
相关问题
- Nullpointer exception when trying to receive UDP m
- Tcp connection with Spring Integration framework
- How iperf calculates network statistics
- Java UDP socket - Data are left over at the server
- Wireshark dissector that works with tls/ssl
相关文章
- Socket编程 TCP方式发送时间有点长
- PostgreSQL field data type for IPv4 addresses
- How many times will TCP retransmit
- What's “tcp-backlog” in redis.conf
- Is it better to send 1 large chunk or lots of smal
- How to find that an IP address is a LAN IP or WAN
- Direct IP call android
- as3 ByteArray to Hex (binary hex representation)
To multiplex services. The
UDP
port number can differentiate between multiple services on the same host, using the same L3 identification. UsingIP
only it wouldn't be possible to host multiple services on the same station and easily differentiate between them.Also, consider the case of UDP over IPv6. Since IPv6 doesn't have error-checking somebody has to perform it: the
Checksum
field of UDP is not optional.Once a packet reaches a host using its IP address, the packet needs to be given to one of the applications on this machine. To determine which application should get the packet, it needs demultiplexing logic, which is based on ports. UDP has port information which is used by IP to deliver the packet to appropriate application.