1836535 Members
4206 Online
110102 Solutions
New Discussion

default router

 
SOLVED
Go to solution
Josh_13
Super Advisor

default router

i keep getting a problem with the default route being lost on a hp 9000 series running 10.20. i have copy a correct version of the netconf file before doing anything, but when it rebooted, it still didn't have the default path. i went into sam and sam said there wasn't one while the log shows that when calling the paths, there is one listed as a default path.

how do i fix it so the machine remembers the default path and not just the netconf file?

thanx in advance

-Josh
25 REPLIES 25
Michael Tully
Honored Contributor

Re: default router

Hi,

Below is an example of a /etc/rc.config.d/netconf file.

The netconf file has the lines:

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

Is there any problem with the syntax, or something? This is EXACTLY what's there, and make sure that your subnet mask is correct.

-Michael
Anyone for a Mutiny ?
Darrell Allen
Honored Contributor

Re: default router

Hi Josh,

Just a hunch. Do you have a copy of netconf in /etc/rc.config.d? If so, it may be getting sourced by /etc/rc.config (which is called by /etc/rc when changing run level). If it is, it may be sourced after the real netconf so that your settings are not what you expect.

As a general rule, place your copies of /etc/rc.config.d files somewhere else.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Craig Rants
Honored Contributor
Solution

Re: default router

In your netconf file make sure you have the following:

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

and the [0] matches the ip and hostname

then netstat -nr to check the routing table

Dest/Netmask Gateway Flags Refs Use Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 29589 lo0 4136
10.1.1.1 10.1.1.1 UH 0 4653375 lan0 4136
10.1.1.0 10.1.1.2 U 2 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
default 10.1.1.1 UG 0 0 lan0 1500

If you have a default route in there your routing table is ok.

if not

route add default netmask 255.255.255.0 10.1.1.1 1

This is all you need to know about default gateways, there is no /etc/defaultrouter file like in Sun.

However, if you are using 11.x there is a bug called the dead gateway detection problem where if you can't ping the gateway, then it goes dead and you can't route out, which seems like you have lost your default route. However, if it is in your routing table, you really did not loose it.

There are some ndd patches to fix this or you can have your network admin allow icmp traffic from your hp box to fix this problem.

Hopefully I have covered it.

C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Michael Tully
Honored Contributor

Re: default router

Are there any errors produced in the
/etc/rc.log file when the system starts?
Anyone for a Mutiny ?
Steve Labar
Valued Contributor

Re: default router

If the syntax of your netconf file is correct, have you verified that the subnet mask of your interface and the subnet mask of your gateway are the same and the addresses of each are in the same subnet?

Good Luck

Steve
Josh_13
Super Advisor

Re: default router

sorry about the delay in replaying. i haven't had a chance to actually go through and try anything. i was away while finding my class schedule for hte semester since my work schedule is made around that. for those interested, here's part of the current netconf after it starts up:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=gw.net.brandeis.edu
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

# Dynamic routing daemon configuration. See gated(1m)
#
# GATED: Set to 1 to start gated daemon.
# GATED_ARGS: Arguments to the gated daemon.

GATED=0
GATED_ARGS=""

#
# Router Discover Protocol daemon configuration. See rdpd(1m)
#
# RDPD: Set to 1 to start rdpd daemon
#

RDPD=0

#
# Reverse Address Resolution Protocol daemon configuration. See rarpd(1m)
#
# RARPD: Set to 1 to start rarpd daemon
#

RARPD=0
IP_ADDRESS[0]=129.64.5.249
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=129.64.5.255
LANCONFIG_ARGS[0]="ether"





and here's the file i replace it with before accessing it in the start up scripts:

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=gw.net.brandeis.edu
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

# Dynamic routing daemon configuration. See gated(1m)
#
# GATED: Set to 1 to start gated daemon.
# GATED_ARGS: Arguments to the gated daemon.

