[SunHELP] newbie unclear on post installation steps of solaris 8 on ultra sparc...

Jim Pennino jimp at specsol.com
Fri Mar 14 10:38:32 CST 2003


On Fri, Mar 14, 2003 at 10:25:51AM -0500, Jeffrey Nonken wrote:
> 
> I'm gonna give you what I was given, and found out since, in one capsule
> lesson. Maybe that'll help.
> 
> Assume your gateway/DNS router is 192.168.1.1, your local machine is
> 192.168.1.10, your inside domain is internal.net, and your machine name is
> holycow.
> 
> /etc/nodename should contain the name of the machine:
> holycow

This is true if you are setting your IP and name locally as you are.

If using DHCP, it is not used.

man nodename

 
> (If you have multiple interfaces, you'll need to list all the names here.)

Where? Not in nodename.
 
 
 
> /etc/netmasks should contain the network IP and mask:
> 192.168.1.0	255.255.255.0

This is necessary only if you have a non-standard network, i.e. a subnet.

Example: You have only part of 192.168.1.0:

192.168.1.0	255.255.255.192
192.168.1.64	255.255.255.192
192.168.1.128	255.255.255.192
192.168.1.192	255.255.255.192

 
> (If you have multiple interfaces, each network will need to be listed on a
> separate line.)

Yes, IF the network is subnetted. If it is a whole class C for example,
you don't need an entry.
 
man netmasks 
 
> /etc/hosts should contain a list of known hosts, at least yourself if you
> have
> a DNS server. Include a fully-qualified hostname, thus:
> 127.0.0.1	localhost
> 192.168.1.10	holycow.internal.net	holycow 	loghost
> 
> Note that I put the fully qualified domain name FIRST. I don't know what
> loghost is, but it's there by default, so of course I left it in. I'm not
> sure
> if it's necessary, but it seems to me the items should be separated by tabs,
> not spaces.

You MUST have:

1) the localhost entry.
2) the name and IP for each interface you intend to use, i.e for every
   /etc/hostname.interface you have.

The loghost entry says syslog logs to this machine. You can send your
syslogs to another machine by adding the appropriate loghost entry.

man syslog.conf

 
> /etc/hostname.<interface>, e.g. /etc/hostname.le0 or /etc/hostname.hme0 has
> the machine name:
> holycow

Usually it is fully qualified, but doesn't really matter that much.
 
> /etc/defaultrouter has your gateway:
> 192.168.1.1
> 
> I gather that's one of those things that's not always necessary, but if the
> machine gets confused about what to use as a router (mine did last night),
> that will set it straight.

It is necessary if you are using static routing, i.e. you are not running
something to dynamically discover routers on your network.

If you have a single route, there is no reason to use dynamic routing.
 
The default route say where to send traffic if the network doesn't match
any that are explicitly stated.

Example:

Assume you have two physical interfaces with a local second network and
an external network.

Your main network: 192.168.1.0
Your local subnet: 192.168.2.0
Your two interfaces: 192.168.1.1 (first.mine.com)
                     192.168.2.1 (second.mine.net)
Your router to the outside: 192.168.1.250

/etc/hostname.eri0 contains first.mine.com
/etc/hostname.eri1 contains second.mine.net

/etc/defaultrouter contains 192.168.1.250

/etc/hosts contains:

127.0.0.1       localhost
192.168.1.1	first.mine.com	first	loghost
192.168.2.1	second.mine.net	second
192.168.1.250	(optionally name the router)

If you want syslogs to go to second.mine.net, put the loghost entry
there instead.

Since you are using full class C networks, you don't need a netmasks entry.

Your routing table (netstat -rn) will look like (ignoring loopback and
multicast):

Destination     Gateway        Interface
192.168.1.255	192.168.1.1    eri0
192.168.2.255   192.168.2.1    eri1
default         192.168.1.250

Any packets not for 192.168.1.255 or 192.168.2.255 go to 192.168.1.250.
 
> domain internal.net
> nameserver 192.168.1.1
> 
> Since I'm using 192.168.1.1 as the gateway AND as the DNS server/forwarder, I
> shouldn't need to specify the external network information. YMMV there. I'm
> using SmoothWall as my router/firewall/gateway/DNS server.

Not quite.

/etc/resolv.conf only effects how name resolution works and has nothing
to do with routing or anything else.

The domain entry specifies your local domain and allows you to use short
names (i.e. first).

The optional search entry allows short names for more than one domain
and specifies the order.

Since in the example I used both mine.com and mine.net for domain names,
there should be an entry like:

search mine.com mine.net

Then you can reference all your local systems by the short names, ASSUMING
you can get the names from somewhere; either DNS or /etc/hosts.

The nameserver entry specifies the nameserver to use and must be there.

You can optionally have up to three nameserver entries.

See below for nsswitch.conf.
 
> I think all the search does is let you use unqualified hostnames from those
> domains. You probably won't need to be using unqualified hostnames from
> bellsouth.net, unless you want to specify "www" and have it resolve to
> "www.bellsouth.net" or something. :)

See above.
 
 
> Some of the above is guesswork. I'm a newbie, too, so be gentle. :)
> 
> 
> ---
> It slices, dices, purees, and saves to CDROM. How could I resist?
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp

All the above assumes the system can find someplace to convert an IP
to a hostname (as well as the reverse).

Any names you use must be in either /etc/hosts or available through DNS.

Since some of the names, such as your interface names, are used before
DNS is available during bootup, they MUST be in /etc/hosts.

Once the machine is up, you need an entry in /etc/nsswitch.conf like:

hosts:	files dns

All the other entries should say "files" unless you are using NIS or
LDAP, which we won't go into.

This says when presented with a name, the system first looks in the
/etc/hosts file to find it. If the name isn't there, then try DNS.


-- 
Jim Pennino


More information about the SunHELP mailing list