LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-04-2009, 05:14 PM   #1
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Rep: Reputation: 31
Is it possible for two hosts to use the same source port ?


Hi

I was reading about data communication on the net and i got a little confused. There are 65535 available port numbers and the port numbers from 1-1024 are reserved for applications and such. That leaves 64511 ports available. My question is, when a web server has a number of connections from users which are larger than the amount of ports available, how can it handle more connections ? Every host that connects to the web server needs a source port, can several hosts share the same port numbers (and then the connections would be differentiated with the TCP ACK field and sequence numbers for example) ?

Thanks for all help.
 
Old 04-04-2009, 06:39 PM   #2
clvic
Member
 
Registered: Feb 2008
Location: Rome, Italy
Distribution: OpenSuSE 11.x, vectorlinux, slax, Sabayon
Posts: 206
Blog Entries: 2

Rep: Reputation: 45
A connection in the internet (a TCP connection) is always identified by two couples of numbers: (source address, source port), (destination address, destination port)
So, two different source addresses can have the same source port, as this results in two different connection identifiers.
A book about connections should absolutely explain this thing! If not, try complementing that book with some other source
 
Old 04-05-2009, 11:04 AM   #3
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
If your webserver runs out of available ports to use for connections, it doesn't accept more until one becomes free. Typically this is called a Denial of Service (DoS).

Source ports are specific to the local machine. A single computer can't use the same source port for multiple applications at the same time, as the port would be already bound and reported as in-use to the OS. However, multiple computers connecting to the same destination could use the same source port.
 
Old 04-06-2009, 01:35 AM   #4
exceed1
Member
 
Registered: Mar 2008
Location: oslo
Distribution: debian,redhat
Posts: 199

Original Poster
Rep: Reputation: 31
thanks, great answers.
 
  


Reply



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
[SOLVED] Using hosts.allow to allow only postfix to use port 25 Mogget Linux - Server 3 03-28-2009 04:36 AM
allow only 2 hosts to access a port using iptables. masterjml Linux - Security 2 11-14-2008 09:30 AM
mapping address:port to name in hosts redmeat Linux - General 2 09-11-2006 10:12 AM
Virtual hosts and port forwarding fr_laz Linux - Networking 0 02-03-2005 02:46 PM
Forwarding port 80 to two hosts from a Linksys router ridertech Linux - Networking 1 08-19-2004 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:10 AM.

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