Netopia R2121 User Manual

Page 245

Advertising
background image

Understanding Netopia NAT Behavior D-3

When the Netopia R2121 receives this IP packet, it can not simply for ward it to the WAN inter face and the
Internet since the IP addresses on the LAN inter face are not valid or globally unique for the Internet. Instead the
Netopia R2121 has to change the IP packet to reflect the IP address that was acquired on the WAN inter face
from the ISP.

The Netopia R2121 will first substitute the source IP address with the IP address that was acquired on the WAN
inter face which in this case is 200.1.1.40. Next the Netopia R2121 will substitute the source TCP or UDP por t
with a TCP or UDP por t from within a specified range maintained within the Netopia R2121. And finally the
modified IP packet's checksum is recalculated (as specified in RFC 1631) and the packet is transmitted across
the WAN inter face to its destination, the WWW Ser ver on the Internet.

If the send and response IP packets were drawn out, this process would look like the following:

As you can see, the IP packet from Workstation A is sent to the Netopia R2121 and the source IP address is
substituted with 200.1.1.40 and the source por t is substituted with 5001, then the IP packet checksum is
recalculated. When this modified packet reaches the WWW Ser ver on the Internet, the WWW Ser ver responds
and sends the IP packet back to destination IP address 200.1.1.40 and destination por t 5001.

When the Netopia R2121 receives this IP packet from the WWW Ser ver, the Netopia R2121 replaces the
destination IP address with 192.168.5.2, the address for Workstation A. The por t is changed back to 400, the
IP packet checksum is recalculated, and the IP packet is sent to Workstation A on the Netopia R2121s LAN
inter face.

The reasons for the IP address changes are obvious from the diagram above but what is not so obvious is why
the TCP or UDP source por ts need to be changed as well. These are changed and maintained in an internal
table so the Netopia R2121 can determine which host on the local LAN inter face sent the IP packet and what
host the response from the WAN inter face is going to go to on the LAN inter face. This becomes especially
impor tant when two or more hosts on the LAN inter face are accessing the same type of ser vice on the Internet,
like a WWW Ser ver (Por t 80), for example.

Now look at how two hosts on the LAN inter face accessing the same WWW Ser ver on the Internet will work:

Netopia

Router

Wkstn A to Netopia

Src IP: 192.168.5.2
Dst IP: 163.176.4.32
Src Port:: 400
Dst Port:: 80

Workstation A

192.168.5.2

Netopia Router
LAN: 192.168.5.1

WAN: 200.1.1.40

Netopia to ISP Router

Src IP: 200.1.1.40
Dst IP: 163.176.4.32
Src Port:: 5001
Dst Port:: 80

ISP Router to WWW

Src IP: 200.1.1.40
Dst IP: 163.176.4.32
Src Port:: 5001
Dst Port:: 80

WWW to ISP Router
Src IP: 163.176.4.32
Dst IP: 200.1.1.40

Src Port:: 80
Dst Port:: 5001

ISP Router to Netopia
Src IP: 163.176.4.32
Dst IP: 200.1.1.40

Src Port:: 80
Dst Port:: 5001

Netopia to Wkstn A
Src IP: 163.176.4.32
Dst IP: 192.168.5.2

Src Port:: 80
Dst Port:: 400

ISP Router

200.1.1.1

WWW Server
163.176.4.32

Advertising