With the rapid development of Internet network, the shortage of IP address has become a very prominent problem. In order to solve this problem, there are many solutions. The following are some of the more effective ways to address translation (NAT) in the current network environment.
Nat settings can be divided into static address translation, dynamic address translation, and multiplex dynamic address conversion.
Static address translation Converts an internal local address to an internal legal address, and it needs to specify and which legal address to convert. If the internal network has services such as an e-mail server or an FTP server that can be provided to external users, the IP addresses of these servers must be converted to static addresses so that they can be used by external users.
(1) Establishing static address conversion between internal local address and internal legal address. Enter in global setting state:
Ip nat inside source static internal local address internal legal address
(2), specify the internal port of the connection network to enter in the Port settings state:
IP nat Inside
(3) Specifies that the external port connecting the external network is entered in the Port setting state:
IP Nat Outside
Note: You can define multiple internal ports and multiple external ports according to your actual needs.
This example realizes the static NAT address translation function. Use 2501 of the Ethernet port as the internal and sync port 0 as the external port. Where 10.1.1.2,10.1.1.3,10.1.1.4 's internal local address is static address translation. Its internal legal address corresponds to 192.1.1.2,192.1.1.3,192.1.1.4 respectively.
Configuration of Router 2501:
Current configuration:
Version 11.3
No service password-encryption
Hostname 2501
IP nat inside source static 10.1.1.2 192.1.1.2
IP nat inside source static 10.1.1.3 192.1.1.3
IP nat inside source static 10.1.1.4 192.1.1.4
Interface Ethernet0
IP address 10.1.1.1 255.255.255.0
IP nat Inside
Interface Serial0
IP address 192.1.1.1 255.255.255.0
IP Nat Outside
No IP mroute-cache
Bandwidth 2000
No Fair-queue
Clockrate 2000000
Interface Serial1
No IP address
Shutdown
No IP classless
IP Route 0.0.0.0 0.0.0.0 Serial0
Line con 0
Line aux 0
Line vty 0 4
Password Cisco
End
After the configuration is complete, you can view it with the following statement:
Show ip Nat Statistcs
Show ip NAT Translations
2, dynamic address conversion applicable to the environment:
Dynamic address translation is also a one-to-one conversion of the local address to the internal legal address, but the dynamic address translation converts the internal local address dynamically from the internal legal address pool by selecting a last-used address.
(1), in the global setting mode, define the internal legal address pool
IP NAT Pool Address pool name Start IP address IP address subnet mask
Where the address pool name can be set arbitrarily.
(2), in global settings mode, define a standard access-list rule to allow which internal addresses can be dynamic address conversion.
Access-list Label permit Source address wildcard character
An integer with a label of 1-99.
(3), in Global settings mode, address translation is made to the internal local address specified by Access-list and the specified internal legal address pool.
IP NAT inside source list access list label pool internal legal address pools name
(4), specify the internal port connected to the internal network in the Port settings state:
IP nat Inside
(5), specifying external ports connected to the external network
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.