No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


CLI-based Configuration Guide - IP Service

AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R010

This document describes the concepts and configuration procedures of IP Service features on the device, and provides the configuration examples.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Example for Configuring Static One-to-One NAT

Example for Configuring Static One-to-One NAT

Networking Requirements

As shown in Figure 5-18, the IP address of outbound interface GE2/0/0 on the router is and the LAN gateway address is The IP address of the carrier device connected to the router is The private IP address of the host is and the fixed IP address the host needs to use is In this case, the private IP address of this company must be translated to a public IP address to allow the host to access the WAN.

Figure 5-18  Networking diagram for configuring static one-to-one NAT

Configuration Roadmap

The configuration roadmap is as follows:

  1. Configure the IP address of ports, default route, and static NAT on the WAN interface to implements one-to-one translation between a private IP address and a public IP address.


  1. Configure an IP address for ports on the router.

    <Huawei> system-view
    [Huawei] sysname Router
    [Router] interface gigabitethernet 2/0/0 
    [Router-GigabitEthernet2/0/0] undo portswitch
    [Router-GigabitEthernet2/0/0] ip address 24  
    [Router-GigabitEthernet2/0/0] quit       
    [Router] interface gigabitethernet 1/0/0
    [Router-GigabitEthernet1/0/0] undo portswitch
    [Router-GigabitEthernet1/0/0] ip address 24  
    [Router-GigabitEthernet1/0/0] quit

  2. Configure a default route with next hop address on the router.

    [Router] ip route-static

  3. Configure one-to-one NAT mapping on uplink interface GE2/0/0 on the router.

    [Router] interface gigabitethernet 2/0/0
    [Router-GigabitEthernet2/0/0] nat static global inside
    [Router-GigabitEthernet2/0/0] quit

  4. Verify the configuration.

    # Run the display nat static command on the router to check the mapping between address pools.

    <Router> display nat static
      Static Nat Information:                                                       
      Interface  : GigabitEthernet2/0/0                                                    
        Global IP/Port     :                                        
        Inside IP/Port     :                                       
        Protocol : ----                                                             
        VPN instance-name  : ----                                                   
        Acl number         : ----                                                   
        Vrrp id            : ----                                                   
        Netmask  :                                                  
        Description : ----                                                          
      Total :    1                                                                  

Configuration Files

Configuration file of the router

 sysname Router
interface GigabitEthernet1/0/0                                                         
 undo portswitch
 ip address                                           
interface GigabitEthernet2/0/0                                                  
 undo portswitch
 ip address                                            
 nat static global inside netmask
 ip route-static                                     
Updated: 2019-05-20

Document ID: EDOC1100034231

Views: 82382

Downloads: 54

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Previous Next