You are on page 1of 29

Yogind's Creations

This page has been specially put up for the begineers of Solaris this contains all the important
commands used in Solaris
Monday, Nove mber 9 , 2009

SOLARIS QUICK REFERENCE


SOLARIS SOLUTION GUIDE
BOOT BLOCK RECOVERY:

installboot /usr/platform/'uname m'/lib/fs/ufs/ bootblk


/dev/rdsk/c#t#d#s#
fdisk b /usr/lib/fs/ufs/mboot /dev/rdsk/c#t#d#s#
TERMINAL PROBLEM:

TERM=Vt100
Export=TERM
TAPE DRIVE
#mt f /dev/rmt/0 stat

#tar cvf /dev/rmt/0(copy)


#tar xvf /de/vrm/0(restore)
#mt f /dev/rmt/0 rewoffl (for eject)
HDD SIZE MISMATCH:

#format
#select disk
#selects "type"
#select 0 (AUTO CONFIGURE)

#ok
ALOM CONFIGURATION:
sc> setsc if_network true - this command enables the port
sc> setsc netsc_dhcp false - this command should be set to false
sc> setsc netsc_ipaddr 129.148.173.27
sc> setsc netsc_ipnetmask 255.255.255.0
sc> setsc netsc_ipgateway 129.148.173.253
sc> resetsc y
You can now verify the settings with the "shownetwork" command
Note - There is also an interactive configuration process possible
through the use of the "setupsc" command,

Resetting the ALOM Password


To override the ALOM password on the system you will need to:
1.

Attach console to Serial Management Port

2) Power on the server via the front power button. Once POST has
completed,you will need to wait 1 to 2 minutes for a timeout to occur
and the system to drop to the "ok>" prompt.
If you do not get the "Please login:" prompt (you will likely see the SC
prompt) then you must power the system off
Remove the battery from the LOM board, wait a minute, and re-install
everything).
Below is an example of what you might see on the console:
Please login:
SC Alert: Host System has reset
[Wait one two minutes]

Serial line login timeout returns to console stream.


ok>
3) Boot the system to the OS level. If Solaris is not currently installed
on the server, you will need to install it at this
point.
4) Use the scadm command to reset the admin password:
server# cd /usr/platform/`uname -i`/sbin
server# ./scadm userpassword admin
5) Use the escape sequence "#." to get system back to the ALOM login
prompt.
6) You can now log into the admin account using the password "admin"
that
you just set.

Working with NVRAM:


auto-boot?: if true, boot automatically after POST. (true)
boot-command: command to execute if auto-boot? is true. (boot)
boot-device: device to use for booting (disk net)
boot-file: file to boot (empty string)
diag-device: diagnostic boot source (net)
diag-file: file from which to boot in diagnostic more (empty string)
dial-level: Level of diagnostics to run (min or max)
diag-switch?: If true, run in diagnostic mode
input-device: input device to use (keyboard)

keymap: keyboad map for custom keyboard (no default)


nvramrc: NVRAM startup script (empty string)
oem-banner: Custom OEM banner (empty string)
oem-banner?: If true, use custom OEM banner (false)
output-device: Output device to use (screen)
sbus-probe-list: Identifies which sbus slots are probed & in what order
(01)
scsi-initiator-id: SCSI bus address of host adapter (7)
security-mode: Firmware security level (none | command | full)
security-password: Firmware security password (none)
use-nvramrc?: If true, execute commands in NVRAMRC during startup
sequence (false)
watchdog-reboot?: If true, reboot after watchdog reset (false)

NVRAM COMMANDS:
nvalias alias <device-path> - Store the command "devalias alias devicepath" in NVRAMRC. The alias persists until the nvunalias or set-defaults
commands are executed.
nvedit - Enter the NVRAMRC editor. If data remains in the temporary
buffer from a previous nvedit session, resume editing those previous
contents. If not, read the contents of NVRAMRC into the temporary
buffer and begin editing them.
nvquit -Discard the contents of the temporary buffer, without writing it
to NVRAMRC. prompt for confirmation.
nvrecover - Recover the contents of NVRAMRC if they have been lost as
a result of the execution of setdefaults

