cancel
Showing results for 
Search instead for 
Did you mean: 

re : cannot set default gateway

vinowg
Advisor

re : cannot set default gateway

Hi Guys,

    Can anyone help,  I have problem configuring the default gateway  on my server rx2660 install with hpux11iv3 .

I have try reconfiguring  the /etc/rc.config.d/netconf file again but it still doesn't work. I even try to use command line set_parms to reset the ip subnet and gateway , still failed.

 

Below is the netconf output

 

# more /etc/rc.config.d/netconf
# netconf:  configuration values for core networking subsystems
#
# @(#) netconf $Date: 2007/10/05 20:09:28 $Revision: r11.31/1 PATCH_11.31 (PHNE_36281)
#
# HOSTNAME:           Name of your system for uname -S and hostname
#
# OPERATING_SYSTEM:   Name of operating system returned by uname -s
#                     ---- DO NOT CHANGE THIS VALUE ----
#
# LOOPBACK_ADDRESS:   Loopback address
#                     ---- DO NOT CHANGE THIS VALUE ----
#

HOSTNAME="erptest"
OPERATING_SYSTEM=HP-UX
LOOPBACK_ADDRESS=127.0.0.1

# Internet configuration parameters.  See ifconfig(1m), autopush(1m)
#
# INTERFACE_NAME:     Network interface name (see lanscan(1m))
#
# IP_ADDRESS:         IP address in decimal-dot notation (e.g., 192.1.2.3),
#                     or hostname (in /etc/hosts).
#
# SUBNET_MASK:        Subnetwork mask in decimal-dot notation, if different
#                     from default
#
# BROADCAST_ADDRESS:  Broadcast address in decimal-dot notation, if
#                     different from default
#
# INTERFACE_STATE:    Desired interface state at boot time.
#                     either up or down, default is up.
#
# DHCP_ENABLE         Determines whether or not DHCP client functionality
#                     will be enabled on the network interface (see
#                     auto_parms(1M), dhcpclient(1M)). DHCP clients get
#                     their IP address assignments from DHCP servers.
#                     1 enables DHCP client functionality; 0 disables it.
#
# INTERFACE_MODULES:  A list of modules to be pushed on a stream
#                     associated with an interface. For example,
#                     INTERFACE_MODULES[0]="mod1 mod2 ... modN-1 modN"
#                     pushes modN on top of modN-1.
#
# For each additional network interfaces, add a set of variable assignments
# like the ones below, changing the index to "[1]", "[2]" et cetera.
#

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=172.18.116.220
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""

INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=172.18.116.222
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=""
INTERFACE_STATE[1]=""
DHCP_ENABLE[1]=0
INTERFACE_MODULES[1]=""

