<chapter id="ipconfig-1"><title>Configuring TCP/IP
Network Services and IPv4 Addressing (Tasks)</title><highlights><para>TCP/IP network administration evolves in two stages. The first stage
is to assemble the hardware. Then, you configure the daemons, files, and services
that implement the TCP/IP protocol.</para><para>This chapter explains how to configure TCP/IP on a network that implements
IPv4 addressing and services.</para><note><para>Many of the tasks in this chapter apply to both IPv4-only and
IPv6-enabled networks. Where configuration tasks differ between the two addressing
formats, the IPv4 configuration steps are in this chapter. The tasks in this chapter then cross
reference
the equivalent IPv6 tasks in <olink targetptr="ipv6-config-tasks-1" remap="internal">Chapter&nbsp;7, Enabling
IPv6 on a Network (Tasks)</olink>.</para>
</note><para>This chapter contains the following information:</para><itemizedlist><listitem><para><olink targetptr="ipconfig-2a" remap="internal">Before You Configure an IPv4
Network (Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ipconfig-3" remap="internal">Determining Host Configuration
Modes</olink></para>
</listitem><listitem><para><olink targetptr="ipconfig-2" remap="internal">Adding a Subnet to a Network
(Task Map)</olink></para>
</listitem><listitem><para><olink targetptr="ipconfig-63" remap="internal">Configuring Systems on the
Local Network </olink></para>
</listitem><listitem><para><olink targetptr="ipconfig-4" remap="internal">Network Configuration Task Map</olink></para>
</listitem><listitem><para><olink targetptr="gcvjj" remap="internal">Packet Forwarding and Routing on
IPv4 Networks</olink></para>
</listitem><listitem><para><olink targetptr="ipconfig-111" remap="internal">Monitoring and Modifying Transport
Layer Services</olink></para>
</listitem>
</itemizedlist>
</highlights><sect1 id="gcwwj"><title>What's New in This Chapter</title><para>In Solaris Express, Developer Edition 2/07 and subsequent releases, you can configure and manage routing through
the Service Management Facility (SMF) as an alternative to using the <command>routeadm</command> command.
For instructions,
refer to the procedures and examples in <olink targetptr="gcvjj" remap="internal">Packet
Forwarding and Routing on IPv4 Networks</olink>and the <olink targetdoc="refman1m" targetptr="routeadm-1m" remap="external"><citerefentry><refentrytitle>routeadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</sect1><sect1 id="ipconfig-2a"><title>Before You Configure an IPv4 Network
(Task Map)</title><para>Before you configure TCP/IP, complete the tasks that are listed
in the following table. </para><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colname="colspec0" colwidth="50.00*"/><colspec colwidth="50*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Design the network topology.</para>
</entry><entry><para>Determine the physical layout of the network.</para>
</entry><entry><para><olink targetptr="ipplan-38" remap="internal">Network Topology Overview</olink>.</para>
</entry>
</row><row><entry><para>2. Obtain a network number from your ISP or Regional Internet Registry
(RIR).</para>
</entry><entry><para>Get a registered network number, which enables systems at your site
to communicate externally.</para>
</entry><entry><para><olink targetptr="exlxp" remap="internal">Designing Your IPv4 Addressing Scheme</olink>.</para>
</entry>
</row><row><entry><para>3. Plan the IPv4 addressing scheme for the network. If applicable, include
subnet addressing.</para>
</entry><entry><para>Use the network number as the basis for your addressing plan.</para>
</entry><entry><para><olink targetptr="exlxp" remap="internal">Designing Your IPv4 Addressing Scheme</olink>.</para>
</entry>
</row><row><entry><para>4. Assemble the network hardware depending on the network topology.
Assure that the hardware is functioning properly.</para>
</entry><entry><para>Set up the systems, network media, routers, switches, hubs and bridges
that you outlined in the network topology design.</para>
</entry><entry><para>The hardware manuals and <olink targetptr="ipplan-38" remap="internal">Network Topology
Overview</olink>.</para>
</entry>
</row><row><entry><para>5. Assign IPv4 addresses and host names to all systems in the network.</para>
</entry><entry><para>Assign the IPv4 addresses during Solaris OS installation or post installation,
in the appropriate files.</para>
</entry><entry><para> <olink targetptr="exlxp" remap="internal">Designing Your IPv4 Addressing Scheme</olink> and <olink targetptr="gbwxb" remap="internal">How to Change the IPv4 Address and Other Network Configuration
Parameters</olink></para>
</entry>
</row><row><entry><para>6. Run configuration software that is required by network interfaces
and routers, if applicable.</para>
</entry><entry><para>Configure routers and multihomed hosts.</para>
</entry><entry><para><olink targetptr="ipplan-37" remap="internal">Planning for Routers on Your Network</olink> and <olink targetptr="ipconfig-116" remap="internal">Configuring an IPv4 Router</olink> for information
on routers.</para>
</entry>
</row><row><entry><para>7. Determine which name service or directory service your network uses:
NIS, LDAP, DNS, or local files.</para>
</entry><entry><para>Configure your selected name service and/or directory service.</para>
</entry><entry><para><olink targetdoc="sysadv5" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)</citetitle></olink>.</para>
</entry>
</row><row><entry><para>8. Select domain names for your network, if applicable.</para>
</entry><entry><para>Choose a domain name for your network and register it with the InterNIC.</para>
</entry><entry><para><olink targetdoc="sysadv5" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)</citetitle></olink> </para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ipconfig-3"><title>Determining Host Configuration Modes</title><para>As a network administrator, you configure TCP/IP to run on hosts
and routers (if applicable). You can configure these systems to obtain configuration
information from files on the local system or from files that are located
on other systems on the network. You need the following configuration information: </para><itemizedlist><listitem><para>Host name of each system</para>
</listitem><listitem><para>IP address of each system</para>
</listitem><listitem><para>Domain name to which each system belongs</para>
</listitem><listitem><para>Default router</para>
</listitem><listitem><para>IPv4 netmask in use on each system's network</para>
</listitem>
</itemizedlist><para>A system that obtains TCP/IP configuration information from local
files operates in <emphasis>local files mode</emphasis>. A system that obtains
TCP/IP configuration information from a remote network server operates in <emphasis>network client mode</emphasis>.</para><sect2 id="ipconfig-4a"><title>Systems That Should Run in Local Files Mode</title><para>To run in local files mode, a system must have local copies of
the TCP/IP configuration files. These files are described in <olink targetptr="ipconfig-12" remap="internal">TCP/IP Configuration Files</olink>. The system should
have its own disk, though this recommendation is not strictly necessary.</para><para>Most servers should run in local files mode. This requirement includes
the following servers:</para><itemizedlist><listitem><para>Network configuration servers</para>
</listitem><listitem><para>NFS servers</para>
</listitem><listitem><para>Name servers that supply NIS, LDAP, or DNS services</para>
</listitem><listitem><para>Mail servers</para>
</listitem>
</itemizedlist><para>Additionally, routers should run in local files mode. </para><para>Systems that function exclusively as print servers do not need to run
in local files mode. Whether individual hosts should run in local files mode
depends on the size of your network.</para><para>If you are running a very small network, the amount of work that is
involved in maintaining these files on individual hosts is manageable. If
your network serves hundreds of hosts, the task becomes difficult, even with
the network divided into a number of administrative subdomains. Thus, for
large networks, using local files mode is usually less efficient. However,
because routers and servers must be self-sufficient, they should be configured
in local files mode.</para><sect3 id="ipconfig-5"><title>Network Configuration Servers</title><para><emphasis>Network configuration servers</emphasis> are the servers
that supply the TCP/IP configuration information to hosts that are configured
in network client mode. These servers support three booting protocols: </para><itemizedlist><listitem><para>RARP &ndash; Reverse Address Resolution Protocol (RARP) maps Ethernet
addresses (48 bits) to IPv4 addresses (32 bits), which is the reverse of ARP.
When you run RARP on a network configuration server, hosts that are running
in network client mode obtain their IP addresses and TCP/IP configuration
files from the server. The <command>in.rarpd</command> daemon enables RARP
services. Refer to the <olink targetdoc="refman1m" targetptr="in.rarpd-1m" remap="external"><citerefentry><refentrytitle>in.rarpd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page for details. </para>
</listitem><listitem><para>TFTP &ndash; The Trivial File Transfer Protocol (TFTP) is an application
that transfers files between remote systems. The <command>in.tftpd</command> daemon
executes TFTP services, enabling file transfer between network configuration
servers and their network clients. Refer to the <olink targetdoc="refman1m" targetptr="in.tftpd-1m" remap="external"><citerefentry><refentrytitle>in.tftpd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page for details.</para>
</listitem><listitem><para>Bootparams &ndash; The Bootparams protocol supplies parameters
for booting that are required by clients that boot off the network. The <command>rpc.bootparamd</command> daemon executes these services. Refer to the <olink targetdoc="refman1m" targetptr="bootparamd-1m" remap="external"><citerefentry><refentrytitle>bootparamd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page
for details.</para>
</listitem>
</itemizedlist><para>Network configuration servers can also function as NFS file servers.</para><para>If you are configuring any hosts as network clients, then you
must also configure at least one system on your network as a network configuration
server. If your network is subnetted, then you must have at least one network
configuration server for each subnet with network clients. </para>
</sect3>
</sect2><sect2 id="ipconfig-6a"><title>Systems That Are Network Clients</title><para>Any host that obtains its configuration information from a network
configuration server operates in network client mode. Systems that are configured
as network clients do not require local copies of the TCP/IP configuration
files. </para><para><emphasis>Network client mode</emphasis> simplifies administration of
large networks. Network client mode minimizes the number of configuration
tasks that you perform on individual hosts. Network client mode assures that
all systems on the network adhere to the same configuration standards.</para><para>You can configure network client mode on all types of computers.
For example, you can configure network client mode on standalone systems.</para>
</sect2><sect2 id="ipconfig-8"><title>Mixed Configurations</title><para>Configurations are not limited to either an all-local-files mode
or an all-network-client mode. Routers and servers should always be configured
in local mode. For hosts, you can use any combination of local files and network
client mode. </para>
</sect2><sect2 id="ipconfig-9"><title>IPv4 Network Topology Scenario</title><para><olink targetptr="ipconfig-fig-10" remap="internal">Figure 5&ndash;1</olink> shows
the hosts of a fictitious network with the network number <literal>192.9.200</literal>.
The network has one network configuration server, which is called <literal>sahara</literal>. Hosts <literal>tenere</literal> and <literal>nubian</literal> have
their own disks and run in local files mode. Host <literal>faiyum</literal> also
has a disk, but this system operates in network client mode. </para><para>Finally, the system <literal>timbuktu</literal> is configured as a router.
The system includes two network interfaces. The first interface is named <literal>timbuktu</literal>. This interface belongs to network <literal>192.9.200</literal>.
The second interface is named <literal>timbuktu-201</literal>. This interface
belongs to network <literal>192.9.201</literal>. Both networks are in the
organizational domain <filename>deserts.worldwide.com</filename>. The domain
uses local files as its name service.</para><figure id="ipconfig-fig-10"><title>Hosts in an IPv4 Network Topology Scenario</title><mediaobject><imageobject><imagedata entityref="fig195.epsi"/>
</imageobject><textobject><simpara>Diagram shows a sample network with one network server
that serves four hosts.</simpara>
</textobject>
</mediaobject>
</figure>
</sect2>
</sect1><sect1 id="ipconfig-2"><title>Adding a Subnet to a Network (Task Map)</title><para>If you are changing from a network that does not use a subnet
to a network that does use a subnet, perform the tasks in the following task
map.</para><note><para>The information in this section applies to IPv4 subnets only.
For information on planning IPv6 subnets, refer to <olink targetptr="ipv6-planning-16" remap="internal">Preparing the Network Topology for IPv6 Support</olink> and <olink targetptr="ipv6-planning-22" remap="internal">Creating a Numbering Scheme for Subnets</olink>.</para>
</note><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colname="colspec0" colwidth="50.00*"/><colspec colwidth="50*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>1. Determine if your network topology requires subnets.</para>
</entry><entry><para>Decide on the new subnet topology, including where to locate routers
and hosts on the subnets.</para>
</entry><entry><para><olink targetptr="ipplan-37" remap="internal">Planning for Routers on Your Network</olink>, <olink targetptr="ipconfig-31" remap="internal">What Is Subnetting?</olink>, and <olink targetptr="ipref-4" remap="internal">Network Classes</olink></para>
</entry>
</row><row><entry><para>2. Assign the IP addresses with the new subnet number to the systems
to become members of the subnet.</para>
</entry><entry><para>Configure IP addresses that use the new subnet number, either during
Solaris OS installation or later, in the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file.</para>
</entry><entry><para><olink targetptr="ipplan-4" remap="internal">Deciding on an IP Addressing Format for
Your Network</olink></para>
</entry>
</row><row><entry><para>3. Configure the network mask of the subnet on all prospective systems
in the subnet.</para>
</entry><entry><para> Modify the <filename>/etc/inet/netmasks</filename> file, if you are
manually configuring network clients. Or, supply the netmask to the Solaris
installation program.</para>
</entry><entry><para><olink targetptr="ipconfig-30" remap="internal">netmasks Database</olink> and <olink targetptr="ipconfig-32" remap="internal">Creating the Network Mask for IPv4 Addresses</olink></para>
</entry>
</row><row><entry><para>4. Edit the network databases with the new IP addresses of all systems
in the subnet.</para>
</entry><entry><para>Modify  <filename>/etc/inet/hosts</filename>  on all hosts to reflect
the new host addresses.</para>
</entry><entry><para><olink targetptr="ipconfig-18" remap="internal">hosts Database</olink></para>
</entry>
</row><row><entry><para>5. Reboot all systems.</para>
</entry><entry>
</entry><entry>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ipconfig-4"><title>Network Configuration Task Map</title><informaltable frame="all"><tgroup cols="3" colsep="1" rowsep="1"><colspec colwidth="50*"/><colspec colwidth="50*"/><colspec colname="colspec0" colwidth="50.00*"/><thead><row><entry><para>Task</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Configure a host for local files mode</para>
</entry><entry><para>Involves editing the <filename>nodename</filename>, <filename>hostname</filename>, <filename>hosts</filename>, <filename>defaultdomain</filename>, <filename>defaultrouter</filename>,
and <filename>netmasks</filename> files</para>
</entry><entry><para><olink targetptr="ipconfig-64" remap="internal">How to Configure a Host for Local Files
Mode</olink></para>
</entry>
</row><row><entry><para>Set up a network configuration server</para>
</entry><entry><para>Involves turning on the <filename>in.tftp</filename> daemon, and editing
the <filename>hosts</filename>, <filename>ethers</filename>, and <filename>bootparams</filename> files</para>
</entry><entry><para><olink targetptr="ipconfig-79" remap="internal">How to Set Up a Network Configuration
Server</olink></para>
</entry>
</row><row><entry><para>Configure a host for network client mode</para>
</entry><entry><para>Involves creating the <filename>hostname</filename> file, editing the <filename>hosts</filename> file, and deleting the <filename>nodename</filename> and <filename>defaultdomain</filename> files, if they exist</para>
</entry><entry><para><olink targetptr="ipconfig-90" remap="internal">How to Configure Hosts for Network Client
Mode</olink></para>
</entry>
</row><row><entry><para>Specify a routing strategy for the network client</para>
</entry><entry><para>Involves determining whether to use static routing or dynamic routing
on the host.</para>
</entry><entry><para><olink targetptr="ipconfig-125" remap="internal">How to Enable Static Routing on a Single-Interface Host</olink> and <olink targetptr="ipconfig-15" remap="internal">How to Enable Dynamic Routing on a Single-Interface
Host</olink>.</para>
</entry>
</row><row><entry><para>Modify the existing network configuration </para>
</entry><entry><para>Involves changing the host name, IP address, and other parameters that
were set at installation or configured at a later time.</para>
</entry><entry><para><olink targetptr="gbwxb" remap="internal">How to Change the IPv4 Address and Other Network
Configuration Parameters</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</sect1><sect1 id="ipconfig-63"><title>Configuring Systems on the Local Network </title><para>Network software installation occurs along with the installation of
the operating system software. At that time, certain IP configuration parameters
must be stored in appropriate files so that they can be read at boot time. </para><para>The network configuration process involves creating or editing the network
configuration files. How configuration information is made available to a
system's kernel is conditional. The availability depends on whether these
files are stored locally (local files mode) or acquired from the network configuration
server (network client mode).</para><para>The parameters that are supplied during network configuration
follow: </para><itemizedlist><listitem><para>The IP address of each network interface on every system.</para>
</listitem><listitem><para>The host names of each system on the network. You can type
the host name in a local file or a name service database.</para>
</listitem><listitem><para>The NIS, LDAP, or DNS domain name in which the system resides,
if applicable.</para>
</listitem><listitem><para>The default router addresses. You supply this information if you
have a simple network topology with only one router attached to each network.
You also supply this information if your routers do not run routing protocols
such as the Router Discovery Server Protocol (RDISC) or the Router Information
Protocol (RIP). For more information on default routers, refer to <olink targetptr="gcvjj" remap="internal">Packet Forwarding and Routing on IPv4 Networks</olink> See <olink targetptr="gcxiw" remap="internal">Table 5&ndash;1</olink> for a list of routing protocols
supported in the Solaris OS.</para>
</listitem><listitem><para>Subnet mask (required only for networks with subnets).</para>
</listitem>
</itemizedlist><para>If the Solaris installation program detects more one interface on the
system, you can optionally configure the additional interfaces during installation.
For complete instructions, see <olink targetdoc="solarisinstall" remap="external"><citetitle remap="book">Solaris Express Installation Guide: Basic Installations</citetitle></olink>.</para><para>This chapter contains information on creating and editing local configuration
files. See <olink targetdoc="sysadv5" remap="external"><citetitle remap="book">System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP)</citetitle></olink> for
information on working with name service databases.</para><task id="ipconfig-64"><title>How to Configure a Host for Local Files Mode</title><tasksummary><para>Use this procedure for configuring TCP/IP on a host that runs in local
files mode. </para>
</tasksummary><procedure><step id="ipconfig-step-66a"><para>Assume the Primary Administrator role,
or become superuser </para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Change to the <filename>/etc</filename> directory.</para>
</step><step id="ipconfig-step-67"><para>Verify that the correct host name is set
in the <filename>/etc/nodename</filename> file.</para><para>When you specify
the host name of a system during Solaris installation, that host name is entered
into the <filename>/etc/nodename</filename> file. Make sure that the node
name entry is the correct host name for the system.</para>
</step><step id="ipconfig-step-68a"><para>Verify that an <filename>/etc/hostname</filename>.<replaceable>interface</replaceable> file exists for each network interface on the system.</para><para>For file syntax and basic information about the <filename>/etc/hostname</filename>.<replaceable>interface</replaceable> file, refer to <olink targetptr="fpcwh" remap="internal">Basics for
Administering Physical Interfaces</olink>.</para><para>The Solaris installation
program requires you to configure at least one interface during installation.
The first interface that you configure automatically becomes the <emphasis>primary
network interface</emphasis>. The installation program creates an <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file for the primary network
interface and any other interfaces that you optionally configure at installation
time. </para><para>If you configured additional interfaces during installation,
verify that each interface has a corresponding <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file. You do not need to configure more than one interface
during Solaris installation. However, if you later want to add more interfaces
to the system, you must manually configure them.</para><para>For steps for
manually configuring interfaces, refer to  <olink targetptr="fpdcn" remap="internal">How to Configure a Physical Interface After System Installation</olink>, for releases starting with Solaris 10 1/06.</para>
</step><step id="ipconfig-step-70"><para>Verify that the entries in the <filename>/etc/inet/hosts</filename> file
are current.</para><para>The Solaris installation program creates entries
for the primary network interface, loopback address, and, if applicable, any
additional interfaces that were configured during installation.</para><substeps><step><para>Make sure that the existing entries in <filename>/etc/inet/hosts</filename> are
current.</para>
</step><step id="ipconfig-step-71"><para>(Optional) Add the IP addresses and corresponding
names for any network interfaces that were added to the local host after installation.</para>
</step><step id="ipconfig-step-72"><para>(Optional) Add the IP address or addresses
of the file server, if the <filename>/usr</filename> file system is NFS mounted.</para>
</step>
</substeps>
</step><step id="ipconfig-step-73"><para>Type the host's fully qualified domain name in the <filename>/etc/defaultdomain</filename> file. </para><para>For example, suppose host <literal>tenere</literal> was
part of the domain <literal>deserts.worldwide.com</literal>. Therefore, you
would type <filename>deserts.worldwide.com</filename> in <filename>/etc/defaultdomain</filename>. See <olink targetptr="ipconfig-16" remap="internal">/etc/defaultdomain File</olink> for
more information.</para>
</step><step id="ipconfig-step-74"><para>Type the router's name in the <filename>/etc/defaultrouter</filename> file. </para><para>See <olink targetptr="ipconfig-17" remap="internal">/etc/defaultrouter File</olink> for
information about this file.</para>
</step><step id="ipconfig-step-75"><para>Type the name of the default router and
its IP addresses in the <filename>/etc/inet/hosts</filename> file. </para><para>Additional
routing options are available, as discussed in <olink targetptr="ipconfig-90" remap="internal">How
to Configure Hosts for Network Client Mode</olink>. You can apply these options
to a local files mode configuration.</para>
</step><step id="ipconfig-step-76"><para>Add the network mask for your network, if applicable:</para><itemizedlist><listitem><para>If the host gets its IP address from a DHCP server, you do
not have to specify the network mask.</para>
</listitem><listitem><para>If you have set up a NIS server on the same network as this
client, you can add <filename>netmask</filename> information into the appropriate
database on the server. </para>
</listitem><listitem><para>For all other conditions, do the following:</para>
</listitem>
</itemizedlist><substeps><step><para>Type the network number and the netmask in the <filename>/etc/inet/netmasks</filename> file.</para><para>Use the following format:</para><screen>network-number netmask</screen><para>For example, for the Class C network number <literal>192.168.83</literal>,
you would type:</para><screen><userinput>192.168.83.0    255.255.255.0</userinput></screen><para>For CIDR addresses, convert the network prefix into the equivalent dotted
decimal representation. Network prefixes and their dotted decimal equivalents
can be found in <olink targetptr="extkp" remap="internal">Table 2&ndash;3</olink>. For example,
use the following to express the CIDR network prefix <literal>192.168.3.0/22</literal>.</para><screen>192.168.3.0 255.255.252.0</screen>
</step><step><para>Change the lookup order for netmasks in <filename>/etc/nsswitch.conf</filename>,
so that local files are searched first:</para><screen>netmasks:   files nis</screen>
</step>
</substeps>
</step><step id="ipconfig-step-77"><para>Reboot the system. </para>
</step>
</procedure>
</task><task id="ipconfig-79"><title>How to Set Up a Network Configuration Server</title><tasksummary><para>Information for setting up installation servers and boot servers is
found in <olink targetdoc="solarisinstall" remap="external"><citetitle remap="book">Solaris Express Installation Guide: Basic Installations</citetitle></olink>.</para>
</tasksummary><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Change to the root (<literal>/</literal>) directory of the prospective
network configuration server.</para>
</step><step id="ipconfig-step-82"><para>Turn on the <command>in.tftpd</command> daemon by creating the
directory <filename>/tftpboot</filename>: </para><screen># <userinput>mkdir /tftpboot</userinput></screen><para>This command configures the system as a TFTP, bootparams, and RARP server.</para>
</step><step id="ipconfig-step-83"><para>Create a symbolic link to the directory.</para><screen># <userinput>ln -s /tftpboot/. /tftpboot/tftpboot</userinput></screen>
</step><step id="ipconfig-step-84"><para>Enable the <literal>tftp</literal> line
in the <filename>/etc/inetd.conf</filename> file. </para><para>Check that
 the entry reads as follows:</para><screen>tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot</screen><para>This line prevents <command>in.tftpd</command> from retrieving any file
