
6.4.3 Port Number
A single computer may be connected to multiple hosts over the Internet. How does the computer know how
to deliver each packet? For example, while writing this paper my mail program is checking e-mail, and I’m
listening to a Real Audio radio program. Each IP packet includes a port number. Port numbers are 16 bit
values that range from 0-65,535. For example when you enter a URL into you web browser to access a
World Wide Web site the browser automatically uses port 80. The low port numbers 0-1023 are called the
well-known ports; they are assigned by IANA the Internet Assigned Number Authority when a particular
service is defined. Software uses that port to make initial contact. After the connection is established the
high numbered ports are used.
6.5 Private Addresses
The Internet Assigned Number Authority assigns Internet addresses. This is the entity that assigned the
addresses used by your ISP. IANA allocated three blocks of private addresses that are guaranteed not to be
used on the Internet RFC 1918. The private addresses are ideal for a small LAN. Devices on the LAN are
assigned from the pool of private addresses. This eliminates the need for coordination of the IP addresses
used on the LAN with those used on the Internet at large. When a computer on the LAN needs to access the
Internet the gateway router uses a technique called Network Address Translation (NAT) to convert the
private IP addresses to the public address assigned by the ISP.
Excerpt from IETF RFC 1918 Address Allocation for Private Internets
The Internet Assigned Numbers Authority (IANA) has reserved the
following three blocks of the IP address space for private
Internets:
10.0.0.0 - 10.255.255.255 (10/8 prefix)
172.16.0.0 - 172.31.255.255 (172.16/12 prefix)
192.168.0.0 - 192.168.255.255 (192.168/16 prefix)
We will refer to the first block as "24-bit block", the second as
"20-bit block", and to the third as "16-bit" block. Note that (in
pre-CIDR notation) the first block is nothing but a single class A
network number, while the second block is a set of 16 contiguous
class B network numbers, and third block is a set of 256
contiguous class C network numbers.
An enterprise that decides to use IP addresses out of the address
space defined in this document can do so without any coordination
with IANA or an Internet registry. The address space can thus be
used by many enterprises. Addresses within this private address
space will only be unique within the enterprise, or the set of
enterprises, which choose to cooperate over this space so they may
communicate with each other in their own private Internet.
In our implementation DHCP is built into the Multitech broadband router. We use Class C private
addresses in the range of 192.168.2.x this allows up to 254 hosts on the LAN. The IP address of the NAT
router is statically assigned as 192.168.2.1. The DHCP server in the router then assigns an IP address to
each client from the pool of remaining addresses.
Some devices work better with a static address. Our local web and print server are assigned static address
so the address is constant. An option in the router forces the router to always issue the same address to a
given device.
Komentáře k této Příručce