117 - 238 CCNA 2: Routers and Routing Basics v3.1 Instructor Guide – Module 10 Copyright © 2004, Cisco Systems, Inc.
10.2.5 Example of multiple sessions between hosts
Port numbers are used to track multiple sessions that occur between hosts. The port number
combined with the network address forms a socket. A pair of sockets, one for the source and
one for the destination, forms a unique connection. For example, a host could have a Telnet
connection on port 23 and surf the net on port 80 at the same time. Explain to the students
that port numbers must be different because they represent different protocols and different
sockets. Emphasize the fact that sequencing and acknowledgement numbers are handled on
a session-by-session basis. Each session between hosts uses its own unique set of
sequencing and acknowledgement numbers.
10.2.6 Comparison of MAC addresses, IP addresses, and port numbers
Port numbers are located at the transport layer and are serviced by the network layer. The IP
address is assigned at the network layer and is serviced by the data link layer that assigns the
MAC address.
A good analogy is a letter. The address on a letter consists of a name, street, city, and state.
These can be compared to the port, MAC, and IP address used for network data. The name
on the envelope would be the same as the port number, the street address would be the MAC
address, and the city and state would be the IP address. Multiple letters can be mailed to the
same MAC and IP address, but different port numbers would be different family members
living in the same household.
To better explain this, the instructor may want to ask some questions and start a discussion:
Could a protocol be routable with only Layer 3 addressing? No. A new frame is
built as the packet is transmitted from the router interface. The Layer 2 address is
used for the delivery of data within the local segment. If only Layer 2 addressing is
used then the data can only be delivered locally. If a router cannot find a Layer 3
address after the frame is discarded, it will not know what to do with the packet.
Could there be multiple sessions between the same hosts without port numbers?
No. Port numbers distinguish the various conversations between hosts. Without
port numbers, there would be no way for the hosts to determine to which session a
packet belongs.
What is an option if there is no Layer 2 address? Broadcast all the frames.
Generally, this is not an acceptable solution. When a frame is broadcast, every
host in the network segment will examine the packet to see if it is addressed to
that host. This forces the host to use an interrupt to notify the CPU. The host must
stop what it is doing and service this interrupt. This type of broadcast
communication is an inefficient use of bandwidth and also wastes valuable CPU
resources on the hosts.