Thread Tools Search this Thread
Special Forums IP Networking ports???
# 1  
Old 02-20-2003

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  
Old 02-20-2003
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  
Old 02-24-2003

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  
Old 02-24-2003
Yes what you see is legal. It's also what I have in /etc/services.
# 5  
Old 02-24-2003
It even states this in the header of my /etc/services on a Redhat Linux box:
# 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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users


** forum admins: Before you come down on my like a wrath of something, I can get no decent answers so I have to come to these Gurus' court *** I am by no means Unix expert. However, none of our unix admin (aix & hpux) can give me an answer that makes sense. My Issue: Assigned ports in 8601,... (7 Replies)
Discussion started by: rsheikh
7 Replies

2. UNIX for Dummies Questions & Answers


When the netstat -an command is run on current unix machine, it seems that there's an excessive amount of ports established (roughly 600). How can I tell what each of these ports are being used for? (1 Reply)
Discussion started by: lastchance551
1 Replies

3. Solaris


Hi, If for example i try to start tomcat in a solaris server and get errors related to address already in use, how can I know if this port is really used for another process? If someone can point any documentation it will be very helpfull. Thanks! :rolleyes: (9 Replies)
Discussion started by: ffpradella
9 Replies

4. Solaris

regarding ports

Hi , I need one help... Is there any command on solaris 10 to free the ports. For e.g I used netstat -na| grep 8080 it displays either it is listening or established.. i want to free the ports... Anyone please help me on this... Thanks, Shanmuga (2 Replies)
Discussion started by: shanshine
2 Replies

5. HP-UX


Can any one tell the command for which process are running on a perticular port (1 Reply)
Discussion started by: zsujith
1 Replies

6. UNIX for Dummies Questions & Answers


Hello UNIX people... This is my first foray into the UNIX world so go easy on me... I have a client who has hired me to do some work on his windows stuff, BUT it just so happens his UNIX server started giving him problems... He is running SCO Open Server 5.0.6 The TTY ports won't... (5 Replies)
Discussion started by: TechKnow
5 Replies

7. IP Networking


What are some good sites that list all TPC/UDP ports? ~thanks (3 Replies)
Discussion started by: ireeneek
3 Replies

8. UNIX for Dummies Questions & Answers


I know i can look in the /etc/services file to look at referenced port numbers, but is there a command that will list the current ports being used? (i.e. what is the application does not have an entry in the services files :confused: ) (2 Replies)
Discussion started by: Ralf
2 Replies

9. UNIX for Dummies Questions & Answers


How To Close ports,for example finger port 79?? :confused: :confused: :confused: 10x (6 Replies)
Discussion started by: Yaki
6 Replies

10. UNIX for Dummies Questions & Answers


how can i check to see if my mail ports are open (port 110 for incoming and 25 for outgoing)? I want to do this because i am having a problem sending email out. If one of the ports has a problem, how can i open it? Thanks in advance! (9 Replies)
Discussion started by: djatwork
9 Replies
Login or Register to Ask a Question

Featured Tech Videos