原来防火墙F1000设备出接口上网是走运营商的ipv4,近期要改成ipv6去上网了,是出接口写运营商给的ipv6信息吗,这样的话路由咋写?有相关案例吗?
(0)
是的,默认路由:
[DeviceA] ipv6 route-static 0::0 0 *****
如下图所示,Internet已经升级到了IPv6,但是某公司内部网络仍然是IPv4网络。而该公司内部网络的10.1.1.0/24网段的用户仍需要访问IPv6 Internet中的服务器,其他用户不能访问。
为满足上述要求,本例中使用如下方式实现:
使用IPv4到IPv6源地址动态地址转换策略,将IPv4报文的源地址转换为IPv6地址。
通过IPv6到IPv4的源地址静态转换策略为IPv6 Internet上服务器的IPv6地址指定一个对应的IPv4地址,Device收到发往该IPv4地址的报文时将其转换为对应的IPv6地址。
图-1 IPv4网络访问IPv6 Internet中的服务器配置组网图
配置接口IP地址
# 根据组网图中规划的信息,配置各接口的IP地址,具体配置步骤如下。
<Device> system-view
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] ip address 10.1.1.3 24
[Device-GigabitEthernet1/0/1] quit
请参考以上步骤配置其他接口的IP地址,具体配置步骤略。
将接口加入安全域
# 请根据组网图中规划的信息,将接口加入对应的安全域,具体配置步骤如下。
[Device] security-zone name trust
[Device-security-zone-Trust] import interface gigabitethernet 1/0/1
[Device-security-zone-Trust] quit
[Device] security-zone name untrust
[Device-security-zone-Untrust] import interface gigabitethernet 1/0/2
[Device-security-zone-Untrust] quit
配置静态路由
本举例仅以静态路由方式配置路由信息。实际组网中,请根据具体情况选择相应的路由配置方式。
# 请根据组网图中规划的信息,配置静态路由,本举例假设到达Server所在网络的下一跳IPv6地址为2014::100,实际使用中请以具体组网情况为准,具体配置步骤如下。
[Device] ipv6 route-static 2013:0:ff14:0101:100:: 64 2014::100
配置安全策略
# 配置名称为aftlocalin的安全策略,使Device能对Host访问Server的报文进行AFT转换,具体配置步骤如下。
[Device] security-policy ip
[Device-security-policy-ip] rule name aftlocalin
[Device-security-policy-ip-1-aftlocalin] source-zone trust
[Device-security-policy-ip-1-aftlocalin] destination-zone local
[Device-security-policy-ip-1-aftlocalin] source-ip-subnet 10.1.1.0 24
[Device-security-policy-ip-1-aftlocalin] destination-ip-host 20.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 untrust
[Device-security-policy-ipv6-1-aftlocalout] source-ip-subnet 2012:: 96
[Device-security-policy-ipv6-1-aftlocalout] destination-ip-host 2013:0:ff14:0101:100::1
[Device-security-policy-ipv6-1-aftlocalout] action pass
[Device-security-policy-ipv6-1-aftlocalout] quit
[Device-security-policy-ipv6] quit
配置AFT功能
# 配置ACL 2000,仅允许IPv4网络中10.1.1.0/24网段的用户可以访问IPv6 Internet。
[Device] acl basic 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 source 2013:0:ff14:0101:100::1 20.1.1.1
# 在设备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与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
Source security zone: Trust
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
Source security zone: Local
State: ICMP_REPLY
Application: ICMP
Rule ID: -/-/-
Rule name:
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
Source security zone: Local
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
Source security zone: Untrust
State: ICMPV6_REPLY
Application: ICMP
Rule ID: 0
Rule name: aftlocalout
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
#
interface GigabitEthernet1/0/1
ip address 10.1.1.3 255.255.255.0
aft enable
#
interface GigabitEthernet1/0/2
aft enable
ipv6 address 2014::1/96
#
security-zone name Trust
import interface GigabitEthernet1/0/1
#
security-zone name Untrust
import interface GigabitEthernet1/0/2
#
ipv6 route-static 2013:0:FF14:101:: 64 2014::100
#
acl basic 2000
rule 0 permit source 10.1.1.0 0.0.0.255
rule 5 deny
#
aft prefix-nat64 2012:: 96
aft v6tov4 source 2013:0:FF14:101:100::1 20.1.1.1
aft v4tov6 source acl number 2000 prefix-nat64 2012:: 96
#
security-policy ip
rule 0 name aftlocalin
action pass
source-zone trust
destination-zone local
source-ip-subnet 10.1.1.0 255.255.255.0
destination-ip-host 20.1.1.1
#
security-policy ipv6
rule 0 name aftlocalout
action pass
source-zone local
destination-zone untrust
source-ip-subnet 2012::/96
destination-ip-host 2013:0:FF14:101:100::1
#
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
这种改成ipv6去上网对内网192.168这些ipv4有影响吗
内网是V4 ?公网通过V6出去?
对
看下答案
配置中20.1.1.1这个IP是啥意思呀?