Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

Previous Previous     Contents     Index     Next Next

ProcedureHow to Configure a 6to4 Router

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

  • Configured IPv6 on all appropriate nodes at the prospective 6to4 site, as described in How to Enable IPv6 on a Node.

  • Selected at least one router with a connection to an IPv4 network to become the 6to4 router.

  • Configured a globally unique IPv4 address for the prospective 6to4 router's interface to the IPv4 network. The IPv4 address must be static. Do not use a dynamically allocated IPv4 address. For instructions for configuring an IPv4 interface, see "Network Configuration Procedures" in System Administration Guide: IP Services

  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

ProcedureHow to Add IPv6 Addresses to NIS and NIS+

A new table has been added for NIS+ named ipnodes.org_dir. The table contains both IPv4 and IPv6 addresses for a host. The existing hosts.org_dir table, which contains only IPv4 addresses for a host, remains the same to facilitate existing applications. Both the hosts.org_dir and ipnodes.org_dir tables must be consistent with the IPv4 addresses. See IPv6 Extensions to Solaris Name Services for an overview.

Administration of the new ipnodes.org_dir table is similar to administering the hosts.org_dir. The same tools and utilities that are used to administer the previous NIS+ tables are valid for ipnodes.org_dir. See System Administration Guide: Naming and Directory Services for details on how to manipulate the NIS+ table.

The following command merges the entries from /etc/inet/ipnodes into the ipnodes.org_dir table, in verbose mode. The NIS+ table was probably created by nistbladm(1), nissetup(1M), or nisserver(1M).

  • On a command line, type the following command:

    % nisaddent -mv -f /etc/inet/ipnodes ipnodes

Use the following procedure to display the ipnodes.org_dir table.

  • On a command line, type the following command:

    % nisaddent -d ipnodes

Two new maps have been added for NIS: ipnodes.byname and ipnodes.byaddr. These maps contain both IPv4 and IPv6 host name and address associations. The hosts.byname and hosts.byaddr maps, which contain only IPv4 host name and address associations, are unchanged so that they can facilitate existing applications. Administration of the new maps is similar to the maintenance of the hosts.byname and hosts.byaddr older maps. Again, it is important that when you update the hosts maps with IPv4 addresses that the new ipnode maps are also updated with the same information.


Note - Tools that are aware of IPv6 use the new NIS maps and the new NIS+ tables.


Previous Previous     Contents     Index     Next Next