Forcing ethernet interface settings on Solaris - get the sequence right (scripts).
posted by hal 20030116
(archived)
|
permalink
|
path
|
initial version: 20030115.
When forcing settings for an ethernet interface using ndd on Solaris it essential to get the sequence correct. Get it wrong and you end up with the wrong results or having to issue your ndd's twice (as shown here).
First set the interface speed and handshake, then turn off auto-negotiation. It's a
common mistake to do it the other way around (in fact I did it myself until I checked my settings after a reboot).
So for the hme0 ethernet interface run the commands in this sequence to force
100 Mbit/sec full-duplex:
# /usr/sbin/ndd -set /dev/hme instance 0
# /usr/sbin/ndd -set /dev/hme adv_100fdx_cap 1
# /usr/sbin/ndd -set /dev/hme adv_100hdx_cap 0
# /usr/sbin/ndd -set /dev/hme adv_10fdx_cap 0
# /usr/sbin/ndd -set /dev/hme adv_10hdx_cap 0
# /usr/sbin/ndd -set /dev/hme adv_100T4_cap 0
# /usr/sbin/ndd -set /dev/hme adv_autoneg_cap 0
Simple scripts for forcing (ge, eri and hme) ethernet interfaces and checking them are available as downloads.
Solaris Guide for New Sys Admins - useful guide for newbies, but contains errors.
posted by hal 20030116
(archived)
|
permalink
|
path
|
initial version: 20030109
"The SolarisTM OE Guide for New System Administrators" by Rolf Kersten has been
front page stuff on Sun's bigadmin site for a
while now and claims to contain the
20% of Solaris knowledge that solves 80% of your needs
.
A new version (1.12e)
is out and these notes refer to this one.
20030116: got an email from Rolf today and (some of) my suggested changes will be incorporated into the next version.
First let me just say that it is a good reference document with overall sound advice (37 pages of it). I am sure it will be of great help to new admins
or people moving up from Linux. It is geared towards administrators of Solaris workstations
(big sections on CDE and OpenGL).
I specially like the book recommendations which only contains two books -
Unix Power Tools and the
Unix System Administration Handbook. The chapter on graphics is very useful for admins who normally deals with headless servers.
I think there is plenty of room for improvement:
- section 1.4.5 on disabling network interface error messages is mentioning
setenv tpe_link test false.
Firstly it is not good practice to turn off the link test just to make valid informational messages disappear
(ifconfig unplumb interface is a better option); secondly the correct statement is
setenv tpe-link-test? false. I would remove the whole of the section.
- section 2.2 on disk partitions: Rolf Kersten recommends using 1 cylinder for the DiskSuite metadatabases.
That's what I was doing until I read Sun's
"Configuring Boot Disks With Solaris[tm] Volume Manager Software (October 2002) ".
This blueprint recommends 30 mb
(which will probably be more than one cylinder). Each state database replica is now 4Mb (Solaris 9) and that is probably why the size recommendation has been increased.
You might as well start using the 30 mb recommendation -
Solaris will round up the 30mb to the nearest cylinder boundary and 30 mb is peanuts.
- section 2.5.5 on tapes: ufsdump really should be mentioned for backups
(tar is quick and dirty; it also has pitfalls like problems restoring tapes written with absolute paths).
- section 2.7 on SDS: again I refer to the blueprint. In a mirrored two disk configuration
(common on a small web server or a workstation) do not create 3 state replicas on one disk and 4 on the other one.
Instead create 2 replicas on each disk and add the following line (to disable the quorum rule)
to /etc/system:
set md:mirrored_root_flag=1.
Note: only do this in a 2 disk configuration.
- section 8.1 on /etc files: the hostname is also found in
/etc/net/{ticlts,ticots,ticotsord}/hosts and potentially in /etc/inet/ipnodes (>=Solaris 8). If changing the ip-address do check/update /etc/defaultrouter, /etc/netmasks, /etc/resolv.conf and the nis servers in /etc/hosts as well.
- section 8.1 on /etc files: Rolf uses an example of an Ultra 60 workstation named "u60".
New system administrators should not be encouraged to name any machine in this matter
(or any scheme which involves site names, room numbers, hardware types etc. Schemes which always seem to be favoured by Microserfs).
New unix system administrators should instead first read
Choosing a Name for Your Computer and then call their workstation something
like balder, pippin or eel instead.
- 8.6 on setting up a DNS client: the search yourdomain.com is normally included in /etc/resolv.conf.
- 8.9.10 on setting up network interface properties. The ndd -set sequence is wrong. First you set the capabilities,
then you turn off auto negotiation (this is a very common mistake). The sequence is clearly documented for all network
interfaces I have come over, including the
eri driver. Failing to configure in this sequence might leave you with unexpected settings for your ethernet interface.
See also my posting on setting and checking ethernet interface settings.
- UFS file system logging should be turned on. There is no reason not to - specially now that Sun has announced that for Solaris 9 12/02
the performance of UFS logging improves or exceeds the level of performance of non-logging file systems
.
A few other things worth mentioning (hints and personal preferences):
- section 1.1 on OK prompt: you type go at the ok prompt. Although Go and GO actually both works (at least on the machine I tested it on) it's better to get in the habit of using all lowercase at the ok prompt.
- 2.6 on cloning: judging by the links in /usr/platform (Solaris 8 and 9) I do think you can clone an Ultra10 to an Ultra60 (they both point to Ultra1). I have cloned an Ultra2 to an Ultra1 Creator without any adverse effects.
- 2.7 on mirroring: I do not like Rolf's naming scheme for the metadevices (d54 for the root filesystem?). For small systems I prefer names like d10 (first mirror) and d20 (second mirror) for the submirrors of d0 (being the root file system).
- 4.1 on installation: the statement that unless you install Entire+OEM
only drivers for hardware present in the system would be installed
is simply not true. The package differences between "Entire+OEM" and "Entire" are minimal - in fact for Solaris 9 it is just 2 packages (2 files:/kernel/misc/sparcv9/phx and /kernel/misc/phx - you have to wonder why Sun just don't bundle it all in a package called "Entire" and get rid of the confusing OEM cluster).
- 7.3 on hosts file and sendmail: I add
127.0.0.1 localhost localhost.localdomain to /etc/inet/hosts.
- 8.4 on default router: (strictly informational) you can have more than one defaultrouter in /etc/defaultrouter.
- 10.5 on web browser: the Netscape Navigator used in Solaris 8 is pretty crippled (when it comes to CSS support among other things).
Download a newer version (or get Opera/Mozilla).
- 11.1 on top 3 hints: C-shell - don't use it at all would be my tip ;-). Use ksh.
- Gnome should possibly be mentioned.