The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
.
google unix.com



IP Networking Learn TCP/IP, Internet Protocol, Routing, Routers, Network protocols in this UNIX and Linux forum.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ports zsujith HP-UX 1 12-31-2007 04:45 PM
Ports walsh_j UNIX for Dummies Questions & Answers 4 07-18-2007 02:25 PM
Ports Ralf UNIX for Dummies Questions & Answers 2 12-10-2002 12:07 PM
Ports Yaki UNIX for Dummies Questions & Answers 6 10-10-2002 12:07 PM
TCP/UDP Ports eugene_mayo IP Networking 5 08-26-2002 07:27 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 02-20-2003
eloquent99 eloquent99 is offline
Registered User
  
 

Join Date: Jun 2002
Posts: 37
ports???

Ok, I've been working in the IT field for about 3 years now and I never fully understood the concept of ip ports. I just started a new job that uses Solaris and today it kinda clicked in my head and I want to know if I'm right or wrong.
Does each ip address have multiple ports. because we have multiple sun boxes here with about 5 different environments on each server (five different clients use them).
Now since the server only has one ip addresses does the port addresses that follow the ip address sort of branch the ip address to all the different clients using that one ip address or that one server.
If I'm totally wrong please correct me
Any information given would be much appreciated

thanks in advance
  #2 (permalink)  
Old 02-20-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
That's pretty close, but you are are ignoring the protocols. The IP address gets the packet to the box. The next thing that happens is the IP layer looks at the protocol. The protocol might be TCP, UDP, ICMP, and a few others. So the IP layer hands the packet to the proper protocol layer. This will usually be TCP or UDP. Both TCP and UDP will then look at the port number. If a program has that port open it will get the packet.

The program could be client or server.

Try this:
grep telnet /etc/services

You should see:
telnet 23/tcp

So a telnet daemon might be running and if it is, it would be using port 23 but under the tcp protocol. A packet coming in to port 23 with the udp protocol would be an error of some kind. It is even possible that some other program is using 23/udp but that would be rare.

I don't want to write a complete book here, but one more point... tcp is connection oriented. That means that your average tcp packet has a second port and a second ip address that tell where it came from. So there 4 things to look at:
destination ip address
destination port
source ip address
source ip port

All 4 have to match. That is how you can have 20 telnetd's running. They all have the same local ip address and they use port 23. But it takes all 4 numbers to define a socket.

There is more to this and you really should read a book. I suggest TCP/IP Illustrated Volume 1 by Rich Stevens.
  #3 (permalink)  
Old 02-24-2003
kymberm kymberm is offline
Registered User
  
 

Join Date: Mar 2002
Location: Texas
Posts: 120
??

Question on this, i've been posting about a problem with xdmcp and errors, i did a grep xdmcp /etc/services and it comes back with 2 entries, one udp and one tcp. Can there be two entries for the same service? Could this be why i'm not broadcasting, its conflicting?

# grep xdmcp /etc/service

gives me this output:
xdmcp 177/tcp
xdmcp 177/udp
  #4 (permalink)  
Old 02-24-2003
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
Yes what you see is legal. It's also what I have in /etc/services.
  #5 (permalink)  
Old 02-24-2003
LivinFree's Avatar
LivinFree LivinFree is offline Forum Advisor  
Goober Extraordinaire
  
 

Join Date: Jul 2001
Location: Portland, OR, USA
Posts: 1,584
It even states this in the header of my /etc/services on a Redhat Linux box:
Quote:
...
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
...
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:36 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0