Implementation of NAT technology-static address translation
Assume that the lP address segment used by the internal LAN is 192.168.12.1 ~ 192.168.12.254, the IP address of the router LAN port (that is, the default gateway) is 192.168.0.1/24. The valid public IP address allocated by the network ranges from 11.11.11.128 ~ 11.11.11.135, the IP address of the router in the Wan is 11.11.11.129, And the subnet mask is 255.255.255.255.248. The IP address range that can be used for conversion is 11.11.11.130 ~ 11.11.11.134. You must stop the Intranet from 192.168.12.2 ~ 192.168.12.4 are converted to valid IP addresses 11.11.11.130 ~ 11.11.11.132.
Step 1: Set the external port.
Before configuring network address translation, you must first understand the internal and external interfaces, and on which external interfaces enable NAT. Generally, the interface connecting to the user's internal network is a NAT Internal interface, and the interface connecting to the external network (such as the Internet) is a NAT external interface.
- interface serial 0
-
- ip address 11.11.11.129 255.255.255.248
-
- ip nat outside
Step 2: Set the internal port.
- interface ethernet 0
-
- ip address 192.168.0.1 255.255.255.0
-
- ip nat inside
Step 3: create static address translation between the local and valid internal addresses.
Ip nat inside source static internal local address internal legal address
Example:
- Ip nat inside source static 192.168.12.2 11.11.11.130 // convert the internal network address 192.168.12.2 to a valid ip address 11.11.130
-
- Ip nat inside source static 192.168.12.3 11.11.11.131 // convert the internal network address 192.168.12.3 to a valid ip address 11.11.11.131
-
- Ip nat inside source static 192.168.12.4 11.11.11.132 // convert the internal network address 192.168.12.4 to a valid ip address 11.11.11.132
In this way, the static address translation configuration is complete.
For more information about NAT technology, see:
Implementation of NAT technology-Dynamic Address Translation
Implementation of NAT technology-port multiplexing Dynamic Address Translation (PAT)
- Principles of NAT technology
- Analysis on the concept of vronat NAT
- Analysis of multicast knowledge in IGMP V2 package
- Horizontal split-by-the-command-by-product
- Instance resolution: the floating summary routing configuration of the VPN gateway.
- Analysis of multicast knowledge-Layer 2 device forwarding Multicast