网络描述:客户内部有一台OA服务器,及提供外部使用,又供内部使用。在AR 路由器上配置NAT Server 配置。

拓扑如下:

华为路由器映射内部服务器到公网_华为


关键配置:

AR1 配置

acl number 2000  

rule 5 permit 

interface GigabitEthernet0/0/0    //内网口

ip address 192.168.200.2 255.255.255.252  

#

interface GigabitEthernet0/0/1   //互联网口/WAN口

ip address 211.1.1.1 255.255.255.0  

nat server protocol tcp global current-interface www inside 192.168.101.1 www

nat outbound 2000

#

ip route-static 0.0.0.0 0.0.0.0 211.1.1.254

ip route-static 192.168.0.0 255.255.0.0 192.168.200.1


交换机配置:

​vlan batch 100 to 101 200

​interface Vlanif100

ip address 192.168.100.254 255.255.255.0

#

interface Vlanif101

ip address 192.168.101.254 255.255.255.0

#

interface Vlanif200

ip address 192.168.200.1 255.255.255.252

#

interface MEth0/0/1

#

interface GigabitEthernet0/0/1

des hulianrouter

port link-type access

port default vlan 200

#

interface GigabitEthernet0/0/2

des bangong

port link-type access

port default vlan 100

#

interface GigabitEthernet0/0/3   

desc server

port link-type access

port default vlan 101

ip route-static 0.0.0.0 0.0.0.0 192.168.200.2