出口设备是一台H3C F1020防火墙。内网的的网关在墙上。现在的网络是IPV4. 准备申请一条IPV6的专线。需求就是让内网的电脑可以访问的IPV6的网络。
现在最简单的实现方式是什么?
nat 64应该不合适这种需求吧?
(0)
最佳答案
nat afg实现
本举例是在F1090的R8660P33版本上进行配置和验证的。
如下图所示,某公司将网络升级到了IPv6,此时Internet仍然是IPv4网络。该公司希望内部的FTP服务器能够继续为IPv4 Internet的用户提供服务。该公司拥有的IPv4地址为10.1.1.1。
为满足上述要求,本例实现方式如下:
使用IPv6侧服务器配置将IPv6内部服务器的地址及端口映射为IPv4地址及端口,Device收到来自IPv4 Internet的报文后,根据该配置策略将报文IPv4目的地址转换为IPv6地址;
使用NAT64前缀将报文源IPv4地址转换为IPv6地址。
图-1 IPv4 Internet访问IPv6网络内部服务器配置组网图
配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] ip address 10.1.1.2 24
[Device-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
将接口加入安全域
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/0/2
[Device-security-zone-Trust] quit
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/0/1
[Device-security-zone-Untrust] quit
配置安全策略
# 配置名称为aftlocalin的安全策略,使Device能对Host访问Server的报文进行AFT转换,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name aftlocalin
[Device-security-policy-ip-1-aftlocalin] source-zone untrust
[Device-security-policy-ip-1-aftlocalin] destination-zone local
[Device-security-policy-ip-1-aftlocalin] destination-ip-host 10.1.1.1
[Device-security-policy-ip-1-aftlocalin] action pass
[Device-security-policy-ip-1-aftlocalin] quit
[Device-security-policy-ip] quit
# 配置名称为aftlocalout的安全策略,允许将AFT转换后的报文转发至Server,具体配置步骤如下。
[Device] security-policy ipv6
[Device-security-policy-ipv6] rule name aftlocalout
[Device-security-policy-ipv6-1-aftlocalout] source-zone local
[Device-security-policy-ipv6-1-aftlocalout] destination-zone trust
[Device-security-policy-ipv6-1-aftlocalout] source-ip-subnet 2012:: 96
[Device-security-policy-ipv6-1-aftlocalout] destination-ip-host 2013::102
[Device-security-policy-ipv6-1-aftlocalout] action pass
[Device-security-policy-ipv6-1-aftlocalout] quit
[Device-security-policy-ipv6] quit
配置AFT功能
# 配置IPv6侧服务器对应的IPv4地址及端口号。IPv4网络内用户通过访问该IPv4地址及端口即可访问IPv6服务器。
[Device] aft v6server protocol tcp 10.1.1.1 21 2013::102 21
# 报文的源地址将根据配置的NAT64前缀转换为IPv6地址。
[Device] aft prefix-nat64 2012:: 96
# 在设备IPv4侧和IPv6侧接口开启AFT。
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] aft enable
[Device-GigabitEthernet1/0/1] quit
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] aft enable
[Device-GigabitEthernet1/0/2] quit
# 以上配置完成后,IPv4 Host可以通过FTP协议访问IPv6 FTP Server。
# 通过查看AFT会话,可以看到创建了一个IPv4会话和IPv6会话,分别对应转换前和转换后的报文。
[Device] display aft session ipv4 verbose
Initiator:
Source IP/port: 20.1.1.1/11025
Destination IP/port: 10.1.1.1/21
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Untrust
Responder:
Source IP/port: 10.1.1.1/21
Destination IP/port: 20.1.1.1/11025
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Local
State: TCP_ESTABLISHED
Application: FTP
Rule ID: -/-/-
Rule name:
Start time: 2014-03-13 09:07:30 TTL: 3577s
Initiator->Responder: 3 packets 124 bytes
Responder->Initiator: 2 packets 108 bytes
Total sessions found: 1
[Device] display aft session ipv6 verbose
Initiator:
Source IP/port: 2012::1401:0101/1029
Destination IP/port: 2013::102/21
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/1
Source security zone: Local
Responder:
Source IP/port: 2013::102/21
Destination IP/port: 2012::1401:0101/1029
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: TCP(6)
Inbound interface: GigabitEthernet1/0/2
Source security zone: Trust
State: TCP_ESTABLISHED
Application: FTP
Rule ID: 0
Rule name: aftlocalout
Start time: 2014-03-13 09:07:30 TTL: 3582s
Initiator->Responder: 3 packets 184 bytes
Responder->Initiator: 2 packets 148 bytes
Total sessions found: 1
(0)
有相关的文档吗?
https://www.h3c.com/cn/pub/Document_Center/2023/08/WebHelp_H3C_SecPath_FHQCP_DXPZALJ(V7)/default_auto.htm?CHID=904195
可以的,
https://www.h3c.com/cn/d_202208/1668940_30005_0.htm#_Toc111450793
Internet已经升级到了IPv6,但是某公司内部网络仍然是IPv4网络。而该公司内部网络的10.1.1.0/24网段的用户仍需要访问IPv6 Internet中的服务器,其他用户不能访问。
为满足上述要求,本例中使用如下方式实现:
· 使用IPv4到IPv6源地址动态地址转换策略,将IPv4报文的源地址转换为IPv6地址。
· 通过IPv6到IPv4的源地址静态转换策略为IPv6 Internet上服务器的IPv6地址指定一个对应的IPv4地址,Device收到发往该IPv4地址的报文时将其转换为对应的IPv6地址。
图1-10 IPv4网络访问IPv6 Internet
# 按照组网图配置各接口的IP地址,具体配置过程略。
# 配置ACL 2000,仅允许IPv4网络中10.1.1.0/24网段的用户可以访问IPv6 Internet。
<Device> system-view
[Device] acl number 2000
[Device-acl-ipv4-basic-2000] rule permit source 10.1.1.0 0.0.0.255
[Device-acl-ipv4-basic-2000] rule deny
[Device-acl-ipv4-basic-2000] quit
# 配置NAT64前缀,此前缀将在IPv4到IPv6源地址动态转换策略中被调用,将报文的源地址转换为IPv6地址。
[Device] aft prefix-nat64 2012:: 96
# 配置IPv4到IPv6源地址动态转换策略,将匹配ACL 2000报文的源地址根据NAT64前缀转换为IPv6地址。
[Device] aft v4tov6 source acl number 2000 prefix-nat64 2012:: 96
# 配置IPv6到IPv4的源地址静态转换策略,用于将报文的目的地址转换为IPv6地址。
[Device] aft v6tov4 souce 2013:0:ff14:0101:100:: 20.1.1.1
# 在IPv4侧接口GigabitEthernet1/0/1开启AFT。
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] aft enable
[Device-GigabitEthernet1/0/1] quit
# 在IPv6侧接口GigabitEthernet1/0/2开启AFT。
[Device] interface gigabitethernet 1/0/2
[Device-GigabitEthernet1/0/2] aft enable
[Device-GigabitEthernet1/0/2] quit
# 以上配置完成后,检查IPv4 host与IPv6 server的连通性。以IPv4 host A ping IPv6 server为例:
D:\>ping 20.1.1.1
Pinging 20.1.1.1 with 32 bytes of data:
Reply from 20.1.1.1: bytes=32 time=14ms TTL=63
Reply from 20.1.1.1: bytes=32 time=1ms TTL=63
Reply from 20.1.1.1: bytes=32 time=1ms TTL=63
Reply from 20.1.1.1: bytes=32 time=1ms TTL=63
# 通过查看AFT会话,可以看到创建了一个IPv4会话和IPv6会话,分别对应转换前和转换后的报文。
[Device] display aft session ipv4 verbose
Initiator:
Source IP/port: 10.1.1.1/1025
Destination IP/port: 20.1.1.1/2048
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/1
Responder:
Source IP/port: 20.1.1.1/1025
Destination IP/port: 10.1.1.1/0
DS-Lite tunnel peer: -
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: ICMP(1)
Inbound interface: GigabitEthernet1/0/2
State: ICMP_REPLY
Application: OTHER
Start time: 2014-03-13 08:52:59 TTL: 27s
Initiator->Responder: 4 packets 240 bytes
Responder->Initiator: 4 packets 240 bytes
Total sessions found: 1
[Device] display aft session ipv6 verbose
Initiator:
Source IP/port: 2012::0A01:0101/0
Destination IP/port: 2013:0:FF14:0101:0100::/32768
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: IPV6-ICMP(58)
Inbound interface: GigabitEthernet1/0/1
Responder:
Source IP/port: 2013:0:FF14:0101:0100::/0
Destination IP/port: 2012::0A01:0101/33024
VPN instance/VLAN ID/Inline ID: -/-/-
Protocol: IPV6-ICMP(58)
Inbound interface: GigabitEthernet1/0/2
State: ICMPV6_REPLY
Application: OTHER
Start time: 2014-03-13 08:52:59 TTL: 23s
Initiator->Responder: 4 packets 320 bytes
Responder->Initiator: 4 packets 320 bytes
Total sessions found: 1
(0)
V4要访问的V6的地址很多。不是各别的几台
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
https://www.h3c.com/cn/pub/Document_Center/2023/08/WebHelp_H3C_SecPath_FHQCP_DXPZALJ(V7)/default_auto.htm?CHID=904195