blob: 98306d2226f706cf10791335e8bc2b7c89a248f3 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001How to use the upstream XLAT464 function
2========================================
3For xlat464, we offer two solutions: one is the upstream xlat464 described in this document,
4and the other is based on datapath provided by ASR (see howto: data_path_nat46.txt).
5In contrast, the former converts nat46 and nat64 in the kernel, which will lose some throughput and cpu,
6while the latter can achieve zero copy, which can improve throughput.
7
8Here we take 1803 (i.e. Falcon) as example.
9The host PC system tested in this paper is Ubuntu 16.04.7 LTS.
10
11
121) make menuconfig and select "PACKAGE_464xlat" and save your new configuration.
13And then rebuild:make -j8 V=99
14
152) Redial using IPv6
16 "serial_client"
17 "AT+ZGDCONT=1,IPV6,GPRS"
18 "AT+ZGACT=1,1"
19 After this operation, you will not be able to access the IPv4 service and failed to ping IPv4 on the host or 1803,
20 but you can successfully ping the IPv6 server on 1803.
21
223) Configure CLAT interface
23 # Configure network
24 uci set network.clat="interface"
25 uci set network.clat.proto="464xlat"
26 uci set network.clat.ip6prefix="64:ff9b::/96"
27 uci commit network
28 /etc/init.d/network reload
29
30 64:ff9b::/96 is the v6 prefix of PLAT, which may not be accessible in china but is available overseas.
31
324) Firewall
33 Consider CLAT network as public. Assign CLAT interface to WAN zone to minimize firewall setup.
34 # Configure firewall
35 uci rename firewall.@zone[1]="wan"
36 uci del_list firewall.wan.network="clat"
37 uci add_list firewall.wan.network="clat"
38 uci set firewall.wan.forward="ACCEPT"
39 uci commit firewall
40 /etc/init.d/firewall reload
41
425) DHCP
43 If you need to resolve IPv6 domain names on Ubuntu, you need to configure IPv6 dns information in dhcp.
44 # Configure dhcp
45 list dns '2409:8030:2000::1'
46 list dns '2409:8030:2000::2'
47 uci add_list dhcp.lan.dns="2409:8030:2000::1"
48 uci add_list dhcp.lan.dns="2409:8030:2000::2"
49 uci commit dhcp
50 /etc/init.d/odhcpd restart
51
52 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.
53
546) Host Configuration
55 "dhclient enp0s26u1u1"
56 "route add default gw 192.168.1.1"
57
58 enp0s26u1u1 is the enumerated rndis NIC on Ubuntu.
59
607) Testing
61 Establish the XLAT connection. Use ping to verify your client can be accessed using IPv4.
62 ping www.baidu.com