1827807 Members
2943 Online
109969 Solutions
New Discussion

Adding Default gateway

 
baong
Frequent Advisor

Adding Default gateway

Hi All,
Hopefully you can help me out here..I am trying to add gateway IP in this file
/etc/rc.config.d/netconf

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

# /sbin/init.d/net stop
# /sbin/init.d/net start

but when i try to ping gateway then it hang...
I can ping my IP, loopback...
Anyone, can help me to see what else i need to do or missing something here?
Thanks ALL


18 REPLIES 18
Steven Schweda
Honored Contributor

Re: Adding Default gateway

> but when i try to ping gateway then it
> hang...

What is/are the IP address/es on this system?

If you can't ping the gateway before you tell
the system that it is a gateway, then it
can't be much of a gateway, can it?

Potentially interesting:

netstat -rn
baong
Frequent Advisor

Re: Adding Default gateway

Here is my netstat -rn
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
192.168.1.60 192.168.1.60 UH 0 lan0 4136
192.168.1.0 192.168.1.60 U 2 lan0 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 192.168.1.1 UG 0 lan0 0
Jupinder Bedi
Respected Contributor

Re: Adding Default gateway

please try following command

#route add default 192.168.1.1 1


Good luck


All things excellent are as difficult as they are rare
Fabio Ettore
Honored Contributor

Re: Adding Default gateway

Hi,

apart the ping behaviour to gateway which hangs, does the gateway do its work? I mean can you reach systems over the gateway from this machine?

Best regards,
Fabio
WISH? IMPROVEMENT!
smatador
Honored Contributor

Re: Adding Default gateway

Hi,
The netstat -rn seems good. You have configure the default gateway as 192.168.1.1
If you don't ping it, perhaps you have a link/cable problem or maybe the port of the network switch is not configure on the same vlan of 192.168....
HTH
Johnson Punniyalingam
Honored Contributor

Re: Adding Default gateway

>>default 192.168.1.1 UG 0 lan0 0<<

netstat -rn -> command shows that you already setup "default Gateway"

if you can't ping the gateway -> next thing you check using -> traceroute command from Your server

# traceroute

check with "Network" Team
sometime it could be the "firewall" rule
ping may be blocked.
Problems are common to all, but attitude makes the difference
AVV
Super Advisor

Re: Adding Default gateway

Hi,

You are configured good but as you said there seems to be a firewall (not from OS)that blocks you from PING.
baong
Frequent Advisor

Re: Adding Default gateway

Hi all,
Thanks for all your input what i did is
# traceroute 192.168.1.1
traceroute to 192.168.1.1 (192.168.1.1), 30 hops max, 40 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 * * *
7 *#

So look like my firewall is block?? Can someone provide me some input..Thanks all again
Steven Schweda
Honored Contributor

Re: Adding Default gateway

> Can someone provide me some input.

(Is that a question. That's a question?)

Only you (and the psychics) know what network
hardware and software lie between your
(unidentified) server system and your
(unidentified) gateway system. With almost
exactly no useful information, what do you
expect anyone to tell you?
Fabio Ettore
Honored Contributor

Re: Adding Default gateway

Hi,

maybe the ping is blocked from the firewall for ICMP request, you should check with people who manage the firewall but the point is: does the gateway do its work? I mean can you reach systems over the gateway from this machine?

Best regards,
Fabio
WISH? IMPROVEMENT!
baong
Frequent Advisor

Re: Adding Default gateway

Thanks for reply quick to me..
I will check with the network team to make sure is not block. As far as i know the gateway IP is working, when i ping the gateway IP address from my desktop is working..
Tim Nelson
Honored Contributor

Re: Adding Default gateway

If this server is in a DMZ, and if the server is accessable for a few moments and then cannot be contacted, and if the firewall @ 192.268.1.1 does not allow icmp ( which most do not by default)

then turn off the dead gateway probe via ndd.

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

this will need to be put in /etc/rc.config.d/nddconf in order to exist after reboots.

( if this is not the issue the save it for a rainy day ;)
baong
Frequent Advisor

Re: Adding Default gateway

Thanks all for input in this case my server is not in DMZ...by the way
i am using command :
# set_parms addl_netwrk
I got an error message " WARNING: Unable to contact gateway at 192.168.1.1.

The gateway system may be down or there may be a network disruption.

Verify that the address 192.168.1.1 is correct.

WARNING: Unable to contact DNS server at 192.168.1.33.

The DNS server system may be down or there may be a network disruption.

Verify that the address 192.168.1.33 is correct.

my ip address is 192.168.1.60 which they are same subnet.

Could it be something wrong on my network server side rather than on HP-UX machine ifself? I really appreciate if any one you guy give me some suggestion..
Thanks ALL
Fabio Ettore
Honored Contributor

Re: Adding Default gateway

Hi,

which is the operating system on DNS machines? Try to check from another side, connect onto DNS machines and try to ping your HP-UX system.

Best regards,
Fabio
WISH? IMPROVEMENT!
baong
Frequent Advisor

Re: Adding Default gateway

Hi Fibio, we are using window server for DNS machine.
Johnson Punniyalingam
Honored Contributor

Re: Adding Default gateway

can you also please post the "nsswitch" file form you HPUX Server


And please d'not forget assign points :)
Problems are common to all, but attitude makes the difference
Johnson Punniyalingam
Honored Contributor

Re: Adding Default gateway

nsswitch.conf

Please see below "example "nsswitch.conf"

more /etc/nsswitch.conf
passwd: files
group: files
hosts: files [NOTFOUND=continue] dns
ipnodes: files
services: files
networks: files
protocols: files
rpc: files
publickey: files
netgroup: files
automount: files
aliases: files
Problems are common to all, but attitude makes the difference
baong
Frequent Advisor

Re: Adding Default gateway

Hi All,
I had the enginerring HP take a look my configuration file..He said everything is look fine and correct. one thing about he concerned is my network side..like router or switch box...If i don't see the MAC address on switch box is that mean something with the configuration switch or what??