# Internet routing configuration.  See route(1m), routing(7)
#
# ROUTE_DESTINATION:  Destination host or network IP address in decimal-dot
#                     notation, or hostname (in /etc/hosts) or network name
#                     (in /etc/networks), preceded by the word "host" or "net";
#                     or simply the word "default".
#
# ROUTE_MASK:         Subnetwork mask in decimal-dot notation, or C language
#                     hexadecimal notation.  This is an optional field.
#                     An IP address/subnet mask pair uniquely identifies
#                     a subnet to be reached. If a subnet mask is not given,
#                     then the system will assign the longest subnet mask
#                     of the configured network interfaces to this route.
#                     If there is no matching subnet mask, then the system
#                     will assign the default network mask as the route's
#                     subnet mask.
#
# ROUTE_GATEWAY:      Gateway IP address in decimal-dot notation, or hostname
#                     (in /etc/hosts).  If local interface, must use the
#                     same form as used for IP_ADDRESS above (hostname or
#                     decimal-dot notation). If loopback interface, i.e.,
#                     127.0.0.1, the ROUTE_COUNT must be set to zero.
#
# ROUTE_COUNT:        An integer that indicates whether the gateway is a
#                     remote interface (one) or the local interface (zero)
#                     or loopback interface (e.g., 127.*).
#
# ROUTE_ARGS:         Route command arguments and options.  This variable
#                     may contain a combination of the following arguments:
#                     "-f", "-n" and "-p pmtu".
#
# ROUTE_SOURCE:       Local system IP address in decimal-dot notation, or the
#                     equivalent hostname or alias (in /etc/hosts).
#                     This field is optional.  If specified, it must match
#                     one of the configured IP addresses or names of the
#                     local system.
#
# For each additional route, add a set of variable assignments like the ones
# below, changing the index to "[1]", "[2]" et cetera.
#
# IMPORTANT:  If host or network names are used instead of IP addresses for
#             fields that support both, make sure the system name resolution
#             policy is configured so that a hang during system boot (or slow
#             boot behavior) is avoided.  See nsswitch.conf(4).

ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=255.255.255.0
ROUTE_GATEWAY[0]=172.18.116.250
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""
ROUTE_SOURCE[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 ARP daemon configuration.  See rarpd(1m)
#
# RARP:         Set to 1 to start rarpd daemon
#

RARPD=0

#
# Network interface configuration.  See ifconfig(1m)
#
# DEFAULT_INTERFACE_MODULES contains a default list of modules to be
# pushed on a stream associated with an interface.  For example,
# INTERFACE_MODULES[0]="mod1 mod2 ...  modN-1 modN" pushes modN on top
# of modN-1.
#
# Precedence rules:
# 1) The module names specified in INTERFACE_MODULES[] for the specified
#    interface overrides the modules in DEFAULT_INTERFACE_MODULES. For
#    example, INTERFACE_MODULES[0]="foo" and
#    DEFAULT_INTERFACE_MODULES="m1 m2", then the module list applied
#    will be "foo".
#
# 2) If INTERFACE_MODULES[] is set to null string, then the module
#    names specified in DEFAULT_INTERFACE_MODULES will be used for the
#    specified interface. For example, INTERFACE_MODULES[0]="" ( or
#    INTERFACE_MODULES[0]= ) and DEFAULT_INTERFACE_MODULES="m1 m2",
#    then the applied module list will be "m1,m2".
#
# 3) If INTERFACE_MODULES[] is explicitly set to "NONE", then no module
#    list will be applied for the specified interface. For example, if
#    INTERFACE_MODULES[0]="NONE" and DEFAULT_INTERFACE_MODULES="m1 m2",
#    then there will be no -m option applied to the interface.
#    Restriction: The module name can't be "NONE", and "NONE" is not
#    case sensitive.

DEFAULT_INTERFACE_MODULES=""

If i do a traceroute it will end at the ip address assign it will not go to my gateway

# traceroute 172.16.74.233
traceroute to 172.16.74.233 (172.16.74.233), 30 hops max, 40 byte packets
 1  172.18.116.222 (172.18.116.222)  0.050 ms !N  0.027 ms !N  0.012 ms !N

Kindly help and advice.

 

Regards

Vincent

5 REPLIES
Turgay Cavdar
Honored Contributor

Re: re : cannot set default gateway

There is a problem with the netconf file : lan0 and lan1 ip addresses are on the same subnet. It is not recommended.

 

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


INTERFACE_NAME[1]=lan1
IP_ADDRESS[1]=172.18.116.222
SUBNET_MASK[1]=255.255.255.0

Arunabha Banerjee
Valued Contributor

Re: re : cannot set default gateway

Can you please share # netstat -nr output. Please find below configuration from a running server with different subnet.

 

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=10.200.75.157
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=10.200.75.255
INTERFACE_STATE[0]=up

DHCP_ENABLE[0]=0

 

DHCP_ENABLE[1]=0


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

 

ROUTE_DESTINATION[1]="net 10.90.0.0"
ROUTE_MASK[1]="255.255.0.0"
ROUTE_GATEWAY[1]="10.90.42.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""


GATED=0
GATED_ARGS=""


RDPD=0


RARP=0

IP_ADDRESS[2]=10.90.42.11
SUBNET_MASK[2]=255.255.255.0
INTERFACE_NAME[2]=lan2
BROADCAST_ADDRESS[2]=10.90.42.255
INTERFACE_STATE[2]=up

AB
donna hofmeister
Trusted Contributor

Re: re : cannot set default gateway

with a subnet mask of 255.255.255.0 the only ip address that you can reach are 172.16.116.1 - 172.16.116.254.  if this -- ROUTE_GATEWAY[0]=172.18.116.250 -- is correct, you're not allowed to reach it.  (could it be a typo?)

 

i suggest you go back to your networking team and find out what the correct values should be.  if this is truly a test system and possibly on a restricted network, then your mask is correct (although limited) and your gateway is wrong.  alternatively your mask is wrong.

vinowg
Advisor

Re: re : cannot set default gateway

Hi Guys, Thanks for the info, I know that I can set two lan card on the same subnet. But, the reason is cause I cannot connect my laptop directly to the user lan due to security reason. Therefore , I use a cross cable to connect from my laptop to the lan1 ip address 172.18.116.222 , just for testing purpose . You can ignore the lan1 ipaddress as is only temporary. Anyway, I have already resolve the problem by adding line to /etc/rc.config.d/nddconf TRANSPORT_NAME[0]=ip NDD_NAME[0]=ip_ire_gw_probe_interval NDD_VALUE[0]=0 this resolve the problem , I can traceroute to another subnet. Regards Vincent
Steven Schweda
Honored Contributor

Re: re : cannot set default gateway

> ROUTE_DESTINATION[0]="default"
> ROUTE_MASK[0]="255.255.255.0"

 

   Does it make any sense to specify a netmask for the default route?