Online Expert Day - HPE Data Storage - Live Now
April 24/25 - Online Expert Day - HPE Data Storage - Live Now
Read more
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

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
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.
AnthonySN
Respected Contributor

Re: Static route Need to be added

can you post ur netconf file
nightwich
Valued Contributor

Re: Static route Need to be added

Your netconf should look like this:



ROUTE_MASK[0]=Route_mask_for_your_gateway
ROUTE_GATEWAY[0]=your_gateway_address
ROUTE_COUNT[0]=1
ROUTE_DESTINATION[0]=default


You also have to define your NIC to comunicate ex:

INTERFACE_NAME[0]=lan0
IP_ADDRESS[0]=your_ip_adress
SUBNET_MASK[0]=your_netmasks
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
INTERFACE_MODULES[0]=""

Please assign some points to the inputs.

Regards.
V. Nyga
Honored Contributor

Re: Static route Need to be added

Hi,

try:
ROUTE_DESTINATION[1]="net 172.32.10.0"

Give us your netstat after reboot.

V.
*** Say 'Thanks' with Kudos ***
V. Nyga
Honored Contributor

Re: Static route Need to be added

P.S.

net is also used by you in your command:

#route add --net 172.32.10.0-- netmask 255.255.255.0 10.80.60.200 1

V.
*** Say 'Thanks' with Kudos ***