other than the files that are located in <filename>/tftpboot</filename>.</para>
</step><step id="ipconfig-step-85"><para>Edit the <filename>hosts</filename> database.</para><para>Add the host names and IP addresses for every client on the network.</para>
</step><step id="ipconfig-step-86"><para>Edit the <filename>ethers</filename> database.</para><para>Create entries for every host on the network that runs in network client
mode.</para>
</step><step id="ipconfig-step-87"><para>Edit the <filename>bootparams</filename> database.</para><para>See <olink targetptr="ipconfig-51" remap="internal">bootparams Database</olink>.
Use the wildcard entry or create an entry for every host that runs in network
client mode.</para>
</step><step><para>Convert the <filename>/etc/inetd.conf</filename> entry into a
Service Management Facility (SMF) service  manifest, and enable the resulting
service:</para><screen># <userinput>/usr/sbin/inetconv</userinput></screen>
</step><step><para>Verify that <command>in.tftpd</command> is working correctly.</para><screen># <userinput>svcs network/tftp/udp6</userinput></screen><para>You should receive output resembling the following:</para><screen>STATE          STIME    FMRI
online         18:22:21 svc:/network/tftp/udp6:default</screen>
</step>
</procedure><taskrelated-custom><title>Administering the <command>in.tftpd</command>Daemon</title><para>The <command>in.tftpd</command> daemon is managed by the Service
Management Facility.  Administrative actions on <command>in.tftpd</command>,
such as enabling, disabling, or restarting, can be performed using 	the <command>svcadm</command> command. Responsibility for initiating and restarting  this
service is delegated to <command>inetd</command>. Use the <command>inetadm</command> command
to make configuration changes and to view configuration  information for <command>in.tftpd</command>.  You can query the service's status  by using the <command>svcs</command> command. For an overview of the Service Management Facility, refer
to <olink targetdoc="sysadv1" targetptr="hbrunlevels-25516" remap="external">Chapter 14, <citetitle remap="chapter">Managing Services (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</taskrelated-custom>
</task><sect2 id="ipconfig-89"><title>Configuring Network Clients</title><para>Network clients receive their configuration information from network
configuration servers. Therefore, before you configure a host as a network
client you must ensure that at least one network configuration server is set
up for the network. </para>
</sect2><task id="ipconfig-90"><title>How to Configure Hosts for Network Client Mode</title><tasksummary><para>Do the following procedure on each host to be configured in network
client mode. </para>
</tasksummary><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="ipconfig-step-93"><para>Search the <filename>/etc</filename> directory for the <filename>nodename</filename> file. </para><para>If such a file exists, delete it.</para><para>Eliminating <filename>/etc/nodename</filename> causes the system to use the <command>hostconfig</command> program
to obtain the host name, domain name, and router addresses from the network
configuration server. See <olink targetptr="ipconfig-63" remap="internal">Configuring Systems
on the Local Network </olink>.</para>
</step><step id="ipconfig-step-94"><para>Create the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file,
if it does not exist. </para><para>Ensure that the file is empty. An empty <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file causes
the system to acquire the IPv4 address from the network configuration server. </para>
</step><step id="ipconfig-step-95"><para>Ensure that the <filename>/etc/inet/hosts</filename> file contains
only the <literal>localhost</literal> name and IP address of the loopback
network interface. </para><screen># <userinput>cat /etc/inet/hosts</userinput>
# Internet host table
#
127.0.0.1       localhost</screen><para>The IPv4 loopback interface has the IP address <literal>127.0.0.1</literal>.</para><para>For more information, see <olink targetptr="ipconfig-22" remap="internal">Loopback Address</olink>. The file should not contain the IP address and host
name for the local host (primary network interface). </para>
</step><step id="ipconfig-step-96"><para>Check for the existence of an <filename>/etc/defaultdomain</filename> file.</para><para>If such a file exists, delete it.</para><para>The <filename>hostconfig</filename> program automatically sets
the domain name. To override the domain name that is set by <filename>hostconfig</filename>,
type the substitute domain name in the <filename>/etc/defaultdomain</filename> file. </para>
</step><step id="ipconfig-step-97"><para>Ensure that the search paths in the client's <filename>/etc/nsswitch.conf</filename> file reflect the name service requirements for your network. </para>
</step>
</procedure>
</task><task id="gbwxb"><title>How to Change the IPv4 Address and Other Network Configuration
Parameters</title><tasksummary><para>This procedure explains how to modify the IPv4 address, host name, and
other network parameters on a previously installed system. Use the procedure
for modifying the IP address of a server or networked standalone system. The
procedure does not apply to network clients or appliances. The steps create
a configuration that persists across reboots. </para><note><para>The instructions apply specifically to changing the IPv4 address
of the primary network interface. To add another interface to the system,
refer to <olink targetptr="fpdcn" remap="internal">How to Configure a Physical Interface After
System Installation</olink>.</para>
</note><para>In almost all cases, the following steps use traditional IPv4 dotted
decimal notation to specify the IPv4 address and subnet mask. Alternatively,
you can use CIDR notation to specify the IPv4 address in all the applicable
files in this procedure. For an introduction to CIDR notation, see <olink targetptr="eyhxz" remap="internal">IPv4 Addresses in CIDR Format</olink>. </para>
</tasksummary><procedure><step><para>Assume the Primary Administrator role, or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>If the system's host name must change, modify the host name entry
in the <filename>/etc/nodename</filename> file.</para>
</step><step><para>Modify the IP address and, if applicable, the host name in the <filename>/etc/inet/hosts</filename> file or equivalent <filename>hosts</filename> database.</para>
</step><step><para>Modify the IP address in the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file for the primary network interface.</para><para>You
can use any of the following as the entry for the primary network interface
in the <filename>/etc/hostname</filename><replaceable>interface</replaceable> file:</para><itemizedlist><listitem><para>IPv4 address, expressed in traditional dotted decimal format</para><para>Use the following syntax:</para><screen><replaceable>IPv4 address</replaceable>
(Optional) <replaceable>subnet mask</replaceable></screen><para>Here is an example:</para><screen># <userinput>vi hostname.eri0</userinput>
10.0.2.5
netmask + 255.0.0.0</screen><para>The netmask entry is optional. If you do not specify it, the default
netmask is assumed.</para>
</listitem><listitem><para>IPv4 address, expressed in CIDR notation, if appropriate for
your network configuration.</para><screen><replaceable>IPv4 address/network prefix</replaceable></screen><para>Here is an example:</para><screen># <userinput>vi hostname.eri0</userinput>
10.0.2.5/8</screen><para>The CIDR prefix designates the appropriate netmask for the IPv4 address.
For example, the /8 above indicates the netmask 255.0.0.0.</para>
</listitem><listitem><para>Host name.</para><para>To use the system's host name in the <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file, be sure
that the host name and associated IPv4 address are also in the <filename>hosts</filename> database.</para>
</listitem>
</itemizedlist>
</step><step><para>If the subnet mask has changed, modify the subnet entries in the
following files:</para><itemizedlist><listitem><para><filename>/etc/netmasks</filename></para>
</listitem><listitem><para>(Optional) <filename>/etc/hostname.</filename><replaceable>interface</replaceable></para>
</listitem>
</itemizedlist>
</step><step><para>If the subnet address has changed, change the IP address of the
default router in <filename>/etc/defaultrouter</filename> to that of the new
subnet's default router.</para>
</step><step><para>Reboot the system.</para><screen># <userinput>reboot -- -r</userinput></screen>
</step>
</procedure><example id="gbyga"><title>Modifying the IPv4 Address and Other Network Parameters to Persist
Across Reboots</title><para>This example shows how to change the following network parameters of
a system that is moved to another subnet:</para><itemizedlist><listitem><para>IP address for the primary network interface <literal>eri0</literal> changes
from <literal>10.0.0.14</literal> to <literal>192.168.55.14</literal>.</para>
</listitem><listitem><para>Host name changes from <literal>myhost</literal> to <literal>mynewhostname</literal>.</para>
</listitem><listitem><para>Netmask changes from <literal>255.0.0.0</literal> to <literal>255.255.255.0</literal>.</para>
</listitem><listitem><para>Default router address changes to <literal>192.168.55.200</literal>.</para>
</listitem>
</itemizedlist><para>Check the system's current status:</para><screen># <userinput>hostname</userinput>
myhost
<userinput># ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 </screen><para>Next, change the system's host name and the IP address of <literal>eri0</literal> in
the appropriate files:</para><screen># <userinput>vi /etc/nodename
mynewhostname</userinput>
# <userinput>vi /etc/inet/hosts
#
# Internet host table
#
127.0.0.1       localhost
192.168.55.14   mynewhostname        loghost</userinput>
# <userinput>vi /etc/hostname.eri0
192.168.55.14
netmask + 255.255.255.0</userinput></screen><para>Finally, change the netmask and the IP address of the default router.</para><screen># <userinput>vi /etc/netmasks</userinput>.
.
.
<userinput>192.168.55.0    255.255.255.0</userinput>
# <userinput>vi /etc/defaultrouter</userinput>
<userinput>192.168.55.200        #moved system to 192.168.55 net</userinput>
#</screen><para>After making these changes, reboot the system.</para><screen># <userinput>reboot -- -r</userinput></screen><para>Verify that the configuration you just set is maintained after the reboot:</para><screen># <userinput>hostname</userinput>
mynewhostname
# <userinput>ifconfig -a</userinput>

lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.55.14 netmask ffffff00 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 </screen>
</example><example id="gbyge"><title>Changing the IP Address and Host Name For the Current Session</title><para>This example shows how to change a host's name, IP address of the primary
network interface, and subnet mask for the current session only. If you reboot,
the system reverts to its previous IP address and subnet mask. The IP address
for the primary network interface <literal>eri0</literal> changes from <literal>10.0.0.14</literal> to <literal>192.168.34.100</literal>.</para><screen><userinput># ifconfig -a</userinput>lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
# <userinput>ifconfig eri0 192.168.34.100 netmask 255.255.255.0 broadcast + up</userinput>
# <userinput>vi /etc/nodename</userinput>
mynewhostname

# <userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.34.100 netmask ffffff00 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
<userinput># hostname</userinput>
mynewhostname</screen>
</example><example id="gcans"><title>Changing the IPv4 Address for the Current Session, Using CIDR Notation</title><para>This example shows how to change a host name and IP address for the
current session only, using CIDR notation. If you reboot, the system reverts
to its previous IP address and subnet mask. The IP address for the primary
network interface, <literal>eri0</literal>, changes from <literal>10.0.0.14</literal> to <literal>192.168.6.25/27</literal>.</para><screen><userinput># ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.0.14 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
# <userinput>ifconfig eri0 192.168.6.25/27 broadcast + up</userinput>
# <userinput>vi /etc/nodename</userinput>
mynewhostname
# <userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
eri0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.06.25 netmask ffffffe0 broadcast 10.255.255.255
        ether 8:0:20:c1:8b:c3 
<userinput># hostname</userinput>
mynewhostname</screen><para>When you use CIDR notation for the IPv4 address, you do not have to
specify the netmask. <command>ifconfig</command> uses the network prefix designation
to determine the netmask. For example, for the <literal>192.168.6.0/27</literal> network,
 <command>ifconfig</command> sets the netmask <literal>ffffffe0</literal>.
If you had used the more common <literal>/24</literal> prefix designation,
the resulting netmask is <literal>ffffff00</literal>. Using the <literal>/24</literal> prefix
designation is the equivalent of specifying the netmask <command>255.255.255.0</command> to <command>ifconfig</command> when configuring a new IP address.</para>
</example><taskrelated role="see-also"><para>To change the IP address of an interface other than the primary network
interface, refer to <olink targetdoc="sysadv1" remap="external"><citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink> and <olink targetptr="fpdcn" remap="internal">How to Configure a Physical Interface After System Installation</olink>.</para>
</taskrelated>
</task>
</sect1><sect1 id="gcvjj"><title>Packet Forwarding and Routing on IPv4 Networks</title><para>This section contains
procedures and examples that show how to configure forwarding and routing
for routers and hosts on IPv4 networks.</para><para><emphasis>Packet forwarding</emphasis> is the basic method for
sharing information across systems on a network. Packets are transferred between
a source interface and a destination interface, usually on two different systems.
When you issue a command or send a message to a nonlocal interface, your system
forwards those packets onto the local network. The interface with the destination
IP address that is specified in the packet headers then retrieves the packets
from the local network. If the destination address is not on the local network,
the packets are then forwarded to the next adjacent network, or <emphasis>hop</emphasis>.
By default, packet forwarding is automatically configured when you install
the Solaris OS.</para><para><emphasis>Routing</emphasis> is the process by which systems decide
where to send a packet. Routing protocols on a system &ldquo;discover&rdquo;
the other systems on the local network. When the source system and the destination system are
on the same local network, the path that packets travel between them is called
a <emphasis>direct route</emphasis>. If a packet must travel at least one
hop beyond its source system, the path between the source system and destination system is called
an <emphasis>indirect route</emphasis>. The routing protocols learn the path
to a destination interface and retain data about known routes in the system's <emphasis>routing table</emphasis>. </para><para><emphasis>Routers</emphasis> are specially configured systems
with multiple physical interfaces that connect the router to more than one
local network. Therefore, the router can forward packets beyond the home LAN,
regardless of whether the router runs a routing protocol. For more information
about how routers forward packets, refer to <olink targetptr="ipplan-37" remap="internal">Planning
for Routers on Your Network</olink>. </para><para><emphasis>Routing protocols</emphasis> handle routing activity on a system and, by exchanging routing information with other hosts, maintain
known routes to remote networks. Both routers
and hosts can run routing protocols. The routing protocols
on the host communicate with routing daemons on other routers and hosts. These protocols assist
the host in determining where to forward packets. When network interfaces  are
enabled, the system
automatically communicates with the routing daemons. These daemons monitor
routers on the network and advertise the routers' addresses to the hosts
on the local network. Some routing protocols, though not all, also maintain
statistics that you can use to measure routing performance.  Unlike packet forwarding, you must explicitly configure routing
on a Solaris system.  </para><para>This section contains tasks for administering packet forwarding and
routing on IPv4 routers and hosts. For information about routing on an IPv6-enabled
network, refer to <olink targetptr="ipv6-config-tasks-5" remap="internal">Configuring an IPv6
Router</olink>.</para><sect2 id="gcxjj"><title>Routing Protocols Supported by the Solaris OS</title><para>Routing protocols are classified as
interior gateway protocols (IGPs), exterior gateway protocols (EGPs), or a combination
of both. <emphasis>Interior gateway protocols</emphasis>  exchange routing information between
routers on networks under common administrative control. In the network topology shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>, the routers run an IGP for exchanging
routing information. <emphasis>Exterior gateway protocols</emphasis> enable
the router that connects the local internetwork to an external network to
exchange information with another router on the external network. For example,
the router that connects a corporate network to an ISP runs an EGP to exchange
routing information with its router counterpart at the ISP. Border Gateway
Protocol (BGP) is a popular EGP that is used for carrying  routing information
between different organizations and IGPs.</para><para>The following table provides information about the Solaris routing protocols
and the location of each protocol's associated documentation. </para><table frame="topbot" pgwide="100" id="gcxiw"><title>Solaris Routing Protocols</title><tgroup cols="4" colsep="0" rowsep="0"><colspec colwidth="18.11*"/><colspec colwidth="15.23*"/><colspec colwidth="33.24*"/><colspec colwidth="33.44*"/><thead><row rowsep="1"><entry><para>Protocol</para>
</entry><entry><para>Associated Daemon</para>
</entry><entry><para>Description</para>
</entry><entry><para>For Instructions</para>
</entry>
</row>
</thead><tbody><row><entry><para>Routing Information Protocol (RIP)</para>
</entry><entry><para><command>in.routed</command></para>
</entry><entry><para>IGP that routes IPv4 packets and maintains a routing table</para>
</entry><entry><para><olink targetptr="ipconfig-118" remap="internal">How to Configure an IPv4 Router</olink></para>
</entry>
</row><row><entry><para>Internet Control Message Protocol (ICMP) Router Discovery</para>
</entry><entry><para><command>in.routed</command></para>
</entry><entry><para>Used by hosts to discover the presence of a router on the network</para>
</entry><entry><para><olink targetptr="ipconfig-125" remap="internal">How to Enable Static Routing on a Single-Interface Host</olink> and <olink targetptr="ipconfig-15" remap="internal">How to Enable Dynamic Routing on a Single-Interface
Host</olink></para>
</entry>
</row><row><entry><para>Routing Information Protocol, next generation (RIPng) Protocol</para>
</entry><entry><para><command>in.ripngd</command></para>
</entry><entry><para>IGP that routes IPv6 packets and maintains a routing table</para>
</entry><entry><para><olink targetptr="ipv6-config-tasks-21" remap="internal">How to Configure an IPv6-Enabled
Router</olink></para>
</entry>
</row><row><entry><para>Neighbor Discovery (ND) Protocol</para>
</entry><entry><para><command>in.ndpd</command></para>
</entry><entry><para>Advertises the presence of an IPv6 router and discovers the presence
of IPv6 hosts on a network</para>
</entry><entry><para><olink targetptr="ipv6-config-tasks-64" remap="internal">Configuring an IPv6 Interface</olink></para>
</entry>
</row>
</tbody>
</tgroup>
</table>
</sect2><sect2 id="gcxjg"><title>IPv4 Autonomous System Topology</title><para>Sites with multiple routers and networks
typically administer their network topology as a single routing domain, or  <emphasis>autonomous
system (AS)</emphasis> . The following figure shows a typical
network topology that would
be considered a small AS. This topology is referenced in
the examples throughout this section.</para><figure id="gdcvl"><title>Autonomous System With Multiple IPv4 Routers</title><mediaobject><imageobject><imagedata entityref="nwt_multpl_routers"/>
</imageobject><textobject><simpara>This topology diagram of an autonomous system is explained
in the following context.</simpara>
</textobject>
</mediaobject>
</figure><para>The figure shows an AS that is divided into three local networks, <literal>10.0.5.0</literal>, <literal>172.20.1.0</literal>, and <literal>192.168.5</literal>. Four routers share
packet-forwarding and routing responsibilities. The AS  includes the following types of systems:</para><itemizedlist><listitem><para><emphasis>Border routers</emphasis> connect
an AS
to an external network, such as the Internet. Border routers interconnect
with networks external to the IGP running on the local AS. A border router can run an EGP, such as Border
Gateway Protocol (BGP), to exchange information with external routers, for
example, the routers at the ISP. In <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>,
the border router's interfaces connect to internal network <literal>10.0.5.0</literal> and
to a high-speed router to a service provider.</para><para>For information on configuring a border router,
refer to the <ulink url="http://quagga.net/docs/docs-info.php#SEC72" type="text_url">Open Source Quagga documentation</ulink> for BGP.</para><para> If you plan to use BGP to connect your AS to the Internet, you
should obtain an autonomous system number (ASN) from the Internet Registry
for your locale. Regional registries, such as the American Registry for Internet
Numbers (ARIN), offer guidelines on how to obtain an ASN. For example, the<ulink url="http://www.arin.net/policy/nrpm.html#five" type="text_url"> ARIN Number
Resource Policy Manual</ulink> contains instructions for getting an ASN for
autonomous systems in the United States and Canada. Alternatively, your ISP
might be able to obtain an ASN for you.</para>
</listitem><listitem><para><emphasis>Default routers</emphasis> maintain routing information
about all the systems on the local network. These routers typically run IGPs
such as RIP. In <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>, Router
1s interfaces
are connected to internal network <literal>10.0.5.0</literal> and internal
network <literal>192.168.5</literal>. Router 1 also serves as the default
router for <literal>192.168.5</literal>. Router 1 maintains routing information
for all systems on <literal>192.168.5</literal> and routes to other routers,
such as the border router. Router 2s interfaces connect to internal network <literal>10.0.5.0</literal> and internal network <literal>172.20.1</literal>. </para><para>For an example of configuring a default router, refer to <olink targetptr="gcvjm" remap="internal">Example 5&ndash;4</olink>.</para>
</listitem><listitem><para><emphasis>Packet-forwarding routers</emphasis> forward packets
but do not run routing protocols. This type of router receives packets from
one of its interfaces that is connected to a single  network. These packets
are then forwarded through another interface on the router to another local network.
In <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>, Router 3 is a packet-forwarding router with connections
to networks <literal>172.20.1</literal> and <literal>192.168.5</literal>. </para>
</listitem><listitem><para><emphasis>Multihomed hosts</emphasis> have two or more interfaces
that are connected to the same network segment. A multihomed host can forward
packets, which is the default for all systems that run the Solaris OS. <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink> shows a multihomed host with both
interfaces connected to network <literal>192.168.5</literal>. For an example
of configuring a multihomed host, refer to <olink targetptr="geegh" remap="internal">Example
5&ndash;6</olink>.</para>
</listitem><listitem><para><emphasis>Single interface hosts</emphasis> rely on the local
routers, not only for packet forwarding but also for receiving valuable configuration
information. <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink> includes Host
A on the <literal>192.168.5</literal> network, which implements dynamic routing,
and Host B on the <literal>172.20.1</literal> network, which implements static
routing.  To configure
a host to run dynamic routing, refer to <olink targetptr="ipconfig-15" remap="internal">How
to Enable Dynamic Routing on a Single-Interface Host</olink>. To
configure a host to run static routing, refer to <olink targetptr="ipconfig-125" remap="internal">How to Enable Static Routing on a Single-Interface Host</olink>.</para>
</listitem>
</itemizedlist>
</sect2><sect2 id="ipconfig-116"><title>Configuring an IPv4 Router</title><para>This section contains a procedure and example for configuring an IPv4
router. To configure an IPv6-enabled router, refer to <olink targetptr="ipv6-config-tasks-21" remap="internal">How to Configure an IPv6-Enabled Router</olink>.</para><para>Because a router provides the interface between two or more networks,
you must assign a unique name and IP address to each of the router's physical
network interfaces. Thus, each router has a host name and an IP address that
are associated with its primary network interface, in addition to a minimum of one
more unique name and IP address for each additional network interface. </para><para>You can also use the following procedure to configure a system with only one
physical interface (by default, a host) to be a router. You might configure
a single interface system as a router if the system serves as one endpoint
on a PPP link, as explained in <olink targetdoc="sysadv4" targetptr="pppsvrconfig.p2plink-4" remap="external"><citetitle remap="section">Planning a Dial-up PPP Link</citetitle> in <citetitle remap="book">System Administration Guide: Network Services</citetitle></olink>. </para><note><para>You can configure all interfaces of a router during Solaris system
installation. For instructions, see <olink targetdoc="solarisinstall" remap="external"><citetitle remap="book">Solaris Express Installation Guide: Basic Installations</citetitle></olink>.</para>
</note><task id="ipconfig-118"><title>How to Configure an IPv4 Router</title><tasksummary><para>The following instructions assume that you are configuring interfaces
for the router after installation.</para>
</tasksummary><taskprerequisites><para>After the router is physically installed on the network, configure
the router to operate in local files mode, as described in <olink targetptr="ipconfig-64" remap="internal">How to Configure a Host for Local Files Mode</olink>.
This configuration ensures that routers boot if the network configuration
server is down.  </para>
</taskprerequisites><procedure><step><para>On the system to be configured as a router, assume the Primary
Administrator role or become superuser.</para><para>The Primary Administrator
role includes the Primary Administrator profile. To create the role and assign
the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Use the <command>dladm show-link</command> command
to determine which interfaces are physically installed on the router.</para><screen># <userinput>dladm show-link</userinput></screen><para>The following example output from <command>dladm show-link</command> indicates
that a <command>qfe</command> NIC with four interfaces and two <command>bge</command> interfaces
are physically available on the system.</para><screen>qfe0             type: legacy    mtu: 1500       device: qfe0
qfe1             type: legacy    mtu: 1500       device: qfe1
qfe2             type: legacy    mtu: 1500       device: qfe0
qfe3             type: legacy    mtu: 1500       device: qfe1
bge0             type: non-vlan  mtu: 1500       device: bge0
bge1             type: non-vlan  mtu: 1500       device: bge1</screen>
</step><step id="eypqa"><para>Review which interfaces on the router were configured
and plumbed during installation.</para><screen># <userinput>ifconfig -a</userinput></screen><para>The following example output from <command>ifconfig -a</command> shows
that the interface <literal>qfe0</literal> was configured during installation.
This interface is on the <literal>172.16.0.0</literal> network. The remaining
interfaces on the <literal>qfe</literal> NIC, <literal>qfe1</literal> - <literal>qfe3</literal>, and the <literal>bge</literal> interfaces have not been configured.</para><screen width="100">lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
qfe0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 172.16.26.232 netmask ffff0000 broadcast 172.16.26.255
        ether 0:3:ba:11:b1:15 
         </screen>
</step><step><para>Configure and
plumb another interface.</para><screen># <userinput>ifconfig</userinput> <replaceable>interface</replaceable> <userinput>plumb up</userinput></screen><para>For example, for <command>qfe1</command>, you would type:</para><screen># <userinput>ifconfig qfe1 plumb up</userinput></screen><note><para>Interfaces that are explicitly configured with the <command>ifconfig</command> command
do not persist across reboots.</para>
</note>
</step><step><para>Assign an IPv4 address and a netmask to the interface.</para><caution><para>You can configure an IPv4 routers to receive its IP address
through DHCP, but this is recommended only for very experienced DHCP system
administrators.</para>
</caution><screen># <userinput>ifconfig</userinput> <replaceable>interface IPv4-address</replaceable> <userinput>netmask+</userinput><replaceable>netmask</replaceable></screen><para>For example, to assign the IP address <literal>192.168.84.3</literal> to <literal>qfe1</literal>, do either of the following:</para><itemizedlist><listitem><para>Using traditional IPv4 notation, type the following:</para><screen># <userinput>ifconfig qfe1 192.168.84.3 netmask + 255.255.255.0</userinput></screen>
</listitem><listitem><para>Using CIDR notation, type the following:</para><screen># <userinput>ifconfig qfe1 192.168.84.3/24</userinput></screen><para>The prefix <literal>/24</literal> automatically assigns the <literal>255.255.255.0</literal> netmask to <literal>qfe1</literal>. For a table of CIDR prefixes
and their dotted-decimal netmask equivalents, refer to <olink targetptr="eypku" remap="internal">Figure
2&ndash;2</olink>.</para>
</listitem>
</itemizedlist>
</step><step id="ipconfig-step-120"><para>(Optional)
To ensure that the interface configuration persists across reboots, create an <filename>/etc/hostname.</filename><replaceable>interface</replaceable> file for each additional physical
interface .</para><para>For example, you would
create the <filename>/etc/hostname.qfe1</filename> and <filename>/etc/hostname.qfe2</filename> files. Then you would type the host name <literal>timbuktu</literal> in <filename>/etc/hostname.qfe1</filename> file and host name <literal>timbuktu-201</literal> in <filename>/etc/hostname.qfe1</filename> . For more information
about configuring single interfaces, refer to <olink targetptr="fpdcn" remap="internal">How
to Configure a Physical Interface After System Installation</olink>.</para><para>Be sure to
do a configuration reboot after creating this file:</para><screen># <userinput>reboot -- -r</userinput></screen>
</step><step id="ipconfig-step-122"><para>Add the host name and IP address of each interface to the <filename>/etc/inet/hosts</filename> file. </para><para>For example:</para><screen>172.16.26.232      deadsea        #interface for network 172.16.0.0
192.168.200.20     timbuktu       #interface for network 192.168.200
192.168.201.20     timbuktu-201   #interface for network 192.168.201
192.168.200.9      gobi
192.168.200.10     mojave
192.168.200.110    saltlake
192.168.200.12     chilean</screen><para>The interfaces <literal>timbuktu</literal> and <literal>timbuktu-201</literal> are
on the same system. Notice that the network address for <literal>timbuktu-201</literal> is
different from the network interface for <literal>timbuktu</literal>. The difference
exists because the physical network media for network <literal>192.168.201</literal> is
connected to the <literal>timbuktu-201</literal> network interface while the
media for network <literal>192.168.200</literal> is connected to the <literal>timbuktu</literal> interface.</para>
</step><step id="ipconfig-step-123"><para>If the router is connected to any subnetted network, add the network
number and the netmask to the <filename>/etc/inet/netmasks</filename> file.</para><itemizedlist><listitem><para>For traditional IPv4 address notation, such as <literal>192.168.83.0</literal>, you would type:</para><screen>192.168.83.0    255.255.255.0</screen>
</listitem><listitem><para>For CIDR addresses, use the dotted-decimal version of the prefix in the entry
in the <filename>/etc/inet/netmask</filename> file. Network prefixes and their
dotted-decimal equivalents can be found in <olink targetptr="eypku" remap="internal">Figure
2&ndash;2</olink>. For example, you would use the following entry in <filename>/etc/netmasks</filename> to express the CIDR network prefix <literal>192.168.3.0/22</literal>:</para><screen>192.168.3.0 255.255.252.0</screen>
</listitem>
</itemizedlist>
</step><step><para>Enable IPv4 packet forwarding on the router.</para><para>Use either of the following commands to enable packet forwarding:</para><itemizedlist><listitem><para>Use the <command>routeadm</command> command, as follows:</para><screen># <userinput>routeadm -e ipv4-forwarding -u</userinput></screen>
</listitem><listitem><para>Use the following service management facility (SMF) command:</para><screen># <userinput>svcadm enable ipv4-forwarding</userinput></screen>
</listitem>
</itemizedlist><para>At this point, the router can forward packets beyond the local network.
The router also supports <emphasis>static routing</emphasis>, a process where
you can manually add routes to the routing table. If you plan to use static
routing on this system, then router configuration is complete. However, you
need to maintain routes in the system routing table. For information on adding
routes, see <olink targetptr="gdwbq" remap="internal">Configuring Routes</olink> and the <olink targetdoc="refman" targetptr="route-1m" remap="external"><citerefentry><refentrytitle>route</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para>
</step><step><para>(Optional) Start arouting protocol.</para><para>The routing daemon <command>/usr/sbin/in.routed</command> automatically updates the routing table, a process that is known
as <emphasis>dynamic routing</emphasis>. Turn on the default IPv4 routing protocols in either of the following ways:</para><itemizedlist><listitem><para>Use the <command>routeadm</command> command, as follows:</para><screen># <userinput>routeadm -e ipv4-routing -u</userinput></screen>
</listitem><listitem><para>Use the following SMF command to start a routing protocol
such as RIP.</para><screen>#<userinput> svcadm enable route:default</userinput> </screen><para>The SMF FMRI associated with the <command>in.routed</command> daemon
is <command>svc:/network/routing/route.</command></para>
</listitem>
</itemizedlist><para>For  information about the <command>routeadm</command> command, see
the <olink targetdoc="refman1m" targetptr="routeadm-1m" remap="external"><citerefentry><refentrytitle>routeadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page. </para>
</step>
</procedure><example id="gcvjm"><title>Configuring the Default Router for a Network</title><para>This example shows
how to upgrade a system
with more than one interface to
become a default router.   The goal is to make Router 2, which
is shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>,  the default router for network <literal>172.20.1.0</literal>. Router 2 contains two wired network connections, one connection
to network <literal>172.20.1.0</literal> and one to network <literal>10.0.5.0</literal>. The example assumes that the router operates in local files mode,
as described in <olink targetptr="ipconfig-64" remap="internal">How to Configure a Host for
Local Files Mode</olink>. </para><para>After becoming superuser or assuming an equivalent
role, you would determine out the status of the system's interfaces.</para><screen># <userinput>dladm show-link</userinput>
ce0              type: legacy    mtu: 1500       device: ce0
bge0             type: non-vlan  mtu: 1500       device: bge0
bge1             type: non-vlan  mtu: 1500       device: bge1

# <userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 172.20.1.10 netmask ffff0000 broadcast 172.20.10.100
        ether 8:0:20:c1:1b:c6 </screen><para>The output of <command>dladm show-link</command> indicates
that three links are available on the system. Only the <literal>ce0</literal> interface
has been plumbed. You would
begin default router configuration by physically connecting the <literal>bge0</literal> interface
to the <literal>10.0.5.0</literal> network. Then, you would plumb the interface and make
it persist across reboots.</para><screen># <userinput>ifconfig bge0 plumb up</userinput>
# <userinput>ifconfig bge0 10.0.5.10</userinput>
# <userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
ce0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 172.20.1.10 netmask ffff0000 broadcast 172.255.255.255
        ether 8:0:20:c1:1b:c6 
bge0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 10.0.5.10 netmask ff000000 broadcast 10.255.255.255
        ether 8:0:20:e5:95:c4
 # <userinput>vi /etc/hostname.bge0</userinput>
<userinput>10.0.5.10
255.0.0.0</userinput></screen><para>Reboot the system, using the reconfiguration boot command:</para><screen># <userinput>reboot -- -r</userinput></screen><para>Continue
by configuring the following network databases
with information about the newly plumbed interface and the
network to which it is connected:</para><screen># <userinput>vi /etc/inet/hosts</userinput>
127.0.0.1       localhost
172.20.1.10        router2        #interface for network 172.20.1
<userinput>10.0.5.10          router2-out    #interface for network 10.0.5</userinput>
# <userinput>vi /etc/inet/netmasks</userinput>
172.20.1.0    255.255.0.0
<userinput>10.0.5.0      255.0.0.0</userinput></screen><para>Finally, use SMF
to enable packet forwarding and then enable the <command>in.routed</command> routing
daemon.</para><screen># <userinput>svcadm enable ipv4-forwarding</userinput>
#<userinput> svcadm enable route:default</userinput></screen><para>Now IPv4 packet forwarding and dynamic routing through RIP  are enabled on Router
2. However, the default
router configuration for network <command>172.20.1.0</command> is not yet
complete. You would need to do the following:</para><itemizedlist><listitem><para>Modify each host on <literal>172.10.1.10</literal> so that
the host gets its routing information from the new default router. For more
information, refer to <olink targetptr="ipconfig-125" remap="internal">How to Enable Static Routing on a Single-Interface Host</olink>.</para>
</listitem><listitem><para>Define a static route to the border router in the routing
table of Router 2. For more details, refer to <olink targetptr="gdyen" remap="internal"> Routing
Tables and Routing Types</olink>.</para>
</listitem>
</itemizedlist>
</example>
</task>
</sect2><sect2 id="gdyen"><title> Routing Tables and Routing Types</title><para>Both routers and hosts maintain a <emphasis>routing table</emphasis>.
The routing daemon on each system updates the table with all known routes.
The system's kernel reads the routing table before forwarding packets to the
local network. The routing table lists the IP addresses of networks that the
system knows about, including the system's local, default network. The table
also lists the IP address of a gateway system for each known network. The <emphasis>gateway</emphasis> is a system that can receive outgoing packets and forward
them one hop beyond the local network. The following is a simple routing table
for a system on an IPv4-only network:</para><screen>Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.20.1.10          UG       1    532   ce0
224.0.0.0            10.0.5.100           U        1      0   bge0
10.0.0.0             10.0.5.100           U        1      0   bge0
127.0.0.1            127.0.0.1            UH       1     57   lo0</screen><para>You can configure two types of routing on a Solaris system: static
and dynamic. You can configure
either or both routing types on a single system. A system that implements <emphasis>dynamic routing</emphasis> relies on routing protocols, such as RIP for IPv4
networks, and RIPng for IPv6 networks, to maintain its routing tables. A system that runs only <emphasis>static routing </emphasis> does
not rely on a routing protocol for
routing information and for updating the routing table. Instead, you must maintain the system's
known routes manually through the <command>route</command> command. For complete
details, refer to the <olink targetdoc="refman1m" targetptr="route-1m" remap="external"><citerefentry><refentrytitle>route</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>When you configure routing for the local network or autonomous system,  consider which
type of routing to support on particular routers and hosts.</para><informaltable frame="none"><tgroup cols="2" colsep="0" rowsep="0"><colspec colwidth="23.00*"/><colspec colwidth="77.00*"/><thead><row><entry><para>Routing Type</para>
</entry><entry><para>Best Used on</para>
</entry>
</row>
</thead><tbody><row><entry><para>Static</para>
</entry><entry><para>Small networks, hosts
that get their routes from a default router, and default routers that only need to know about one
or two routers on the next few hops. </para>
</entry>
</row><row><entry><para>Dynamic</para>
</entry><entry><para>Larger internetworks, routers on local networks with many hosts, and hosts on large
autonomous systems. Dynamic
routing is the best choice for systems on most networks.</para>
</entry>
</row><row><entry><para>Combined static and dynamic</para>
</entry><entry><para>Routers that connect a staticallyrouted network and a dynamically routed
network, and border routers that connect
an interior autonomous system with external networks. Combining both static and dynamic routing
on a system is a common practice.</para>
</entry>
</row>
</tbody>
</tgroup>
</informaltable><para>The
AS that is shown is <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink> combines
both static and dynamic routing.</para><sect3 id="gdwbq"><title>Configuring Routes</title><para> To implement dynamic routing for
an IPv4 network, use the <command>routeadm</command> or <command>svcadm</command> command
to start the <command>in.routed</command> routing daemon. For instructions,
see <olink targetptr="ipconfig-118" remap="internal">How to Configure an IPv4 Router</olink>.
Dynamic routing is the preferred strategy for most networks and autonomous
systems. However, your network topology or a particular
system on your network might require static routing. In that case, you must manually
edit the system routing table to reflect the known route to the gateway. The next procedure shows how to add a static
route.</para><note><para>Two routes to the same destination does not automatically cause the
system to do load balancing or failover. If you need these capabilities, use
IPMP, as explained in <olink targetptr="mpoverview" remap="internal">Chapter&nbsp;30, Introducing
IPMP (Overview)</olink>.</para>
</note><task id="gecqy"><title>How to Add a Static Route to the Routing Table</title><procedure><step><para>View the current state of the routing table.</para><para>Use your regular user account to run
the following form of the <command>netstat</command> command:</para><screen>% <userinput>netstat -rn</userinput></screen><para>Your output would
resemble the following:</para><screen>Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
192.168.5.125        192.168.5.10          U      1   5879   ipge0
224.0.0.0            198.168.5.10          U      1  0       ipge0
default              192.168.5.10          UG     1  91908
127.0.0.1            127.0.0.1             UH     1  811302   lo0</screen>
</step><step><para>Assume the Primary Administrator role or become superuser.</para><para>The Primary
Administrator role includes the Primary Administrator profile. To create the
role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>(Optional) Flush the existing entries in the routing table.</para><screen># <userinput>route flush</userinput></screen>
</step><step><para>Add a route that persists across system reboots.</para><screen># <userinput>route -p add -net <replaceable>network-address</replaceable> -gateway <replaceable>gateway-address</replaceable></userinput></screen><variablelist><varlistentry><term><option>p</option></term><listitem><para>Creates a route that must persist across system reboots. If you want the route to prevail only for
the current session, do not use the <option>p</option> option.</para>
</listitem>
</varlistentry><varlistentry><term><command>add</command></term><listitem><para>Indicates that you are about to add the following route.</para>
</listitem>
</varlistentry><varlistentry><term><option>net</option><replaceable>network-address</replaceable></term><listitem><para>Specifies that the route goes to the network with the address in <replaceable>network-address</replaceable>.</para>
</listitem>
</varlistentry><varlistentry><term><option>gateway</option><replaceable>gateway-address</replaceable></term><listitem><para>Indicates that the gateway system for the specified route
has the IP address <replaceable>gateway-address</replaceable>.</para>
</listitem>
</varlistentry>
</variablelist>
</step>
</procedure><example id="gedsl"><title>Adding a Static Route to the Routing Table</title><para>The following example shows how to add a static route to a system. The
system is Router 2, the default router for the <literal>172.20.1.0</literal> network
that is shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>. In <olink targetptr="gcvjm" remap="internal">Example 5&ndash;4</olink>, Router 2 is configured for dynamic
routing. To better serve as the default router for the hosts on network <literal>172.20.1.0</literal>, Router 2 additionally needs a static route to the AS's
border router, <literal>10.0.5.150</literal>. </para><para>To view the routing table on Router 2, you would do the following:</para><screen># <userinput>netstat -rn</userinput>
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.20.1.10          UG        1    249 ce0
224.0.0.0            172.20.1.10          U         1      0 ce0
10.0.5.0             10.0.5.20            U         1     78 bge0
127.0.0.1            127.0.0.1            UH        1     57 lo0</screen><para>The routing table indicates two routes that Router 2 knows about. The
default route uses Router 2's <literal>172.20.1.10</literal> interface as
its gateway. The second route, <literal>10.0.5.0</literal>, was discovered
by the <literal>in.routed</literal> daemon running on Router 2. The gateway
for this route is Router 1, with the IP address <literal>10.0.5.20</literal>. </para><para>To add a second route to network <literal>10.0.5.0</literal>, which
has its gateway as the border router, you would do the following:</para><screen># <userinput>route -p add -net 10.0.5.0/24 -gateway 10.0.5.150/24</userinput>
add net 10.0.5.0: gateway 10.0.5.150</screen><para>Now the routing table has a route for the border router, which has the
IP address <literal>10.0.5.150/24</literal>.</para><screen># <userinput>netstat -rn</userinput>
Routing Table: IPv4
  Destination           Gateway           Flags  Ref   Use   Interface
-------------------- -------------------- ----- ----- ------ ---------
default              172.20.1.10          UG        1    249 ce0
224.0.0.0            172.20.1.10          U         1      0 ce0
10.0.5.0             10.0.5.20            U         1     78 bge0
10.0.5.0             10.0.5.150           U         1    375 bge0
127.0.0.1            127.0.0.1            UH        1     57 lo0</screen>
</example>
</task>
</sect3>
</sect2><sect2 id="ipconfig-22a"><title>Configuring Multihomed Hosts</title><para>In the Solaris OS, a system with more than one interface is considered
a <emphasis>multihomed host</emphasis>. A multihomed host does not forward
IP packets. However, you can
configure a multihomed host to run routing protocols. You typically configure
the following types of systems as multihomed hosts: </para><itemizedlist><listitem><para>NFS servers, particularly those servers that function as large data centers,
can be attached to more than one network in order to share files among a large
pool of users. These servers do not need to maintain routing tables.</para>
</listitem><listitem><para>Database servers can have multiple network interfaces to provide
resources to a large pool of users, just like NFS servers.</para>
</listitem><listitem><para>Firewall gateways are systems that provide the connection
between a company's network and public networks such as the Internet. Administrators
set up firewalls as a security measure. When configured as a firewall, the
host does not pass packets between the networks that are attached to the host's
interfaces. However, the host can still provide standard TCP/IP services,
such as <command>ssh</command> to authorized users.</para><note><para>When multihomed hosts have different types of firewalls on any of their interfaces,
take care to avoid unintentional disruption of the host's packets. This problem
arises particularly with stateful firewalls. One solution might be to configure stateless
firewalling. For more information about firewalls, refer to <olink targetdoc="sysadv6" targetptr="concept-25" remap="external"><citetitle remap="section">Firewall Systems</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink> or the documentation for your third-party
firewall. </para>
</note>
</listitem>
</itemizedlist><task id="ipconfig-130"><title>How to Create a Multihomed Host</title><procedure><step><para> On the prospective
multihomed host, assume the Primary Administrator role,
or become superuser.</para><para>The Primary
Administrator role includes the Primary Administrator profile. To create the
role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="ipconfig-step-132"><para> Configure and plumb each additional network
interface that was not configured as part of the Solaris OS installation. </para><para>Refer to <olink targetptr="fpdcn" remap="internal">How
to Configure a Physical Interface After System Installation</olink>.</para>
</step><step><para>Verify that IP forwarding is not enabled on the multihomed host.</para><screen># <userinput>routeadm</userinput>
 </screen><para>The <command>routeadm</command> command without options reports the state of the routing
daemons. The following  output from <command>routeadm</command> shows that IPv4 forwarding is enabled:</para><screen>   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   enabled              disabled
            IPv6 forwarding   disabled             disabled
            Routing services   "route:default ripng:default"</screen>
</step><step><para>Turn off packet forwarding, if it is enabled on the system.</para><para>Use either of the following commands:</para><itemizedlist><listitem><para>For the <command>routeadm</command> command, type the following:</para><screen># <userinput>routeadm -d ipv4-forwarding -u</userinput></screen>
</listitem><listitem><para>To use SMF, type the following:</para><screen># <userinput>svcadm disable ipv4-forwarding</userinput></screen>
</listitem>
</itemizedlist>
</step><step><para>(Optional) Turn on dynamic routing for the multihomed host.</para><para>Use either of the following commands to enable the <command>in.routed</command> daemon:</para><itemizedlist><listitem><para>For the <command>routeadm</command> command, type the following:</para><screen># <userinput>routeadm -e ipv4-routing -u</userinput></screen>
</listitem><listitem><para>To use  SMF, type the
following:</para><screen>#<userinput>svcadm enable route:default</userinput> </screen>
</listitem>
</itemizedlist>
</step>
</procedure><example id="geegh"><title>Configuring a Multihomed
Host</title><para>The  following example shows how to configure the multihomed host that
is shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>. In the example, the system has the host name <literal>hostc</literal>. This host has two interfaces, which are both connected to network <literal>192.168.5.0</literal> .</para><para>To begin, you would display the status of the system's interfaces.</para><screen># <userinput>dladm show-link</userinput>
hme0            type: legacy    mtu: 1500       device: hme0
qfe0            type: legacy    mtu: 1500       device: qfe0
qfe1            type: legacy    mtu: 1500       device: qfe1
qfe2            type: legacy    mtu: 1500       device: qfe2
qfe3            type: legacy    mtu: 1500       device: qfe3
# <userinput>ifconfig -a</userinput>
# ifconfig -a
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
hme0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
      inet 192.168.5.82 netmask ff000000 broadcast 192.255.255.255
      ether 8:0:20:c1:1b:c6 
 </screen><para>The <command>dladm show-link</command> command reports that <literal>hostc</literal> has two interfaces
with a total of five possible links. However, only <literal>hme0</literal>  has been plumbed.
To configure <literal>hostc</literal> as
a multihomed host, you must add <literal>qfe0</literal> or another link on the <literal>qfe</literal> NIC
. First, you would physically connect the <literal>qfe0</literal> interface to the <literal>192.168.5.0</literal> network. Then you would plumb
the <literal>qfe0</literal> interface, and  make the interface
persist across reboots.</para><screen># <userinput>ifconfig qf0 plumb up</userinput>
# <userinput>ifconfig qfe0 192.168.5.85</userinput>
# <userinput>ifconfig -a</userinput>
lo0: flags=1000849 &lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
hme0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.5.82 netmask ff0000 broadcast 192.255.255.255
        ether 8:0:20:c1:1b:c6 
qfe0: flags=1000843 &lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.5.85 netmask ff000000 broadcast 192.255.255.255
        ether 8:0:20:e1:3b:c4
 # <userinput>vi /etc/hostname.qfe0</userinput>
<userinput>192.168.5.85
255.0.0.0</userinput></screen><para>Reboot the system, using the reconfiguration command:</para><screen># <userinput>reboot -- -r</userinput></screen><para>Next, you would add
the <literal>qfe0</literal>
interface to the <literal>hosts</literal> database:</para><screen># <userinput>vi /etc/inet/hosts</userinput>
127.0.0.1           localhost
192.168.5.82        host3    #primary network interface for host3
<userinput>192.168.5.85        host3-2  #second interface</userinput></screen><para>Then, you would check
the state of packet forwarding and routing on <literal>host3</literal>:</para><screen># <userinput>routeadm</userinput>
              Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   enabled              enabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   enabled              enabled
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"</screen><para>The <command>routeadm</command> command
reports that dynamic routing through the <command>in.routed</command> daemon and
packet forwarding are currently enabled. However, you would need to disable packet forwarding:</para><screen># <userinput>svcadm disable ipv4-forwarding</userinput></screen><para>You can also use
the <literal>routeadm</literal> commands as shown in <olink targetptr="ipconfig-130" remap="internal">How to Create a Multihomed Host</olink> to turn off
packet forwarding. When packet forwarding is disabled, <command>host3</command> becomes
a multihomed host.</para>
</example>
</task>
</sect2><sect2 id="gcvjx"><title>Configuring Routing for Single-Interface Systems</title><para>Single-interface
hostsneed to implement
some form of routing. If the host is to obtain its routes from one or more local default routers, then you must configure the host to use static routing. Otherwise, 
dynamic routing is recommended
for the host. The following procedures contain the instructions for enabling both routing types.</para><task id="ipconfig-125"><title>How to Enable Static Routing on a Single-Interface
Host</title><tasksummary><para>This procedure enables static routing on a single-interface host. Hosts that use static routing
do not run a
dynamic routing protocolsuch as RIP. Instead, the host must rely
on the services of a default router for routing information. The figure <olink targetptr="gcxjg" remap="internal">IPv4 Autonomous System Topology</olink> shows several default routers and their client
hosts. If you supplied the name of a default router when you installed a particular host, 
that host is already configured to use static routing. </para><note><para>You can also use the following procedure to configure static routing
on a multihomed host.</para>
</note><para>For  information about the <filename>/etc/defaultrouter</filename> file, see <olink targetptr="ipconfig-17" remap="internal">/etc/defaultrouter File</olink>.
For information about static routing and the routing table, refer to <olink targetptr="gdyen" remap="internal"> Routing Tables and Routing Types</olink>.</para>
</tasksummary><procedure><step><para>On the single interface host, assume the Primary Administrator
role, or become superuser.</para><para>The Primary Administrator role includes
the Primary Administrator profile. To create the role and assign the role
to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step><para>Verify whether
the <filename>/etc/defaultrouter </filename>file is present on the host.</para><screen># <userinput>cd /etc</userinput>
# <userinput>ls | grep defaultrouter</userinput></screen>
</step><step><para>Open a text editor to create
or modify the <filename>/etc/defaultrouter</filename> file </para>
</step><step id="ipconfig-step-14"><para>Add an entry for thedefault router.</para><screen># <userinput>vi  /etc/defaultrouter</userinput>
<replaceable>router-IP</replaceable>
       </screen><para>where <replaceable>router-IP</replaceable> indicates
the IP address of the default router for the host to use.</para>
</step><step><para>Verify that
routing and packet forwarding are not running on the host.</para><screen># <userinput>routeadm</userinput>
   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   disabled            disabled
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"</screen>
</step><step><para>Add an entry for the default router in the local <filename>/etc/inet/hosts</filename> file.</para><para>For information about configuring <filename>/etc/inet/hosts</filename>,
refer to <olink targetptr="gbwxb" remap="internal">How to Change the IPv4 Address and Other
Network Configuration Parameters</olink>.</para>
</step>
</procedure><example id="geegq"><title>Configuring a Default Router and Static Routing for a Single-Interface
Host</title><para>The following example shows how to configure static routing for <literal>hostb</literal>, a single-interface host on the network <literal>172.20.1.0</literal> that
is shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>. <literal>hostb</literal> needs
to use Router 2 as its default router.</para><para>First, you would log in to <literal>hostb</literal> as superuser, or
assume an equivalent role. Then, you would determine whether the <filename>/etc/defaultrouter</filename> file is present on the host:</para><screen># <userinput>cd /etc</userinput>
# <userinput>ls | grep defaultrouter</userinput></screen><para>No response from <command>grep</command> indicates that you need to
create the <filename>/etc/defaultrouter</filename> file.</para><screen># <userinput>vi /etc/defaultrouter</userinput>
<userinput>172.20.1.10</userinput></screen><para>The entry in the <filename>/etc/defaultrouter</filename> file is the
IP address of the interface on Router 2, which is attached to the <literal>172.20.1.0</literal> network. Next, you verify whether the host currently enables packet
forwarding or routing.</para><screen># <userinput>routeadm</userinput>
   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   enabled              enabled
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"</screen><para>Packet forwarding is enabled for this particular host. You would turn
it off as follows:</para><screen># <userinput>svcadm disable ipv4-forwarding</userinput></screen><para>Lastly, you would make sure that the host's <filename>/etc/inet/hosts</filename> file
has an entry for the new default router.</para><screen># <userinput>vi /etc/inet/hosts</userinput>
127.0.0.1           localhost
172.20.1.18         host2    #primary network interface for host2
<userinput>172.20.1.10         router2  #default router for host2</userinput></screen>
</example>
</task><task id="ipconfig-15"><title>How to Enable Dynamic Routing on a Single-Interface
Host</title><tasksummary><para>Dynamic routing is the easiest way
to manage routing on a host. Hosts that use dynamic routing
run the routing protocols provided by the <command>in.routed</command> daemon for IPv4
or <command>in.ripngd</command> daemon for IPv6. Use the next procedure
to enable IPv4 dynamic
routing on a single interface
host. For more information about dynamic routing, refer
to <olink targetptr="gcvjj" remap="internal">Packet Forwarding and Routing on IPv4 Networks</olink>.</para>
</tasksummary><procedure><step><para>On the host, assume the Primary Administrator role or become superuser.</para><para>The Primary Administrator role includes the Primary Administrator profile.
To create the role and assign the role to a user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="ipconfig-step-18"><para>Verify whether the <filename>/etc/defaultrouter</filename> file exists.</para><screen># <userinput>cd /etc</userinput>
# <userinput>ls | grep defaultrouter</userinput></screen>
</step><step><para>If <filename>/etc/defaultrouter</filename> exists, delete any entry that you find there.</para><para>An empty <filename>/etc/defaultrouter</filename> file forces the host to use dynamic routing.</para>
</step><step><para>Verify whether packet forwarding and routing are enabled
on the host.</para><screen># <userinput>routeadm</userinput>
   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   enabled              enabled
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"</screen>
</step><step><para>If packet forwarding is enabled, turn it off </para><para>Use
either of the following commands:</para><itemizedlist><listitem><para>For the <command>routeadm</command> command, type the following:</para><screen># <userinput>routeadm -d ipv4-forwarding -u</userinput></screen>
</listitem><listitem><para>To use SMF, type the following:</para><screen># <userinput>svcadm disable ipv4-forwarding</userinput></screen>
</listitem>
</itemizedlist>
</step><step><para>Enable routing protocols on the host.</para><para>Use either of the following commands:</para><itemizedlist><listitem><para>For the <command>routeadm</command> command, type the following:</para><screen># <userinput>routeadm -e ipv4-routing -u</userinput></screen>
</listitem><listitem><para>To use SMF, type the following:</para><screen>#<userinput>svcadm enable route:default</userinput> </screen>
</listitem>
</itemizedlist><para>Now IPv4 dynamic routing is enabled. The host's routing table is dynamically maintained by
the <command>in.routed</command> daemon.</para>
</step>
</procedure><example id="geekw"><title>Running Dynamic Routing on a Single-Interface Host</title><para>The following example shows how to configure dynamic routing for <command>hosta</command>, a single-interface host on the network <literal>192.168.5.0</literal> that
is shown in <olink targetptr="gdcvl" remap="internal">Figure 5&ndash;2</olink>. <literal>hosta</literal> currently
uses Router 1 as its default router. However, <literal>hosta</literal> now
needs to run dynamic routing.</para><para>First, you would log in to <literal>hosta</literal> as superuser or
assume an equivalent role. Then, you would determine whether the <filename>/etc/defaultrouter</filename> file is present on the host:</para><screen># <userinput>cd /etc</userinput>
# <userinput>ls | grep defaultrouter</userinput>
defaultrouter</screen><para>The response from <command>grep</command> indicates that a <filename>/etc/defaultrouter</filename> file exists for <literal>hosta</literal>. </para><screen># <userinput>vi /etc/defaultrouter</userinput>
192.168.5.10</screen><para>The file has the entry <literal>192.168.5.10</literal>, which is the
IP address for Router 1. You would delete this entry to enable static routing.
Next, you would need to verify whether packet forwarding and routing are already
enabled for the host.</para><screen># <userinput>routeadm</userinput>   Configuration   Current              Current
                     Option   Configuration        System State
---------------------------------------------------------------
               IPv4 routing   disabled             disabled
               IPv6 routing   disabled             disabled
            IPv4 forwarding   disabled             disabled
            IPv6 forwarding   disabled             disabled

           Routing services   "route:default ripng:default"</screen><para>Both routing and packet forwarding are turned off for <literal>hosta</literal>.
Turn on routing to complete the configuration of dynamic routing for <literal>hosta</literal>, as follows:</para><para>#<userinput>svcadm enable route:default</userinput></para>
</example>
</task>
</sect2>
</sect1><sect1 id="ipconfig-111"><title>Monitoring and Modifying Transport Layer Services</title><para>The transport layer protocols TCP, SCTP, and UDP are part of the
standard Solaris OS package. These protocols typically need no intervention
to run properly. However, circumstances at your site might require you to
log or modify services that run over the transport layer protocols. Then,
you must modify the profiles for these services by using the Service Management
Facility (SMF), which is described in <olink targetdoc="sysadv1" targetptr="hbrunlevels-25516" remap="external">Chapter 14, <citetitle remap="chapter">Managing Services (Overview),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>. </para><para>The <command>inetd</command> daemon is responsible for starting standard
Internet services when a system boots. These services include applications
that use TCP, SCTP, or UDP as their transport layer protocol. You can modify
existing Internet services or add new services using the SMF commands. For
more information about <command>inetd</command>, refer to <olink targetptr="ipv6-ref-32" remap="internal">inetd Internet Services Daemon</olink>.</para><para>Operations that involve the transport layer protocols include:</para><itemizedlist><listitem><para>Logging of all incoming TCP connections</para>
</listitem><listitem><para>Adding services that run over a transport layer protocol,
using SCTP as an example</para>
</listitem><listitem><para>Configuring the TCP wrappers facility for access control</para>
</listitem>
</itemizedlist><para>For detailed information on the <command>inetd</command> daemon refer
to the <olink targetdoc="refman1m" targetptr="inetd-1m" remap="external"><citerefentry><refentrytitle>inetd</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink>man
page. </para><task id="ipconfig-6"><title>How to Log the IP Addresses of All Incoming TCP
Connections</title><procedure><step id="ipconfig-step-9"><para>On the local system, assume the Network Management
role or become superuser.</para><para>Roles contain authorizations and privileged
commands.    For more information about roles, see <olink targetdoc="sysadv6" targetptr="rbactask-15" remap="external"><citetitle remap="section">Configuring RBAC (Task Map)</citetitle> in <citetitle remap="book">System Administration Guide: Security Services</citetitle></olink>.</para>
</step><step id="ipconfig-step-8"><para>Set TCP tracing to enabled for all services
managed by <command>inetd</command>.</para><screen># <userinput>inetadm -M tcp_trace=TRUE</userinput></screen>
</step>
</procedure>
</task><task id="ermig"><title>How to Add Services That Use the SCTP Protocol</title><tasksummary><para>The SCTP transport protocol provides services to application layer protocols
in a fashion similar to TCP. However, SCTP enables communication between two
systems, either or both of which can be multihomed. The SCTP connection is
called an <emphasis>association</emphasis>. In an association, an application
divides the data to be transmitted into one or more message streams, or <emphasis>multi-streamed</emphasis>. An SCTP connection can go to endpoints with multiple
IP addresses, which is particularly important for telephony applications.
The multihoming capabilities of SCTP are a security consideration if your
site uses IP Filter or IPsec. Some of these considerations are described in
the <olink targetdoc="refman7" targetptr="sctp-7p" remap="external"><citerefentry><refentrytitle>sctp</refentrytitle><manvolnum>7P</manvolnum></citerefentry></olink> man page.</para><para>By default, SCTP is included in the Solaris OS and does not require
additional configuration. However, you might need to explicitly configure
certain application layer services to use SCTP. Some example applications
are <command>echo</command> and <command>discard</command>. The next procedure
shows how to add an echo service that uses an SCTP one-to-one style socket.</para><note><para>You can also use the following procedure to add services for the
TCP and UDP transport layer protocols.</para>
</note><para>The following task shows how to add an SCTP <command>inet</command> service
that is managed by the <command>inetd</command> daemon to the SMF repository.
The task then shows how to use the Service Management Facility (SMF) commands
to add the service.</para><itemizedlist><listitem><para>For information about SMF commands, refer to <olink targetdoc="sysadv1" targetptr="dzhqq" remap="external"><citetitle remap="section">SMF Command-Line Administrative Utilities</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</listitem><listitem><para>For syntactical information, refer to the man pages for the
SMF commands, as cited in the procedure.</para>
</listitem><listitem><para>For detailed information about SMF refer to the <olink targetdoc="refman5" targetptr="smf-5" remap="external"><citerefentry><refentrytitle>smf</refentrytitle><manvolnum>5</manvolnum></citerefentry></olink> man page.</para>
</listitem>
</itemizedlist>
</tasksummary><taskprerequisites><para>Before you perform the following procedure, create a manifest file for
the service. The procedure uses as an example a manifest for the <command>echo</command> service
that is called <filename>echo.sctp.xml</filename>.</para>
</taskprerequisites><procedure><step><para>Log in to the local system with a user account that has write
privileges for system files.</para>
</step><step><para>Edit the <filename>/etc/services</filename> file and add a definition
for the new service.</para><para>Use the following syntax for the service definition.</para><screen><replaceable>service-name |port/protocol | aliases</replaceable></screen>
</step><step><para>Add the new service.</para><para>Go to the directory where the
service manifest is stored and type the following:</para><screen># <userinput>cd <replaceable>dir-name</replaceable></userinput>
# <userinput>svccfg import <replaceable>service-manifest-name</replaceable></userinput></screen><para>For a complete syntax of <command>svccfg</command>, refer to the <olink targetdoc="refman1m" targetptr="svccfg-1m" remap="external"><citerefentry><refentrytitle>svccfg</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man page.</para><para>Suppose
you want to add a new SCTP <literal>echo</literal> service using the manifest <command>echo.sctp.xml</command> that is currently located in the <filename>service.dir</filename> directory.
You would type the following:</para><screen># <userinput>cd service.dir</userinput>
# <userinput>svccfg import echo.sctp.xml</userinput></screen>
</step><step><para>Verify that the service manifest has been added:</para><screen># <userinput>svcs <replaceable>FMRI</replaceable></userinput></screen><para>For the <replaceable>FMRI</replaceable> argument, use the Fault Managed
Resource Identifier (FMRI) of the service manifest. For example, for the SCTP <command>echo</command> service, you would use the following command:</para><screen># <userinput>svcs svc:/network/echo:sctp_stream</userinput></screen><para>Your output should resemble the following:</para><screen>	STATE          STIME    FMRI
disabled       16:17:00 svc:/network/echo:sctp_stream</screen><para>For detailed information about the <command>svcs</command> command,
refer to the <olink targetdoc="refman1" targetptr="svcs-1" remap="external"><citerefentry><refentrytitle>svcs</refentrytitle><manvolnum>1</manvolnum></citerefentry></olink> man
page.</para><para>The output indicates that the new service manifest is currently
disabled.</para>
</step><step><para>List the properties of the service to determine if you must make
modifications.</para><screen># <userinput>inetadm -l <replaceable>FMRI</replaceable></userinput></screen><para>For detailed information about the <command>inetadm</command> command,
refer to the<olink targetdoc="refman1m" targetptr="inetadm-1m" remap="external"><citerefentry><refentrytitle>inetadm</refentrytitle><manvolnum>1M</manvolnum></citerefentry></olink> man
page.</para><para>For example, for the SCTP <command>echo</command> service,
you would type the following:</para><screen># <userinput>inetadm -l svc:/network/echo:sctp_stream</userinput>
SCOPE    NAME=VALUE
	         name="echo"
	         endpoint_type="stream"
	         proto="sctp"
	         isrpc=FALSE
	         wait=FALSE
	         exec="/usr/lib/inet/in.echod -s"
         .
         .
         default  tcp_trace=FALSE
       	default  tcp_wrappers=FALSE</screen>
</step><step><para>Enable the new service:</para><screen># <userinput>inetadm -e <replaceable>FMRI</replaceable></userinput></screen>
</step><step><para>Verify that the service is enabled:</para><para>For example, for
the new <literal>echo</literal> service, you would type the following:</para><screen># <userinput>inetadm | grep sctp_stream</userinput>
.
.
	enabled   online         svc:/network/echo:sctp_stream</screen>
</step>
</procedure><example id="erttc"><title>Adding a Service That Uses the SCTP Transport Protocol</title><para>The following example shows the commands to use and the file entries
required to have the echo service use the SCTP transport layer protocol.</para><screen>$ <userinput>cat /etc/services</userinput>
.
.
echo            7/tcp
echo            7/udp
<userinput>echo            7/sctp</userinput>

# <userinput>cd service.dir</userinput>

	# <userinput>svccfg import echo.sctp.xml</userinput>

# <userinput>svcs network/echo*</userinput>
	STATE          STIME    FMRI
	disabled       15:46:44 svc:/network/echo:dgram
	disabled       15:46:44 svc:/network/echo:stream
	disabled       16:17:00 svc:/network/echo:sctp_stream

# <userinput>inetadm -l svc:/network/echo:sctp_stream</userinput>
	SCOPE    NAME=VALUE
	         name="echo"
	         endpoint_type="stream"
	         proto="sctp"
	         isrpc=FALSE
	         wait=FALSE
	         exec="/usr/lib/inet/in.echod -s"
	         user="root"
	default  bind_addr=""
	default  bind_fail_max=-1
	default  bind_fail_interval=-1
	default  max_con_rate=-1
	default  max_copies=-1
	default  con_rate_offline=-1
	default  failrate_cnt=40
	default  failrate_interval=60
	default  inherit_env=TRUE
	default  tcp_trace=FALSE
	default  tcp_wrappers=FALSE

# <userinput>inetadm -e svc:/network/echo:sctp_stream</userinput>

# <userinput>inetadm | grep echo</userinput>
	disabled  disabled       svc:/network/echo:stream
	disabled  disabled       svc:/network/echo:dgram
	enabled   online         svc:/network/echo:sctp_stream</screen>
</example>
</task><task id="ipconfig-86"><title>How to Use TCP Wrappers to Control Access to
TCP Services</title><tasksummary><para>The <command>tcpd</command> program implements <emphasis>TCP wrappers</emphasis>. TCP wrappers add a measure of security for service daemons such
as <command>ftpd</command> by standing between the daemon and incoming service
requests. TCP wrappers log successful and unsuccessful connection attempts.
Additionally, TCP wrappers can provide access control, allowing or denying
the connection depending on where the request originates. You can use TCP
wrappers to protect daemons such as SSH, Telnet, and FTP. The <command>sendmail</command> application
can also use TCP wrappers, as described in <olink targetdoc="sysadv4" targetptr="mailrefer-125" remap="external"><citetitle remap="section">Support for TCP Wrappers From Version 8.12 of sendmail</citetitle> in <citetitle remap="book">System Administration Guide: Network Services</citetitle></olink>.</para>
</tasksummary><procedure><step><para>On the local system, assume the Primary Administrator role, or
become superuser.</para><para>The Primary Administrator role includes the
Primary Administrator profile. To create the role and assign the role to a
user, see <olink targetdoc="sysadv1" targetptr="smcover-1" remap="external">Chapter 2, <citetitle remap="chapter">Working With the Solaris Management Console (Tasks),</citetitle> in <citetitle remap="book">System Administration Guide: Basic Administration</citetitle></olink>.</para>
</step><step id="fawnj"><para>Set TCP wrappers to enabled.</para><screen># <userinput>inetadm -M tcp_wrappers=TRUE</userinput></screen>
</step><step id="ipconfig-step-91"><para>Configure the TCP wrappers access control
policy as described in the <literal>hosts_access</literal>(3) man page. </para><para>This man page can be found in the <filename>/usr/sfw/man</filename> directory
on the SFW CD-ROM, which is packaged along with the Solaris OS CD-ROM.</para>
</step>
</procedure>
</task>
</sect1>
</chapter>