Problem Solving:Internet
ing the address space, we've tried us
certainly more than one. Even if two
with a static NAT mapping rule. You
ing CIDR, but nevertheless address
separate computers happen to pick
tell it the internal number in use on
space will eventually run out. Our
port 1025 for their respective stacks to
your LAN for the relevant computer,
stop gap measures have, however,
use to start a session (quite likely when
and you tell it the public address from
succeeded in preserving the address
everyone fires their computers up in
your ISP assigned address block that
space for longer than we all thought
the morning) the router just keeps a
relates to it.
possible.
mapping for each session it sees.
Now that this is properly set up, if
RFC 1918 provides the rules for us
The advantages of NAT are that it
someone ftps to the public IP address
ing a set of reserved numbers guaran
works, with RFC 1918, to conserve the
listed in the static NAT mapping you
teed never to be in use on the Internet.
address space. The disadvantages are
made, your router will re write the
The beauty of it is that every company
that it slows down the process of trans
packets and transmit them inside to the
that connects can pick from the same
mission, and limits the total number of
correct machine on your LAN.
set of reserved numbers, and it doesn't
sessions to the router to slightly less
To keep things relatively simple, in
matter.
than 65,000 at any one time. That's not
describing static NAT I have spoken of
However, as these numbers are not
really a disadvantage, however, since
you providing a computer on your net
routed around the Internet at all we
unless you had an absolutely vast ex
work, or on your LAN, as a server you
have to have a method of transmitting
ternal pipe you wouldn't want to be
allow unknown outsiders to connect to
packets around the Internet, and re
running that many sessions through
via the public Internet. From a security
ceiving the replies, and then sending
your router anyway.
perspective this is a very unwise thing
the packets inwards to our network to
to do. The best advice is to get a router
the correct computer on our LAN, and
Dynamic And Static NAT
with two Ethernet ports, put all your
the correct session on that computer.
company private machines on one seg
This is where NAT comes in.
Finally a quick word on the differ
ment, and put the machines you wish
To use NAT, the router which con
ence between dynamic NAT and static
to be public on the other segment. Con
nects your LAN to the Internet will
NAT. What has been defined so far is
figure the router with suitable ACLs.
have two addresses. On the LAN side,
known as dynamic NAT all packets
it will have an address from the par
leaving your LAN for the Internet con
ticular RFC 1918 address range you
tain the same source IP address, which
chose to use and, on the Internet side,
is the public one assigned to your
it will have an address assigned to you
router.
by your current ISP.
There is one drawback with this. If
Now let's look at that example
the router is the only device with a
again. Your machine sends out a
public address, then there is no way for
packet aimed at some.server.com. The
you to provide information services on
source IP and source port are in the
any computer on your network.
packet, just as before, together with the
Supposing that, despite being a
destination port and IP address.
good network citizen and using RFC
When it arrives at the router, the
1918 addressing, you nevertheless
router will de encapsulate the packet,
wish to provide a Web server, or an ftp
PCNA
and re write it. The packet it sends out
repository, for example. You can't, be
onto the Internet will contain the
cause no one on the Internet has any
router's public IP address, a source
way of specifying that they want to
port allocated from the router's list of
connect to the specific computer con
available ports, and the same destina
taining the server.
tion IP address and port number that
However, static NAT allows this to
your machine generated.
happen. First, you will need to get your
The router will also add an entry
ISP to allocate you a block of public
into a table it keeps, which maps the
addresses. Using CIDR, most ISPs will
internal address and source port
allocate you a block of eight addresses.
number your machine generated
Because of certain rules which we
against the port number it allocated to
won't go into here, you will have five
this session. Therefore, when the ma
of these eight available for use for static
chine some.server.com sends a reply
mapping.
packet to the router, the router can
The computer on your LAN with
The Author
quickly work out how it needs to re
the service you wish to make available
write the packet before transmitting it
still gets assigned an RFC 1918 address
Neil Briscoe is a network consult
back on the LAN.
otherwise, you wouldn't be able to
ant and can be contacted as
This works well because most
connect to it from your own comput
neil.briscoe@itp journals.com.
LANs have many computers on them
ers. Next, you configure the router
File: P1827.2
Issue 111 (October 1999) page 22
PC Network Advisor
< Next page >
New! The best sites for quality inkjet printer cartridges and the best sites for cheap inkjet cartridges