华三wx510h 这台无线ac可以配置nat吗如果可以如何配置
(0)
最佳答案
· 某公司内网使用的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。
<AC> system-view
[AC] nat address-group 0
[AC-address-group-0] address 202.38.1.2 202.38.1.3
[AC-address-group-0] quit
# 配置ACL 2000,仅允许对内部网络中192.168.1.0/24网段的用户报文进行地址转换。
[AC] acl basic 2000
[AC-acl-ipv4-basic-2000] rule permit source 192.168.1.0 0.0.0.255
[AC-acl-ipv4-basic-2000] quit
# 在接口Vlan-interface20上配置出方向动态地址转换,允许使用地址组0中的地址对匹配ACL 2000的报文进行源地址转换,并在转换过程中使用端口信息。
[AC] interface vlan-interface 20
[AC-Vlan-interface20] nat outbound 2000 address-group 0
以上配置完成后,Client A能够访问WWW server,Client B无法访问WWW server。通过查看如下显示信息,可以验证以上配置成功。
[AC] 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: Vlan-interface20
ACL: 2000
Address group: 0
Port-preserved: N NO-PAT: N Reversible: N
Config 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 : Disabled
H323 : Disabled
ICMP-ERROR : Enabled
ILS : Disabled
MGCP : Disabled
NBT : Disabled
PPTP : Enabled
RTSP : Enabled
RSH : Disabled
SCCP : Disabled
SIP : Disabled
SQLNET : Disabled
TFTP : Disabled
XDMCP : Disabled
# 通过以下显示命令,可以看到Client A访问WWW server时生成NAT会话信息。
[AC] display nat session verbose
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: Vlan-interface10
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: Vlan-interface20
State: ICMP_REPLY
Application: INVALID
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)
华三wx510h 这台无线ac可以配置nat
以下是NAT的配置举例:
组网说明:本案例是采用H3C HCL模拟器来模拟搭建basic NAT的组网环境,内网和外网均以在网络拓扑图中有了明确的标识,R1是某局点的内网设备,R1为出口设备,某局点申请了202.1.100.3-202.1.100.5范围的公网地址,内网终端需要通过NAT地址转换来访问外网。PC-3为外网的服务器。本案例要求PC-4、PC-5能通过转换为202.1.100.3-202.1.100.5范围内的公网地址来访问PC-3。
1、按照网络拓扑图正确配置IP地址
2、在R1配置NAT,实现地址转换
3、R1配置默认路由指向到外网
4、PC-4、PC-5能通过地址转换后PING通外网服务器PC-3
R1:
<H3C>sys
[H3C]sysname R1
[R1]int LoopBack 0
[R1-LoopBack0]ip address 2.2.2.2 32
[R1-LoopBack0]quit
[R1]router id 2.2.2.2
[R1]vlan 10
[R1-vlan10]quit
[R1]vlan 20
[R1-vlan20]quit
[R1]int vlan 10
[R1-Vlan-interface10]ip address 192.168.10.1 24
[R1-Vlan-interface10]quit
[R1]int vlan 20
[R1-Vlan-interface20]ip address 192.168.20.1 24
[R1-Vlan-interface20]quit
[R1]int gi 5/0
[R1-GigabitEthernet5/0]port link-mode bridge
[R1-GigabitEthernet5/0]port link-type access
[R1-GigabitEthernet5/0]port access vlan 10
[R1-GigabitEthernet5/0]quit
[R1]int gi 5/1
[R1-GigabitEthernet5/1]port link-mode bridge
[R1-GigabitEthernet5/1]port link-type access
[R1-GigabitEthernet5/1]port access vlan 20
[R1-GigabitEthernet5/1]quit
[R1]int gi 0/1
[R1-GigabitEthernet0/1]description <connect to ISP>
[R1-GigabitEthernet0/1]ip address 202.1.100.2 28
[R1-GigabitEthernet0/1]quit
NAT配置:
[R1]acl basic 2000
[R1-acl-ipv4-basic-2000]rule 0 permit source any
[R1-acl-ipv4-basic-2000]quit
[R1]nat address-group 1
[R1-address-group-1]address 202.1.100.3 202.1.100.5
[R1-address-group-1]quit
[R1]int gi 0/1
[R1-GigabitEthernet0/1]nat outbound 2000 address-group 1 no-pat
[R1-GigabitEthernet0/1]quit
[R1]ip route-static 0.0.0.0 0.0.0.0 202.1.100.1
ISP:
<H3C>sys
[H3C]sysname ISP
[ISP]int gi 0/1
[ISP-GigabitEthernet0/1]description <connect to R1>
[ISP-GigabitEthernet0/1]ip address 202.1.100.1 28
[ISP-GigabitEthernet0/1]quit
[ISP]int gi 0/0
[ISP-GigabitEthernet0/0]description <connect to PC-3>
[ISP-GigabitEthernet0/0]ip address 202.103.224.254 24
[ISP-GigabitEthernet0/0]quit
测试:
所有PC都填写上IP地址、子网掩码、默认网关
PC-4和PC-5能PING通PC-3
查看NAT的转换情况及会话清单:
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论