1829106 Members
2505 Online
109986 Solutions
New Discussion

DHCP problem?

 
SOLVED
Go to solution
Nikos Avradinis
Occasional Advisor

DHCP problem?

Hello all.

I am a total novice on HPUX so please excuse any mistakes or silly questions. I work on a D220/HPUX 10.20 server with A4450A graphics card. When the system boots up, I see the following messages:

/sbin/rc[61]: csh: not found.
/sbin/auto_parms, checking network for DHCP server (see /etc/auto_parms.log)

After that, the system seems totally stuck and does nothing. I interrupt the boot-up process and set again the values manually
(ifconfig lan0 [myipaddress]
and
/sbin/set_parms/addl_netwrk),
but I cannot ping anything beyond my subnet.
The system does not recognize the specified subnet mask (255.255.255.128) and uses 255.255.255.0 instead.

This probably prevents me from logging on to CDE (CDE loading also seems to hang at some point)

Is this due to DHCP misconfiguration? Does anybody have a clue?

Thanks
13 REPLIES 13
David Burgess
Esteemed Contributor

Re: DHCP problem?

Line 61 runs . /etc/rc.config
Check /etc/hosts has a valid entry for the hostname and ip address.

100.100.100.1 myhost

Check /etc/rc.config.d/netconf had the correct entries for hostname, ip address, subnet mask against the correct lan card.
Also check the default gateway is correct.

HOSTNAME="myhost"

INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=100.100.100.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=100.100.100.2
LANCONFIG_ARGS[1]=""
DHCP_ENABLE[1]=0

Swap the addresses I've given for you ip's for host and gateway.

Check this as a starting point.

Regards,

Dave.
S.K. Chan
Honored Contributor

Re: DHCP problem?

You probably got DHCP enabled, try to disable it ..
The file is /etc/rc.config.d/netconf and change to this ..

DHCP_ENABLE[0]=0

the "0" disables it.

Reboot the system afterwards.
David Burgess
Esteemed Contributor

Re: DHCP problem?

Sorry, missed a couple of [0]'s out.

HOSTNAME="myhost"

INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=100.100.100.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=100.100.100.2
LANCONFIG_ARGS[0]=""
DHCP_ENABLE[0]=0


If you have got DHCP client enabled check your resolv.conf is as you expect as well as hosts and netconf. They get updated by the dhcp server.

Regards,

Dave.

Nikos Avradinis
Occasional Advisor

Re: DHCP problem?

Thanks all for the answers, but that won't do.

I had already checked netconf-it was OK. DHCP_ENABLE is set to 0 in netconf.

Could the problem be in auto_parms?

My auto_parms.log contains the following (after I stop the process by pressing Pause/Break twice):

Information: /sbin/auto_parms execution was stopped

/sbin/auto_parms may only execute from /sbin/rc during the initial transition from run level 'S' (see init(1M)).

OK with the first line, but could the second message be connected to the
"csh:not found" error I get during rc execution???
U.SivaKumar_2
Honored Contributor

Re: DHCP problem?

hi,
can you attach the output of following
#cat /etc/auto_parms.log
#ifconfig lan0
#cat /etc/rc.config.d/netconf

regards,
U.SivaKumar
Innovations are made when conventions are broken
Hartmut Lang
Trusted Contributor

Re: DHCP problem?

I wonder how you get into this "csh: not found" problem.

Check /sbin/init.d and /etc/rc.config.d if the files there contain any csh (they should not!):

