cancel
Showing results for 
Search instead for 
Did you mean: 

Netconf problem

SOLVED
Go to solution
ahmtoukhy
Occasional Advisor

Netconf problem

Dears,
I have an issue with my system as I added some static routes to the system using #route add
But I need to make these routes permrnant so I added them in /etc/rc.config.d/netconf but still each time I restart the system all routes are gone !! what could be the problem?
attached the netconf file from server
17 REPLIES
Mel Burslan
Honored Contributor
Solution

Re: Netconf problem

Try moving the IP address assignments block at the bottom of the netconf file to the top, definitely above the static route settings.

Also post a copy of the /etc/rc.log, especially the portion where the route activation fails. But I am pretty sure that, the failure is because of the interfaces not being active prior to the static route assignments.
________________________________
UNIX because I majored in cryptology...
ahmtoukhy
Occasional Advisor

Re: Netconf problem

Actually the routes are assigned after the enabling of the interfaces as they were working when I used the route add command
But I will try your suggestion tonight and get back to u
Patrick Wallek
Honored Contributor

Re: Netconf problem

The way the routes were assigned with the 'route add' command is irrelevant to how they will be assigned when the system boots.

Doing a 'route add' from the command prompt does nothing to make them permanent and has no impact on the netconf file.

Mel's comment makes perfect sense.
Mel Burslan
Honored Contributor

Re: Netconf problem

If you have a system, on which you are happy with the routing, you can use a little script I developed to make a dynamically created routing table (i.e., using 'route add ...' commands) permanent. you can use it if you wish. I am attaching the script to this post. Hope it helps. It works for me but exercise caution and backup your netconf file, just in case
________________________________
UNIX because I majored in cryptology...
Shiv007
Frequent Advisor

Re: Netconf problem

Hi,

Try using "set_parms initial", to configure the network settings and reboot the system.

your system will be brought up with the newer settings.

Thanks
Shiv
Adisuria Wangsadinata_1
Honored Contributor

Re: Netconf problem

Hi there,

Try not to create the backup of netconf on /etc/rc.config.d, create the backup of netconf to your home directory or on /tmp directory.

Regards,
Adi.
now working, next not working ... that's unix
Mel Burslan
Honored Contributor

Re: Netconf problem

Adi,

The issue you are referring to has been addressed in earlier versions of hpux and to the best that I know, having netconf backups in /etc/rc.config.d directory does not have any effect on networking any more, not on 11.x versions at least. It may be a good habit of housekeeping, but to each his own.
________________________________
UNIX because I majored in cryptology...
ahmtoukhy
Occasional Advisor

Re: Netconf problem

dears,

thanks very much for your replies But still problem isn't solved I moved the routes in the file to the end of the file after interfaces declaration
the Backup of netconf is in /tmp
It suppose to be very easy and simple just add the routes in netconf and they will be permanent and I did it before on other servers
what seems to be the problem??
Patrick Wallek
Honored Contributor

Re: Netconf problem

Have a look in /etc/rc.log and see if there are any errors about network configuration there.
Mel Burslan
Honored Contributor

Re: Netconf problem

please post your new version of your netconf file contents in a post here (just copy-and-paste, attachments are hassle) Most probably there is a typo or something. This is not rocket science and should work if typed correctly.
________________________________
UNIX because I majored in cryptology...
ahmtoukhy
Occasional Advisor

Re: Netconf problem

from /etc/rc.log it states very clearly that it couldn't add the route as interface isn't up try to add route after interface is initialized
this is the o/p even after I moved all the routes at the end of the netconf file(after interfaces declearion)and when I use route add it works fine!! ifconfig all interfaces are up !
Mel Burslan
Honored Contributor

Re: Netconf problem

It definitely is the timing issue. I had them quite a lot before having to write the script attached to one of my previous posts. If you add your routes by route add, then remove all the static route information from your netconf file and run my script, it will place all your active routes ona proper order, as the system currently sees them (I am assuming when you do the route add process, you are getting to a working routing table configuration) and creates you a clean netconf file.

If you like you can post your netconf and I can take a look at it.
________________________________
UNIX because I majored in cryptology...
ahmtoukhy
Occasional Advisor