then enter the editor as with nvedit.


nvrecover fails if nvedit is executed between the time that the
NVRAMRC contents were lost and the time that nvrecover is executed.
nvrun - Execute the contents of the temporary buffer.
nvstore - Copy the contents of the temporary buffer to NVRAMRC;
discard the contents of the temporary
buffer.
nvunalias alias - Delete the corresponding alias from NVRAMRC. Must
reset system.

Activating nvram:
ok> nvedit
<enter commands>
Type Control-C to get out of the editor and back to the ok prompt.
ok> nvstore
ok> setenv use-nvramrc? true
ok> reset

BOOT OPTIONS:
-a

Ask the user for configuration information, such as where to find the
system file, where to mount root, and even override the name of the
kernel itself. Default responses will be contained in square brackets
and the user may simply enter <RETURN> to use the default response.
To help repair a damaged /etc/system file, enter /dev/null at the
prompt that asks for the pathname of the system configuration file.
-v Boot with verbose messages enabled.

-s Boot only to init level 's' Single User Mode. All local file systems are
mounted. Only a small set of essential kernel processes are left
running. This mode is for administrative tasks such as installing
optional utility packages. All files are accessible and no users are
logged in on the system.
-x Do not boot in clustered mode. This option only has an effect when
a version of Sun Cluster software that supports this option has been
installed.
-r Reconfiguration boot. The system will probe all attached hardware
devices and assign nodes in the file system to represent only those
devices actually found.

Sparc Jumpstart install using Solaris 10


This is notes and procedure I used to do a Solaris 10 sparc jumpstart
install.
INTRODUCTION
PART I: COPY CDS TO HARD DRIVE
PART II: JUMPSTART CONFIG
PART III: CLIENT SETUP & NFS
PART IV: CLIENT BOOT
PART V: PROBLEMS I RAN IN TO
-----------------------------------------------------------------------------------INTRODUCTION
This is the exact process I used to setup a Solaris 10 sparc jumpstart
install.
Sparc jumpstart is a breeze compared to x86. This really only took me
about 30
minutes to setup. The hardware setup I used was:

SERVER:
Sun V210
IP: 137.202.217.104
CLIENT:
T1000
IP: 137.202.216.163
-----------------------------------------------------------------------------------PART I: COPY CDS TO HARD DRIVE
On the server you are making the install server, make a directory to
store the CD
contents:
# mkdir /export/home/export/install
Put in the Solaris 10 sparc DVD and goto the Tools folder
(/cdrom/cdrom0/s2/Solaris_10/Tools),
run:
# ./setup_install_server /export/home/export/install
This will see if you have enough space there, and if so copy the DVD
image to the disk. It will take a while. Eject the DVD when it's done:
# eject
-------------------------------------------------------------------------------PART II: JUMPSTART CONFIG
We now need to setup the jumpstart directory and put the necessary
files in it to perform a custom jumpstart install.
# mkdir /export/home/export/config

Now we need to create a profile for the system, this is used to


configure the disk setup and packages for the client. It is one of the
files we just copied over.
# cat /export/home/export/config/any_machine
install_type initial_install
system_type standalone
partitioning default
cluster SUNWCxall
cluster SUNWCxgl delete
filesys any 500 swap
Explanation:
install_type

initial_install - This is included in every profile.

system_type
system.

standalone - This defines to be installed as a standalone

partitioning default - This tells it to determine the slices by the


software size.
The size of swap is set to 512 Mbytes and is installed on
any disk.
cluster

SUNWCxall - This tells what cluster of packages to install.


SUNWCxall is Entire Solaris Software Group Plus OEM Support.
SUNWCall is Entire Solaris Software Group.
SUNWCprog is Developer Solaris Software Group.
SUNWCuser is End User Solaris Software Group.
SUNWCreq is Core System Support Software Group.
SUNWCrnet is Reduced Network Support Software Group.

cluster
SUNWcxgl delete - This tells it to not install package
SUNWcxgl.
filesys
slice

any 500 swap - This tells it to place the swap slice on any
with size 500MB.

