Advanced System Administration for the Solaris™ 10 Operating System SA-202-S10 Student Guide
Sun Microsystems, Inc. UBRM05-104 500 Eldorado Blvd. Broomfield, CO 80021 U.S.A. Revision A.1
Copyright 2005 Sun Microsystems, Inc. 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. No part of this product or document may be reproduced in any form by any means without prior written authorization of Sun and its licensors, if any. Third-party software, including font technology, is copyrighted and licensed from Sun suppliers. Sun, Sun Microsystems, the Sun logo, Solaris, JumpStart, Web Start, Solstice DiskSuite, SunBlade, SunSolve, Ultra, OpenBoot, Java, Sun Ray, Java Card and iPlanet are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd. The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for its users and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developing the concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sun’s licensees who implement OPEN LOOK GUIs and otherwise comply with Sun’s written license agreements. Federal Acquisitions: Commercial Software – Government Users Subject to Standard License Terms and Conditions Export Laws. Products, Services, and technical data delivered by Sun may be subject to U.S. export controls or the trade laws of other countries. You will comply with all such laws and obtain all licenses to export, re-export, or import as may be required after delivery to You. You will not export or re-export to entities on the most current U.S. export exclusions lists or to any country subject to U.S. embargo or terrorist controls as specified in the U.S. export laws. You will not use or provide Products, Services, or technical data for nuclear, missile, or chemical biological weaponry end uses. DOCUMENTATION IS PROVIDED “AS IS” AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS, AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLY INVALID. THIS MANUAL IS DESIGNED TO SUPPORT AN INSTRUCTOR-LED TRAINING (ILT) COURSE AND IS INTENDED TO BE USED FOR REFERENCE PURPOSES IN CONJUNCTION WITH THE ILT COURSE. THE MANUAL IS NOT A STANDALONE TRAINING TOOL. USE OF THE MANUAL FOR SELF-STUDY WITHOUT CLASS ATTENDANCE IS NOT RECOMMENDED. Export Commodity Classification Number (ECCN) assigned: 12 December 2001
Please Recycle
Copyright 2005 Sun Microsystems Inc. 4150 Network Circle, Santa Clara, California 95054, Etats-Unis. Tous droits réservés. Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l’utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l’autorisation préalable et écrite de Sun et de ses bailleurs de licence, s’il y en a. Le logiciel détenu par des tiers, et qui comprend la technologie relative aux polices de caractères, est protégé par un copyright et licencié par des fournisseurs de Sun. Sun, Sun Microsystems, le logo Sun, Solaris, JumpStart, Web Start, Solstice DiskSuite, SunBlade, SunSolve, Ultra, OpenBoot, Java, Sun Ray, Java Card, et iPlanet sont des marques de fabrique ou des marques déposées de Sun Microsystems, Inc. aux Etats-Unis et dans d’autres pays. Toutes les marques SPARC sont utilisées sous licence sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d’autres pays. Les produits portant les marques SPARC sont basés sur une architecture développée par Sun Microsystems, Inc. UNIX est une marques déposée aux Etats-Unis et dans d’autres pays et licenciée exclusivement par X/Open Company, Ltd. L’interfaces d’utilisation graphique OPEN LOOK et Sun™ a été développée par Sun Microsystems, Inc. pour ses utilisateurs et licenciés. Sun reconnaît les efforts de pionniers de Xerox pour larecherche et le développement du concept des interfaces d’utilisation visuelle ou graphique pour l’industrie de l’informatique. Sun détient une licence non exclusive de Xerox sur l’interface d’utilisation graphique Xerox, cette licence couvrant également les licenciés de Sun qui mettent en place l’interface d’utilisation graphique OPEN LOOK et qui en outre se conforment aux licences écrites de Sun. Législation en matière dexportations. Les Produits, Services et données techniques livrés par Sun peuvent être soumis aux contrôles américains sur les exportations, ou à la législation commerciale dautres pays. Nous nous conformerons à lensemble de ces textes et nous obtiendrons toutes licences dexportation, de ré-exportation ou dimportation susceptibles dêtre requises après livraison à Vous. Vous nexporterez, ni ne ré-exporterez en aucun cas à des entités figurant sur les listes américaines dinterdiction dexportation les plus courantes, ni vers un quelconque pays soumis à embargo par les Etats-Unis, ou à des contrôles anti-terroristes, comme prévu par la législation américaine en matière dexportations. Vous nutiliserez, ni ne fournirez les Produits, Services ou données techniques pour aucune utilisation finale liée aux armes nucléaires, chimiques ou biologiques ou aux missiles. LA DOCUMENTATION EST FOURNIE “EN L’ETAT” ET TOUTES AUTRES CONDITIONS, DECLARATIONS ET GARANTIES EXPRESSES OU TACITES SONT FORMELLEMENT EXCLUES, DANS LA MESURE AUTORISEE PAR LA LOI APPLICABLE, Y COMPRIS NOTAMMENT TOUTE GARANTIE IMPLICITE RELATIVE A LA QUALITE MARCHANDE, A L’APTITUDE A UNE UTILISATION PARTICULIERE OU A L’ABSENCE DE CONTREFAÇON. CE MANUEL DE RÉFÉRENCE DOIT ÊTRE UTILISÉ DANS LE CADRE D’UN COURS DE FORMATION DIRIGÉ PAR UN INSTRUCTEUR (ILT). IL NE S’AGIT PAS D’UN OUTIL DE FORMATION INDÉPENDANT. NOUS VOUS DÉCONSEILLONS DE L’UTILISER DANS LE CADRE D’UNE AUTO-FORMATION.
Please Recycle
Table of Contents About This Course ............................................................Preface-xvii Course Goals....................................................................... Preface-xvii Course Map........................................................................ Preface-xviii Topics Not Covered............................................................. Preface-xix How Prepared Are You?..................................................... Preface-xxi Introductions .......................................................................Preface-xxii How to Use Course Materials ..........................................Preface-xxiii Conventions ........................................................................Preface-xxiv Icons ............................................................................Preface-xxiv Typographical Conventions .....................................Preface-xxv Describing Interface Configuration ................................................1-1 Objectives ........................................................................................... 1-1 Controlling and Monitoring Network Interfaces .......................... 1-2 Displaying the MAC Address................................................. 1-2 Displaying the IP Address...................................................... 1-3 Marking an Ethernet Interface as Down................................ 1-3 Sending ICMP ECHO_REQUEST Packets.................................. 1-4 Capturing and Inspecting Network Packets........................ 1-5 Configuring IPv4 Interfaces at Boot Time ...................................... 1-6 Introducing IPv4 Interface Files.............................................. 1-6 Changing the System Host Name ......................................... 1-9 Performing the Exercises ................................................................ 1-12 Exercise: The Solaris OS Network Commands (Level 1) ........... 1-13 Preparation............................................................................... 1-13 Tasks ......................................................................................... 1-13 Exercise: The Solaris OS Network Commands (Level 2) ........... 1-14 Preparation............................................................................... 1-14 Task Summary......................................................................... 1-14 Tasks ........................................................................................ 1-15 Exercise: The Solaris OS Network Commands (Level 3) ........... 1-17 Preparation............................................................................... 1-17 Task Summary......................................................................... 1-17 Tasks and Solutions ............................................................... 1-18 Exercise Summary............................................................................ 1-20 v Copyright 2005 Sun Microsystems, Inc. All Rights Reserved.Sun Services, Revision A.1
Describing the Client-Server Model ............................................... 2-1 Objectives ........................................................................................... 2-1 Introducing Client-Server Processes ............................................... 2-2 Introducing Client Processes................................................... 2-2 Introducing Server Processes ................................................. 2-4 The Service Management Facility (SMF) ........................................ 2-6 SMF Service................................................................................ 2-6 Service Identifiers..................................................................... 2-7 Service States ............................................................................. 2-9 Milestones ................................................................................ 2-10 The svc.startd Daemon........................................................... 2-12 The Service Configuration Repository................................. 2-12 Starting Server Processes ................................................................ 2-14 Introducing the Internet Service Daemon (inetd) ............ 2-14 The Impact of SMF on Network Services ........................... 2-17 Introducing Network Ports .................................................. 2-19 Starting Services That Use a Well-Known Port .................. 2-20 Starting RPC Services ............................................................ 2-23 Using the rpcinfo Commands ............................................ 2-26 Performing the Exercises ................................................................ 2-28 Exercise: Observing the Solaris OS Network (Level 1)............... 2-29 Preparation............................................................................... 2-29 Tasks ......................................................................................... 2-29 Exercise: Observing the Solaris OS Network (Level 2)............... 2-31 Preparation............................................................................... 2-31 Task Summary......................................................................... 2-31 Tasks ......................................................................................... 2-32 Exercise: Observing the Solaris OS Network (Level 3)............... 2-36 Preparation............................................................................... 2-36 Task Summary......................................................................... 2-36 Tasks and Solutions ................................................................ 2-37 Exercise Summary............................................................................ 2-42 Customizing the Solaris™ Management Console ........................ 3-1 Objectives ........................................................................................... 3-1 Introducing the Solaris Management Console Toolbox Editor Actions .............................................................................................. 3-2 Starting the Solaris Management Console ............................ 3-2 Introducing the Solaris Management Console and the Solaris Management Console Toolbox Editor ................... 3-4 Adding a Toolbox URL ......................................................... 3-17 Adding a Tool.......................................................................... 3-17 Using the Solaris Management Console Toolbox Editor ........... 3-18 Adding Access to a Toolbox URL of a Solaris Management Console.......................................................... 3-18 Adding Access to a Tool ........................................................ 3-34 Performing the Exercises ................................................................ 3-57
vi
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise: Using the Solaris Management Console (Level 1) ...... 3-58 Preparation............................................................................... 3-58 Task Summary......................................................................... 3-58 Exercise: Using the Solaris Management Console (Level 2) ...... 3-59 Preparation............................................................................... 3-59 Task Summary......................................................................... 3-59 Tasks ........................................................................................ 3-60 Exercise: Using the Solaris Management Console (Level 3) ...... 3-67 Preparation............................................................................... 3-67 Task Summary......................................................................... 3-67 Tasks and Solutions ................................................................ 3-68 Exercise Summary............................................................................ 3-75 Managing Swap Configuration........................................................4-1 Objectives ........................................................................................... 4-1 Introducing Virtual Memory............................................................ 4-2 Physical RAM ............................................................................ 4-2 Swap Space ............................................................................... 4-3 The swapfs File System ........................................................... 4-4 Paging ........................................................................................ 4-5 Configuring Swap Space................................................................... 4-6 Displaying the Current Swap Configuration........................ 4-6 Adding Swap Space.................................................................. 4-8 Removing Swap Space ............................................................. 4-9 Performing the Exercises ................................................................ 4-11 Exercise: Managing swap Utility Configuration (Level 1) ......... 4-12 Preparation............................................................................... 4-12 Tasks ......................................................................................... 4-13 Exercise: Managing swap Utility Configuration (Level 2) ......... 4-14 Preparation............................................................................... 4-14 Task Summary......................................................................... 4-15 Tasks ......................................................................................... 4-15 Exercise: Managing swap Utility Configuration (Level 3) ......... 4-18 Preparation............................................................................... 4-18 Task Summary......................................................................... 4-19 Tasks and Solutions ............................................................... 4-19 Exercise Summary............................................................................ 4-23 Managing Crash Dumps and Core Files.........................................5-1 Objectives ........................................................................................... 5-1 Managing Crash Dump Behavior.................................................... 5-2 The Crash Dump ....................................................................... 5-2 Displaying the Current Dump Configuration ...................... 5-3 Changing the Crash Dump Configuration........................... 5-4 Managing Core File Behavior........................................................... 5-6 Core Files.................................................................................... 5-6 Displaying the Current Core File Configuration.................. 5-7 Changing the Core File Configuration .................................. 5-9 vii Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Performing the Exercises ................................................................ 5-14 Exercise: Collecting the Crash Dump and Core Dump (Level 1) .......................................................................................... 5-15 Preparation............................................................................... 5-15 Tasks ......................................................................................... 5-15 Exercise: Collecting the Crash Dump and Core Dump (Level 2) .......................................................................................... 5-16 Preparation............................................................................... 5-16 Task Summary......................................................................... 5-16 Tasks ......................................................................................... 5-17 Exercise: Collecting the Crash Dump and Core Dump (Level 3) .......................................................................................... 5-19 Preparation............................................................................... 5-19 Task Summary......................................................................... 5-19 Tasks and Solutions ................................................................ 5-20 Exercise Summary............................................................................ 5-23 Configuring NFS .............................................................................. 6-1 Introducing the Benefits of NFS....................................................... 6-2 Benefits of Centralized File Access........................................ 6-3 Benefits of Common Software Access.................................... 6-3 Introducing the Fundamentals of the NFS Distributed File System ....................................................................................... 6-4 NFS Server................................................................................. 6-5 NFS Client .................................................................................. 6-6 NFSv4......................................................................................... 6-7 Managing an NFS Server ........................................................ 6-8 The NFS Server Files................................................................. 6-8 The NFS Server Daemons ..................................................... 6-11 Managing the NFS Server Daemons .................................... 6-14 NFS Server Commands .......................................................... 6-16 Configuringthe NFS Server for Sharing Resources........... 6-17 Managing the NFS Client................................................................ 6-22 NFS Client Files ....................................................................... 6-22 NFS Client Daemons .............................................................. 6-23 Managing the NFS Client Daemons.................................... 6-24 NFS Client Commands........................................................... 6-25 Configuring the NFS Client for Mounting Resources ....... 6-25 Enabling the NFS Server Logging ................................................. 6-31 Fundamentals of NFS Server Logging................................. 6-31 Configuring NFS Log Paths ................................................. 6-32 Initiating NFS Logging.......................................................... 6-34 Configuring the nfslogd Daemon Behavior..................... 6-35 Managing NFS With the Solaris Management Console Storage Folder Tools ..................................................................... 6-36 Adding a Shared Directory on the NFS Server................... 6-36 Mounting a Shared Directory on the NFS Client .............. 6-38
viii
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Troubleshooting NFS Errors .......................................................... 6-40 The rpcbind failure Error.................................................. 6-40 The server not responding Error...................................... 6-41 The NFS client fails a reboot Error .......................... 6-41 The service not responding Error ................................. 6-42 The program not registered Error ................................. 6-42 The stale NFS file handle Error...................................... 6-43 The unknown host Error ....................................................... 6-43 The mount point Error .......................................................... 6-43 The no such file Error ...................................................... 6-44 Performing the Exercises ................................................................ 6-45 Exercise: Configuring NFS (Level 1) ............................................. 6-46 Preparation............................................................................... 6-46 Tasks ......................................................................................... 6-46 Exercise: Configuring NFS (Level 2) ............................................. 6-48 Preparation............................................................................... 6-48 Task Summary......................................................................... 6-48 Tasks ......................................................................................... 6-49 Exercise: Configuring NFS (Level 3) ............................................. 6-52 Preparation............................................................................... 6-52 Task Summary......................................................................... 6-52 Tasks and Solutions ................................................................ 6-53 Exercise Summary............................................................................ 6-57 Configuring AutoFS .........................................................................7-1 Objectives ........................................................................................... 7-1 Introducing the Fundamentals of AutoFS...................................... 7-2 AutoFS File System ................................................................... 7-3 The automountd Daemon....................................................... 7-4 The automount Command ...................................................... 7-4 Using Automount Maps ................................................................... 7-5 Configuring the Master Map................................................... 7-6 Identifying Mount Points for Special Maps .......................... 7-7 Adding Direct Map Entries ..................................................... 7-8 Adding Indirect Map Entries ................................................ 7-11 Updating the Automount Maps ........................................... 7-13 Stopping and Starting the Automount System................... 7-15 Performing the Exercises ................................................................ 7-17 Exercise: Using the Automount Facility (Level 1)....................... 7-18 Preparation............................................................................... 7-18 Tasks ......................................................................................... 7-18 Exercise: Using the Automount Facility (Level 2)....................... 7-19 Preparation............................................................................... 7-19 Task Summary......................................................................... 7-19 Tasks ......................................................................................... 7-20
ix Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise: Using the Automount Facility (Level 3)....................... 7-24 Preparation............................................................................... 7-24 Task Summary......................................................................... 7-24 Tasks and Solutions ................................................................ 7-25 Exercise Summary............................................................................ 7-31 Describing RAID and the Solaris™ Volume Manager Software .. 8-1 Objectives ........................................................................................... 8-1 Introducing RAID .............................................................................. 8-2 RAID 0 ........................................................................................ 8-2 RAID 1 ........................................................................................ 8-6 RAID 5 ...................................................................................... 8-13 Hardware Considerations ..................................................... 8-16 Introducing Solaris Volume Manager Software Concepts ........ 8-19 Logical Volume ....................................................................... 8-19 Soft Partitions .......................................................................... 8-20 Introducing the State Database ............................................. 8-21 Introducing Hot Spares and Hot Spare Pools..................... 8-24 Configuring Solaris Volume Manager Software............................ 9-1 Objectives ........................................................................................... 9-1 Solaris Volume Manager Concepts ................................................. 9-2 The State Database Replicas ............................................................. 9-3 Creating the State Database..................................................... 9-3 Configuring RAID-0 ........................................................................ 9-14 RAID-0 Striped Volumes ................................................................ 9-15 Creating a RAID-0 Volume .................................................. 9-16 Configuring RAID-1 ........................................................................ 9-29 Building a Mirror of the Root (/) File System.............................. 9-31 The Scenario............................................................................ 9-32 Creating The RAID-0 Volumes ............................................. 9-32 Creating The RAID-1 Volume............................................... 9-43 Unmirroring the Root (/) File System................................. 9-60 Performing the Exercises ................................................................ 9-62 Exercise: Mirroring the Root (/) File System (Level 1) ............... 9-63 Preparation............................................................................... 9-63 Tasks ......................................................................................... 9-64 Exercise: Mirroring the Root (/) File System (Level 2) ............... 9-65 Preparation............................................................................... 9-65 Task Summary......................................................................... 9-66 Tasks ......................................................................................... 9-66 Exercise: Mirroring the Root (/) File System (Level 3) ............... 9-69 Preparation............................................................................... 9-69 Task Summary......................................................................... 9-70 Tasks and Solutions ................................................................ 9-70 Exercise Summary............................................................................ 9-74
x
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Configuring Role-Based Access Control (RBAC) .......................10-1 Objectives ......................................................................................... 10-1 Introducing RBAC Fundamentals ................................................. 10-2 Key RBAC Files ....................................................................... 10-2 Roles.......................................................................................... 10-3 Assigning Rights Profiles To Users ..................................... 10-4 Assigning Rights Profiles To Roles ..................................... 10-8 Assigning Roles To Users ................................................... 10-11 Using Roles ........................................................................... 10-12 Authorizations................................................................................ 10-13 Assigning Authorizations.................................................... 10-15 Assigning Authorizations To User Accounts .................. 10-16 Assigning Authorizations To Roles.................................... 10-17 Assigning Authorizations To Rights Profiles .................. 10-18 RBAC Configuration File Summary............................................ 10-19 The /etc/user_attr File.................................................... 10-19 The /etc/security/prof_attr File................................ 10-20 The /etc/security/exec_attr File................................ 10-22 The /etc/security/auth_attr File............................... 10-24 Managing RBAC Using the Solaris Management Console...... 10-26 Fundamentals of Managing RBAC..................................... 10-26 Performing the Exercises .............................................................. 10-59 Exercise: Configuring RBAC (Level 1)........................................ 10-60 Preparation............................................................................. 10-60 Task Summary....................................................................... 10-60 Exercise: Configuring RBAC (Level 2)........................................ 10-61 Preparation............................................................................. 10-61 Task Summary....................................................................... 10-61 Tasks ....................................................................................... 10-61 Exercise: Configuring RBAC (Level 3)........................................ 10-65 Preparation............................................................................. 10-65 Task Summary....................................................................... 10-65 Tasks and Solutions ............................................................. 10-66 Exercise Summary.......................................................................... 10-72 Configuring System Messaging....................................................11-1 Objectives ......................................................................................... 11-1 Introducing the syslog Function .................................................. 11-2 The syslog Concept............................................................... 11-2 The /etc/syslog.conf File ................................................ 11-3 The syslogd Daemon and the m4 Macro Processor ......... 11-8 Configuring the /etc/syslog.conf File................................... 11-12 Message Routing ................................................................... 11-12 Stopping and Starting the syslogd Daemon.................... 11-13 Configuring syslog Messaging .................................................. 11-14 Enabling TCP Tracing .......................................................... 11-14
xi Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Monitoring a syslog File in Real Time ............................. 11-16 Adding One-Line Entries to a System Log File ............... 11-18 Using the Solaris Management Console Log Viewer ............... 11-20 Opening the Solaris Management Console Log Viewer.................................................................................. 11-20 Viewing a syslog Message File.......................................... 11-21 Viewing a Management Tools Log File ............................. 11-23 Browsing the Contents of a Management Tools Log File ............................................................................... 11-25 Displaying Management Tools Log Entry Details ........... 11-27 Backing Up Management Tools Log File ......................... 11-29 Performing the Exercises .............................................................. 11-33 Exercise: Using the syslog Function and Auditing Utilities (Level 1) ........................................................................................ 11-34 Preparation............................................................................. 11-34 Tasks ....................................................................................... 11-34 Exercise: Using the syslog Function and Auditing Utilities (Level 2) ........................................................................................ 11-36 Preparation............................................................................. 11-36 Task Summary....................................................................... 11-36 Tasks ....................................................................................... 11-37 Exercise: Using the syslog Function and Auditing Utilities (Level 3) ........................................................................................ 11-43 Preparation............................................................................. 11-43 Task Summary....................................................................... 11-43 Tasks and Solutions .............................................................. 11-44 Exercise Summary.......................................................................... 11-52 Using Name Services .................................................................... 12-1 Objectives ......................................................................................... 12-1 Introducing the Name Service Concept........................................ 12-2 Domain Name System (DNS) ............................................... 12-4 Network Information Service (NIS) ..................................... 12-5 Network Information Service Plus (NIS+) ......................... 12-7 Lightweight Directory Access Protocol (LDAP) ................ 12-8 Name Service Features Summary....................................... 12-10 Introducing the Name Service Switch File................................. 12-11 Database Sources.................................................................. 12-13 Status Codes........................................................................... 12-14 Actions .................................................................................... 12-14 Configuring the Name Service Cache Daemon (nscd) ............ 12-16 The nscd Daemon ................................................................. 12-16 Configuring the nscd Daemon ........................................... 12-16 Stopping and Starting the nscd Daemon .......................... 12-18 Retrieving Name Service Information ........................................ 12-20 The getent Command......................................................... 12-20 Using the getent Command ............................................. 12-21
xii
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Exercise: Reviewing Name Services............................................ 12-22 Preparation............................................................................. 12-22 Tasks ....................................................................................... 12-22 Task Solutions....................................................................... 12-24 Exercise Summary.......................................................................... 12-25 Configuring Name Service Clients................................................13-1 Objectives ......................................................................................... 13-1 Configuring a DNS Client .............................................................. 13-2 Configuring the DNS Client During Installation ............... 13-2 Editing DNS Client Configuration Files .............................. 13-5 Setting Up an LDAP Client............................................................. 13-7 Client Authentication ............................................................. 13-7 Client Profile and Proxy Account......................................... 13-8 Client Initialization ................................................................. 13-8 Configuring the LDAP Client During Installation............ 13-9 Initializing the Native LDAP Client................................... 13-12 Copying the /etc/nsswitch.ldap File to the /etc/ nsswitch.conf File .......................................................... 13-14 Listing LDAP Entries............................................................ 13-15 Unconfiguring an LDAP Client .......................................... 13-16 Performing the Exercises .............................................................. 13-17 Exercise: Configuring a System to Use DNS and LDAP (Level 1) ........................................................................................ 13-18 Preparation............................................................................. 13-18 Tasks ....................................................................................... 13-18 Exercise: Configuring a System to Use DNS and LDAP (Level 2) ........................................................................................ 13-19 Preparation............................................................................. 13-19 Task Summary....................................................................... 13-19 Tasks ....................................................................................... 13-19 Exercise: Configuring a System to Use DNS and LDAP (Level 3) ........................................................................................ 13-21 Preparation............................................................................. 13-21 Task Summary....................................................................... 13-21 Tasks and Solutions .............................................................. 13-22 Exercise Summary.......................................................................... 13-24 Configuring the Network Information Service (NIS)....................14-1 Objectives ......................................................................................... 14-1 Introducing NIS Fundamentals ..................................................... 14-2 NIS Namespace Information................................................. 14-2 NIS Domains............................................................................ 14-4 NIS Processes.......................................................................... 14-6 Configuring the Name Service Switch.......................................... 14-9 Changing Lookup Requests to Go From Files to NIS...... 14-10 Changing Lookup Requests to Go From NIS to Files...... 14-11
xiii Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Introducing NIS Security .............................................................. 14-13 The securenets File ........................................................... 14-13 The passwd.adjunct File.................................................... 14-14 Configuring NIS Domain.............................................................. 14-16 Generating NIS Maps ........................................................... 14-16 Configuring the NIS Master Server.................................... 14-20 Testing the NIS Service ........................................................ 14-23 Configuring the NIS Client.................................................. 14-24 Configuring the NIS Slave Server....................................... 14-25 Updating the NIS Map ......................................................... 14-27 Updating the NIS Password Map....................................... 14-27 Updating the NIS timezone Map ...................................... 14-28 Building Custom NIS Maps.......................................................... 14-32 Using the make Command................................................... 14-32 Editing the NIS Makefile File ........................................... 14-33 Troubleshooting NIS ..................................................................... 14-38 Troubleshooting NIS Server Failure Messages................. 14-38 Troubleshooting NIS Client Failure Messages ................. 14-41 Performing the Exercises .............................................................. 14-43 Exercise: Configuring NIS (Level 1) ............................................ 14-44 Preparation............................................................................. 14-44 Tasks ....................................................................................... 14-45 Exercise: Configuring NIS (Level 2) ............................................ 14-46 Preparation............................................................................. 14-46 Task Summary....................................................................... 14-47 Tasks ....................................................................................... 14-48 Exercise: Configuring NIS (Level 3) ............................................ 14-55 Preparation............................................................................. 14-55 Task Summary....................................................................... 14-56 Tasks and Solutions ............................................................. 14-57 Exercise Summary.......................................................................... 14-69 Introduction to Zones .................................................................... 15-1 Objectives ......................................................................................... 15-1 Introducing Solaris Zones............................................................... 15-2 Server Consolidation Solutions............................................. 15-2 Resource Sharing..................................................................... 15-3 Zone Features .......................................................................... 15-4 Zone Concepts .................................................................................. 15-5 Zone Types............................................................................... 15-5 Zone Daemons........................................................................ 15-7 Zone File Systems ................................................................... 15-7 Zone Networking.................................................................... 15-9 Zone Command Scope ........................................................... 15-9 Zone States ............................................................................. 15-10 Configuring Zones ......................................................................... 15-12
xiv
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Identifying Zone Components ............................................ 15-12 Allocating File System Space............................................... 15-12 Using the zonecfg Command ............................................ 15-13 The zonecfg Resources Parameters................................... 15-14 Zone Configuration Walk-Through .................................. 15-16 Viewing the Zone Configuration File ................................ 15-19 Using the zoneadm Command ..................................................... 15-20 Verifying a Configured Zone .............................................. 15-20 Installing a Configured Zone .............................................. 15-21 Booting a Zone....................................................................... 15-21 Halting a Zone....................................................................... 15-22 Rebooting a Zone .................................................................. 15-22 Logging Into and Working With the Zone........................ 15-22 Deleting a Zone ..................................................................... 15-24 Describing the Custom JumpStart Configurations.....................16-1 Objectives ......................................................................................... 16-1 Introducing JumpStart Configurations......................................... 16-2 Purpose of JumpStart ............................................................. 16-2 Boot Services ............................................................................ 16-3 Identification Services ............................................................ 16-5 Configuration Services ........................................................... 16-7 Installation Services ................................................................ 16-8 Implementing a Basic JumpStart Server ..................................... 16-11 Spooling the Operating System Image .............................. 16-11 Editing the sysidcfg File.................................................... 16-13 Running the check Script .................................................... 16-21 Running the add_install_client Script........................ 16-23 Booting the JumpStart Client .............................................. 16-26 Exercise: Configuring a Software Installation Procedure Using JumpStart.............................................. 16-26 Task Preparation ................................................................... 16-26 Task Summary....................................................................... 16-27 Worksheet for Configuring a Software Installation Procedure Using JumpStart Software ............................. 16-28 Tasks ...................................................................................... 16-29 Task Solutions........................................................................ 16-33 Setting Up JumpStart Software Configuration Alternatives ... 16-34 Introducing the JumpStart Client Boot Sequence ............ 16-35 Setting Up a Boot-Only Server ............................................ 16-42 Setting Up Identification Service Alternatives ................. 16-46 Setting Up Configuration Service Alternatives ................ 16-50 Setting Up Installation Service Alternatives ..................... 16-63 Troubleshooting JumpStart ................................................. 16-65 Resolving Boot Problems ..................................................... 16-65 Resolving Identification Problems ..................................... 16-68
xv Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Resolving Configuration Problems .................................... 16-70 Resolving Installation Problems ......................................... 16-71 Resolving Begin and Finish Script Problems .................... 16-72 Identifying Log Files............................................................ 16-73 Exercise: Configuring a Software Installation Procedure Using JumpStart to Create a RAID-1 Volume and Add a Patch During the JumpStart Process ..................................... 16-74 Preparation............................................................................. 16-74 Task Summary....................................................................... 16-74 Worksheet for Configuring a Software Installation Procedure Using JumpStart Software ............................. 16-75 Tasks ...................................................................................... 16-76 Exercise Summary.......................................................................... 16-82 Configuring NIS for JumpStart Procedures ............................... 16-83 Performing a Flash Installation .................................................... 17-1 Objectives ......................................................................................... 17-1 Introducing the Flash Installation Feature ................................... 17-2 Uses of the Flash Installation Feature .................................. 17-2 Flash Deployment Methods .................................................. 17-3 Flash Installation Process....................................................... 17-3 Flash Installation Requirements .......................................... 17-5 Manipulating a Flash Archive.............................................. 17-6 Creating a Flash Archive........................................................ 17-7 Administering a Flash Archive .......................................... 17-10 Using a Flash Archive for Installation ........................................ 17-12 Using a Flash Archive With JumpStart Software ............ 17-20 Locating the Installation Logs ............................................. 17-26 Live Upgrade ......................................................................... 17-27 WANboot ............................................................................... 17-27 Exercise Summary.......................................................................... 17-28 Index...........................................................................................Index-1
xvi
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Preface
About This Course Course Goals Upon completion of this course, you should be able to: ●
Describe network basics
●
Manage virtual file systems and core dumps
●
Manage storage volumes
●
Control access and configure system messaging
●
Set up name services
●
Perform advanced installation procedures
Preface-xxi Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Course Map
Course Map The course map enables you to see what you have accomplished and where you are going in reference to the course goals.
Describing Network Basics Describing
Customizing
Describing the
Interface
Client-Server
Configuration
Model
the Solaris Management Console
Managing Virtual File Systems and Core Dumps Managing
Managing Swap
Crash Dumps
Configuring
Configuring
and
NFS
AutoFS
Configuration
Core Files
Managing Storage Volumes Describing
Configuring
RAID and
Solaris
Solaris
Volume
Volume
Manager
Manager
Software
Software
Controlling Access and Configuring System Messaging Configuring
Configuring
Role-Based Access Control (RBAC)
System Messaging
Setting Up Name Services Using
Configuring
Name
Name
Services
Service Clients
Configuring the Network Information Service (NIS)
Performing Advanced Installation Procedures Introduction to Zones
Preface-xxii
Configuring the Custom JumpStart Procedure
Performing a Flash Installation
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Topics Not Covered
Topics Not Covered This course does not cover the following topics. Many of these topics are covered in other courses offered by Sun Educational Services: ●
Basic UNIX® commands – Covered in SA-100: UNIX® Essentials Featuring the Solaris™ 10 Operating System
●
The vi editor – Covered in SA-100: UNIX® Essentials Featuring the Solaris™ 10 Operating System
●
Basic UNIX file security – Covered in SA-100: UNIX® Essentials Featuring the Solaris™ 10 Operating System
●
Software package administration – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Patch maintenance – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Adding users using the Solaris Management Console software – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Basic system security – Covered in SA-100: UNIX® Essentials Featuring the Solaris™ 10 Operating System
●
Administering initialization files – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Advanced file permissions – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Backup and recovery – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
The lp print service and print commands – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
Process control – Covered in SA-200: Intermediate System Administration for the Solaris™ 10 Operating System
●
All the new features in Solaris 10 – Covered in SA-225S10: Solaris™ 10 for Experienced System Administrators
●
Hardware or software troubleshooting – Covered in ST-350: Sun™ Systems Fault Analysis Workshop
●
System tuning – Covered in SA-400: Enterprise System Performance Management
About This Course Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Preface-xxiii
Topics Not Covered ●
Detailed shell programming – Covered in SA-245: Shell Programming for System Administrators
●
Detailed network administration concepts – Covered in SA-300: Network Administration for the Solaris™ 10 Operating System Refer to the Sun Educational Services catalog for specific information on course content and registration.
Preface-xxiv
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
How Prepared Are You?
How Prepared Are You? To be sure you are prepared to take this course, can you answer yes to the following questions? ●
Can you install and boot the Solaris™ 10 Operating System (Solaris 10 OS) on a stand-alone workstation?
●
Can you implement basic system security?
●
Can you add users to the system using the Solaris Management Console software?
●
Can you use the pkgadd command to add software packages?
●
Can you monitor and mount file systems?
●
Can you manage disk devices and processes?
●
Can you perform backups and restorations?
About This Course Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Preface-xxv
Introductions
Introductions Now that you have been introduced to the course, introduce yourself to the other students and the instructor, addressing the following items:
Preface-xxvi
●
Name
●
Company affiliation
●
Title, function, and job responsibility
●
Experience related to topics presented in this course
●
Reasons for enrolling in this course
●
Expectations for this course
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
How to Use Course Materials
How to Use Course Materials To enable you to succeed in this course, these course materials use a learning module that is composed of the following components: ●
Objectives – You should be able to accomplish the objectives after completing a portion of instructional content. Objectives support goals and can support other higher-level objectives.
●
Lecture – The instructor will present information specific to the objective of the module. This information will help you learn the knowledge and skills necessary to succeed with the activities.
●
Activities – The activities take on various forms, such as an exercise, self-check, discussion, and demonstration. Activities are used to facilitate the mastery of an objective.
●
Visual aids – The instructor might use several visual aids to convey a concept, such as a process, in a visual form. Visual aids commonly contain graphics, animation, and video.
Note – Many system administration tasks for the Solaris OS can be accomplished in more than one way. The methods presented in the courseware reflect recommended practices used by Sun Educational Services.
About This Course Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Preface-xxvii
Conventions
Conventions The following conventions are used in this course to represent various training elements and alternative learning resources.
Icons
!
Discussion – Indicates a small-group or class discussion on the current topic is recommended at this time.
?
Note – Indicates additional information that can help students but is not crucial to their understanding of the concept being described. Students should be able to understand the concept or complete the task without this information. Examples of notational information include keyword shortcuts and minor system adjustments. Caution – Indicates that there is a risk of personal injury from a nonelectrical hazard, or risk of irreversible damage to data, software, or the operating system. A caution indicates that the possibility of a hazard (as opposed to certainty) might happen, depending on the action of the user. Power user – Indicates additional supportive topics, ideas, or other optional information.
Preface-xxviii
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Conventions
Typographical Conventions Courier is used for the names of commands, files, directories, user names, host names, programming code, and on-screen computer output; for example: Use the ls -al command to list all files. host1# cd /home Courier bold is used for characters and numbers that you type; for example: To list the files in this directory, type the following: # ls
Courier italics is used for variables and command-line placeholders that are replaced with a real name or value; for example: To delete a file, use the rm filename command.
Courier italic bold is used to represent variables whose values are to be entered by the student as part of an activity; for example: Type chmod a+rwx filename to grant read, write, and execute rights for filename. Palatino italics is used for book titles, new words or terms, or words that you want to emphasize; for example: Read Chapter 6 in the User’s Guide. These are called class options.
About This Course Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Preface-xxix
Module 1
Describing Interface Configuration Objectives The network interfaces that a system uses to communicate with other systems on the network use both hardware and software configuration components. When adding a network interface to a system, you must configure specific files to establish a relationship between the hardware and the software addresses. Upon completion of this module, you should be able to: ●
Control and monitor network interfaces
●
Configure Internet Protocol Version 4 (IPv4) interfaces at boot time
The course map in Figure 1-1 shows how this module fits into the current instructional goal.
Describing Network Basics Describing
Describing the
Interface
Client-Server
Configuration
Model
Figure 1-1
Customizing the Solaris Management Console
Course Map
1-1 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Controlling and Monitoring Network Interfaces
Controlling and Monitoring Network Interfaces Network commands, such as ifconfig, ping, and snoop, control and monitor the functionality of network interfaces.
Displaying the MAC Address The media access control (MAC) address is your computer’s unique hardware address on a local area network (LAN). The MAC address is also the Ethernet address on an Ethernet LAN. When you are connected to a LAN, an address resolution table maps your computer’s physical MAC address to an Internet Protocol (IP) address on the LAN. Two ways to display the MAC address or the Ethernet address are: ●
Use the ifconfig -a command
●
Use the boot programmable read-only memory (PROM) banner command
Note – The MAC address is displayed only if run as the root user. # ifconfig -a lo0: flags=1000849
mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843 mtu 1500 index 2 inet 192.168.30.41 netmask ffffff00 broadcast 192.168.30.255 ether 8:0:20:93:c9:af The MAC address is listed as 8:0:20:93:c9:af in this example. You can also retrieve the MAC address from a system that has not yet been booted by running the banner command at the ok prompt. ok banner Sun Ultra 5/10 UPA/PCI (UltraSPARC-IIi 300MHz), Keyboard Present OpenBoot 3.31 256 MB (60ns) memory installed, Serial #9685423. Ethernet address 8:0:20:93:c9:af, Host ID: 8093c9af.
1-2
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Controlling and Monitoring Network Interfaces
Displaying the IP Address The ifconfig -a command displays the current configuration for the network interfaces. With the -a option, the ifconfig command displays the current configuration for all network interfaces in the system. # ifconfig -a lo0: flags=1000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843 mtu 1500 index 2 inet 192.168.30.41 netmask ffffff00 broadcast 192.168.30.255 ether 8:0:20:93:c9:af The previous example shows that the loopback interface (lo0) is up, running, and configured with an IP address of 127.0.0.1. The hme0 interface is up, running, and configured with an IP address of 192.168.30.41.
Marking an Ethernet Interface as Down When an Ethernet interface is marked as down, it means that it cannot communicate. You can use the ifconfig command to mark an Ethernet interface as up or down. For example, to mark the hme0 interface as down, perform the commands: # ifconfig hme0 down # ifconfig -a lo0: flags=1000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000842 mtu 1500 index 2 inet 192.168.30.41 netmask ffffff00 broadcast 192.168.30.255 ether 8:0:20:93:c9:af
Note – The UP flag for hme0 is no longer present. When an interface is flagged as UP, it is ready to communicate.
Describing Interface Configuration Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
1-3
Controlling and Monitoring Network Interfaces The following example shows that when you mark an interface as up, the UP status appears in the flags field of the ifconfig command output: # ifconfig hme0 up # ifconfig -a lo0: flags=1000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843 mtu 1500 index 2 inet 192.168.30.41 netmask ffffff00 broadcast 192.168.30.255 ether 8:0:20:93:c9:af
Sending ICMP ECHO_REQUEST Packets To determine if you can contact another system over the network, enter the ping command: # ping sys41 sys41 is alive The previous response indicates the host name sys41 is alive. A response of no answer from sys41 indicates that you cannot contact host sys41. This implies a problem with host sys41, or a problem with the network. For the ping command to succeed, the following conditions must be satisfied on both systems: ●
The interface must be plumbed.
●
The interface must be configured.
●
The interface must be up.
●
The interface must be physically connected.
●
The interface must have valid routes configured.
For more information on ifconfig and plumbed, see the ifconfig man page. Note – Configuration of routes is an advanced networking topic. Detailed network administration concepts are covered in SA300: Network Administration for the Solaris™ 10 Operating System.
1-4
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Controlling and Monitoring Network Interfaces
Capturing and Inspecting Network Packets You can use the snoop utility to capture and inspect network packets to determine what kind of data is transferred between systems. You can use the snoop utility to see what happens when one system uses the ping command to communicate with another system. To view network traffic between two specific systems, perform the command: # snoop sys41 sys42 sys41 -> sys42 ICMP Echo request (ID: 615 Sequence number: 0) sys42 -> sys41 ICMP Echo reply (ID: 615 Sequence number: 0) Use the -a option to enable audible clicks, which notify you of any network traffic. Although noisy, the clicks are useful when troubleshooting. The following example shows how to turn on audible clicks for all network traffic related to a Dynamic Host Configuration Protocol (DHCP) boot: # snoop -a dhcp Some additional snoop options include: snoop
Summary output
snoop -V
Summary verbose output
snoop -v
Detailed verbose output
snoop -o filename
Redirects the snoop utility output to filename in summary mode
snoop -i filename
Displays packets that were previously captured in filename
Note – Press Control-C to stop the snoop utility.
Describing Interface Configuration Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
1-5
Configuring IPv4 Interfaces at Boot Time
Configuring IPv4 Interfaces at Boot Time This section describes the files and scripts involved with configuring IPv4 network interfaces.
Introducing IPv4 Interface Files You can get a basic understanding of network interfaces within the Solaris OS by learning the function of a few files and services. The services and files are the following: ●
The svc:/network/physical:default service
●
The /etc/hostname.xxn file
●
The /etc/inet/hosts file
The svc:/network/physical:default Service The svc:/network/physical:default service calls the /lib/svc/method/net-physical method script. It is one of the startup scripts that runs each time you boot the system. This script uses the ifconfig utility to configure each interface with an IP address and other required network information. The script searches for files called hostname.xxn in the /etc directory, where xx is an interface type and n is the instance of the interface. For every file named /etc/hostname.xxn, the script uses the ifconfig command with the plumb option to make the kernel ready to talk to this type of interface. The script then configures the named interface using other options to the ifconfig command. The /etc/hostname.hme0 file is an example of an interface configuration file. Note – In Solaris 8 and 9 OS, the /etc/rcS.d/S30network.sh file is used to perform the same function. Before Solaris 8 OS, the /etc/rcS.d/S30rootusr.sh file was used.
1-6
Advanced System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
Configuring IPv4 Interfaces at Boot Time
The /etc/hostname.xxn File The /etc/hostname.xxn file contains an entry that configures a corresponding interface. The variable component of the file name is replaced by an interface type and a number that differentiates between multiple interfaces of the same type configured in the system. Table 1-1 shows some examples. Table 1-1 The /etc/hostname.xxn File Entries and Corresponding Interfaces Entry
Interface
/etc/hostname.hme0
First hme Ethernet interface in the system
/etc/hostname.hme1
Second hme Ethernet interface in the system
/etc/hostname.qfe0
First qfe Ethernet interface in the system
/etc/hostname.eri0
First eri Ethernet interface in the system
The codes for the interface types are product codes. These codes originate from varying sources. For example, the qfe code is an abbreviation for Quad Fast Ethernet. The /etc/hostname.hme0 file contains either the host name or the IP address of the system that contains the hme0 interface. The host name contained in the file must exist in the /etc/inet/hosts file so that it can be resolved to an IP address at system boot time. You can edit the /etc/hostname.hme0 file to contain either the host name or the IP address from the /etc/inet/hosts file. # cat /etc/hostname.hme0 sys41 or # cat /etc/hostname.hme0 192.168.30.41
Describing Interface Configuration Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1
1-7
Configuring IPv4 Interfaces at Boot Time
The /etc/inet/hosts File The /etc/inet/hosts file is a local database that associates the IP addresses of hosts with their names. You can use the /etc/inet/hosts file with, or instead of, other hosts databases, including the Domain Name System (DNS), the Network Information Service (NIS) hosts map, and the Network Information Service Plus (NIS+) hosts table. Programs use library interfaces to access information in the /etc/inet/hosts file. The /etc/inet/hosts file contains at least the loopback and host information. The file has one entry for each IP address of each host. If a host has more than one IP address, this file will have one entry for each address, on separate lines. The format of each line is:
IP-address official-host-name [aliases] . . . Items are separated by any number of spaces or tab characters. The first item on a line is the host’s IP address. The second entry is the host’s official name. Subsequent entries on the same line are alternative names for the same machine, or nicknames. Nicknames are optional. # cat /etc/inet/hosts . < output truncated> . 127.0.0.1 localhost . < output truncated> . 192.168.30.41 sys41 loghost 192.168.4.1 sys41 -internal .