Configuration Roadmap
The configuration roadmap is as follows:
1.
Configure IP addresses for interfaces.
2.
Configure DNS mappings to allow users to access servers by using domain names.
3.
Map the overlapping address pool to the temporary address pool.
4.
Configure outbound NAT to allow internal users to access external networks.
Procedure
Step 1
Configure IP addresses for the interfaces of the AR150/200.
<Huawei>
system-view
[Huawei]
vlan 100
[Huawei-vlan100]
quit
[Huawei]
interface vlanif 100
[Huawei-Vlanif100]
ip address 192.168.20.1 24
[Huawei-Vlanif100]
quit
[Huawei]
interface Ethernet 0/0/0
[Huawei-Ethernet0/0/0]
port link-type access
[Huawei-Ethernet0/0/0]
port default vlan 100
[Huawei-Ethernet0/0/0]
quit
[Huawei]
vlan 200
[Huawei-vlan200]
quit
[Huawei]
interface vlanif 200
[Huawei-Vlanif200]
ip address 10.0.0.1 24
[Huawei-Vlanif200]
quit
[Huawei]
interface Ethernet 0/0/1
[Huawei-Ethernet0/0/1]
port link-type access
[Huawei-Ethernet0/0/1]
port default vlan 200
[Huawei-Ethernet0/0/1]
quit
[Huawei]
interface ethernet 2/0/0
[Huawei-Ethernet2/0/0]
ip address 202.169.10.2 24
[Huawei-Ethernet2/0/0]
quit
Step 2
Configure DNS mappings on the AR150/200.
[Huawei]
nat alg dns enable
[Huawei]
nat dns-map www.Server.com 192.168.20.2 80 tcp
Step 3
Configure the mapping between the overlapping address pool and the temporary address pool
on the AR150/200.
[Huawei]
nat overlap-address 0 192.168.20.2 202.169.100.2 pool-length 254
Step 4
Configure a static route on the AR150/200 from the temporary address pool to outbound interface
Ethernet2/0/0.
[Huawei]
ip route-static 202.169.100.2 32 ethernet 2/0/0 202.169.10.2
Step 5
Configure outbound NAT on outbound interface Ethernet2/0/0 of the AR150/200.
1.
Create an ACL and configure an ACL rule to permit the packets of host A.
[Huawei]
acl 3180
[Huawei-acl-adv-3180]
rule permit ip source 192.168.20.0 0.0.0.255
[Huawei-acl-adv-3180]
quit
2.
Configure the NAT address pool for outbound NAT.
[Huawei]
nat address-group 1 160.160.0.2 160.160.0.254
3.
Configure outbound NAT on outbound interface Ethernet2/0/0.
[Huawei]
interface ethernet 2/0/0
[Huawei-Ethernet2/0/0]
nat outbound 3180 address-group 1
[Huawei-Ethernet2/0/0]
quit
Huawei AR150&200 Series Enterprise Routers
Configuration Guide - IP Service
5 NAT Configuration
Issue 02 (2012-03-30)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
123