Default route is configured, but seem to not work

Hiya,
I got the default gateway set in /etc/defaultrouter file, however "netstat -nr" doesn't show anything like "default" in the routing table. As far as I know "netstat" on Solaris 10 u7 should show something like :

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              10.1.1.1         UG        1       2303

Also I can't ping any far end system on the internet, unless I add a explicit route like:

route add -host <IP> 10.1.1.1

Is there any known bug in Solaris which could have caused this ? Maybe I'm missing something in system config? Please help.
Cheers,
Tom

have you restarted the machine?

yes of course, but it didn't help for the problem

This is expected. The "-n" option prevents adresses to be converted to names so "default" will never be displayed here, "0.0.0.0" will be instead.

Edit: Sorry. My previous statement is incorrect as far as Solaris netstat is concerned, even while its "-n" option is documented not to display symbolic names. On the other hand, Linux netstat displays "0.0.0.0" when "-n" is specified.

nope, I've just checked on other systems that "netstat -nr" produced in the output:

[server:/root] # netstat -nr

Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              1.2.3.4         UG        1       2388

Note: I changed IP in the above output.
Also on the server when it doesn't work, there is no 0.0.0.0 as well as no "deafult"
Cheers,
Tom

can you post how you go about adding the default route? silly to ask, but maybe the command was not successful. :slight_smile:

Wasn't me who setup this server, but I've checked that the default GW IP address is inside /etc/defaultrouter file. Isn't that enough to make it working? At least I do this when I setup networking on Solaris boxes and it always worked ok. That is why I like Solaris :slight_smile: but on this particular system something must be messed up as it is not inserting deafult GW IP from the file into the routing table when the system boots up.
But I don't know what else to check ? I've searched /var/adm/messages file to check what was going on since last reboot, but I did not notice anything unusual..
Regards,
Tom

Try "route add default 10.1.1.1" and then rerun "netstat -rn" and post the results. Post your /etc/netmasks file and post the results of "ifconfig -a".

----edit----

Actually after trying to manually add the default route, do a "netstat -nvr" and post that. This displays the netmasks...

#
# netstat -nrv

IRE Table: IPv4
  Destination             Mask           Gateway          Device Mxfrg Rtt   Ref Flg  Out  In/Fwd
-------------------- --------------- -------------------- ------ ----- ----- --- --- ----- ------
default              0.0.0.0         10.20.36.1                   1500*    0   1 UG   22597      0
10.20.36.0           255.255.252.0   10.20.36.18          eri0    1500*    0   1 U     4927      0
224.0.0.0            240.0.0.0       10.20.36.18          eri0    1500*    0   1 U        0      0
127.0.0.1            255.255.255.255 127.0.0.1            lo0     8232*    0 222 UH  63426006      0
#

Hiya,
problem was solved. The issue was that the interface from the deafult GW network range was not yet configured. I mean at the time when /etc/defaultrouter is processed and added to routing table (network/physical startup) interface was not yet up. It happend becasue someone placed interface config script in rc dir instead of creating the /etc/hostname.* file. I wasn't expecting that.
Thanks for all support
Tom