Softpanorama
(slightly skeptical) Open Source Software Educational Society

May the source be with you, but remember the KISS principle ;-)

Google   


Enabling IPv6 Routing in Solaris

You can enable IPv6 from the command line or by creating a specific file that is found by the /etc/rc2.d/S69inet startup scripts at boot time.

The in.ndpd Process on the Non-Router

The in.ndpd process implements the Neighbor Discovery Protocol (NDP). Systems on the same network link use NDP for IPv6 to:

IPv6 on Non-Routers Configuration

You can configure a system to support both IPv4 and IPv6. This configured system is known as a dual-stack system.

IPv6 introduces new files, including:

Configuring an Interface for IPv6

To configure IPv6 on a system, create a /etc/hostname6.interface file, and reboot the system or use the ifconfig utility to manually configure the interface. For example, to configure IPv6 on the  system’s hme0 interface, complete the following steps:

1. View the configuration of the system’s interfaces before making any changes.

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000

hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:90:b5:c7

2. Create the /etc/hostname6.interfacefile to cause the interface to configure with IPv6, and then reboot the system.

# touch /etc/hostname6.hme0
# init 6
#
INIT: New run level: 6


3. Watch the start messages for IPv6 messages, which are similar to the
following:

...
...
configuring IPv6 interfaces: hme0.
...
...
Starting IPv6 neighbor discovery.
...
...

4. View the system’s interface configuration after the boot.

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000


hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.1.2 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:90:b5:c7


lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
inet6 ::1/128


hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
ether 8:0:20:90:b5:c7
inet6 fe80::a00:20ff:fe90:b5c7/10

Notice how both the lo0 and hme0 interfaces have inet6 components and that each interface has an inet6 address. Recall from a previous step that an IPv6 address was not defined.

Configuring IPv6 Name Service Lookup

Like IPv4, you can apply names to IPv6 addresses so that you can more easily refer to a system. For example, to name this system’s IPv6 hme0 interface -v6, you can add an entry to the /etc/inet/ipnodes file to make it look similar to the following:

# tail -2 /etc/inet/ipnodes
# added for ipnode example
fec0::a00:20ff:fe90:b5c7 -v6

 

You can now address the system by its IPv6 interface by using the -v6 host name, for example:

# ping -v6
-v6 is alive

Name service lookup configuration for IPv6 is similar to name service lookup configuration for IPv4.

The following are additional files:


Non-Router Configuration Troubleshooting

You can use the netstat utility with the address-family (-f) inet6 option to display only IPv6-specific information when you troubleshoot. The netstat utility has multiple forms and produces different types and levels of output depending on the options that are used with the utility. To view the IPv6 route table, perform the command:

# netstat -f inet6 -r

Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If


fe80::/10 -v6 U 1 0 hme0
ff00::/8 -v6 U 1 0 hme0
default -v6 U 1 0 hme0
localhost localhost UH 1 0 lo0

 

To view multicast group information for IPv6 interfaces, perform the command:

# netstat -f inet6 -g
Group Memberships: IPv6
If Group RefCnt


lo0 ff02::1:ff00:1 1
lo0 ff02::1 1
hme0 ff02::202 1
hme0 ff02::1:ff90:b5c7 1
hme0 ff02::1 2

 

You can use the ifconfig utility to obtain IPv6-specific information by using the inet6 address family parameter. For example, to view the configuration of all IPv6 interfaces, perform the command:

# ifconfig -a inet6


lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
inet6 ::1/128


hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:fe90:b5c7/10


The in.ndpd Process on the Router

The IPv6 NDP is implemented by the in.ndpd process. The in.ndpd process implements IPv6 functions, including:

  1. Router discovery
  2. Prefix discovery
  3. Address autoconfiguration
  4. Address resolution
  5. Neighbor unreachability detection


IPv6 Routing Information Protocol

Routing in IPv6 is almost identical to IPv4 routing in CIDR, except that the IPv6 addresses are 128 bits instead of 32 bits. The in.ripngd process is the IPv6 routing daemon for the Solaris.

In normal operation, the in.ripngd process listens on the UDP port 521 for route information datagrams. If the host is a router, it periodically supplies copies of its route table to any directly connected host and
network.

IPv6 Router Configuration

You can use the command line to configure an IPv4 router to support IPv6. You can activate IPv6 by starting specific processes or by rebooting the system.

