Answer Posted / anand sebastian
They are both necessary for correctly routing traffic to its destination but have different scope. An IP address identifies a particular computer on the Internet. The port number identifies a particular program running on that computer.
Consider postal addresses by analogy. The street address and everything following identifies a particular residence or building, e.g. 1600 Pennsylvania Avenue, Washington DC. That is all the postal service needs to deliver a letter to its destination. However, once there it does not describe precisely _who_ the letter should go to. For that you need additional information - the name of the receipient. Only when this is also given - e.g. Bo the First Dog, 1600 Pennsylvania Avenue, Washington DC, can the letter be finally passed to the intended receipient.
The port number works in the same way - the IP address is enough to get the data to the right computer but does not say which application should receive the data on that machine. That is what the port number does. For example, by convention anything sent to TCP port 80 will be forwarded to a web server running on that machine. Anything sent to port 21 is directed to the FTP server instead. Without the port numbers the operating system would have no idea what data is intended for which application.
| Is This Answer Correct ? | 9 Yes | 2 No |
Post New Answer View All Answers
What is port 8080 typically used for?
What is port number and why it is used?
What is the difference between name based and ip based virtual hosting?
What is 3 way handshake?
What is the structure and use of internet addresses?
What is bidirectional firewall rule?
What does an ip address mean?
How do I know my ip address ubuntu?
Can port forwarding mess up internet?
What is the purpose of routing protocol?
How to define ip address?
Explain about tcp&ip and osi model.
What is the pdu of "network layer" and "data link layer"?
What is the differance between HTTP and TCP/IP Protocols?
How do I refresh my ip address?