IPv6 Administration Guide

How to Configure a 6to4 Router

Before you configure 6to4 routing on an IPv6 network, you must have done the following:

  1. Become superuser on the prospective 6to4 router.

  2. Configure a 6to4 pseudo-interface on the router by creating the /etc/hostname6.ip.6to4tun0 file.

    • If you plan to use the recommended convention of subnet ID=0 and host ID=1, use the short format for /etc/hostname6.ip.6to4tun0:


      tsrc IPv4 address up

    • If you plan to use other conventions for subnet ID and host ID, use the long format for /etc/hostname6.ip.6to4tun0:


      tsrc IPv4 address 2002:IPv4 address:subnet ID:host ID:/64 up

    The next table explains the parameters of /etc/hostname6.ip.6to4tun0 that are used in this step.

    tsrc 

    Indicates that this interface is used as a tunnel source 

    IPv4 address

    Specifies, in dotted decimal format, the IPv4 address that is configured on the physical interface to become the 6to4 pseudo-interface 

    2002 

    (Optional) Specifies the 6to4 prefix 

    IPv4 address

    (Optional) Specifies, in hexadecimal, the IPv4 address of the pseudo-interface. 

    subnet ID

    (Optional) Specifies, in hexadecimal notation, a subnet ID other than 0 

    host ID

    (Optional) Specifies a host ID other than 1 

    /64 

    Indicates that the address has a length of 64 bits. 

    up 

    Directs ifconfig to configure the interface as “up”


    Note –

    Two IPv6 tunnels cannot have the same source and same destination addresses. Packets are dropped as a result. This type of event can happen if a 6to4 router also performs tunneling through atun.


  3. (Optional) Create additional 6to4 pseudo-interfaces on the router.

    Each prospective 6to4 pseudo-interface must have an already-configured, globally unique IPv4 address.

  4. Run ifconfig to verify the status of the interface.


    # ifconfig ip.6to4tun0 inet6
            
    

    If the interface is correctly configured, you receive output that is similar to the following.


    ip.6to4tun0: flags=2200041<UP,RUNNING,NONUD,IPv6>mtu 1480 index 11
            inet tunnel src 129.146.87.188 
            tunnel hop limit 60 
            inet6 2002:8192:56bb:56bb::1/64 

  5. Edit /etc/inet/ndpd.conf to advertise 6to4 routing.

    For detailed information, refer to ndpd.conf(4).

    1. Specify the subnet to receive the advertisement in the first line.

      Create an if entry with the following format:


      if subnet-interface AdvSendAdvertisements 1

      For example, to advertise 6to4 routing to the subnet that is connected to interface hme0, replace subnet-interface with hme0.


      if hme0 AdvSendAdvertisements 1

    2. Add the 6to4 prefix as the second line of the advertisement.

      Create a prefix entry with following format:


      prefix 2002:IPv4-address:subnet ID::/64 subnet-interface
      

      prefix 2002 

      Indicates a 6to4 prefix 

      IPv4-address

      Specifies, in hexadecimal representation, the unique IPv4 address of the 6to4 pseudo-interface 

      subnet ID

      Specifies, in hexadecimal, a subnet ID 

      subnet-interface

      Router interface to which the subnet is connected 

  6. Reboot the router.

    Alternatively, you can issue a sighup to /etc/inet/in.ndpd to begin sending router advertisements.. The IPv6 nodes on each subnet to receive the 6to4 prefix now autoconfigure with new 6to4–derived addresses.

  7. Add the new 6to4–derived addresses of the nodes to the name service that is used at the 6to4 site.

    For instructions, go to How to Add IPv6 Addresses to DNS or How to Add IPv6 Addresses to NIS and NIS+.

Configuring Multiple Routers at the 6to4 Site

For a multiple router site, the routers behind the 6to4 router might require further configuration to support 6to4. If your site uses RIP, you must configure on each non-6to4 router static routes to the 6to4 router. If you use a commercial routing protocol, you do not need to create static routes to the 6to4 router.

Examples—6to4 Router Configuration

The following is an example of the short form of /etc/hostname6.ip.6to4tun0.


# cat /etc/hostname6.ip.6to4tun0
tsrc 129.146.87.188 up

Here is an example of the long form of /etc/hostname6.ip.6to4tun0.


# cat /etc/hostname6.ip.6to4tun0
tsrc 129.146.87.188 2002:8192:56bb::1/64 up

The following example shows output of ifconfig for a 6to4 pseudo-interface.


# ifconfig ip.6to4tun0 inet6
ip.6to4tun0: flags=2200041<UP,RUNNING,NONUD,IPv6> mtu 1480 index 11
        inet tunnel src 129.146.87.188
        tunnel hop limit 60 
        inet6 2002:8192:56bb::1/64 

The next sample /etc/inet/ndpd.conf file advertises 6to4 routing on two subnets.


if qfe0 AdvSendAdvertisements 1
prefix  2002:8192:56bb:1::/64 qfe0 

if qfe1 AdvSendAdvertisements 1
prefix  2002:8192:56bb:2::/64 qfe1