Operating System - HP-UX
1834483 Members
3158 Online
110067 Solutions
New Discussion

nddconf not setting value

 
SOLVED
Go to solution
AIMC
Frequent Advisor

nddconf not setting value

Hi,

I have added the following to a /etc/rc.config.d/nddconf file to disable ip forwarding

TRANSPORT_NAME[5]=ip
NDD_NAME[5]=ip_forwarding
NDD_VALUE[5]=0

However when the server is rebooted an i run
ndd -get /dev/ip ip_forwarding, i get a value of 2 returned???? There was no lan connection when i tried this but i'm not sure this would make a difference.... any ideas??

Regards,

Aidan
6 REPLIES 6
Jeff Schussele
Honored Contributor

Re: nddconf not setting value

Hi Aidan,

The 2 value is default which implies an error in your nddconf file.
Make sure:
1) The index value is unique.
2) There is no typo in the entry - including hidden characters - delete & replace to be sure.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Sanjay_6
Honored Contributor

Re: nddconf not setting value

Hi,

Are you able to set it manuallyu from the command like

ndd -set /dev/ip ip_forwarding 5
ndd -get /dev/ip ip_forwarding

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: nddconf not setting value

Hi,

Are you able to set it manually from the command like

ndd -set /dev/ip ip_forwarding 5

Check to see if it is set to "5"

ndd -get /dev/ip ip_forwarding

Hope this helps.

Regds
AIMC
Frequent Advisor

Re: nddconf not setting value

Hi All,

Thanks for the reply's, i didn't check with the -get option after i'd used the -set to set the value to 0, also 5 is is not a valid option here it can only be set to 0,1 or 2.

I'll try setting it manually & then testing, also i'll try removing the lines & re-typing them in the nddconf file.

Does anybody know what daemon reads the nddconf file on bootup?

Aidan
Sanjay_6
Honored Contributor

Re: nddconf not setting value

Hi,

i think "init" is the daemon that reads and starts all the configured process at boot time.

hope this helps.

Regds
Bill Hassell
Honored Contributor
Solution

Re: nddconf not setting value

No daemon read the nddconf file. It is run just like all the other startup scripts. /etc/rc.config.d/nddconf is processed using the script /sbin/init.d/net (you can read the script to see where ndd is called).

Now, ndd -c is the tool to test your nddconf file. It performs the task of reading the nddconf file and setting the required values. So, the order in debugging an ndd setting is to first request the current value:

ndd -get /dev/ip ip_forwarding

That returns the current value and also verifies the syntax of the command (the right device file, and the correct speilling of the parameter). Now set the value manually:

ndd -set /dev/ip ip_forwarding 0
ndd -get /dev/ip ip_forwarding

The first sets the value and the second verifies the setting. Finally, make the changes to nddconf, then set the value to something else, followed by ndd -c and verify that the setting took place:

ndd -set /dev/ip ip_forwarding 2
ndd -get /dev/ip ip_forwarding
ndd -c
ndd -get /dev/ip ip_forwarding

If all is well, you'll see the value change and then take on the value in nddconf.

NOTE: ndd -c has been BROKEN for a while. It doesn't do anything or fails to process all the values in the file (contrary to the man page) until you add the latest ndd patch (PHNE_31247 for 11.11, PHNE_26125 for 11.00).


Bill Hassell, sysadmin