Re: Netconf problem

This is my netconf file after changing location of the routes
# netconf: configuration values for core networking subsystems
#
# @(#)B.11.11_LR $Revision: 1.6.119.6 $ $Date: 97/09/10 15:56:01 $
#
# 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 ----
#
# IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between
# the next set of statements

HOSTNAME="pdh1"
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: Hostname (in /etc/hosts) or IP address in decimal-dot
# notation (e.g., 192.1.2.3)
#
# 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.
#
# For each additional network interfaces, add a set of variable assignments
# like the ones below, changing the index to "[1]", "[2]" et cetera.
#
# IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between
# the next set of statements

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=200.1.200.63
SUBNET_MASK[0]=""
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0

# Internet routing configuration. See route(1m), routing(7)
#
# ROUTE_DESTINATION: Destination hostname (in /etc/hosts) or host or network
# IP address in decimal-dot notation, 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.
# A 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 hostname (in /etc/hosts) or IP address in
# decimal-dot notation. 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".
#
# For each additional route, add a set of variable assignments like the ones
# below, changing the index to "[1]", "[2]" et cetera.
#
# IMPORTANT: for 9.x-to-10.0 transition, do not put blank lines between
# the next set of statements







# 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
#

RARP=0

IP_ADDRESS[1]=200.1.201.63
SUBNET_MASK[1]=255.255.255.0
INTERFACE_NAME[1]=lan1
BROADCAST_ADDRESS[1]=200.1.201.255
INTERFACE_STATE[1]=up
IP_ADDRESS[2]=200.1.202.63
SUBNET_MASK[2]=255.255.255.0
INTERFACE_NAME[2]=lan2
BROADCAST_ADDRESS[2]=200.1.202.255
INTERFACE_STATE[2]=up
IP_ADDRESS[3]=200.1.203.63
SUBNET_MASK[3]=255.255.255.0
INTERFACE_NAME[3]=lan3
BROADCAST_ADDRESS[3]=200.1.203.255
INTERFACE_STATE[3]=up
IP_ADDRESS[4]=200.1.204.63
SUBNET_MASK[4]=255.255.255.0
INTERFACE_NAME[4]=lan4
BROADCAST_ADDRESS[4]=200.1.204.255
INTERFACE_STATE[4]=up
IP_ADDRESS[5]=200.1.205.63
SUBNET_MASK[5]=255.255.255.0
INTERFACE_NAME[5]=lan5
BROADCAST_ADDRESS[5]=200.1.205.255
INTERFACE_STATE[5]=up

ROUTE_DESTINATION[1]="net 192.101.129.0"
ROUTE_MASK[1]=255.255.255.0
ROUTE_GATEWAY[1]=200.1.202.63
ROUTE_COUNT[1]=1
ROUTE_ARGS[1]=""
ROUTE_DESTINATION[2]="net 192.101.110.0"
ROUTE_MASK[2]=255.255.255.0
ROUTE_GATEWAY[2]=200.1.202.63
ROUTE_COUNT[2]=1
ROUTE_ARGS[2]=""
ROUTE_DESTINATION[3]="net 192.101.117.0"
ROUTE_MASK[3]=255.255.255.0
ROUTE_GATEWAY[3]=200.1.202.63
ROUTE_COUNT[3]=1
ROUTE_ARGS[3]=""
ROUTE_DESTINATION[4]="net 192.101.116.0"
ROUTE_MASK[4]=255.255.255.0
ROUTE_GATEWAY[4]=200.1.202.63
ROUTE_COUNT[4]=1
ROUTE_ARGS[4]=""
ROUTE_DESTINATION[5]="net 192.101.119.0"
ROUTE_MASK[5]=255.255.255.0
ROUTE_GATEWAY[5]=200.1.203.63
ROUTE_COUNT[5]=1
ROUTE_ARGS[5]=""
ROUTE_DESTINATION[6]="net 192.101.118.0"
ROUTE_MASK[6]=255.255.255.0
ROUTE_GATEWAY[6]=200.1.202.63
ROUTE_COUNT[6]=1
ROUTE_ARGS[6]=""
ROUTE_DESTINATION[7]="net 192.101.122.0"
ROUTE_MASK[7]=255.255.255.0
ROUTE_GATEWAY[7]=200.1.202.63
ROUTE_COUNT[7]=1
ROUTE_ARGS[7]=""
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]=200.1.201.165
ROUTE_COUNT[0]=1
ROUTE_ARGS[0]=""

