I CSI 124X Lecture Notes - Lecture 14: Data Link Layer
Document Summary
Both tcp and udp use numeric port numbers to do their work. The reason for ports is that computers can communicate for a number of different reasons. The ports identify: the program (service) that a client is requesting from a server the program on the client that the server is replying to. These port numbers can be used to indicate the program (client or server) sending a packet, or receiving a pack. This makes sure that information (the packets) get sent to the correct program running on the computer. There are three different groups of port numbers well-known ports(0 1023) Registered server ports(1024 49151) client ports (49152 65535) It is however possible to set up services to use non-standard port numbers. You could set up a http/web server that uses port 1234 if you wanted. No effort is made to ensure their delivery. Udp is typically used for situations when the loss of an occasional packet is acceptable. (streaming audio/video)