Jump to content
xisto Community
Sign in to follow this  
OpaQue

What Is: User Datagram Protocol (udp)?

Recommended Posts

User Datagram ProtocolUnlike TCP, the User Datagram Protocol (UDP) does not present data as a stream of bytes, nor does it require that you establish a connection with another program in order to exchange information. Data is exchanged in discrete units called datagrams, which are similar to IP datagrams. In fact, the only features that UDP offers over raw IP datagrams are port numbers and an optional checksum.UDP is sometimes referred to as an unreliable protocol because when a program sends a UDP datagram over the network, there is no way for it to know that it actually arrived at it’s destination. This means that the sender and receiver must typically implement their own application protocol on top of UDP. Much of the work that TCP does transparently (such as generating checksums, acknowledging the receipt of packets, retransmitting lost packets and so on) must be performed by the application itself.With the limitations of UDP, you might wonder why it’s used at all. UDP has the advantage over TCP in two critical areas: speed and packet overhead. Because TCP is a reliable protocol, it goes through great lengths to insure that data arrives at it’s destination intact, and as a result it exchanges a fairly high number of packets over the network. UDP doesn’t have this overhead, and is considerably faster than TCP. In those situations where speed is paramount, or the number of packets sent over the network must be kept to a minimum, UDP is the solution.

Share this post


Link to post
Share on other sites

Since UDP isn't paid much attention or importance, viruses and worms often use the UDP Protocol to spread themselves. For example, when all other methods of spreading itself fails, the blaster worm uses UDP Port 69, which is the common access port for TFTP(Trivial File Transfer Protocol), to spread itself to other computers. Firewalls like Zone Alarm can block UDP ports that are known to be used by worms/viruses to spread themselves. Hackers can also run port-scans on servers and unprotected UDP ports can sometimes allow them to compromise the system....

Share this post


Link to post
Share on other sites

Just a question... are the ports actual ports on our computers? Or do they exists somewhere on the net?

<{POST_SNAPBACK}>


Well... they aren't actual, they're bits. And they exist on our computers and and in the net, as our computers are the net.

 

Ports are there to define which packets belong to which applications. They are like apartment numbers in snail mail. You can think that the IP address is the house's address and number (ie. Somestreet 11) and port is the apartment number (ie b 4).

 

 

 

 

Simply put UDP is a "fire and forget" protocol. It sends the datagram but doesn't give a **** if it ever mades through.

 

But like Opaque mention UDP has it's uses. Mainly these are for streaming live audio and video. For example on a phone conversation it really doesn't matter if every packet mades through, atleast if the alternative would be increased lag. One packet missing from speech doesn't affect much on how well the actual message is received, but if it was, say a zip file, transfered one inverted bit could mean loss of the entire data. But that's why there are different protocols for different tasks.

Share this post


Link to post
Share on other sites

Is it possible to have multicasted UDP packets in the same way as IP multicast?My question is referred to a discussion i had concerning UDP packets sent from a server (S1) to its clients, to be sent also to another server (S2) saving as much BW as we can.I think a multicast UDP packet could be the solution.

Share this post


Link to post
Share on other sites

...

But like Opaque mention UDP has it's uses. Mainly these are for streaming live audio and video. For example on a phone conversation it really doesn't matter if every packet mades through, atleast if the alternative would be increased lag. One packet missing from speech doesn't affect much on how well the actual message is received, but if it was, say a zip file, transfered one inverted bit could mean loss of the entire data.  But that's why there are different protocols for different tasks.

<{POST_SNAPBACK}>


All the online gaming world is also based on UDP packets: it's necessary to send as quick as possible data from server to clients no matter if they receive all the packets.

Share this post


Link to post
Share on other sites

All the online gaming world is also based on UDP packets: it's necessary to send as quick as possible data from server to clients no matter if they receive all the packets.

<{POST_SNAPBACK}>


Ok here is the problem some people complain that they cant coonect to my game server casue they have the same ip is there any way that can be resolved ?? please let me know.

Share this post


Link to post
Share on other sites

Ok here is the problem some people complain that they cant coonect to my game server casue they have the same ip is there any way that can be resolved ?? please let me know.

<{POST_SNAPBACK}>


I really don't think "same IPs" is your clients connection problem. It will be probably a firewall matter. You will need to open some ports to let data exchange. IPs on internet can't be the same, IP uniqueness is an internet fundamental feature.

Share this post


Link to post
Share on other sites

It is possible to be behind same IP address. If computers are connected to a switch/router which uses NAT (network address translation), all the computers have unique IP addresses inside the LAN, but from outside all traffic seems to come from same IP address (ie. the routers address)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.