This is how mine looks, but you can modify the settings to specify your
needs, check:
http://docs.sun.com/app/docs/doc/817-5506/6mkv6ki9s?
a=view#preparecustom-97
for a good explanation of every option, you can even setup RAID
configuration during
install.
Now that the profile is done, we need to create the sysidcfg file. This
file answers all of the network, timezone, name service questions. It
won't be in the jumpstart directory so we have to create it.
# vi /export/home/export/config/sysidcfg
system_locale=en_US
timezone=US/Central
timeserver=192.168.1.201
network_interface=primary {netmask=255.255.255.0}
terminal=dtterm
name_service=NONE
Check http://docs.sun.com/app/docs/doc/817-5504/6mkv4nh20?
a=view
for an explanation of all the options.

Now we need to setup the rules file. This is a text file used to create
the "rules.ok" file. This is a look up table that has rules defining how
install clients are installed based on their system attributes. It is
already in the directory, you need to edit it and make sure it only
contains the line "any - - any_machine -" and all other lines are
commented out.
After that, in the jumpstart directory, run:
# ./check
Validating rules...
Validating profile any_machine...
The custom JumpStart configuration is ok.
Now on to setting up the client.
-------------------------------------------------------------------------------PART III: CLIENT SETUP & NFS
Add the client to the hosts file.
# echo "137.202.216.163

innsun10" >> /etc/hosts

# cd /export/home/export/install/Solaris_10/Tools
We need to use the ./add_install_client to add clients to the jumpstart
Here's the options:
-e = mac address of client
-s = ip/host:dir of server with installation image
-c = ip/host:dir of jumpstart server configuration
-p = ip/host:dir of sysidcfg file
sparc = client name
sun4u = platform group

# ./add_install_client -e 8:0:20:b0:c5:b8 -s
137.202.217.104:/export/hom
e/export/install -c 137.202.216.163:/export/home/export/config -p
137.202.216.104:/export/home/export/config innsun10 sun4v
making /tftpboot
updating /etc/bootparams
copying inetboot to /tftpboot
To make sure they are both sharing:
# dfshares
RESOURCE SERVER ACCESS TRANSPORT
innsun3:/export/home/export/install innsun3 - innsun3:/export/home/export/config innsun3 - -------------------------------------------------------------------------------PART IV: CLIENT BOOT
After all is setup correctly, tell your client to boot off the network card
and
watch it go into the Solaris install process.
# boot net - install
-------------------------------------------------------------------------------PART V: PROBLEMS we RAN IN TO:
On jumpstart install, it errored with:
cat: cannot open /cdrom/.cdtoc
cat: cannot open /cdrom/.cdtoc
expr: syntax error

This was because I had


'/export/home/export/install/Solaris_10/Tools/Boot'
Shared which needed to be '/export/home/export/install'.

Patch Management
Patch add Error Codes (Solaris 2.6, 7, 8,9)
0 No error
1 Usage error
2 Attempt to apply a patch that's already been applied
3 Effective UID is not root
4 Attempt to save original files failed
5 pkgadd failed
6 Patch is obsoleted
7 Invalid package directory
8 Attempting to patch a package that is not installed
9 Cannot access /usr/sbin/pkgadd (client problem)
10 Package validation errors
11 Error adding patch to root template
12 Patch script terminated due to signal
13 Symbolic link included in patch
14 NOT USED
15 The prepatch script had a return code other than 0.
16 The postpatch script had a return code other than 0.

17 Mismatch of the -d option between a previous patch install and


current one.
18 Not enough space in the file systems that are targets of the patch.
19 $SOFTINFO/INST_RELEASE file not found
20 A direct instance patch was required but not found
21 The required patches have not been installed on the manager
22 A progressive instance patch was required but not found
23 A restricted patch is already applied to the package
24 An incompatible patch is applied
25 A required patch is not applied
26 The user specified backout data can't be found
27 The relative directory supplied can't be found
28 A pkginfo file is corrupt or missing
29 Bad patch ID format
30 Dryrun failure(s)
31 Path given for -C option is invalid
32 Must be running Solaris 2.6 or greater
33 Bad formatted patch file or patch file not found
34 The appropriate kernel jumbo patch needs to be installed
35 Later revision already installed

