在华为设备web上设置了源NAT ,
H3C msr2630-xs web 上 如何对端设置呢
他这个网络配置下的NAT配置下,没有对应的设置,是不是不具备这个功能?
(0)
您好,请知:
MSR2630-XS支持NAT。
以下是配置举例,请参考:
内部网络用户10.110.10.8/24使用外网地址202.38.1.100访问Internet。
图2-1 静态地址转换典型配置组网图
# 按照组网图配置各接口的IP地址,具体配置过程略。
# 配置内网IP地址10.110.10.8到外网地址202.38.1.100之间的一对一静态地址转换映射。
<Router> system-view
[Router] nat static outbound 10.110.10.8 202.38.1.100
# 使配置的静态地址转换在接口GigabitEthernet1/0/2上生效。
[Router] interface gigabitethernet 1/0/2
[Router-GigabitEthernet1/0/2] nat static enable
# 以上配置完成后,内网主机可以访问外网服务器。通过查看如下显示信息,可以验证以上配置成功。
[Router] display nat static
Totally 1 outbound static NAT mappings.
IP-to-IP:
Local IP : 10.110.10.8
Global IP : 202.38.1.100
Config status: Active
Local flow-table status: Active
Global flow-table status: Active
Interfaces enabled with static NAT:
Totally 1 interfaces enabled with static NAT.
Interface: GigabitEthernet1/0/2
Service card : Slot 2
Config status: Active
# 通过以下显示命令,可以看到Host访问某外网服务器时生成NAT会话信息。
[Router] display nat session verbose
Slot 0:
Total sessions found: 0
Slot 2:
Initiator:
Source IP/port: 10.110.10.8/42496
Destination IP/port: 202.38.1.111/2048
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/1
Responder:
Source IP/port: 202.38.1.111/42496
Destination IP/port: 202.38.1.100/0
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/2
State: ICMP_REPLY
Application: INVALID
Rule ID: -/-/-
Rule name:
Start time: 2012-08-16 09:30:49 TTL: 27s
Initiator->Responder: 5 packets 420 bytes
Responder->Initiator: 5 packets 420 bytes
Total sessions found: 1
· 某公司内网使用的IP地址为192.168.0.0/16。
· 该公司拥有202.38.1.2和202.38.1.3两个外网IP地址。
· 需要实现,内部网络中192.168.1.0/24网段的用户可以访问Internet,其它网段的用户不能访问Internet。使用的外网地址为202.38.1.2和202.38.1.3。
图2-2 内网用户通过NAT访问外网配置组网图(地址不重叠)
# 按照组网图配置各接口的IP地址,具体配置过程略。
# 配置地址组0,包含两个外网地址202.38.1.2和202.38.1.3。
<Router> system-view
[Router] nat address-group 0
[Router-address-group-0] address 202.38.1.2 202.38.1.3
[Router-address-group-0] quit
# 配置ACL 2000,仅允许对内部网络中192.168.1.0/24网段的用户报文进行地址转换。
[Router] acl basic 2000
[Router-acl-ipv4-basic-2000] rule permit source 192.168.1.0 0.0.0.255
[Router-acl-ipv4-basic-2000] quit
# 在接口GigabitEthernet1/0/2上配置出方向动态地址转换,允许使用地址组0中的地址对匹配ACL 2000的报文进行源地址转换,并在转换过程中使用端口信息。
[Router] interface gigabitethernet 1/0/2
[Router-GigabitEthernet1/0/2] nat outbound 2000 address-group 0
以上配置完成后,Host A能够访问WWW server,Host B和Host C无法访问WWW server。通过查看如下显示信息,可以验证以上配置成功。
[Router] display nat all
NAT address group information:
Totally 1 NAT address groups.
Address group ID: 0:
Port range: 1-65535
Address information:
Start address End address
202.38.1.2 202.38.1.3
NAT outbound information:
Totally 1 NAT outbound rules.
Interface: GigabitEthernet1/0/2
ACL: 2000
Address group ID: 0
Port-preserved: N NO-PAT: N Reversible: N
Service card: Slot 2
Config status: Active
Global flow-table status: Active
NAT logging:
Log enable : Disabled
Flow-begin : Disabled
Flow-end : Disabled
Flow-active : Disabled
Port-block-assign : Disabled
Port-block-withdraw : Disabled
Alarm : Disabled
NO-PAT IP usage : Disabled
NAT mapping behavior:
Mapping mode : Address and Port-Dependent
ACL : ---
Config status: Active
NAT ALG:
DNS : Enabled
FTP : Enabled
H323 : Enabled
ICMP-ERROR : Enabled
ILS : Enabled
MGCP : Enabled
NBT : Enabled
PPTP : Enabled
RTSP : Enabled
RSH : Enabled
SCCP : Enabled
SIP : Enabled
SQLNET : Enabled
TFTP : Enabled
XDMCP : Enabled
Static NAT load balancing: Disabled
# 通过以下显示命令,可以看到Host A访问WWW server时生成NAT会话信息。
[Router] display nat session verbose
Slot 0:
Total sessions found: 0
Slot 2:
Initiator:
Source IP/port: 192.168.1.10/52992
Destination IP/port: 200.1.1.10/2048
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/1
Responder:
Source IP/port: 200.1.1.10/4
Destination IP/port: 202.38.1.3/0
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/2
State: ICMP_REPLY
Application: INVALID
Rule ID: -/-/-
Rule name:
Start time: 2012-08-15 14:53:29 TTL: 12s
Initiator->Responder: 1 packets 84 bytes
Responder->Initiator: 1 packets 84 bytes
Total sessions found: 1
(0)
暂无评论
这款以命令行为主,可以参考官方的文档
https://www.h3c.com/cn/Service/Document_Software/Document_Center/Routers/Catalog/MSR-XS/MSR2600-XS/#%E5%AE%89%E8%A3%85
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论