中文网站
  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.5.3.5 Linux(1)

Manual Configuration using the command "ip"

To not depend on any distribution specific setup scripts one can create a 6to4 tunnelling interface by hand using the command "ip" and tunnel mode "sit" just like with manually configured tunnels. Theonly difference here is that there is no need to give any information about remote tunnel endpoints.

1. Create a new tunnel interface:

Note: A TTL must be specified. Otherwise the TTL is inherited (value 0).

2. Bring the new interface up:

#/sbin/ip link set dev tun6to4 up

3. Add the local 6to4 address to interface. This is the address computed from the local IPv4 address used in the creation of the tunnel interface. Note that it is important to use the prefix length 16.

#/sbin/ip -6 addr add <local 6to4 address>/16 dev tun6to4

In this example the line would be:

#/sbin/ip -6 addr add 2002:80b0:b807::1/16 dev tun6to4

4. At last only the (default) route has to be configured accordingly. In this case we want to get the host connected to the rest of the IPv6 internet and thus configure the default route to point to the "all-6to4-(relay)-routers" IPv4 anycast address:

# /sbin/ip -6 route add 2000::/3 via ::192.88.99.1 dev tun6to4 metric 1