patchrm Error Codes


0 No error

1 Usage error
2 Attempt to backout a patch that hasn't been applied
3 Effective UID is not root
4 No saved files to restore
5 pkgrm failed
6 Attempt to back out an obsoleted patch
7 Attempt to restore CPIO archived files failed
8 Invalid patch id format
9 Prebackout script failed
10 Postbackout script failed
11 Suspended due to administrative defaults
12 Backoutpatch could not locate the backout data
13 The relative directory supplied can't be found
14 Installpatch has been interrupted, re-invoke installpatch

PATCH INSTALLATION
Get OK prompt, through Console
Install the OS initially (Solaris 9 version 12/02) on c1t1d0s0.(If pre OE is
not present)
Install patches through EIS installation DVD.
# cd /cdrom/cdrom0/sun/install
# ./setup_standard.sh or # sh setup_standard.sh
Selections for menu to be made as follows :

select disable power n


select SFS package y
alternate break sequence n
install ACT y
select default base directory /opt
send email panic y
create directory y
continue installation y
select default explorer path - /etc/opt/SUNWexplo/default/explorer
provide details of contact person, email id, phone number etc..
select APAC i.e (Asia Pacific)
select 2 character country code i.e IN for India
select automatic sending of explorer no
logout and re-login.
# cd /cdrom/cdrom0/sun/patch/9
# cat README | less
# df h check and see whether required space for patch unpacking is
available. (approx 2Gb) general practice is to use /var/tmp location
for unpacking the patches.
# unpack-patches q /var/tmp
# cd /opt/SUNWexplo/output
# explorer this will show the current output of explorer.
# ls l
# init 6 (reboot the system in single user mode for installing patches)

# cd /var/tmp/9
# ./install_all_patches
NOTE: after the patches are installed, install extra patches for
Storage.
# mkdir /var/tmp/storagepatches
# cd /cdrom/cdrom0/sun/patch/SAN/9
# unpack-patches q /var/tmp/storagepatches
# cd /var/tmp/storagepatches
# ./install_all_patches
NOTE:- Here after packages related to storage needs to be installed.
# mkdir /var/tmp/packages
# cp /cdrom/cdrom0/sun/progs/sunwqus/SUNWqus_9_all.tar.gz \
/var/tmp/packages
# cd /var/tmp/packages
# gunzip SUNWqus_9_all.tar.gz
# tar xvf SUNWqus_9_all.tar
# ls l here we see four packages which needs to be installed
Note: use the command as given below, do not try to add the package
individually as it provides error.
# pkgadd d .
Note: - on providing the pkgadd command, we get a menu where we
need to specify the package number to be added.
# init 0 reboot the system to OK prompt
Here the patches and required programs are installed.

CD BURNING (WRITING)
Cdrw Syntax:
cdrw -i [-vSCO] [-d device] [-p speed] [image-file]
Listing cd devices:
# cdrw -lv
Looking for CD devices...
Node Connected Device Device type
---------------------+--------------------------------+----------------/dev/rdsk/c8t5d0s2 | YAMAHA CRW8824S 1.00 | CD Reader/Writer
Copying from cd to cd:
# cdrw -c -d <target-drive> -s <source-drive> -v
# cdrw -c -d /dev/rdsk/c1t5d0s2 -s cdrom0 -v
Copying from a directory to a cd:
# mkisofs -r <dir-name> 2>/dev/null | cdrw -i -p 4
# mkisofs -r /home/rfox/tmp 2>/dev/null | cdrw -i -p 4
Copying an iso image to a cd:
# cdrw -i -C -p 4 <iso-image-file-name>
Copying a compressed iso image to a cd:
# gzip -dc acrobat4.iso.gz | cdrw -i -C -p 4
Creating an iso image:
# mkisofs -r -o <iso-image-file-name> <path-to-files>
Some common mkisofs options:

-V volid (names the cd)


