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

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.

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

Yes what you see is legal. It's also what I have in /etc/services.

It even states this in the header of my /etc/services on a Redhat Linux box: