Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
  Previous   Contents   Next 
   
 
Chapter 16

IPv6 Files and Commands (Reference)

The Solaris implementation of IPv6 consists primarily of changes to the TCP/IP stack, both at the kernel and user level. New IPv6 modules enable tunneling, router discovery, and stateless address autoconfiguration. This chapter describes the concepts that are associated with the Solaris implementation of IPv6.

This chapter contains the following information:

Overview of the Solaris IPv6 Implementation

As a part of the IPv4 to IPv6 transition, IPv6 specifies methods for encapsulating IPv6 packets within IPv4 packets. IPv6 also specifies IPv6 packets that are encapsulated within IPv6 packets. Consequently, a new module, tun(7M), which performs the actual packet encapsulation, has been added. This module, which is known as the tunneling module, is plumbed and is configured by using the ifconfig utility the same as any physical interface. This module enables the tunneling module to be pushed between IP device and IP module. Tunneling devices also have entries in the system interface list.

The ifconfig(1M) utility is also modified. You use this utility to create the IPv6 stack. This utility also supports new parameters that are described in this chapter.

The in.ndpd(1M) daemon is added to perform router discovery and stateless address autoconfiguration.

IPv6 Network Interface Configuration File

IPv6 uses the file /etc/hostname6.interface at start up to automatically define network interfaces in the same way IPv4 uses /etc/hostname.interface. A minimum of one /etc/hostname.* or /etc/hostname6.* file should exist on the local machine. The Solaris installation program creates these files for you. In the file name, replace interface with the device name of the primary network interface.

The file name has the following syntax:

hostname.interface
hostname6.interface

Interface has the following syntax:

dev[.Module[.Module ...]]PPA

Dev

A network interface device. The device can be a physical network interface, such as le, qe, and so on, or a logical interface, such as a tunnel. See "Solaris Tunneling Interfaces for IPv6" for more details.

Module

The list of one or more streams modules to be pushed onto the device when the device is plumbed.

PPA

The physical point of attachment.

The syntax [.[.]] is also accepted.

The following list shows examples of valid file names:

hostname6.le0
hostname6.ip.tun0
hostname.ip.tun0

IPv6 Interface Configuration File Entry

The autoconfiguration of interfaces in IPv6 enables a node to compute its own link-local address that is based on its link-layer address. Consequently, the interface configuration file for IPv6 might not have an entry. In this instance, the startup scripts configure an interface. The node then "learns" of other addresses and prefixes through the neighbor discovery daemon, in.ndpd. If you require static addresses for an interface, use the ifconfig utility. Consequently, the address or host name is stored in /etc/hostname6.interface (or /etc/hostname.interface. The content is passed to ifconfig when the interface is configured.

In this instance, the file contains only one entry. The entry is the host name or IP address that is associated with the network interface. For example, suppose smc0 is the primary network interface for a machine that is called ahaggar. The /etc/hostname6.* file for the interface would have the name /etc/hostname6.smc0. The file would contain the entry ahaggar.

The networking start up script examines the number of interfaces and the existence of the /etc/inet/ndpd.conf file to start routing daemons and packet forwarding. See "How to Configure a Solaris IPv6 Router".

IPv6 Extensions to the ifconfig Utility

The ifconfig utility now enables IPv6 interfaces and the tunneling module to be plumbed. The ifconfig(1M) utility uses an extended set of ioctls to configure both IPv4 and IPv6 network interfaces. The following table shows the set of options that are added to this utility. See "How to Display Interface Address Assignments" for a description of useful diagnostic procedures that use this utility.

Table 16-1 New ifconfig Utility Options

Option

Description

index

Set the interface index.

tsrc/tdst

Set tunnel source or destination.

addif

Create the next available logical interface.

removeif

Delete a logical interface with a specific IP address.

destination

Set the point-to-point destination address for an interface.

set

Set an address, netmask, or both for an interface.

subnet

Set the subnet address of an interface.

xmit/-xmit

Enable or disable packet transmission on an interface.

"Enabling IPv6 Nodes" provides IPv6 configuration procedures.

Examples--New ifconfig Utility Options

The following usage of the ifconfig command creates the hme0:3 logical interface to the 1234::5678/64 IPv6 address. This command enables the interface with the up option. The command also reports status. The command disables the interface. Finally, the command deletes the interface.


Example 16-1 Examples--Using addif and removeif

# ifconfig hme0 inet6 addif 1234::5678/64 up
Created new logical interface hme0:3

# ifconfig hme0:3 inet6
hme0:3: flags=2000841<UP,RUNNING,MULTICAST,IPv6> mtu 1500 index 2
		inet6 1234::5678/64 

# ifconfig hme0:3 inet6 down

# ifconfig hme0 inet6 removeif 1234::5678

The following usage of the ifconfig command opens the device that is associated with the physical interface name. The command configures the streams that are needed for TCP/IP to use the device. The command reports the status of the device. The command configures the source and the destination address for the tunnel. Finally, the command reports the new status of the device after the configuration.


Example 16-2 Examples--Using tsrc/tdst and index

# ifconfig ip.tun0 inet6 plumb index 13

# ifconfig ip.tun0 inet6
ip.tun0: flags=2200850<POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 
1480 index 13
		inet tunnel src 0.0.0.0 
		inet6 fe80::/10 --> :: 

# ifconfig ip.tun0 inet6 tsrc 120.46.86.158 tdst 120.46.86.122

# ifconfig ip.tun0 inet6
ip.tun0: flags=2200850<POINTOPOINT,RUNNING,MULTICAST,NONUD,IPv6> mtu 
1480 index 13
		inet tunnel src 120.46.86.158  tunnel dst 120.46.86.122
		inet6 fe80::8192:569e/10 --> fe80::8192:567a

 
 
 
  Previous   Contents   Next