-relaxed-filenames (allows long file names)
-iso-level 3 (relaxes restrictions on file names)
Create an audio CD from wav files:
% cdrw -a song1.wav song2.wav song3.wav song4.wav

FIND & REPLACE


Find
Find ufs files only, no nfs mounted fs's:
# find / -name <files> ! -local -prune -print
Note: Because the default /etc/dfs/fstypes only contains "nfs" this is
functionally equivilant to:
# find / -fstype nfs -prune -o -print
Find & Remove files:
# find . -name *.msf -exec rm {} \;
Recursive grep
# /usr/bin/find . -exec /usr/bin/grep PATTERN {} /dev/null \;
Fmthard
# prtvtoc -h /dev/rdsk/c0t0d0s0 >/tmp/vtoc
# fmthard -s /tmp/vtoc /dev/rdsk/c1t0d0s0
FSCK
Syntax:
fsck [-F FSType] [-n | N | y | Y] [-V] [-o FS Type-specific-options]
[special...]
Note: unmount the file system before running fsck!!!

Using an alternate super block (assumes superblock=32):


# fsck -o b=32 /dev/rdsk/c0t0d0s7
Note: to determine other super blocks, run:
# newfs -Nv /dev/dsk/c0t0d0s7
Checking if fs is okay to mount:
# fsck -m /dev/rdsk/c0t0d0s7
ufs fsck: sanity check: /dev/rdsk/c0t0d0s7 okay

INSTALL BOOT
Installs the boot block onto a disk to make it bootable.
# installboot /usr/platform/`uname -i`/lib/fs/ufs/bootblk
/dev/rdsk/c0t0d0s0

MOUNT
Remounting a Read-only File System
# mount -o remount,rw /dev/dsk/c0t0d0s0
How to mount an ISO image:
# lofiadm -a /<path-to-iso-file-image>
Note: lofiadm will return the device name:
/dev/lofi/1
Mount the iso image/device name just returned to your favorite mount
point.
# mount -F hsfs -o ro /dev/lofi/1 /mnt
Afterward, unmount the device and delete the iso device
# umount /mnt
# lofiadm -d /dev/lofi

Mount a PC File System


# mount -f pcfs /dev/dsk/c0d0p1 /export/dos
Mount a Global File System (SunCluster)
# mount -g /dev/vx/dsk/nfsdg/nfs1 /global/nfs

"P" COMMANDS - PROCESS


Pkill
This command kill a process. For example, pkill netscape kills the
process named netscape.
plimit
This command displays and sets the per-process limits on a running
process. This is handy if a long-running process is running up against a
limit (for example, number of open files). Rather than using limit and
restarting the command, plimit can modify the running process.
pgrep
Searches through /proc for processes matching the given criteria, and
returns their process-ids.
A great option is "-n", which returns the newest process that matches.
preap (Solaris >= 9): Reaps zombie processes. Any processes stuck in
the "z" state (as shown by ps), can be removed from the system with
this command.
pargs
(Solaris >= 9): Shows the arguments and environment variables of a
process.
prstat
prstat is top and a lot more. Both commands provide a screen's
worth of process and other information and update it frequently,
for a nice window on system performance. prstat has much
better accuracy than top. It also has some nice options.

"-a" shows process and user information concurrently (sorted by CPU


hog, by default).
"-c" causes it to act like vmstat (new reports printed below old ones).
"-C" shows processes in a processor set. "-j" shows processes in a
"project".
"-L" shows per-thread information as well as per-process.
"-m" and "-v" shows per-process performance detail (including pages,
traps, lock wait, and CPU wait).
The outputs data can also be sorted by resident-set (real memory)
size, virtual memory size, execute time.
SCRIPT (CAPTURE TEXT)
Used to record keystrokes and output to a file.
Start Recording:
oops:/> script -a <filename>
Note: keystrokes and output will be recorded to the file...
Stop recording:
oops:/> ctl-d
Note: After pressing [ctl]-d, no more keystrokes or output will be
recorded.

Stopping, starting, and restarting services


Traditionally, services have been started by an rc script run at boot,
run with the argument start. Some rc scripts provide a stop option, and
a few also allow restart. In SMF, these tasks are all accomplished with
the
svcadm(1M) command:

