14-NAT44命令
本章节下载: 14-NAT44命令 (152.07 KB)
ip nat source 命令用来配置源NAT规则。
no ip nat source 命令用来删除源NAT规则。
【命令】
ip nat source interface-name (SRC_ADDR | any) (DST_ADDR | any) SERVICE (interface|POOL) nat44_range<8-30000> [log] [ID]
【视图】
系统视图
【参数】
interface-name:出接口名称。
SRC_ADDR:源地址对象或地址组对象名称。
DST_ADDR:目的地址对象或地址组对象名称。
any:任意地址或地址组对象。
service:源NAT匹配的服务,可以引用服务或者服务组对象名称。
pool:地址转换类型,转换成NAT地址池的地址。
interface:地址转换类型 ,转换后的地址为出接口地址。
nat44_range<8-30000>:端口范围长度参数,从1024开始按该长度分配
log:是否产生日志,1为产生,0为不产生。
id:规则id,转换规则的唯一标识。
【使用指导】
NAT44支持原有NAT的基本特性,支持用户溯源功能及动态端口预留方式,并实现了地址映射关系上报日志服务。
【举例】
# 在ge0口上创建一条源NAT规则,转后的地址为地址池abc中的地址。
host# configure termina
host(config)# ip nat pool abc
host(ip-nat-pool)# ip address 192.168.1.1 192.168.1.5
host(ip-nat-pool)# exit
host(config)# ip nat source ge0 any any any abc nat44_range 500
ip nat source <1-65535> nat44_range <8-30000>
【参数】
<1-65535>:NAT规则的ID。
<8-30000>:端口范围长度参数,从1024开始按该长度分配
【举例】
# 将ID为100的NAT规则使能NAT44,并设置端口范围长度为500。
原有NAT规则:
ip nat source ge0 any any any interface 100
在全局模式下修改:
host(config)# ip nat source 100 nat44_range 500
【命令】
ip nat source <1-65535> nat44 disable
【视图】
系统视图
【参数】
<1-65535>:NAT规则的ID号
【举例】
# 将ID 100的NAT44规则禁用NAT44:
host# configure termina
host(config)# ip nat source 100 nat44 disable
ip nat { static | source | destination } move命令用来移动配置的NAT规则。
【命令】
ip nat { static | source | destination } move id { before | after } ref-id
【视图】
系统视图
【参数】
static:静态NAT规则。
source:源NAT规则。
destination:目的NAT规则。
before:参考规则之前。
after:参考规则之后。
id:规则id,转换规则的唯一标识。
ref-id:参考规则id。
【举例】
# 将源id为1的源NAT移到id为2的源NAT规则之后。
host# configure termina
host(config)# ip nat source move 1 after 2
【命令】
display ip nat source rule
【命令】
display ip nat44 ID
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!