| How to use the upstream XLAT464 function |
| ======================================== |
| For xlat464, we offer two solutions: one is the upstream xlat464 described in this document, |
| and the other is based on datapath provided by ASR (see howto: data_path_nat46.txt). |
| In contrast, the former converts nat46 and nat64 in the kernel, which will lose some throughput and cpu, |
| while the latter can achieve zero copy, which can improve throughput. |
| |
| Here we take 1803 (i.e. Falcon) as example. |
| The host PC system tested in this paper is Ubuntu 16.04.7 LTS. |
| |
| |
| 1) make menuconfig and select "PACKAGE_464xlat" and save your new configuration. |
| And then rebuild:make -j8 V=99 |
| |
| 2) Redial using IPv6 |
| "serial_client" |
| "AT+ZGDCONT=1,IPV6,GPRS" |
| "AT+ZGACT=1,1" |
| After this operation, you will not be able to access the IPv4 service and failed to ping IPv4 on the host or 1803, |
| but you can successfully ping the IPv6 server on 1803. |
| |
| 3) Configure CLAT interface |
| # Configure network |
| uci set network.clat="interface" |
| uci set network.clat.proto="464xlat" |
| uci set network.clat.ip6prefix="64:ff9b::/96" |
| uci commit network |
| /etc/init.d/network reload |
| |
| 64:ff9b::/96 is the v6 prefix of PLAT, which may not be accessible in china but is available overseas. |
| |
| 4) Firewall |
| Consider CLAT network as public. Assign CLAT interface to WAN zone to minimize firewall setup. |
| # Configure firewall |
| uci rename firewall.@zone[1]="wan" |
| uci del_list firewall.wan.network="clat" |
| uci add_list firewall.wan.network="clat" |
| uci set firewall.wan.forward="ACCEPT" |
| uci commit firewall |
| /etc/init.d/firewall reload |
| |
| 5) DHCP |
| If you need to resolve IPv6 domain names on Ubuntu, you need to configure IPv6 dns information in dhcp. |
| # Configure dhcp |
| list dns '2409:8030:2000::1' |
| list dns '2409:8030:2000::2' |
| uci add_list dhcp.lan.dns="2409:8030:2000::1" |
| uci add_list dhcp.lan.dns="2409:8030:2000::2" |
| uci commit dhcp |
| /etc/init.d/odhcpd restart |
| |
| 2409:8030:2000::1 is the IPv6 dns you obtained by dialing, you can also set others, such as the gateway address of br-lan or Google dns. |
| |
| 6) Host Configuration |
| "dhclient enp0s26u1u1" |
| "route add default gw 192.168.1.1" |
| |
| enp0s26u1u1 is the enumerated rndis NIC on Ubuntu. |
| |
| 7) Testing |
| Establish the XLAT connection. Use ping to verify your client can be accessed using IPv4. |
| ping www.baidu.com |