Old method SMF method


/etc/init.d/sshd stop svcadm disable -t network/
ssh:default
/etc/init.d/sshd start svcadm enable -t network/
ssh:default
/etc/init.d/sshd stop; /etc/init.d/sshd start svcadm restart network/
ssh:default
kill -HUP `cat /var/run/sshd.pid` svcadm refresh network/
ssh:default
Notes; The "-t" option to svcadm enable and svcadm disable indicates
that the requested action should be temporary -- it will not affect
whether the service is started the next time that the system boots.
NEW METHOD:
SVCADM DISABLE T NETWORK
SVCADM ENABLE T NETWORK

SWAP
Creating Swap Space:

a. Create the swap file:


# mkfile -v 10m /export/disk1/myswap (create 10mb swapfile)
or
# mkfile -nv 10m (creates an empty 10 Megabyte swapfile)
b. Add the swap space:
# swap -a /export/disk1/myswap

Managing Swap Space

# swap -s List the amount of swap space available


# swap -a /export/disk1/swapfile Add a swapfile
# swap -d /dev/dsk/c0t0d0s4 Deletes a swap device
# swap -l List the current swap devices:
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 136,9 16 2097104 2097104

DHCP SERVER
Configure the dhcp server:
Create the dhcp resource file:
# vi /etc/default/dhcp
RUN_MODE=server
RESOURCE=files
PATH=/var/dhcp
Update the hosts file with dhcp client ip addresses and names:
# vi /etc/hosts
128.50.1.50 dhcpclient-1
Create the subnet for the clients:
# pntadm -C 128.50.1.0
Add clients
# pntadm -A 128.50.1.50 128.50.1.0
# pntadm -A 128.50.1.51 128.50.1.0
Create the rules database

# dhtadm -C
Create the rules
# dhtadm -A -m <rule-name> -d ':router= lettuce fluke yak:
subnet=255.255.255.0:
LeaseNeg=1:
DNSdmain=comcast.net:
DNSserv=60.8.0.6:'
Note: a list of all possible keywords can be found in /etc/dhcp/inittab.
Associate rules with dhcp clients:
# pntadm -m 128.50.1.50 -m <rule-name> 128.50.1.0
# pntadm -m 128.50.1.51 -m <rule-name> 128.50.1.0
Start dhcp daemon:
# /etc/init.d/dhcp start
Configure a dhcp client
a. Edit /etc/hostname.hme0 and remove all contents
b. Create /etc/dhcp.hme0
# touch /etc/dhcp.hme0
c. Reboot
# init 6

DNS
Configuring the Master DNS Server
A. Edit /etc/named.boot
# named.boot 2/22/2002 rfox

DIRECTORY /var/named # location of dns files


CACHE cache.db # where to pass the request if unresolved
PRIMARY veggie.edu veggie.zone # IP-host resolution file
PRIMARY 1.50.128.in-addr.arpa veggie.rzone # host-IP resolution file
PRIMARY 0.0.127.in-addr.arpa loopback # localhost resolution
B. If Solaris 2.7 or greater, run the conversion utility to create
/etc/named.conf file:
# /usr/sbin/named-bootconf < /etc/named.boot > /etc/named.conf
C. Create the dns directory
# mkdir /var/named
D. Edit the cache.db file
# cache.db 2/22/2002 rfox
in ns parks.edu # domain to pass unresolved request
parks.edu. in a 128.50.1.99 # ip address of server
E. Edit the IP-host resolution file (veggie.zone)
# veggie.zone 2/22/2002 rfox
$ORIGIN veggie.edu.
veggie.edu. in soa lettuce.veggie.edu. root.lettuce.veggie.edu. ( 1
43200 3600 604800 86400 )
veggie.edu. in ns lettuce
lettuce in a 128.50.1.3
cabbage in a 128.50.1.2
corn in a 128.50.1.4

