Part I Introducing System Administration: IP Services
1. Oracle Solaris TCP/IP Protocol Suite (Overview)
2. Planning Your TCP/IP Network (Tasks)
3. Introducing IPv6 (Overview)
4. Planning an IPv6 Network (Tasks)
5. Configuring TCP/IP Network Services and IPv4 Addressing (Tasks)
Before You Configure an IPv4 Network (Task Map)
Determining Host Configuration Modes
Systems That Should Run in Local Files Mode
Systems That Are Network Clients
IPv4 Network Topology Scenario
Adding a Subnet to a Network (Task Map)
Network Configuration Task Map
Configuring Systems on the Local Network
How to Configure a Host for Local Files Mode
How to Set Up a Network Configuration Server
How to Configure Hosts for Network Client Mode
How to Change the IPv4 Address and Other Network Configuration Parameters
Packet Forwarding and Routing on IPv4 Networks
Routing Protocols Supported by Oracle Solaris
IPv4 Autonomous System Topology
How to Configure an IPv4 Router
Routing Tables and Routing Types
How to Create a Multihomed Host
Configuring Routing for Single-Interface Systems
How to Enable Static Routing on a Single-Interface Host
How to Enable Dynamic Routing on a Single-Interface Host
Monitoring and Modifying Transport Layer Services
How to Log the IP Addresses of All Incoming TCP Connections
How to Add Services That Use the SCTP Protocol
How to Use TCP Wrappers to Control Access to TCP Services
6. Administering Network Interfaces (Tasks)
7. Configuring an IPv6 Network (Tasks)
8. Administering a TCP/IP Network (Tasks)
9. Troubleshooting Network Problems (Tasks)
10. TCP/IP and IPv4 in Depth (Reference)
13. Planning for DHCP Service (Tasks)
14. Configuring the DHCP Service (Tasks)
15. Administering DHCP (Tasks)
16. Configuring and Administering the DHCP Client
17. Troubleshooting DHCP (Reference)
18. DHCP Commands and Files (Reference)
19. IP Security Architecture (Overview)
21. IP Security Architecture (Reference)
22. Internet Key Exchange (Overview)
24. Internet Key Exchange (Reference)
25. IP Filter in Oracle Solaris (Overview)
28. Administering Mobile IP (Tasks)
29. Mobile IP Files and Commands (Reference)
30. Introducing IPMP (Overview)
31. Administering IPMP (Tasks)
Part VII IP Quality of Service (IPQoS)
32. Introducing IPQoS (Overview)
33. Planning for an IPQoS-Enabled Network (Tasks)
34. Creating the IPQoS Configuration File (Tasks)
35. Starting and Maintaining IPQoS (Tasks)
36. Using Flow Accounting and Statistics Gathering (Tasks)
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.
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).
The parameters that are supplied during network configuration follow:
The IP address of each network interface on every system.
The host names of each system on the network. You can type the host name in a local file or a name service database.
The NIS, LDAP, or DNS domain name in which the system resides, if applicable.
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 Packet Forwarding and Routing on IPv4 Networks See Table 5-1 for a list of routing protocols supported in Oracle Solaris.
Subnet mask (required only for networks with subnets).
If the Oracle Solaris installation program detects more than one interface on the system, you can optionally configure the additional interfaces during installation. For complete instructions, see Oracle Solaris 10 9/10 Installation Guide: Basic Installations.
This chapter contains information on creating and editing local configuration files. See System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) for information on working with name service databases.
Use this procedure for configuring TCP/IP on a host that runs in local files mode.
For steps for manually configuring interfaces in Solaris 10 11/06 and subsequent releases, refer to How to Configure a Physical Interface After System Installation.
The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
When you specify the host name of a system during Oracle Solaris installation, that host name is entered into the /etc/nodename file. Make sure that the node name entry is the correct host name for the system.
For file syntax and basic information about the /etc/hostname.interface file, refer to Basics for Administering Physical Interfaces.
The Oracle Solaris installation program requires you to configure at least one interface during installation. The first interface that you configure automatically becomes the primary network interface. The installation program creates an /etc/hostname.interface file for the primary network interface and any other interfaces that you optionally configure at installation time.
If you configured additional interfaces during installation, verify that each interface has a corresponding /etc/hostname.interface file. You do not need to configure more than one interface during Oracle Solaris installation. However, if you later want to add more interfaces to the system, you must manually configure them.
For steps for manually configuring interfaces in Solaris 10 11/06 and subsequent releases, refer to How to Configure a Physical Interface After System Installation.
The Oracle Solaris 10 installation program creates the /etc/inet/ipnodes file. This file contains the node name and IPv4 address, and IPv6 address, if appropriate, of every interface that is configured during installation.
Use the following format for entries in the /etc/inet/ipnodes file:
IP-address node-name nicknames...
nicknames are additional names by which an interface is known.
The Oracle Solaris installation program creates entries for the primary network interface, loopback address, and, if applicable, any additional interfaces that were configured during installation.
For example, suppose host tenere was part of the domain deserts.worldwide.com. Therefore, you would type deserts.worldwide.com in /etc/defaultdomain. See /etc/defaultdomain File for more information.
See /etc/defaultrouter File for information about this file.
Additional routing options are available, as discussed in How to Configure Hosts for Network Client Mode. You can apply these options to a local files mode configuration.
If the host gets its IP address from a DHCP server, you do not have to specify the network mask.
If you have set up a NIS server on the same network as this client, you can add netmask information into the appropriate database on the server.
For all other conditions, do the following:
Use the following format:
network-number netmask
For example, for the Class C network number 192.168.83, you would type:
192.168.83.0 255.255.255.0
For CIDR addresses, convert the network prefix into the equivalent dotted decimal representation. Network prefixes and their dotted decimal equivalents can be found in Table 2-3. For example, use the following to express the CIDR network prefix 192.168.3.0/22.
192.168.3.0 255.255.252.0
netmasks: files nis
Information for setting up installation servers and boot servers is found in Oracle Solaris 10 9/10 Installation Guide: Basic Installations.
The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
# mkdir /tftpboot
This command configures the system as a TFTP, bootparams, and RARP server.
# ln -s /tftpboot/. /tftpboot/tftpboot
Check that the entry reads as follows:
tftp dgram udp6 wait root /usr/sbin/in.tftpd in.tftpd -s /tftpboot
This line prevents in.tftpd from retrieving any file other than the files that are located in /tftpboot.
Add the host names and IP addresses for every client on the network.
Create entries for every host on the network that runs in network client mode.
See bootparams Database. Use the wildcard entry or create an entry for every host that runs in network client mode.
# /usr/sbin/inetconv
# svcs network/tftp/udp6
You should receive output resembling the following:
STATE STIME FMRI online 18:22:21 svc:/network/tftp/udp6:default
The in.tftpd daemon is managed by the Service Management Facility. Administrative actions on in.tftpd, such as enabling, disabling, or restarting, can be performed using the svcadm command. Responsibility for initiating and restarting this service is delegated to inetd. Use the inetadm command to make configuration changes and to view configuration information for in.tftpd. You can query the service's status by using the svcs command. For an overview of the Service Management Facility, refer to Chapter 18, Managing Services (Overview), in System Administration Guide: Basic Administration.
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.
Do the following procedure on each host to be configured in network client mode.
The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
If such a file exists, delete it.
Eliminating /etc/nodename causes the system to use the hostconfig program to obtain the host name, domain name, and router addresses from the network configuration server. See Configuring Systems on the Local Network.
Ensure that the file is empty. An empty /etc/hostname.interface file causes the system to acquire the IPv4 address from the network configuration server.
# cat /etc/inet/hosts # Internet host table # 127.0.0.1 localhost
The IPv4 loopback interface has the IP address 127.0.0.1.
For more information, see Loopback Address. The file should not contain the IP address and host name for the local host (primary network interface).
If such a file exists, delete it.
The hostconfig program automatically sets the domain name. To override the domain name that is set by hostconfig, type the substitute domain name in the /etc/defaultdomain file.
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.
Note - The instructions apply specifically to changing the IPv4 address of the primary network interface. To add another interface to the system, refer to How to Configure a Physical Interface After System Installation.
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 IPv4 Addresses in CIDR Format.
The Primary Administrator role includes the Primary Administrator profile. To create the role and assign the role to a user, see Chapter 2, Working With the Solaris Management Console (Tasks), in System Administration Guide: Basic Administration.
Use the following syntax for each IP address that you add to the system:
IP-address host-name, nicknames IP-address interface-name, nicknames
The first entry should contain the IP address of the primary network interface and the host name of the system. You can optionally add nicknames for the host name. When you add additional physical interfaces to a system, create entries in /etc/inet/ipnodes for the IP addresses and associated names of those interfaces.
With the ipadm command, you cannot modify an IP address directly. You first delete the address object that represents the IP address you want to modify. Then you assign a new address by using the same address object name.
# ipadm delete-addr addrobj # ipadm create-addr -T static IP-address addrobj
You can use any of the following as the entry for the primary network interface in the /etc/hostnameinterface file:
IPv4 address, expressed in traditional dotted decimal format
Use the following syntax:
IPv4 address subnet mask
The netmask entry is optional. If you do not specify it, the default netmask is assumed.
Here is an example:
# vi hostname.eri0 10.0.2.5 netmask 255.0.0.0
IPv4 address, expressed in CIDR notation, if appropriate for your network configuration.
IPv4 address/network prefix
Here is an example:
# vi hostname.eri0 10.0.2.5/8
The CIDR prefix designates the appropriate netmask for the IPv4 address. For example, the /8 above indicates the netmask 255.0.0.0.
Host name.
To use the system's host name in the /etc/hostname.interface file, be sure that the host name and associated IPv4 address are also in the hosts database.
/etc/netmasks
(Optional) /etc/hostname.interface
# reboot -- -r
Example 5-1 Modifying the IPv4 Address and Other Network Parameters to Persist Across Reboots
This example shows how to change the following network parameters of a system that is moved to another subnet:
IP address for the primary network interface eri0 changes from 10.0.0.14 to 192.168.55.14.
Host name changes from myhost to mynewhostname.
Netmask changes from 255.0.0.0 to 255.255.255.0.
Default router address changes to 192.168.55.200.
Check the system's current status:
# hostname myhost # ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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
Next, change the system's host name and the IP address of eri0 in the appropriate files:
# vi /etc/nodename mynewhostname
In Oracle Solaris 10 11/06 and earlier Oracle Solaris 10 releases only, do the following:
# vi /etc/inet/ipnodes 192.168.55.14 mynewhostname #moved system to 192.168.55 net # vi /etc/inet/hosts # # Internet host table # 127.0.0.1 localhost 192.168.55.14 mynewhostname loghost # vi /etc/hostname.eri0 192.168.55.14 netmask 255.255.255.0
Finally, change the netmask and the IP address of the default router.
# vi /etc/netmasks ... 192.168.55.0 255.255.255.0 # vi /etc/defaultrouter 192.168.55.200 #moved system to 192.168.55 net #
After making these changes, reboot the system.
# reboot -- -r
Verify that the configuration you just set is maintained after the reboot:
# hostname mynewhostname # ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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
Example 5-2 Changing the IP Address and Host Name For the Current Session
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 eri0 changes from 10.0.0.14 to 192.168.34.100.
# ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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 # ifconfig eri0 192.168.34.100 netmask 255.255.255.0 broadcast + up # vi /etc/nodename mynewhostname # ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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 # hostname mynewhostname
Example 5-3 Changing the IPv4 Address for the Current Session, Using CIDR Notation
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, eri0, changes from 10.0.0.14 to 192.168.6.25/27.
# ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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 # ifconfig eri0 192.168.6.25/27 broadcast + up # vi /etc/nodename mynewhostname # ifconfig -a lo0: flags=1000849 <UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 eri0: flags=1000843 <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 # hostname mynewhostname
When you use CIDR notation for the IPv4 address, you do not have to specify the netmask. ifconfig uses the network prefix designation to determine the netmask. For example, for the 192.168.6.0/27 network, ifconfig sets the netmask ffffffe0. If you had used the more common /24 prefix designation, the resulting netmask is ffffff00. Using the /24 prefix designation is the equivalent of specifying the netmask 255.255.255.0 to ifconfig when configuring a new IP address.
To change the IP address of an interface other than the primary network interface, refer to System Administration Guide: Basic Administration and How to Configure a Physical Interface After System Installation.