Re: What's the difference between UDP and TCP packets?

From:
Date: 09/20/02


Date: Fri, 20 Sep 2002 04:33:49 GMT

In simpler terms

TCP is a connection oriented protocol. Before anything can be done
between two hosts, a negotiation has to be made....normally known as a
"Three way Handshake". The host that wants to send data sends a SYN
Packet - this is to see if the host is available and if so, is it
listening on the requesting port. If all is well, then the
destination host sends back an ACK to say "Yes, i'm here...send your
data" - SYNACK - the source host pretty much sends an "OK, here it
comes" - the session is then established and data starts to flow. TCP
is a reliable protocol - it guarentees delivery - meaning, if some of
the data is lost when being sent -the destiantion host says "Hey -
didn't get all of it - send it again.

UDP - this is a connectionless protocol - no handshake and no
guarentee that the data from the source will get to it's destination
-- pretty much tells the data..."This is where you want to go, on this
port ......you are on your own".

I agree with the above poster in doing some reading..though if you are
not familiar with this I would not jump into a Unix network
programming book. Start easy...get something like "TCP/IP for
dummies" and then work up from there. The dummy books are actually
great for beginners.

-Mike-

On Tue, 10 Sep 2002 06:10:36 GMT, Barry Simple
<nospam@netnews.mchsi.com> wrote:

>UDP is like mail: you send a message and hope it arrives at the destination.
>TCP is like telephone: nothing happens until you are both available.
>
>TCP is protocol 6, UDP is protocol 17.
>
>The source port is critical in TCP; it's generally not important in UDP.
>
>It sounds like you need to read from Stevens "UNIX Network Programming".
>
>michaaal wrote:
>> I know that TCP is connection based and UDP is not connection based. I also
>> know that it is sometimes referred to as the "unreliable" protocol. Does
>> anyone know any other differences?
>>
>> Thanks!
>>
>>

msherman@NOSPAMsecuritysense.com - Remove the NOSPAM



Relevant Pages

  • Re: Trouble with Net::Ping
    ... IIRC TCP lives on top of UDP (and thus it makes sense that UDP would ... ICMP although it is more tightly coupled to IP. ... That's a different protocol then HTTP. ... connection has timed out but that the requested data is still being ...
    (comp.lang.perl.misc)
  • Re: Spoofing question?
    ... TCP and UDP, operate. ... TCP spoofing is a bit more difficult since there has to be a connection ... Attack host - The wily hacker. ... Spoofed host - The host packets will appear to be spoofed from. ...
    (Security-Basics)
  • Re: Socket error when restarting host app
    ... TCP includes a mechanism to ensure that packets delayed by the network will ... not be accepted by another connection to the same host and port combination. ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: I cant figure out how to share a printer on my home network.
    ... In my case my host is xp home and the client is ... > of what I see in the properties of my local connection. ... > Control panel, Network connections, right click Local area connection, ... scroll down and check - Netbios compatible transport protocol. ...
    (microsoft.public.windowsxp.newusers)
  • Re: Question about flow control over ethernet with TCP
    ... tell the other host to slow down its number of packets transmitted per ... When the TCP connection is created, both computers do not know how ... So the Host A send the first packets to host B. ...
    (comp.os.linux.networking)