Problem Solving:Internet
Understanding NAT
As interest in using the Internet grows and grows, Internet address space comes under
greater demand, and the threat looms that it could run out. Network Address Translation is one
method of conserving Internet address space which you can put to use on your network.
By Neil Briscoe
N
etwork Address Translation is
On the other hand, if you have ad
A PC/Server Connection
commonly known as NAT. In
hered to RFC 1918 you will only need
this article I'll explain what
to change the address on the external
Leaving NAT aside for the moment,
NAT is and give a brief technical expla
side of your router, and possibly any
let's consider a connection from your
nation of how it works.
static HAT mappings you've used I'll
PC to a server. What happens when
Why do we need it? Well, it is one
explain that later.
you type telnet some.server.com is
attempt at preserving the address
that your operating system picks a port
space available for use on the Internet.
IP Connections
above 1023 and assigns it to your ses
Internet Service Providers no longer
sion. Let's assume it picks port 1025 to
use the A, B, and C classes of address.
Before we delve further into NAT
use.
They allocate addresses in a classless
we need to talk about how IP connec
It connects to some.server.com on
manner. What that means is that, from
tions normally work.
port 23 because port 23 is the port
their blocks of allocated addresses,
There are 65,535 ports you can
reserved by IANA for telnet sessions.
they will allocate you just as many ad
think of them as channels for IP to
But the source information in the pack
dresses as you need, and no more. This
choose from. (The number of ports
ets that reach the server tell it that your
method is known as CIDR (pro
available is determined by the maxi
machine is using port 1025 to service
nounced Cider) which stands for
mum value you can get from the 16 bits
its replies.
Classless Internet Domain Routing.
allocated to the port number in the IP
When the packets are returned from
CIDR is, however, outside the scope of
packet.)
the server, therefore, they are aimed at
this article. [See this month's Professional
The first 1023 of them are reserved.
the port number that was indicated in
Update for an item on CIDR Ed.]
They're deemed to be privileged ports
the original packets in our example,
All you need to know about CIDR
and are reserved for what are known
port 1025.
for the purposes of this article is that it
as the Well Known Services (WKS)
If you've ever wondered how it's
means that, if you change ISPs, you're
such as telnet, ftp, gopher, www and
possible to talk to two separate servers
going to have to change all of your IP
so on. So they're normally reserved for
at once especially if you use a dial up
addresses, unless you adhere to RFC
server processes for those types of pro
connection to the Internet, which
1918 in the first place. Believe you me,
tocol, and can't be used by client proc
makes the whole procedure appear to
if you have even a medium sized net
esses.
take place by magic it is simply be
work, changing all the IP addresses on
The remaining ports can be used for
cause your operating system assigns,
all of your machines requires a consid
anything. Some of these are anyway
say, port 1025 to the first session, and
erable investment in time and money,
used by various server processes and
port 1026, say, to the second one. Each
not to mention the fact that you will
some are becoming Well Known
server sends its responses back to your
have to reboot many machines, which
but until IANA (see box) grants them
machine, but each using a separate
can mean things fail that might other
a number that use is merely an unoffi
port. So, when received, your com
wise have held on a little longer.
cial convention.
puter knows which session they were
destined for and doesn't mix the ses
sions up.
IANA
The Internet Assigned Numbers Authority (www.iana.org) is responsi
The Need For NAT
ble for allocating port numbers to Well Known Services, allocating blocks of
The reason why NAT is so impor
addresses to Internet Service providers (which they do via delegation), and
tant is that address space under IPv4
assigning Autonomous System Numbers amongst other things. Even in an
(in the current version) is limited.
almost unregulated environment like the Internet, responsibility for certain
There are four octets, totalling 32
issues has to be centralised otherwise it would all fall into chaos.
bits of address space. We've tried class
Issue 111 (October 1999) page 21
File: P1827.1
PC Network Advisor
Next page >
New! The best sites for quality inkjet printer cartridges and the best sites for cheap inkjet cartridges