Jump to content
  • Advertisement
Sign in to follow this  
masq

UDP/IP turmoil

This topic is 3260 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi!! I am in a very big confusion about UDP and IP. In UDP there is pseudo header used to verify whether UDP datagram has reached to correct destination or not. This is done by computing check sum on destination's IP which is then verified at destination machine. My confusion is that, though at Network Layer, correctness of destination is checked by verifying checksum(which also include destination IP), and if it doesn't matches then packet is automatically discarded and not forwarded to transport layer. So what is the need to again perform this check at transport layer..?? Please help me to solve this confusion.. Thanks

Share this post


Link to post
Share on other sites
Advertisement
It's been a while, so this might be inaccurate, but from what I remember, the checksumming done at layer 4 is for data integrity over the whole of the packet (maybe just header?) not just the IP.

Share this post


Link to post
Share on other sites
Thank you for the reply.
Yes, the checksum includes UDP header, data and pseudo header.
But I am confused about why pseudo header is required then, as there is no need to calculate checksum over IP address.(check sum on IP is already been calculated at layer3)

Share this post


Link to post
Share on other sites
But as i read in Internetworking with TCP/IP(by Comer), the main purpose of using the pseudo header is to compute checksum on IP.
You can refer to this link
http://books.google.co.in/books?id=jonyuTASbWAC&pg=PA178&lpg=PA178&dq=udp+pseudo+header+described+in+comer&source=bl&ots=i3XjYbUQZr&sig=JzRZThic3O6xQOOCg7R9VQX_N7E&hl=en&ei=w4nZStmTHobusQPzytSLBg&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA4Q6AEwAA#v=onepage&q=&f=false

If it means something else, then please make me understand what does it means.
Thanks.

Share this post


Link to post
Share on other sites
Sorry, can't view that link. No, the main purpose of UDP checksum is to verify that the packet was sent without degradation. The main use of the psuedo header might be to include IP info with that. But in the end, I don't know the intent of the protocol designers or the historical reasoning behind that design. Though I also don't particularly have a problem treating the entirety as a black box...

Share this post


Link to post
Share on other sites
Yes,one of the purpose of the UDP checksum is to provide data integrity but it can be provided without using pseudo header as pseudo header has no relation with the data.
Though it is the historical black box but it is used in many applications today. And also concept of pseudo header is used in TCP, which is the most widely used technology today. Therefore, unless the purpose of pseudo header is clear to me, I am unable to make my base. and I also have to face practical & theory exam so it is necessary for me to clear the doubts.

The link that i have posted is google book result of Comer(Internetworking with TCP/IP-vol I) that i have searched on google under topic "udp pseudo header".
UDP Pseudo header

Thanks for your suggestion. Do post any information you find regarding this.

Share this post


Link to post
Share on other sites
Quote:
So what is the need to again perform this check at transport layer..


- It checks for correct source and destination IP (as intended by sender, not just making sure IP checksum matches)
- It verifies for correct protocol
- It verifies correct message length

IP checksum cannot verify those in itself, and using pseudo header avoids some duplication, and basically acts to verify sender's signature.

Most of these are for historical purposes only. But back in 1980, when RFC 768 was written, internet was in infancy, communication gear was rudimentary, and transmission errors and faulty network equipment were something to account for. All that "designed for nuclear war" type of thing.

In IPv4, this checksum is optional.

Share this post


Link to post
Share on other sites
UDP pseudo header consist of sender's IP, reciever's IP, protocol and message length.
Verification of message and protocol is needed in UDP but sender and destination IP are unnecessarily included here though it is already included and verified in IP datagram.
That's what I am thinking.
Tell me is there any other issue regarding inclusion of IP address's here again.
If no, then is UDP(and TCP) will work fine without including it??

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!