And this is errors coming out in rc.log

Configure LAN interfaces
Output from "/sbin/rc2.d/S340net start":
----------------------------
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.129.0: gateway 200.1.202.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.110.0: gateway 200.1.202.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.117.0: gateway 200.1.202.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.116.0: gateway 200.1.202.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.119.0: gateway 200.1.203.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.118.0: gateway 200.1.202.63: Network is unreachable
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with
a route commad after the interface is up :
add net 192.101.122.0: gateway 200.1.202.63: Network is unreachable
"/sbin/rc2.d/S340net start" FAILED
Mel Burslan
Honored Contributor

Re: Netconf problem

For a precaution, move your /etc/rc.config.d/netconf file some other place and put the attached file as your new netconf into this directory and reboot. If the same thing happens again, before manually adding these routes, run the following two commands and post the output here:

netstat -rnv
netstat -in

I noticed that your default route was at the end of the static routes, which might be causing your problems.
________________________________
UNIX because I majored in cryptology...
Mel Burslan
Honored Contributor

Re: Netconf problem

also in addition to the two commands above, please run

traceroute 200.1.202.63

and I noticed I forgot the attachment. here it is on this post
________________________________
UNIX because I majored in cryptology...
ahmtoukhy
Occasional Advisor

Re: Netconf problem

First I wanna thank u so much MEL for your concern and grear effort
Even after changing the netconf file as u suggested it still didn't work
And these are the O/Ps u requested

*Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan3 1500 200.1.203.0 200.1.203.63 34 0 0 0 0
lan2 1500 200.1.202.0 200.1.202.63 89 0 0 0 0
lan1 1500 200.1.201.0 200.1.201.63 195 0 318 0 0
lan0 1500 200.1.200.0 200.1.200.63 2516 0 2538 0 0
lo0 4136 127.0.0.0 127.0.0.1 684 0 684 0 0
lan5 1500 200.1.205.0 200.1.205.63 0 0 0 0 0
lan4 1500 200.1.204.0 200.1.204.63 0 0 0 0 0

** Routing tables
Dest/Netmask Gateway Flags Refs Interface Pmtu
127.0.0.1/255.255.255.255 127.0.0.1 UH 0 lo0 4136
200.1.204.63/255.255.255.255 200.1.204.63 UH 0 lan4 4136
200.1.205.63/255.255.255.255 200.1.205.63 UH 0 lan5 4136
200.1.202.63/255.255.255.255 200.1.202.63 UH 0 lan2 4136
200.1.203.63/255.255.255.255 200.1.203.63 UH 0 lan3 4136
200.1.200.63/255.255.255.255 200.1.200.63 UH 0 lan0 4136
200.1.201.63/255.255.255.255 200.1.201.63 UH 0 lan1 4136
200.1.200.0/255.255.255.0 200.1.200.63 U 2 lan0 1500
200.1.201.0/255.255.255.0 200.1.201.63 U 2 lan1 1500
200.1.202.0/255.255.255.0 200.1.202.63 U 2 lan2 1500
200.1.203.0/255.255.255.0 200.1.203.63 U 2 lan3 1500
200.1.204.0/255.255.255.0 200.1.204.63 U 2 lan4 1500
200.1.205.0/255.255.255.0 200.1.205.63 U 2 lan5 1500
127.0.0.0/255.0.0.0 127.0.0.1 U 0 lo0 0
default/0.0.0.0 200.1.201.165 UG 0 lan1 0

*** 1 osilan2 (200.1.202.63) 0.095 ms 0.039 ms 0.031 ms
Victor_Makukha
Occasional Collector

Re: Netconf problem

Dear Ahmtoukhy, Mel,

 

Did you manage to fix this issue?  We have exactly the same problem on one HP-UX B11.11 box...

 

Regards, Victor