GATED=0
GATED_ARGS=""

#
# Router Discover Protocol daemon configuration. See rdpd(1m)
#
# RDPD: Set to 1 to start rdpd daemon
#

RDPD=0

#
# Reverse Address Resolution Protocol daemon configuration. See rarpd(1m)
#
# RARPD: Set to 1 to start rarpd daemon
#

RARPD=0
IP_ADDRESS[0]=129.64.5.249
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=129.64.5.255
LANCONFIG_ARGS[0]="ether"


if i understnad this correctly, what i need to do is change the line:
ROUTE_MASK[0]=""
to:
ROUTE_MASK[0]="255.255.255.0"
and the line:
ROUTE_GATEWAY[0]=gw.net.brandeis.edu
to:
ROUTE_GATEWAY[0]="129.64.5.1"

i'm going to try that and see if it keeps the default router.
Krishna Prasad
Trusted Contributor

Re: default router

I think you need to change your gateway entry from gw.net.bradeis.edu to the hardcoded IP address of it ( providing that it is your router on the same subnet of your hosts IP.)
Positive Results requires Positive Thinking
Josh_13
Super Advisor

Re: default router

i have to leave for class, however, there was one more change since the last time. i noticed it still thought of itself as what it previously was for its internet connections. that was fixed. it now has the correctinformation there as well, but it's still not holding the default gateway.

however this time it did state that it created an error reported in the log file.

the only thing i see related to the gateway is complaints from when it read "gw.net.brandeis.edu" being a bad value.

-Josh
Steve Labar
Valued Contributor

Re: default router

You need to specify your gateway by IP address. It is also important for the Route mask to match the interfaces subnet mask.

Good Luck.

Steve
Ron Kinner
Honored Contributor

Re: default router

I expect the reason your default gateway goes away is because you have it defined by its name and not its ip address. When the box wants to find the router it probably queries your DNS server to find the ip address. Perhaps the DNS server is losing it or not responding? Make sure that you have the gateway entered in your /etc/hosts file and you might want to check /etc/nsswitch.conf to see if it wants to check DNS before /etc/hosts.

Ron
Josh_13
Super Advisor

Re: default router

Darrell Allen


January 18, 2002 22:24 PM GMT

-----------------------------------------------Hi Josh,

Just a hunch. Do you have a copy of netconf in /etc/rc.config.d? If so, it may be getting sourced by /etc/rc.config (which is called by /etc/rc when changing run level). If it is, it may be sourced after the real netconf so that your settings are not what you expect.

As a general rule, place your copies of /etc/rc.config.d files somewhere else.

Darrell
-----------------------------------------------

it's set up so that anywhere a startup script calls it, the script first has it copy the correct file over to netconf. (cp /etc/rc.config.d/netconf.orig /etc/rc.config.d/netconf )




-----------------------------------------------
Craig Rants-

thanx. that didn't fix it but it let me catch a few other problems that were occuring and now seem to be resovled.
after i get this one fixed is when i'm going to give you points for that because it definitely deserves a ten since it allowed me to catch other problems
-----------------------------------------------


Steve Labar


January 21, 2002 23:29 PM GMT

-----------------------------------------------If the syntax of your netconf file is correct, have you verified that the subnet mask of your interface and the subnet mask of your gateway are the same and the addresses of each are in the same subnet?

Good Luck

Steve

-----------------------------------------------

