System Administration Guide: IP Services

ProcedureHow to Configure an IPv6-Enabled Router

This procedure assumes that all interfaces of the router were configured for IPv6 during Oracle Solaris installation.

  1. On the system that will become the IPv6 router, assume the Primary Administrator role or become superuser.

    The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.

  2. Review which interfaces on the router were configured for IPv6 during installation.


    # ifconfig -a
    

    Check the output to ensure that the interfaces that you wanted to configure for IPv6 are now plumbed with link-local addresses. The following sample command output of ifconfig -a shows the IPv4 and IPv6 addresses that were configured for the router's interfaces.


    lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
            inet 127.0.0.1 netmask ff000000 
    dmfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
            inet 172.16.26.232 netmask ffffff00 broadcast 172.16.26.255
            ether 0:3:ba:11:b1:15 
    dmfe1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4 mtu 1500 index 3
            inet 172.16.26.220 netmask ffffff00 broadcast 172.16.26.255
            ether 0:3:ba:11:b1:16 
    lo0: flags=2000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
            inet6 ::1/128 
    dmfe0: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
            ether 0:3:ba:11:b1:15 
            inet6 fe80::203:baff:fe11:b115/10 
    dmfe1: flags=2000841 <UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
            ether 0:3:ba:11:b1:16 
            inet6 fe80::203:baff:fe11:b116/10 

    The output also shows that the primary network interface dmfe0 and the additional interface dmfe1 were configured during installation with the IPv6 link–local addresses fe80::203:baff:fe11:b115/10 and fe80::203:baff:fe11:b116/10.

  3. Configure IPv6 packet forwarding on all interfaces of the router.

    For Solaris 10 11/03 and earlier releases, use the following command:


    # routeadm -e ipv6-forwarding -u
    

    Use either of the following to enable packet forwarding:

    • Use the routeadm command, as follows:


      # routeadm -e ipv6-forwarding -u
      
    • Use the following Service Management Facility (SMF) command, as follows:


      # svcadm enable ipv6-forwarding
  4. Start the routing daemon.

    The in.ripngd daemon handles IPv6 routing.

    For Solaris 10 11/06 and earlier releases, start in.ripngd by typing the following command:


    # routeadm -e ipv6-routing
    # routeadm -u
    

    Turn on IPv6 routing in either of the following ways:

    • Use the routeadm command as follows:


      # routeadm -e ipv6-routing -u
      
    • Use SMF to enable IPv6 routing:


      # svcadm enable ripng:default
      

    For syntax information on the routeadm command, see the routeadm(1M) man page.

  5. Create the /etc/inet/ndpd.conf file.

    You specify the site prefix to be advertised by the router and other configuration information in /etc/inet/ndpd.conf. This file is read by the in.ndpd daemon, which implements the IPv6 Neighbor Discovery protocol.

    For a list of variables and allowable values, refer to ndpd.conf Configuration File and the ndpd.conf(4)man page.

  6. Type the following text into the /etc/inet/ndpd.conf file:


    ifdefault AdvSendAdvertisements true
    prefixdefault AdvOnLinkFlag on AdvAutonomousFlag on
    

    This text tells the in.ndpd daemon to send out router advertisements over all interfaces of the router that are configured for IPv6.

  7. Add additional text to the /etc/inet/ndpd.conf file to configure the site prefix on the various interfaces of the router.

    The text should have the following format:


    prefix global-routing-prefix:subnet ID/64 interface
    

    The following sample /etc/inet/ndpd.conf file configures the router to advertise the site prefix 2001:0db8:3c4d::/48 over the interfaces dmfe0 and dmfe1.


    ifdefault AdvSendAdvertisements true
    prefixdefault AdvOnLinkFlag on AdvAutonomousFlag on
    
    if dmfe0 AdvSendAdvertisements 1
    prefix 2001:0db8:3c4d:15::0/64 dmfe0
    
    if dmfe1 AdvSendAdvertisements 1
    prefix 2001:0db8:3c4d:16::0/64 dmfe1
    
  8. Reboot the system.

    The IPv6 router begins advertising on the local link any site prefix that is in the ndpd.conf file.


Example 7–3 ifconfig Output Showing IPv6 Interfaces

The following example shows output from the ifconfig -a command such as you would receive after you finish the Configuring an IPv6 Router procedure.


lo0: flags=1000849 <UP LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
dmfe0: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 172.16.15.232 netmask ffffff00 broadcast 172.16.26.255
        ether 0:3:ba:11:b1:15 
dmfe1: flags=1000843 <UP,BROADCAST,RUNNING,MULTICAST,IPv4 mtu 1500 index 3
        inet 172.16.16.220 netmask ffffff00 broadcast 172.16.26.255
        ether 0:3:ba:11:b1:16 
lo0: flags=2000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
        inet6 ::1/128 
dmfe0: flags=2100841 <UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
        ether 0:3:ba:11:b1:15 
        inet6 fe80::203:baff:fe11:b115/10 
dmfe0:1: flags=2180841 <UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500
          index 2
        inet6 2001:db8:3c4d:15:203:baff:fe11:b115/64
dmfe1: flags=2100841 <UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 3
        ether 0:3:ba:11:b1:16 
        inet6 fe80::203:baff:fe11:b116/10 
dmfe1:1: flags=2180841 <UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500
           index 3
        inet6 2001:db8:3c4d:16:203:baff:fe11:b116/64

In this example, each interface that was configured for IPv6 now has two addresses. The entry with the name of the interface, such as dmfe0, shows the link-local address for that interface. The entry with the form interface:n, such as dmfe0:1, shows a global IPv6 address. This address includes the site prefix that you configured in the /etc/ndpd.conf file, in addition to the interface ID.


See Also