Operating System - HP-UX
1833527 Members
3044 Online
110061 Solutions
New Discussion

default gateway lost after each reboot.. how can i correct

 
SOLVED
Go to solution
mike worrell
Regular Advisor

default gateway lost after each reboot.. how can i correct

hi all,
i just rebuilt a b132l+ hpux workstation.
after coming up i could only ping what was on this host's subnet. did add route default gatewayipaddy 1 and could ping all we have and could be pinged. after each reboot i have to do the add route command again.. all is set up in the netconf file just fine.. any ideas anyone?
thanks,
mike
19 REPLIES 19
Ivan Ferreira
Honored Contributor
Solution

Re: default gateway lost after each reboot.. how can i correct

Edit the /etc/rc.config.d/netconf file.

Modify the line like this:

ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=192.192.1.1


Where ROUTE_GATEWAY is the ip address of your gateway.


Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

I've got it set up like that.
The file is an exact copy from the old system and all was ok there... It's got me stumped.
John Dvorchak
Honored Contributor

Re: default gateway lost after each reboot.. how can i correct

can you post your netconf file? I wonder if the instance number [0] is different now and you are adding the router to lan [0] instead of [1] or what ever the NIC instance is.

INTERFACE_NAME[0]="lan0"
or is it
INTERFACE_NAME[1]="lan0"

then the mask and gateway also have to be instance [1]
If it has wheels or a skirt, you can't afford it.
James R. Ferguson
Acclaimed Contributor

Re: default gateway lost after each reboot.. how can i correct

Hi Mike:

In addition to the ROUTE_DESTINATION and ROUTE_GATEWAY specification, declare:

# ROUTE_COUNT[n]=1

Regards!

...JRF...

mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

sure.. here we go
INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=10.8.197.28
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=10.8.197.255
LANCONFIG_ARGS[0]="ether"
DHCP_ENABLE[0]=0

ROUTE_DESTINATION[0]=""
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=10.8.197.1
ROUTE_COUNT[0]=""
ROUTE_ARGS[0]=""

and here's the lanscan
lanscan
Hardware Station Crd Hardware Net-Interface NM MAC HP DLPI Mjr
Path Address In# State NameUnit State ID Type Support Num
8/0/20/0 0x0060B0EBBB3A 0 UP lan0 UP 4 ETHER Yes 115

Let me know if you think of anything else i can try
Bill Hassell
Honored Contributor

Re: default gateway lost after each reboot.. how can i correct

Take a look at /etc/rc.log as this is the history of what happened on reboot. There may be some errors in that log. ALSO: make sure you do NOT have any temporary or backup files in /etc/rc.config.d as *everything* in that directory is executed during bootup.


Bill Hassell, sysadmin
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

jeff,
i'm trying the 1 in the route count area now
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

HI Bill,
Log looks ok.
Just rebooted box.. here is what i get from netstat -r immediately after reboot
netstat -r
# uting tables
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
fifrux27.ipaper.com
localhost UH 36 7679 lo0 4608
localhost localhost UH 0 68 lo0 4608
10.8.197 fifrux27.ipaper.com
U 0 94 lan0 1500


here's what i have after doing the route add command
route add default 10.8.197.1 1
netstat -r
# uting tables
Destination Gateway Flags Refs Use Interface Pmtu PmtuTime
fifrux27.ipaper.com
localhost UH 36 7679 lo0 4608
localhost localhost UH 0 68 lo0 4608
default 10.8.197.1 UG 1 125 lan0 1500
10.8.197 fifrux27.ipaper.com
U 0 94 lan0 1500
#

For more info. This is a brandnew box b132l+, i'm replacing an old b132l+, all is on vg00 on this box.. used the make_recovery from the old box and booted off of it on the new box.

Any ideas what may be going on?
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

I just copied in a new netconf from /usr/newconfig/etc/rc.config.d and put in all my values and rebooted.. same thing.. no default gateway when done rebooting.. have to add manually
Bill Hassell
Honored Contributor

Re: default gateway lost after each reboot.. how can i correct

What is in /etc/rc.log for the netconf section?


Bill Hassell, sysadmin
Nguyen Anh Tien
Honored Contributor

Re: default gateway lost after each reboot.. how can i correct

/etc/rc.config.d/netconf file can help You.
Open and edit it as
ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=10.0.0.1 #IP of your GW
save it!
At the Next reboot this will take effected
HP is simple
dhananjay_1
Frequent Advisor

Re: default gateway lost after each reboot.. how can i correct

Hello MIke ,

I hope this will resolve ur issue.


/etc/rc.config.d/netconf looks like this:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=10.8.197.28
SUBNET_MASK[0]=255.255.255.0

ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=10.8.197.1
ROUTE_COUNT[0]=1

GATED=1

The /etc/gated.conf looks like this:

rip yes ;
static { default gateway 160.183.22.251 preference 150 retain ; } ;


Regards
DJ
DJ
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

The net part in the rc.log looks fine, no errors.

The netconf file has all the ip addresses for system and gateway just like the other box did. This netconf worked fine on the old box. Thinking maybe it got corrupted or something I created a new one.. Reboot and I have to add the gateway manually .

Could there be another file someplace that I need to recreate?
Pete Randall
Outstanding Contributor

Re: default gateway lost after each reboot.. how can i correct

Mike,

I suggested this in your other thread - the one that just got removed!!

Check to make sure that you don't have any extraneous files in your rc.config.d directory, like netconf.bak or netconf.orig, for example. These can get parsed after the real file and overlay same.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: default gateway lost after each reboot.. how can i correct

Hi:

With regard to how the '/etc/rc.config.d' directory is processed, it is true that any file therein is a candidate for processing with the *exception* that you *can* have backup copies of files that are *not* processed.

When '/sbin/rc' runs, the '/etc/rc.config.d' directory is examined by the script '/etc/rc.config'. This script skips any file basename name that is replicated with an "extension" that begins with the characters [.,~#].

Thus, it is permissible to have 'netconf' and 'netconf.old'. The '.old' backup will *not* be processed.

If, however, you had kept an old version of your 'netconf' file named as, 'oldnetconf', then *both* 'netconf' and 'oldnetconf' would be sourced. Since the letter "o" follows "n", the result would be undesirable insofar as the last variable declarations seen would be from the wrong file.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: default gateway lost after each reboot.. how can i correct

Thanks for clarifying that, James!


Pete

Pete
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

HI James,

I have netconf, netconf.old, netconf.113 in my /etc/rc.config.d directory. And it worked fine on the old box. I think on all my unix boxes I have some old copies and all works ok.. I even took out all of them but the one netconf and got the same deal.. no default gateway after rreboot
mike worrell
Regular Advisor

Re: default gateway lost after each reboot.. how can i correct

my netconf has all the correct info in it.
i put echo statements from top to bottom.
did /sbin/init.d/net start and it read the netconf file and gave me all the echo statements..
so we're reading the file and all it's contents.. it's just not keeping that addy for the gateway
Bill Hassell
Honored Contributor

Re: default gateway lost after each reboot.. how can i correct

The only way to see what is being done on reboot is to turn on a trace in the /sbin/init.d/net file by adding:

set -x

and then reboot. A complete trace of the script will then be stored in rc.log. That should reveal what is happening. Pay particular attention to the route statements. If multiple commands are run, it means that the array has multiple entries.


Bill Hassell, sysadmin