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

Reminder

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

upgrade

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 2.2.2.2/24 and the LAN gateway address is 192.168.0.1/24. The IP address of the carrier device connected to the router is 2.2.2.1/24. The private IP address of the host is 192.168.0.2/24 and the fixed IP address the host needs to use is 2.2.2.3/24. 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.

Procedure

  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 2.2.2.2 24  
    [Router-GigabitEthernet2/0/0] quit       
    [Router] interface gigabitethernet 1/0/0
    [Router-GigabitEthernet1/0/0] undo portswitch
    [Router-GigabitEthernet1/0/0] ip address 192.168.0.1 24  
    [Router-GigabitEthernet1/0/0] quit
    

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

    [Router] ip route-static 0.0.0.0 0.0.0.0 2.2.2.1
    

  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 2.2.2.3 inside 192.168.0.2
    [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     : 2.2.2.3/----                                        
        Inside IP/Port     : 192.168.0.2/----                                       
        Protocol : ----                                                             
        VPN instance-name  : ----                                                   
        Acl number         : ----                                                   
        Vrrp id            : ----                                                   
        Netmask  : 255.255.255.255                                                  
        Description : ----                                                          
                                                                                    
      Total :    1                                                                  

Configuration Files

Configuration file of the router

#
 sysname Router
#
interface GigabitEthernet1/0/0                                                         
 undo portswitch
 ip address 192.168.0.1 255.255.255.0                                           
#                                                                               
interface GigabitEthernet2/0/0                                                  
 undo portswitch
 ip address 2.2.2.2 255.255.255.0                                            
 nat static global 2.2.2.3 inside 192.168.0.2 netmask 255.255.255.255
#                                                                               
 ip route-static 0.0.0.0 0.0.0.0 2.2.2.1                                     
#
return  
Translation
Download
Updated: 2019-05-20

Document ID: EDOC1100034231

Views: 82382

Downloads: 54

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