|
2-8
Chapter 2
Planning a TCP/IP Network Infrastructure
Connecting to the Internet with Routers
A router is a network layer device that connects two networks and permits
traffic
to pass between them. Routers therefore have two network interfaces and two
IP
addresses, one for each network. If you want to give your network users
access
to the Internet, you must have a router connecting your network with that of
an
ISP. A router can be a software application running on a normal computer, or
it
can be a dedicated hardware device costing anywhere from under one hundred
to many thousands of dollars. For more information on routers and TCP/IP
rout-
ing, see Lesson 3 of this chapter.
When a client application generates a request for information from a server
on the Inter-
net, the client computer generates a request message and packages it in an
IP datagram.
The datagram is essentially the envelope that carries the message to its
destination.
Like a postal envelope, the datagram includes the address of the destination
system
and the address of the sender; the only difference is that these are IP, not
postal,
addresses.
Understanding Routing To get the request to the destination server, the
client com-
puter sends it to a nearby router, which receives the datagram, evaluates
the destina-
tion address, and forwards the packet to the appropriate location, either
the specified
server or another router. The datagram might pass through a dozen or more
routers on
its journey. Eventually, the destination server receives the datagram,
processes the
request contained inside, and generates a reply using the sender’s address
from the
original datagram as the destination. The routing process then occurs in
reverse, with
the reply datagram eventually finding its way back to the client computer.
If the sender’s IP address in the request datagram is unregistered, however,
the reply
can never make it back to the client computer because routers cannot process
unreg-
istered addresses properly. When you use NAT, the first router that receives
the request
datagram from the client makes some slight modifications to it. A NAT router
connects
both to a private network, using unregistered addresses, and to an ISP’s
registered net-
work. This means that the NAT router has one unregistered address and one
registered
address.
Understanding NAT Routing Under normal conditions, routers do not modify
data-
grams any more than the postal service modifies envelopes. A NAT router,
however,
modifies each datagram it receives from an unregistered client computer by
changing
the sender’s IP address. When a client sends a request message in a datagram
to a NAT
router, NAT substitutes its own registered IP address for the client
computer’s unregis-
tered address in the datagram and then forwards it to the destination in the
normal
manner. The NAT router also maintains a table of unregistered addresses on
the private
network so that it can keep track of the datagrams it has processed.
|