grep csh /sbin/init.d/* /etc/rc.config.d/*

Hartmut
Nikos Avradinis
Occasional Advisor

Re: DHCP problem?

Thanx guys.

This is the story so far:

Regarding Hartmut's advice:
The only entry in init.d/* and rc.config.d/* using csh is startqmail
(this is the qmail start script)
I commented the line and the CDE login server at last started (thanks!).

I receive, however a series of errors like the following:

102.05.14 15:30:15 platon pid=1801 /usr/lib/netsvc/yp/ypbind
NIS:Server not responding for domain "lib.unipi.gr"; still trying

Our network uses DHCP.

However, it does not seem to respond OK. When I reboot the server it seems to have lost ip settings. The guy who was administering the server before me left a set of directions saying that this happens due to an HPUX-ifconfig bug or something, so every time the server needs to be rebooted, i have to manually enter the ip to ifconfig and then execute /sbin/set_parms addl_netwrk to configure the rest of the settings.

(I am NOT a knowledgeable sysadmin-I am a web programmer, the server is practically unadministered except for a few minor installations I am doing myself.)

U.SivaKumar requested some output, so here it is:

ifconfig lan0 at bootup reports the following:
lan0: flags=862

AFTER I set ip address and run set_parms, I get the following:

lan0: flags=863
inet 195.251.227.4 netmask ffffff00 broadcast 195.251.227.255

netconf
----------------------
HOSTNAME=platon
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=195.251.227.4
SUBNET_MASK[0]=255.255.255.128
BROADCAST_ADDRESS[0]=
LANCONFIG_ARGS[0]=ether
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=195.251.227.1
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

GATED=0
GATED_ARGS=""

RDPD=0
RARPD=0

auto_parms.log
--------------------
dhcpclient is managing lease(s) for: lan0

Please note the difference between ifconfig reported values
and netconf values for netmask and broadcast. Shouldn't these be the same?

Thank you for your assistance so far.
Ron Kinner
Honored Contributor
Solution

Re: DHCP problem?

 
Hartmut Lang
Trusted Contributor

Re: DHCP problem?

Nikos,

Ron is right, that you have a problem with you netmask/ip-address. Ifconfig reports the wrong subnet-mask, therefore you can not reach all other subnets.

Read more about your problem with ip-adress/subnetmask in
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xbcb7119c3420d411b66300108302854d,00.html

In this thread Ralf Hildebrandt points to a possible solution:

- apply latest ARPA-patch
- check your setting with "nettune ip_check_subnet_addr"
I expect this to be "1". Which is: your IP-Address is checked against the subnetmask, that result is not 0.
- you can change this setting with "nettune -s ip_check_subnet_addr 0".

I think you have to redo this setting on every boot time.
I don't know where to setup this in the rc-scripts, who can help?

Hartmut
U.SivaKumar_2
Honored Contributor

Re: DHCP problem?

hi,
From the output of ifconfig lan0 i understand
that it has taken the netmask as 255.255.255.0
( ffffff00 ) instead of 255.255.255.128
So change the broadcast address as follows in
/etc/rc.config.d/netconf
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=195.251.227.4
SUBNET_MASK[0]=255.255.255.128
BROADCAST_ADDRESS[0]=195.251.227.127
#/sbin/init.d/net start
now paste the output of ifconfig lan0 and
also try accessing the network.

regards,
U.SivaKumar

Innovations are made when conventions are broken
John Carr_2
Honored Contributor

Re: DHCP problem?

Hi

you have NIS enabled in your /etc/rc.config.d/namesvrs file switch it off

NIS_CLIENT=0
NIS_DOMAIN=


cheers
John.
Nikos Avradinis
Occasional Advisor

Re: DHCP problem?

Thanks again, everybody.

The nettune trick as well as disabling NIS seemed to do the job (thanks Harmut and John).

I will probably have to follow Jim Kay's example and include the nettune directive in the net startup script, as shown in the thread proposed by Hartmut.

Also many thanks to Ron for the extensive posting & U.SivaKumar (although I have to mention that the broadcast address change didn't do the job by itself-I still got an invalid address error when I restarted the network, it was the nettune command that solved this).

I have to note, however, that the solution seems to me more like a hack rather than a straightforward way to deal with it-am I wrong?

Nikos
Mladen Despic
Honored Contributor

Re: DHCP problem?

Nikos,

Just a few thoughts:

I think you are right - this does seem like a hack solution. I would check things further in order to prevent other potential problems.

Have you set the subnet mask with set_parms? If yes, does ifconfig report anything different?

Another possibility is that you may have incorrect settings or even incorrect files under /etc/rc.config.d !

I would check that out, perhaps with:

grep -i subnet /etc/rc.config.d/*

Anything interesting logged in /etc/rc.log ??

Mlade