LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-10-2006, 10:22 PM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Red face About TCP / UDP


Friends ,

I have some confused about TCP and UDP protocol .

Suppose i have two computer which are connected using UTP Cable. Since TCP is "connection-oriented" and UDP is "Connectionless" protocol . So i think two pc is connected using only TCP protocol . Am i right ? My question is , in this
condition Can UDP protocol is used in the above two pc's ?

My another question is :

When two different Network are connected using switch or Hub (Like a Intranet)then for transmitting data from One network to another network , which protocol and which ports may can be used between these different two networks ?

Plz kindly inform me...............Thx...
 
Old 05-10-2006, 10:50 PM   #2
haertig
Senior Member
 
Registered: Nov 2004
Distribution: Mint, MX, antiX, SystemRescue
Posts: 2,337

Rep: Reputation: 358Reputation: 358Reputation: 358Reputation: 358
I think your questions indicate you would benefit greatly from a book or online tutorial on networking basics. I would recommend searching Google using terms like "networking", "basic", "tutorial", "howto", "tcp/ip", etc.

You need a basic concept of how a network operates before you can understand what you might be told here. This is not something you appear to be cognisant of, and I doubt it could be easily taught in an online forum like this one. For one, "connection-oriented" vs. "connection-less" as used to describe TCP and UDP protocols has absolutely nothing to do with a physical cable "connecting" the two computers together. Concepts like this are better covered by reading a tutorial than by a question/answer format like a forum. You don't even know what questions to ask yet. I'm not saying this to put you down - I'm trying to come up with the best way to help you.
 
Old 05-10-2006, 11:02 PM   #3
redhatrosh
Member
 
Registered: May 2004
Location: Student of University of Mumbai, Maharastra State, India
Distribution: Redhat Linux 9.0, Knoppix LIVE CD, Ubuntu Live CD, Kubuntu Live CD
Posts: 483

Rep: Reputation: 30
Quote:
Originally Posted by shipon_97
Friends ,

I have some confused about TCP and UDP protocol .

Suppose i have two computer which are connected using UTP Cable. Since TCP is "connection-oriented" and UDP is "Connectionless" protocol . So i think two pc is connected using only TCP protocol . Am i right ? My question is , in this
condition Can UDP protocol is used in the above two pc's ?
When two computers are connected using a UTP cable, they are just "physically connected". You don't determine the protocol by which they are connected. Rather, the physical medium just possesses, physical properties of transmitting signals through it.

The protocol comes at an abstraction layer of the systems. The transport layer in the TCP/IP protocol suite, is the one who handles the protocol communication deciding on which one to use, which in turn is guided by an application requiring access to a network resource or sending data to a network device.

The application would issue commands to the system as to which protocol should be used for communication and what kind of transmission is required between the systems.

UDP or TCP protocol can be used between the two systems, based on what is required to be done by an application.

For example, a FTP Server running on one and the client running on other would require a TCP connection, to ensure that all the packets of the transmission reach safely and completely.

UDP protocol are more commonly used to broadcast things, and are used in real world for Streaming applications, like Internet Radio / Playing songs online etc.

Quote:
Originally Posted by shipon_97
My another question is :

When two different Network are connected using switch or Hub (Like a Intranet)then for transmitting data from One network to another network , which protocol and which ports may can be used between these different two networks ?

Plz kindly inform me...............Thx...
It again depends on what kind of networks they are. There are a few protocols associated with routing the data but I don't have the exact details. Most interior networks Routing Information Protocol (RIP) and Open Shortest Path First(OSPF) are used.
I'll get details about this and you too can get from the following books:

1."Data Communication and Networking" 2nd Edition Behrouz A Forouzan
2."Computer Networks" 4th Edition Andrew S. Tanenbaum
3. "TCP/IP Protocol Suite" 2nd Edition Behrouz A Forouzan
4. "Data and Computer Communications" Sixth Edition William Stallings
 
Old 05-10-2006, 11:35 PM   #4
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
More simply put, TCP and UDP are protocols. They have nothing to do with the physical media (your cord). They simply allow for data transfer. TCP uses something akin to the "Three-way handshake", which means it relies on a SYN, ACK, SYN-ACK process.

Say a computer wanted to communicate something using TCP to a server. First the computer would send a request for SYNchronization, then the server would respond with a ACKnowledgement, and the computer would respond to the ACKnowledgement with a SYNchronization ACKnowledgement.

With UDP, this process is skipped to improve throughput. As redhatrosh mentioned, it is mostly used when streaming data. There is no three-way handshake, thus it is connectionless, since no real acknowledgements are made to synchronization. This is why you will sometimes notice gaps in video or audio streamed to your computer through the internet.
 
Old 06-24-2012, 04:54 AM   #5
hariharan.v
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
Smile

I need to tell you one thing, if you want TCP to connect with UDP .. its very good

But there are problems like UDP is a broadcasting protocol where TCP weekens, but you can do by using signals ..

There must be some interrupts to work on efficient way

Last edited by Tinkster; 06-24-2012 at 10:30 PM. Reason: link spam removed.
 
Old 06-24-2012, 06:22 PM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,398

Rep: Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780Reputation: 2780
Quote:
if you want TCP to connect with UDP .. its very good
As per higher up comments, UDP and TCP are different protocols, therefore this statement makes no sense.

Try these links
http://beej.us/guide/bgnet/
http://www.kohala.com/start/
http://www.linuxtopia.org/online_boo...ide/index.html
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What's the difference between (UDP and TCP)/IP? itz2000 Linux - Networking 5 01-25-2006 06:19 AM
TCP/UDP Confusion blackhole123 Linux - Networking 1 11-15-2005 03:46 AM
tcp/udp and c++ Kroenecker Programming 1 05-10-2005 11:56 AM
UDP over TCP The_Nerd Programming 7 07-21-2004 09:45 PM
TCP vs. UDP mikeshn Linux - Networking 5 05-17-2003 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration