中文网站
  Advanced Search
Read the latest Blogs from IT professionals in the field. Read and write community created documents. Need IT help? Ask our staff. Connect with your peers. Check our Tech Shop for posters, books and software tools. Home

5.6.3.3 The Faith TRT for FreeBSD and NetBSD(1)

The transport relay translator faithd [RFC3142] is an IPv6-to-IPv4 TCP relay. Faithd relays TCP (not UDP, RTP or other transport protocols) from IPv6 to IPv4 (not the other way around). The faith daemon needs to be run on a dual-stack router between you local IPv6 site and outside IPv4 network. The daemon needs to be invoked per TCP service (TCP port number).

Example Setup

This example setup consists of two hosts on the same link running NetBSD software which are connected to a gateway. One of the hosts will be the TCP translator of the connections that the other host tries to establish. Once the TCP translation has been performed, the TCP connection will follow the normal way through the gateway.

Installation

The installation of the TRT consists in running a daemon called faithd included with the NetBSD
software. This daemon must be run for every service we want to provide. To be able to run the
daemon, previously is necessary to enable an interface called faith.

When the faithd daemon receives TCP(v6) traffic from the faith interface it will perform the translation to TCP(v4). The destination of the TCP(v4) connection will be determined by the last 4 octets of the original IPv6 destination. It is necessary to reserve a prefix to perform this service. For example, if the prefix 2001:db8:10:110:: is reserved and the IPv4 destination is 10.1.1.1, the original destination should be 2001:db8:10:110::0a01:0101. The address translation can be performed by hand but of course you are better off using a DNS proxy such as totd.

The faith interface captures IPv6 traffic for implementing IPv6 to IPv4 TCP translations. To be able to
use this interface is necessary to recompile the kernel, enabling the pseudo-interface faith.

The following example shows how to use faithd to provide a TCP relay for the ssh service using
2001:db8:10:110::/64 as faith prefix.