Configuring Interfaces for IPv6

To designate which interfaces are configured with IPv6 at boot time, use the touch utility to create a /etc/hostname6.interface file for each interface. For example, to configure the system to configure the hme0and
qfe0 interfaces with IPv6 at boot time, enter the following:

# touch /etc/hostname6.hme0 /etc/hostname6.qfe0
 

Alternatively, configure the hme0 and qfe0 interfaces from the command line as follows:

1. View the interfaces configuration.


# ifconfig -a


lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000


hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.30.31 netmask ffffff00 broadcast 192.168.30.255
ether 8:0:20:b9:72:23


qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:ac:9b:20


2. Use the ifconfig utility to configure the hme0 interface.

# ifconfig hme0 inet6 plumb up

3. Use the ifconfig utility to configure the qfe0 interface.


# ifconfig qfe0 inet6 plumb up
 

4. View the interfaces configuration.
# ifconfig -a


lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000


hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.30.31 netmask ffffff00 broadcast 192.168.30.255
ether 8:0:20:b9:72:23


qfe0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.1.1 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:ac:9b:20


hme0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
ether 8:0:20:b9:72:23
inet6 fe80::a00:20ff:feb9:7223/10

qfe0: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 3
ether 8:0:20:ac:9b:20
inet6 fe80::a00:20ff:feac:9b20/10

Configuring IPv6 Name Service Lookup

The IPv6 name service lookup mechanism is controlled in the same way as IPv4. Verify that the ipnodes database is defined correctly for your site’s name service lookup mechanism. For example, make sure that the following entry exists if the ipnodes database uses the system’s local file:

# grep ipnodes /etc/nsswitch.conf
ipnodes: files
 


Configuring the ndpd.conf File

Configure the ndpd.conf file to contain route configuration information on the routers. You do not have to advertise link-local addresses on a router because a link-local address cannot be routed. Recall that:

The following example demonstrates how to configure this router information


Complete the following steps:

1. Define the /etc/inet/ndpd.conf file to have the following contents:

# cat /etc/inet/ndpd.conf

# Send router advertisements out all interfaces
ifdefault AdvSendAdvertisements on
#
# Advertise an unregistered (bogus) global prefix and a site
# local prefix using the default lifetimes
prefix fec0:0:0:9255::0/64 hme0
prefix 2000:0:0:9255::0/64 hme0
#
prefix fec0:0:0:9256::0/64 qfe0
prefix 2000:0:0:9256::0/64 qfe0
#


2. Reboot the system. Proceed to the Step 3 to configure the system from the command line.

# init 6
#
INIT: New run level: 6
...
...
Machine is an IPv4 router.
Machine is an IPv6 router.
Setting default IPv6 interface for multicast: add net ff00::/8: gateway
fe80::a00:20ff:feb9:7223


...
...

  1. View the IPv6 configuration of the interfaces.

  2. # ifconfig -a inet6
    lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
    inet6 ::1/128
    hme0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
    inet6 fe80::a00:20ff:feb9:7223/10
    hme0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
    inet6 2000::9255:a00:20ff:feb9:7223/64
    hme0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
    inet6 fec0::9255:a00:20ff:feb9:7223/64
    qfe0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 3
    inet6 fe80::a00:20ff:feac:9b20/10
    qfe0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
    inet6 2000::9256:a00:20ff:feac:9b20/64
    qfe0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
    inet6 fec0::9256:a00:20ff:feac:9b20/64
    #

  3. Observe how the site-local and aggregatable-global unicast addresses are assigned to unique logical interfaces.

3. To configure your system without rebooting it, complete the following steps:

  1. Switch IPv6 IP forwarding on.
    # /usr/sbin/ndd -set /dev/ip ip6_forwarding 1
  2. If required, configure the system to send routing redirects.
    # /usr/sbin/ndd -set /dev/ip ip6_send_redirects 1
     
  3.  If required, configure the system to ignore routing redirects for
    IPv6.
    # /usr/sbin/ndd -set /dev/ip ip6_ignore_redirect 1
     
  4. Start the in.ndpdprocess that reads the ndpd.conffile. Restart
    it if it is already running.
    # /usr/lib/inet/in.ndpd
     
  5. Start the in.ripngd process, and force it to supply route
    information to the network.
    # /usr/lib/inet/in.ripngd -s
     
  6. View the interface configuration:

    # ifconfig -a inet6
    lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
    inet6 ::1/128
    hme0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
    inet6 fe80::a00:20ff:feb9:7223/10
    hme0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
    inet6 2000::9255:a00:20ff:feb9:7223/64
    hme0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
    inet6 fec0::9255:a00:20ff:feb9:7223/64
    qfe0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 3
    inet6 fe80::a00:20ff:feac:9b20/10
    qfe0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
    inet6 2000::9256:a00:20ff:feac:9b20/64
    qfe0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
    inet6 fec0::9256:a00:20ff:feac:9b20/64
    #


