Android 464XLAT和CLAT

今天看ConnectivityService发现了Nat464Xlat,开始很迷惑,从名字上无法理解到底是什么东东,后上网搜索了一下才知道464XLAT是用于IPv4与IPv6之间通信的。464XLAT采用翻译方式进行IPv4 over IPv6,在IPv4-IPv6网络边界进行NAT翻译,在IPv6网络中以IPv6报文进行转发和处理。

有关464XLAT可以参考RFC6877,http://tools.ietf.org/html/rfc6877;

有关Android CLAT,http://dan.drown.org/android/clat/。


This project is for 464xlat support for android. It is useful for ipv4 applications running on an IPv6-only network using NAT64/DNS64 to provide IPv4 access.

当应用不支持64位DNS,通过CLAT 处理从IPV4到IPV6的转换。 CLAT是IPV4在GSM网络使用NAT64转换到IPV6 的入口. Android CLAT 实现了android平台的CLAT。

Below, you can see how CLAT fits in to the other pieces of 464xlat (RFC6877)



 Android 4.3 jellybean 和之后的版本都已经存在。


How can I test that 464xlat is operating properly?

While on the IPv6 APN, visit this helpful ipv6 test page

Can I use clat/464xlat with a wifi connection?

Android does not (yet) support IPv6-only wifi connections, and this software was not designed to offer CLAT services via a wifi connection. It can be made to work by giving CLAT an IP to use in the config file, along with answering ND for that IP on the handset (set the proxy_ndp sysctl and use ip -6 neighbor add proxy ...). Please note that running this CLAT implementation requires IPv6 forwarding turned on, so if you're relying on RA autoconfiguration (SLAAC) you'll need to configure a static IPv6 global address on the wifi interface. Also note that multiple handsets running 464xlat on the same wifi network will result in IPv6 address conflicts if you don't make sure each one has a unique hostid for its clat function.

Can I use the same IPv6 IP for my handset's global traffic and CLAT traffic?

Not for this implementation. It relies on the routing table of the handset to separate traffic to the handset and traffic to the CLAT process. You will need one global IPv6 address for the handset and one for the CLAT process.



### 464XLAT 技术概述 464XLAT(IPv4-over-IPv6 Cross-Layer Address Translation)是一种用于支持纯IPv6网络中的设备访问IPv4互联网的技术[^1]。该技术的主要目标是在不改变现有IPv4基础设施的情况下,帮助实现从IPv4到IPv6的平滑过渡。 #### 技术定义 464XLAT由两部分组成:CLAT(Customer-side Lightweight 4over6 Translator)PLAT(Provider-side Lightweight 4over6 Translator)。其中: - **CLAT** 部署在网络客户端侧,负责将用户的IPv4请求封装成IPv6数据包并发送给服务提供商。 - **PLAT** 则位于服务提供商家中,接收来自CLAT的数据包,并将其解封还原为标准IPv4流量转发至目的地。 这种设计允许终端用户仅需配置简单的软件组件即可接入传统IPv4资源而无需额外硬件投入[^2]。 #### 主要功能 其核心在于解决了地址映射与协议转换两大难题。具体来说, - 对于地址映射方面采用的是基于RFC6052所规定的方案; - 协议层面则利用了NAT-PT类似的原理完成端到端通讯过程中的必要字段替换操作[^3]。 通过上述方式确保即使在一个完全运行着下一代协议栈环境里也依然能够正常浏览旧版网页或者享受其他依赖原有架构所提供的各项在线服务体验不变的同时促进了整个行业向着更加高效节能方向迈进一大步! ```python # Python伪代码展示基本逻辑流程 def clat_process(ipv4_packet): ipv6_packet = convert_ipv4_to_ipv6(ipv4_packet) # 转换函数模拟实际处理细节省略 send_over_ipv6_network(ipv6_packet) def plat_process(received_ipv6_packet): original_ipv4_packet = extract_and_restore_original_payload(received_ipv6_packet) forward_via_native_ipv4_infrastructure(original_ipv4_packet) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值