Operating System - HP-UX
1753386 Members
6596 Online
108792 Solutions
New Discussion юеВ

Re: Static route Need to be added

 
SOLVED
Go to solution
jeevanandham
Frequent Advisor

Static route Need to be added

Hi Experts,

i hvae a case to configure static route in Hp ux servers, i have gone through some threads in the forum which helped me to understand better, can anyone help me to configure the same
13 REPLIES 13
Suraj K Sankari
Honored Contributor
Solution

Re: Static route Need to be added

Hi,
Edit this file /etc/rc.config.d/netconf

# ROUTE_DESTINATION[0]=default
# ROUTE_MASK[0]=""
# ROUTE_GATEWAY[0]=""
# ROUTE_COUNT[0]=""
# ROUTE_ARGS[0]=""

Then restart the net

#/etc/init.d net start

Suraj
jeevanandham
Frequent Advisor

Re: Static route Need to be added

Hi Suraj,

can you please suggest me that below modification is ok

request to add the below

Destination Network : 172.31.10.0 Mask 255.255.255.0 Gateway : 10.80.60.200 HOP : 1

i have modified as below

ROUTE_DESTINATION[1]="172.32.10.0"
ROUTE_MASK[1]="255.255.255.0"
ROUTE_GATEWAY[1]="10.80.60.200"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""

and i have run #inetd -c which reads the config file instead of restarting the network services

and i have added by following cmd

#route add net 172.32.10.0 netmask 255.255.255.0 10.80.60.200 1

my #netstat -rn out put is as below

$ netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
10.90.10.122 10.90.10.122 UH 0 lan0 4136
10.0.0.0 10.90.10.122 U 2 lan0 1500
172.31.10.0 10.80.60.200 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 10.80.60.125 UG 0 lan0 0


but after server restart the configuration is not existing there.

Akif_1
Super Advisor

Re: Static route Need to be added

Hi Jeevan,

Follow below HP recommended solution for this issue.

http://docs.hp.com/en/B2355-90796/ch03s04.html


#

Add routing configuration information.

If you intend to use your system as a gateway or to communicate with gateways, add the route destination, gateway address, and hop count parameter information. The routing configuration parameters have an index value, [x], that groups the routing parameters together. Following is a sample netconf entry:

ROUTE_DESTINATION[0]=├в default├в
ROUTE_GATEWAY[0]=├в 192.6.1.2├в
ROUTE_COUNT[0]=├в 1├в
ROUTE_MASK[0]=├в ├в
ROUTE_ARGS[0]=├в ├в

The index value must be different for each additional route.

Executing the Network Configuration Script

Once you have edited the netconf file, you need to activate this configuration. After adding the LAN and routing configuration information into the netconf file, you can either reboot your system, execute the ifconfig, and route commands manually, or re-execute the /sbin/init.d/net.init and /sbin/init.d/net scripts. This section discusses each of these options.

Option 1: Reboot your system. HP recommends that you reboot your system to activate any changes you made in your netconf file. A reboot is the cleanest method for executing the network script because the reboot handles any other network initialization dependencies.

Option 2: Execute the ifconfig and route commands at the HP-UX prompt. HP recognizes that system reboots are disruptive to end users. To delay or schedule the reboot, but still make your configuration changes active, you may execute the ifconfig and route commands with the appropriate values for your network. When you reboot, the values in your netconf file will be used. Refer to the lanscan(1M), ifconfig(1M), and route(1M) man pages for information on command usage.

Option 3:

If you made changes to the station address, execute the init script in the directory /sbin/init.d/. Refer to Table 3-2 ├в Fast Ethernet Examples├в and Table 3-3 ├в Gigabit Ethernet Examples├в for some examples, and to your specific Ethernet LAN documentation, as appropriate for your configuration, for correct init script. For a 100BT PCI card on an rx2600 system, here├в s an example:

/sbin/init.d/btlan start

After executing the above command, execute the command:

/sbin/init.d/net start

These commands will source the contents of the netconf and hpbtlanconf files. Executing these scripts will not necessarily properly re-initialize any other networking subsystems. For example, if you are running an Internet Service over the link you have just configured manually, the service may not work with your new configuration. The system boot sequence initializes networking subsystems and products in the correct order. Initializing a specific subsystem alone may cause network problems.


Rgd's
T(ogether) E(very one) A(chive) M(ore)
AnthonySN
Respected Contributor

Re: Static route Need to be added

you need to restart the network services

/sbin/init.d/net start
AnthonySN
Respected Contributor

Re: Static route Need to be added

sory
its
/etc/init.d/net start
AnthonySN
Respected Contributor

Re: Static route Need to be added

/sbin/init.d/net start
will not stop network it will start the additional routes in netconf file
Bhadresh
Trusted Contributor

Re: Static route Need to be added

After editing netconf file you have to restart the network.

# /sbin/init.d/net stop

# /sbin/init.d/net start

Regards,
Bhadresh
Bhadresh
Trusted Contributor

Re: Static route Need to be added

Hi,

There was a similar query and you were able to configure route.

http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1435828

What is a difference now in configuration?

Regards,
Bhadresh
jeevanandham
Frequent Advisor

Re: Static route Need to be added

i have added the route but after server restart it is newly added route is not existing in the configuration.