The tenants all live at the same street address (like an FTP server and a Web server share the same IP address). This is like a postal carrier bringing mail for tenants of an apartment building. Based on the destination port, the destination machine knows which program or service to send the data to. Port numbers are found in either TCP segments or UDP datagrams at Layer 4. IP addresses are found in packets at Layer 3.
MAC addresses are found in frames at Layer 2 of the OSI model. So, in addition to source and destination MAC addresses and source and destination IP addresses, there are source and destination ports. If both are accessible by the same IP address, how does the traffic for the FTP server get to the FTP server, and the traffic for the Web server get to the Web server? The way into and out of a program or service is through a port, which is an endpoint in communication, represented by a logical number. Well, then, how does network communication go in and out of a program or service? Let's say a single machine is running both an FTP (File Transfer Protocol) server, like FileZilla, and a Web (HTTP) server, like Apache. In the world of Linux, services are known as daemons. As another example, when you turn on a Web server, you're starting a specific server service that isn't tied to a specific user logon. It's not tied to a single user logon, and is always running in the background.
Windows client machines, for instance, have a Workstation service that runs in the background and enables connections to remote network resources. A service is a program that runs in the background, independent of a logon, that provides functionalities to a system. The way network communication goes in and out of a machine logically though, is through a program or service. Transcribed image text: 166 Chapter 8: TCP/IP Applications Getting Down to Business The way network communication all those ls and Os) goes in and out of a machine physically is through the NIC (network interface card).