yes i have. i know they are on the same subnet, etc. it used to have the old ips in that file (the problem i caught because of craig which was why it wouldn't talk to the backup server)
that was fixed and it is still having the problem



-----------------------------------------------
Ron Esterman


January 31, 2002 17:19 PM GMT

-----------------------------------------------
I think you need to change your gateway entry from gw.net.bradeis.edu to the hardcoded IP address of it ( providing that it is your router on the same subnet of your hosts IP.)

-----------------------------------------------

that's been done and it is still losing it.
Josh_13
Super Advisor

Re: default router

 
Josh_13
Super Advisor

Re: default router

 
Darrell Allen
Honored Contributor

Re: default router

I don't know that this will fix your problem but here's a couple of things about your netconf...

In the following stanza you have misspelled LANCONFIG. You also specify instance number [2] which does not have an interface associated with it. Also DHCP_ENABLE is associated with [2]. I presume you mean for both of them to apply to lan0 thus they should be [0].

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=129.64.5.249
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=129.64.5.255
LANCOFIG_ARGS[2]=ether
DHCP_ENABLE[2]=0


The following stanza repeats entries from the above stanza. You need to delete one stanza or the other. Even if they are the same, it's not good practice to have it repeated.

IP_ADDRESS[0]=129.64.5.249
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=129.64.5.255
LANCONFIG_ARGS[0]="ether"


In the following stanza you misspell ROUTE_GATEWAY.

ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUT_GATEWAY[0]="129.64.5.1"
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

You also specify ROUTE_GATEWAY again as below. Delete the one you don't want. If the first, be sure to correct the spelling.

ROUTE_GATEWAY[0]=gw.net.brandeis.edu


Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Darrell Allen
Honored Contributor

Re: default router

Josh, there's 2 things I don't understand...

Why are you playing games with netconf? I have no idea what you could want to accomplish by overlaying netconf with a saved version.

Why are you editing /sbin/auto_parms? /sbin contains system "stuff" that shouldn't be changed.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Patrick Wallek
Honored Contributor

Re: default router

If you have the netconf.orig file in /etc/rc.config.d, get it out of there. Move it to /tmp or your home directory or something. When the system starts up, it sources ALL FILES in /etc/rc.config.d to get configuration parameters. So any backup files you have get sources as well, and depending on how they fall, the netconf.orig could be overwriting everything that is set in netconf.

You should NEVER have a backup of any of the /etc/rc.config.d configuration files in /etc/rc.config.d.
Josh_13
Super Advisor

Re: default router

Darrell Allen


February 04, 2002 17:19 PM GMT

--------------------------------------------------------------------------------
Josh, there's 2 things I don't understand...

Why are you playing games with netconf? I have no idea what you could want to accomplish by overlaying netconf with a saved version.

Why are you editing /sbin/auto_parms? /sbin contains system "stuff" that shouldn't be changed.

Darrell

----------------------------------------------
because i'm trying to get it to stop losing the default gateway.


and to the person who noted the [2] appearence, this machine used to have three network interfaces. we're now only using the build in interface.

i'm going to fix the problems pointed out, move the backup file and report back.

-Josh
Josh_13
Super Advisor

Re: default router

 
Josh_13
Super Advisor

Re: default router

i have a question... should this:

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

look like this:

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


what would that change do? in it's current state with the quotes it doens't keep the information.
Patrick Wallek
Honored Contributor

Re: default router

Quotes or no quotes shouldn't matter. My box is set up with the stuff enclosed in quotes in netconf and it works fine.
Darrell Allen
Honored Contributor

Re: default router

Hi Josh,

I don't know that it matters (I don't use this arg myself) but you still have a typo:
LANCOFIG_ARGS[0]=ether

I presume you want:
LANCONFIG_ARGS[0]=ether

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
Paul T. Green
Advisor

Re: default router

Josh,

The quotes are used only if there is a space in the variable assigned.

In your case on qoutes are needed.

Paul
We'd like to know a little bit about you for our files.... Paul Simon
Josh_13
Super Advisor

Re: default router

aside form netconf, is there anything that affects the default router at start up?
Ron Kinner
Honored Contributor

Re: default router

You asked: should this:

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

look like this:

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

Actually I think it should look like this:

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

Default shouldn't have a mask and doesn't need quotes tho it doesn't hurt if they are there. I have four 10.20's without quotes and an 11.0 with quotes.

Ron