华为路由器配置NAT

示例1:


1.配置路由器名称及登录密码

system-view

sysname R1

user-interface console 0

authentication-mode password *******

quit

2.配置接口IP

interface GigabitEthenet 0/0/0

ip address 192.168.100.254 255.255.255.252

quit

3.配置ACL2000

acl 2000

rule 5 permit source 192.168.100.0 0.0.0.127

quit

4.配置NAT地址池

nat address-group 1 202.119.25.209 202.119.25.217

5.应用NAT地址转换规则到端口

interface GigabitEthernet 0/0/1

ip address 202.119.25.219 255.255.255.240

nat outbound 2000 address-group1

6.设置RIP

rip

version 2

network 192.168.100.0


示例2:


nat address-group 0 200.100.1.3 200.100.1.6   //配置地址池

acl number 2000 //配置ACL2000

rule 5 permit source 10.10.1.0 0.0.0.255  //允许网段

interface GigabitEthernet 0/0/3

nat outbound 2000 address-group 0 no pat //应用NAT到出口

quit

ip route-static 0.0.0.0 0.0.0.0 200.100.1.1 //设置静态路由

猜你喜欢

转载自blog.csdn.net/istrangeboy/article/details/117453622