Tuesday, April 26, 2011

Bidirectional (2-Way) NAT

Traditional Outbound NAT is designed to handle outbound connections, in which clients of the inside local network initiate requests to outside global Internet hosts. Bidirectional NAT, 2-Way NAT, or Inbound NAT is an enhancement upon NAT to handle connections initiated from the outside network.

The network setup on the figure above can be achieved using a single router. PC1 accesses PC2 using outside local; while PC2 accesses PC1 using inside global.

Bidirectional NAT configuration on RT1:
interface FastEthernet0/0
 ip address
 ip nat inside
interface FastEthernet1/0
 ip address
 ip nat outside
ip nat inside source static
ip nat outside source static add-route

The add-route keyword adds a static /32 host route for the outside local address. This route is used for routing and translating packets that travel from the inside to the outside of the network.
RT1#sh ip route

Gateway of last resort is not set is variably subnetted, 2 subnets, 2 masks
C is directly connected, FastEthernet0/0
S [1/0] via
C is directly connected, FastEthernet1/0

No comments:

Post a Comment