- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Adding a static route for a range of IPs
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
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
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
03-05-2014 05:21 AM
03-05-2014 05:21 AM
Adding a static route for a range of IPs
For adding static route hpux, I know we have to edit /etc/rc.config.d/netconf file & start the net service /sbin/inet.d/net start.
ROUTE_DESTINATION[13]="host 10.14.252.222"
ROUTE_GATEWAY[13]=10.253.240.1
ROUTE_COUNT[13]=1
for eg: If I've to add static routes for IPs ranging from :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2014 05:29 AM
03-05-2014 05:29 AM
Re: Adding a static route for a range of IPs
Gateway will be the same for the above range of IPs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2014 03:25 AM
03-08-2014 03:25 AM
Re: Adding a static route for a range of IPs
This is known as a "network route". In your example, the range matches exactly a C-class network segment, also known as a /24 in more modern terms. That segment could be specified with a combination of network address 10.14.75.0 and netmask 255.255.255.0, or as 10.14.75.0/24 in Cisco-style short form.
So, you would specify such a route for HP-UX as:
ROUTE_DESTINATION[14]="net 10.14.75.0"
ROUTE_MASK[14]="255.255.255.0"
ROUTE_GATEWAY[14]="10.253.240.1"
ROUTE_COUNT[14]="1"
(If you really must do something different with 10.14.75.255, just specify a different host route for it - HP-UX will automatically arrange the routing table so that the most specific entries are chosen over more generic ones, so a host route for 10.14.75.255 will be preferred over a network route for 10.14.75.*.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2014 11:07 PM
03-16-2014 11:07 PM
Re: Adding a static route for a range of IPs
I added following 8 routes to the netconf file.
ROUTE_DESTINATION[60]="net 10.14.75.0"
ROUTE_MASK[60]="255.255.255.0"
ROUTE_GATEWAY[60]=10.15.134.4
ROUTE_COUNT[60]=1
ROUTE_DESTINATION[61]="net 10.14.76.0"
ROUTE_MASK[61]="255.255.255.0"
ROUTE_GATEWAY[61]=10.15.134.4
ROUTE_COUNT[61]=1
ROUTE_DESTINATION[62]="net 10.14.77.0"
ROUTE_MASK[62]="255.255.255.0"
ROUTE_GATEWAY[62]=10.15.134.4
ROUTE_COUNT[62]=1
ROUTE_DESTINATION[63]="net 10.14.78.0"
ROUTE_MASK[63]="255.255.255.0"
ROUTE_GATEWAY[63]=10.15.134.4
ROUTE_COUNT[63]=1
ROUTE_DESTINATION[64]="net 10.14.79.0"
ROUTE_MASK[64]="255.255.255.0"
ROUTE_GATEWAY[64]=10.15.134.4
ROUTE_COUNT[64]=1
ROUTE_DESTINATION[65]="net 10.15.40.0"
ROUTE_MASK[65]="255.255.255.0"
ROUTE_GATEWAY[65]=10.15.134.4
ROUTE_COUNT[65]=1
ROUTE_DESTINATION[66]="net 10.15.25.0"
ROUTE_MASK[66]="255.255.255.0"
ROUTE_GATEWAY[66]=10.15.134.4
ROUTE_COUNT[66]=1
ROUTE_DESTINATION[67]="net 10.16.200.0"
ROUTE_MASK[67]="255.255.255.0"
ROUTE_GATEWAY[67]=10.15.134.4
ROUTE_COUNT[67]=1
I'm getting the following error when I start the net service:
root:/etc/rc.config.d # /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 command after the interface is up :
add net 10.14.75.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.14.76.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.14.77.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.14.78.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.14.79.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.15.40.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.15.25.0: gateway 10.15.134.4: 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 command after the interface is up :
add net 10.16.200.0: gateway 10.15.134.4: Network is unreachable
root:/etc/rc.config.d #
I've attached the lanscan o/p, & few other troubleshooting steps output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2014 06:07 PM
03-21-2014 06:07 PM
Re: Adding a static route for a range of IPs
The gateway you're trying to specify is not directly reachable by neither lan0 or lan1.
Trying to specify routes like "first go to gateway X, then from there to gateway Y" is usually futile: this is known as "source routing".
It turned out that source routing had very few legitimate applications and quite a lot of malicious ones, so most security recommendations for routers today insist that source routing must be disabled.
Without source routing, the gateway that receives the traffic from your server must use its own routing table to decide where to pass the traffic.
I have to say that your routing table looks very messy, and it is probably more complicated than necessary. You might want to show the output of "netstat -rnv" to your network administrator: s/he might find ways to simplify your configuration considerably.