- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- how to make a permanent route
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2009 05:34 AM
10-23-2009 05:34 AM
how to make a permanent route
does anyone know how to make permanent route and even after server reboot, the route will still be existed in routing table?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2009 05:48 AM
10-23-2009 05:48 AM
Re: how to make a permanent route
For example, if you want this route made permanent:
route add net 10.20.30.0 netmask 255.255.255.0 10.2.2.2 1
... you would add lines like this to the netconf file:
ROUTE_DESTINATION[x]="net 10.20.30.0"
ROUTE_MASK[x]="255.255.255.0"
ROUTE_GATEWAY[x]="10.2.2.2"
ROUTE_COUNT[x]=1
Replace "x" with the first unused index number for a set of route entries. Usually the default gateway is defined with index 0.
If you have no other permanent routes defined yet, "x" would be 1 in your new route configuration lines.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2009 05:56 AM
10-23-2009 05:56 AM
Re: how to make a permanent route
Thanks. What happen if the destination is a server, and I don't really quite sure the gateway. Could your given guide works well ?
Appreciate that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2009 06:07 AM
10-23-2009 06:07 AM
Re: how to make a permanent route
I change the route information in /etc/rc.config.d/netconf
Note: Backup copies should not reside in /etc/rc.config.d
You can set default routes and secondary routes.
netstat -rn
# To see the results.
Be careful about typoes in that file, which has fairly good internal documentation.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-23-2009 08:43 AM
10-23-2009 08:43 AM
Re: how to make a permanent route
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="11.22.33.44"
ROUTE_COUNT[0]=1
The index number [in brackets] for the default gateway is typically 0, because this entry is usually created by the OS installation procedure. All other permanent routes are created by the sysadmin.
A single-host route would be specified like this:
ROUTE_DESTINATION[x]="host 10.11.12.13"
ROUTE_MASK[x]=""
ROUTE_GATEWAY[x]="22.33.44.55"
ROUTE_COUNT[x]=1
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2009 09:28 PM
10-25-2009 09:28 PM
Re: how to make a permanent route
Does any network services need to restarted after modification ?
Is that correct ?
> /sbin/init.d/net stop and start
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2009 10:36 PM
10-25-2009 10:36 PM
Re: how to make a permanent route
If you are not familiar with editing the /etc/rc.config.d/netconf file, running "/sbin/init.d/net stop; /sbin/init.d/net start" or rebooting the system is recommended to confirm that your syntax is correct.
But running /sbin/init.d/net may cause a total loss of all network connections for a few seconds: it does more actions than is strictly necessary for adding a route. If you need to add a new route without any kind of service interruption, you *can* add the route using the "route" command without any service interruption, and edit /etc/rc.config.d/netconf to cause the new route be auto-added at system startup.
Of course, if you do this, you should document the change so that you and your fellow sysadmins will know where to start troubleshooting if the system does not successfully start up networking after the next scheduled maintenance break...
NOTE: if you want to keep a backup version of the /etc/rc.config.d/netconf file, do not leave the backup in /etc/rc.config.d directory: move it somewhere else.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2009 11:05 PM
11-11-2009 11:05 PM
Re: how to make a permanent route
can you advise why it still encounter error in adding route to 10.200.64.132 via lan2? In fact lan2 is pingable
psa1a:/root# /sbin/init.d/net stop
psa1a:/root# /sbin/init.d/net 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 host 10.200.64.132: gateway 172.19.149.140: Network is unreachable
psa1a:/root#
psa1a:/root# ping 172.19.149.140
PING 172.19.149.140: 64 byte packets
64 bytes from 172.19.149.140: icmp_seq=0. time=0. ms
64 bytes from 172.19.149.140: icmp_seq=1. time=0. ms
----172.19.149.140 PING Statistics----
2 packets transmitted, 2 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/0
psa1a:/root# ifconfig lan2
lan2: flags=1843
inet 172.19.149.140 netmask ffffff80 broadcast 172.19.149.255
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2009 11:33 PM
11-11-2009 11:33 PM
Re: how to make a permanent route
psa1a:/root# /sbin/init.d/net start
ERROR: Failed to add route entry because its interface is not
yet initialized. May need to add this route entry with<<<
why did you do this <
can post below
ioscan -fnC lan
netstat -in
netstat -rn
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2009 11:40 PM
11-11-2009 11:40 PM
Re: how to make a permanent route
Class I H/W Path Driver S/W State H/W Type Description
========================================================================
lan 0 0/1/2/0 igelan CLAIMED INTERFACE HP PCI 1000Base-T Core
lan 1 0/3/1/0/6/0 iether CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X 1000Base-T 4Gb FC/1000B-T Combo Adapter
lan 2 0/4/1/0/6/0 iether CLAIMED INTERFACE HP AD193-60001 PCI/PCI-X 1000Base-T 4Gb FC/1000B-T Combo Adapter
lan 3 0/6/1/0 iether CLAIMED INTERFACE HP AD331-60001 PCI/PCI-X 1000Base-T Adapter
psa1a:/root# netstat -in
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs Coll
lan0:1 1500 172.19.149.96 172.19.149.105 6230860 0 5799123 0 0
lan3* 1500 none none 0 0 0 0 0
lan2 1500 172.19.149.128 172.19.149.140 89637 0 153384 0 0
lan1* 1500 none none 0 0 0 0 2
lan0 1500 172.19.149.96 172.19.149.103 1608065 0 3613124 0 0
lo0 4136 127.0.0.0 127.0.0.1 730889 0 730889 0 0
lan2:1 1500 172.19.149.128 172.19.149.142 0 0 28 0 0
psa1a:/root# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
172.19.149.142 172.19.149.142 UH 0 lan2:1 4136
172.19.149.140 172.19.149.140 UH 0 lan2 4136
172.19.149.103 172.19.149.103 UH 0 lan0 4136
172.19.149.105 172.19.149.105 UH 0 lan0:1 4136
10.200.64.132 172.19.149.105 UH 0 lan0:1 0
172.19.149.96 172.19.149.103 U 3 lan0 1500
172.19.149.96 172.19.149.105 U 3 lan0:1 1500
172.19.149.128 172.19.149.140 U 3 lan2 1500
172.19.149.128 172.19.149.142 U 3 lan2:1 1500
10.200.64.132 172.19.149.105 UH 0 lan0:1 1500
10.200.64.132 172.19.149.103 UH 0 lan0 1500
10.200.64.132 172.19.149.140 UH 0 lan2 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 172.19.149.126 UG 0 lan0 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2009 11:51 PM
11-11-2009 11:51 PM
Re: how to make a permanent route
can we try like
route add net
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 12:03 AM
11-12-2009 12:03 AM
Re: how to make a permanent route
This what had added into netconf prior to this
ROUTE_DESTINATION[0]=default
ROUTE_GATEWAY[0]=172.19.149.126
ROUTE_COUNT[0]=1
IP_ADDRESS[2]=172.19.149.140
SUBNET_MASK[2]=255.255.255.128
INTERFACE_NAME[2]=lan2
DHCP_ENABLE[2]=0
BROADCAST_ADDRESS[2]=172.19.149.255
INTERFACE_STATE[2]=up
ROUTE_DESTINATION[1]="10.200.64.132"
ROUTE_GATEWAY[1]="172.19.149.140"
ROUTE__MASK[1]=255.255.255.255
ROUTE_COUNT[1]=1
ROUTE_DESTINATION[2]="10.200.64.132"
ROUTE_GATEWAY[2]="172.19.149.103"
ROUTE_MASK[2]=255.255.255.255
ROUTE_COUNT[2]=1
ROUTE_DESTINATION[3]="10.200.64.132"
ROUTE_GATEWAY[3]="172.19.149.105"
ROUTE_MASK[3]=255.255.255.255
ROUTE_COUNT[3]=1
Any reason I can't successfully add to the routing table ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 12:09 AM
11-12-2009 12:09 AM
Re: how to make a permanent route
I have some idea after seeing you netconf file
please provide
so we shall try with "static" than we shall add the entries under the netconf file for permant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 12:13 AM
11-12-2009 12:13 AM
Re: how to make a permanent route
10.200.64.132 is IP which I need to add route for permanent route to netconf.
By manually, but still can't reach the IP
route add net 10.200.64.132 netmask 255.255.255.255 172.19.149.140
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 12:23 AM
11-12-2009 12:23 AM
Re: how to make a permanent route
command shoudl as below
route add net 10.200.64.132 255.255.255.255 172.19.149.140 1
But Below shows you have already add route as per above posted from yours
=========================================================================
# netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
10.200.64.132 172.19.149.140 UH 0 lan2 1500
127.0.0.0 127.0.0.1 U 0 lo0 0
default 172.19.149.126 UG 0 lan0 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 12:53 AM
11-12-2009 12:53 AM
Re: how to make a permanent route
AS because, I was using route add net 10.200.64.132 netmask 255.255.255.255 172.19.149.140"
How difference between these 2 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2009 05:39 PM
11-12-2009 05:39 PM
Re: how to make a permanent route
difference its counts 1