Operating System - HP-UX
1753966 Members
7551 Online
108811 Solutions
New Discussion юеВ

Re: 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?