Protocols and Ports
- At the Link layer, Ethernet allows hosts to send one another frames of data using MAC addresses
- These frames would typically be transporting IP packets
- At the Internet layer, IP provides addressing and routing functionality for a network of networks
- next layer up in the TCP/IP protocol stack is the Transport layer
- One of the functions of the Transport layer is to identify each type of network application
- does this by assigning each application a port number between 0 and 65535
- E.g.,
- data addressed to the HTTP web browsing application can be identified as port 80
- data requesting an email transmission service can be identified as port 25
- host could be transmitting multiple HTTP and email segments at the same time
- These are multiplexed using the port numbers onto the same network link
- E.g.,

Info
- each host assigns two port numbers
- on the client, the destination port number is mapped to the service that the client is requesting (HTTP on port 80, for instance)
- client also assigns a random source port number (47747, for instance)
- server uses this client-assigned port number (47747) as the destination port number for its replies and its application port number (80 for HTTP) as its source port
- This allows the hosts to track multiple “conversations” for the same application protocol