Netopia Netopia ISDN Router Router User Manual


 
Understanding Netopia NAT Behavior E-5
If you were to look at the internal port mapping table that is maintained by the Netopia R310, it would look
similar to the following:
With this information the Netopia R310 can determine the appropriate routing for an IP response from the
Internet. In this case when the WWW Server responds with a destination port of 5001, the Netopia R310 can
see that this packet's destination on the local LAN interface is actually Workstation A at IP address
192.168.5.2. Likewise with the response for port 5002, the Netopia R310 can see that this packet's
destination on the local LAN interface is actually Workstation B at IP address 192.168.5.3.
Exported services
Note that this “automatic” port remapping and IP address substitution only works in one direction, for IP
packets that originated on the LAN interface destined to the WAN interface and the Internet. In order for port
remapping and IP address substitution to work in the other direction, that is, hosts on the Internet wishing to
originate an IP packet destined to a host on the Netopia R310s LAN interface, a manual redirection of TCP or
UDP ports as well as destination IP addresses within the Netopia R310 is required. This manual port
remapping and IP address substitution is accomplished by setting up Exported Services.
Exported Services are essentially user defined pointers for a particular type of incoming TCP or UDP service
from the WAN interface to a host on the local LAN interface. This is necessary since the Netopia R310 and
thus the attached local LAN has only one IP presence on the WAN interface and Internet. Exported Services
allows the user to redirect one type of service, for example Port 21 (FTP), to a single host on the local LAN
interface. This will then allow the Netopia R310 to redirect any packets coming in from the Internet with the
defined destination TCP or UDP port of Port 21 (FTP) to be redirected to a host on the local LAN interface.
For example, suppose the WWW Server on the Internet with the IP address of 163.176.4.32 wants to access
Workstation B on the Netopia R310s local LAN interface which is operating as an FTP Server. The IP address for
Workstation B is 192.168.5.3, which is not a valid IP address and thus the WWW Server on the Internet can not
use this IP address to access Workstation B.
The WWW Server on the Internet would then have to use the single valid IP address that was acquired on the
Netopia R310's WAN interface to access any host on the Netopia R310's local LAN interface, since this is the
only valid address for the Internet. But if the WWW Server on the Internet opens a connection to 200.1.1.40 via
Port 21 (FTP) and no Exported Services are defined on the Netopia R310, the Netopia R310 will discard the
incoming packet since the Netopia R310 itself does not perform the requested service.
Thus you can see why Exported Services are necessary. In the example above, an Exported Service needs to
be defined within the Netopia R310 redirecting any incoming IP traffic with a destination port of 21 to the host
on the local LAN interface with the IP address of 192.168.5.3.
If the WWW Server on the Internet then tries to open a connection to the IP address of 200.1.1.40 with the
appropriate Exported Service defined, the Netopia R310 will look at the destination port and will find that it is
destined for Port 21 (FTP). The Netopia R310 then looks at the internal user-defined Exported Services table
and finds that any incoming IP traffic from the WAN port with a destination of Port 21 (FTP) should be redirected
to the IP address of 192.168.5.3 on the local LAN interface, which in this case is Workstation B.
Source LAN IP Source LAN Port Remapped LAN Port
192.168.5.2 TCP 400 TCP 5001
192.168.5.3 TCP 400 TCP 5002