Brandorr writes:
> Years ago when, I was first learning Solaris, I figured out that you
> could put an IP address in hostname.XXX, and that would set that
> interface's IP address.
>
> Soon enough, I found out that the "correct" way to set an interface's
> IP address was to put a hostname in the hostname.XXX file, and put the
> actual IP in /etc/hosts
>
> I bring this up because I have recently noticed that during
> network-discuss dicussions some senior sun networking folks, have
> given "echo aaa.aaa.aaa.aaa > hostname.xxx" as a valid method of
> setting a host's IP address.
>
> What is the deal? Is the ipaddress > hostnamefile a valid method?
I would use the numeric IP address *with* a prefix length, like this:
echo aaa.aaa.aaa.aaa/bb > hostname.xxx
The reason is that it disconnects interface configuration from name
services (such that if you break one through misadventures in
administration, the other doesn't fall apart) and removes the rancid
netmask-look-up-and-guessing stuff from the picture.
Either is valid though. It's a matter of local administrative
preference.
Note that NWAM will eventually make all of this obscure configuration
hackery obsolete.
--
James Carlson, Solaris Networking <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677
_______________________________________________
networking-discuss mailing list
[email protected]