Router Configuration Troubleshooting

You can perform basic troubleshooting of an IPv6 router by confirming that processes are running, examining the route table, and using the ping utility as shown in the following examples:

Send an ICMP echo request to a remote system to determine if you receive an ICMP echo response from the remote system. Do not attempt to communicate with the link-local address of a system across a router because routers do not forward link-local addresses.


# ping fec0::9255:a00:20ff:fec0:449d
fec0::9255:a00:20ff:fec0:449d is alive

# ping 2000::9255:a00:20ff:fec0:449d
2000::9255:a00:20ff:fec0:449d is alive


Managing IPv6

The tasks you use to manage IPv6 interfaces are similar to the tasks you use to manage IPv4 interfaces.

Displaying the State of IPv6 Interfaces

Use the ifconfig utility with the inet6 option to display the state of the IPv6 interfaces, for example:

# ifconfig -a inet6


lo0: flags=2000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6> mtu 8252 index 1
inet6 ::1/128


hme0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 2
inet6 fe80::a00:20ff:feb9:7223/10


hme0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 2000::9255:a00:20ff:feb9:7223/64


hme0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 2
inet6 fec0::9255:a00:20ff:feb9:7223/64


qfe0: flags=2100841<UP,RUNNING,MULTICAST,ROUTER,IPv6> mtu 1500 index 3
inet6 fe80::a00:20ff:feac:9b20/10


qfe0:1: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
inet6 2000::9256:a00:20ff:feac:9b20/64


qfe0:2: flags=2180841<UP,RUNNING,MULTICAST,ADDRCONF,ROUTER,IPv6> mtu 1500 index 3
inet6 fec0::9256:a00:20ff:feac:9b20/64



Modifying an IPv6 Interface Configuration

Use the ifconfig utility to modify IPv6 interface configuration in a similar manner to IPv4 interfaces. The family type of IPv6 must be defined in the command after the interface option, for example:

ifconfig hme0 inet6 configuration options

Caution – Be sure to specify the inet6 family, or the command changes the configuration of an IPv4 interface.

Configuring Logical Interfaces

You can configure logical IPv6 interfaces by using the ifconfig utility with the inet6 parameter like you do in IPv4, for example:

ifconfig qfe0:3 inet6 plumb configuration options

To remove the logical interface, disable the interface, and then use the unplumb parameter, for example:

# ifconfig qfe0:3 inet6 down unplumb
 

Troubleshooting IPv6 Interfaces

You troubleshoot IPv6 interfaces like you troubleshoot IPv4 interfaces. Recall that different FPs are required on addresses destined beyond the local subnet. Therefore, do not spend time attempting to determine why you cannot access a system on another subnet with an IPv6 address that starts with fe8.

Displaying the IPv6 Route Table

You use the netstat utility with the address-family -finet6 option to display the IPv6 route table, for example:

# netstat -f inet6 -r
 

Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If

fe80::/10 -v6 U 1 0 hme0
ff00::/8 -v6 U 1 0 hme0
default -v6 U 1 0 hme0
localhost localhost UH 1 0 lo0


Copyright © 1996-2008 by Dr. Nikolai Bezroukov. www.softpanorama.org was created as a service to the UN Sustainable Development Networking Programme (SDNP) in the author free time. Submit comments This document is an industrial compilation designed and created exclusively for educational use and is placed under the copyright of the Open Content License(OPL). Original materials copyright belong to respective owners. Quotes are made for educational purposes only in compliance with the fair use doctrine.

Standard disclaimer: The statements, views and opinions presented on this web page are those of the author and are not endorsed by, nor do they necessarily reflect, the opinions of the author present and former employers, SDNP or any other organization the author may be associated with. We do not warrant the correctness of the information provided or its fitness for any purpose.

Last modified: February 28, 2008