Re: hostname with DHCP
- From: "KarlD" <k_dal2@xxxxxxxxxxx>
- Date: 2 Dec 2005 11:07:56 -0800
Finally got some time to work on configuration,
The detailed procedure described by Glenn worked well for
configuring fully qualified host/domain names under DHCP
for Solaris 10 with some minor side effects.
In summary, what I did was:
I'm not a big fan of sys-unconfig since it may reset some
other customization done on the system so I never did that.
This assumes that the DHCP server (in my case a Linksys router
connected to a cable modem using Comcast as ISP)
does not provide a hostname to the client and I want the
hostname to be 'eagle' and my registered domain is 'mydomain.com'
In my system I only have one interface, hme0.
1. Edit /lib/svc/method/net-svc script
Added the domain name where the script writes into the /etc/hosts file.
at lines 140 and 173 as descibed by Glenn in previous post:
echo "${ipaddr}\t${hostname}\t${hostname}.${domain}
2. Configure host/domain name files
cd /etc/
echo > dhcp.hme0
echo "eagle" > nodename
echo "eagle" > hostname.hme0
echo "mydomain.com" > defaultdomain
3. Edit file /etc/default/dhcpagent
Remove request 12 in the last line (PARAM_REQUEST_LIST)
to make sure the client does not ask the DHCP server for
a hostname (in case it would provide a hostname). We are
providing the hostname in file nodename instead. This may not
always be needed.
PARAM_REQUEST_LIST=1,3,6,15,28,43
4. Edit file /etc/auto_home
Change last line, "pdl unknown:/export/home/pdl" to
pdl eagle:/export/home/pdl
This was a side effect of the state of the system when I first
started the system at which time the hostname was assigned 'unknown'.
The DHCP hostname configuration does not work out of the box
in Solaris when the server does not provide a hostname.
This prevented /home/pdl to be mounted on /export/home/pdl
by automountd and gave a lot of confusing error messages
when I tried to log on as user pdl in CDE. It said to look in
many different files and complained about dtsession cookies.
Took some time to figure out what was the problem.
I could log on as root and telnet worked and my home directory
could be accesed through /export/home/pdl but not /home/pdl/
5. Reboot: init 6
-----
After these steps, finally, for the fist time for me for Solaris
under DHCP mode, I got fully qualified host/domain names and
it is automatically configured at boot time.
% /usr/sbin/check-hostname
Hostname eagle OK: fully qualified as eagle.mydomain.com
% uname -a
SunOS eagle 5.10 Generic sun4u sparc SUNW,Ultra-5_10
/etc/hosts now looks like:
127.0.0.1 localhost
192.168.1.100 eagle eagle.mydomain.com # Added by DHCP
Finally, no more error messages in sendmail log files about
unqualified hostnames every time I send an e-mail. Sun
should really think about including an option for this
type of DHCP configuration, which is common, particularly
when using Solaris x86/x64 in home environments now when
Solaris is free and being ported to so many non-Sun
x86 PC's.
One thing I did not configure was loghost.
Don't know if loghost can be the same machine and simply
enetered after localhost in /etc/hosts or if it has to be
a different host or configured differently.
/Karl
.
- Follow-Ups:
- Re: hostname with DHCP
- From: Glenn
- Re: hostname with DHCP
- References:
- Re: hostname with DHCP
- From: KarlD
- Re: hostname with DHCP
- From: Glenn
- Re: hostname with DHCP
- Prev by Date: Re: Cluster software now free?
- Next by Date: mmap question
- Previous by thread: Re: hostname with DHCP
- Next by thread: Re: hostname with DHCP
- Index(es):
Relevant Pages
|
|