localhost in a 127.0.0.1
F. Edit the host-IP resoultion file (veggie.rzone)
# veggie.rzone 2/22/2002 rfox
$ORIGIN 1.50.128.in-addr.arpa.
1.50.128.in-addr-arpa. in soa lettuce.veggie.edu.
root.lettuce.veggie.edu.
( 1 43200 3600 604800 86400 )
1.50.128.in-addr.arpa. in ns lettuce.veggie.edu.
1 in ptr carrot.veggie.edu.
2 in ptr cabbage.veggie.edu.
3 in ptr lettuce.veggie.edu.
4 in prt corn.veggie.edu.
G. Edit loopback file (loopback)
# loopback 2/22/2002 rfox
$ORIGIN 0.0.127.in-addr.arpa.
0.0.127.in-addr-arpa. in soa lettuce.veggie.edu.
root.lettuce.veggie.edu. ( 1
43200 3600 604800 86400 ) 0.0.127.in-addr.arpa. in ns
lettuce.veggie.edu.
1 in ptr localhost.veggie.edu.
H. Start the daemon
# /usr/sbin/in.named
Configuring the DNS Client
A. Create the /etc/resolv.conf file:

# resolve.conf 2/22/2002 rfox


search veggie.edu
nameserver 128.50.1.3
nameserver 128.50.2.1
nameserver 128.50.3.5
B. Edit /etc/nsswitch.conf file's hosts entry:
# hosts dns files

NFS
How to NFS share/mount a CD-ROM:
Share the resource on the NFS server (the system with the CDROM locally).
1.

# share -F nfs -o ro /cdrom/cdrom0/s0


Note: If this is the first time that the NFS server has shared out a
resource then do the following to start the
nfs server daemons:
# /etc/init.d/nfs.server start
2) Now mount the CD-ROM on the remote system.
Run showmount to verify that the NFS server is sharing out the CDROM:
# showmount -e <NFS-server-name>
Mount the CD-ROM:
# mount -rF nfs <NFS-server-name>:/cdrom/cdrom0 /cdrom

Network Troubleshooting

Troubleshooting Command Reference


arp - address resolution display and control
arp -a display entries in the arp table
oops:/home/rfox:>arp -a
Net to Media Table: IPv4
Device IP Address Mask Flags Phys Addr
------ -------------------- --------------- ----- --------------hme0 wow 255.255.255.255 08:00:20:c3:cd:80
hme0 hedley.East.Sun.COM 255.255.255.255 08:00:20:b2:72:9b
hme0 baraddur 255.255.255.255 00:c0:dd:00:6f:62
hme0 cassio 255.255.255.255 00:c0:dd:00:57:49
hme0 smt01rfsra193 255.255.255.255 00:00:0c:07:ac:00
hme0 clnode0 255.255.255.255 08:00:20:d8:d6:c5
hme0 clnode1 255.255.255.255 08:00:20:b0:35:bc
hme0 archiver 255.255.255.255 00:07:e9:04:4a:c4
hme0 lifetime 255.255.255.255 00:03:47:d5:b9:f6
hme0 oops 255.255.255.255 SP 08:00:20:c9:dc:9d
hme0 224.0.0.0 240.0.0.0 SM 01:00:5e:00:00:00
arp -d <hostname> - remove host entry from arp table
dmesg check status of interface at boot time
ifconfig allows you to add/modify/delete interface parameters
kstat -n <interface> kernal stats for interface

ndd (set, get)


# ndd -set /dev/eri instance 0 - sets view to eri0
# ndd /dev/eri \? - shows what eri paramaters are modifiable
How to checking current settings:
# ndd /dev/hme link_status # 0=down 1=up
# ndd /dev/hme link_speed # 0=10MB, 1=100MB
# ndd /dev/hme link_mode # 0=half-duplex, 1=full-duplex
Netstat
netstat -i gives you interface details # of packets, collisions, errors
ect...
oops:/home/rfox:>netstat -i
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
lo0 8232 loopback localhost 39259 0 39259 0 0 0
hme0 1500 somerset oops 522862 74 359240 0 0 0
netstat -rnv routing info, no name resolution, local veiw
oops:/home/rfox:>netstat -rn
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ --------129.154.57.0 129.154.57.155 U 1 4587 hme0

You might also like