The application is what actually determines what source and destination port to use. Most applications default to a well known port, for example, FTP is traditionally port 21, so if you don't specify a port, it will default to that. The application then generates a random source port from the ephemeral port range. Some applications that do autodiscovery of ports may do it at a layer lower than 7, but for the most part, the destination port of any application that's going to act as a client has to be defined ahead of time, and likewise with the listening port on the server side. It's largely unimportant, though. OSI is a set of guidelines, not law, and the Net+ doesn't get that deep into OSI theory and methodology. That kind of question is more important for a developer than a network engineer