HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- multiple static routes on one lan and "default" on...
Operating System - HP-UX
1834183
Members
2881
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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-11-2005 05:26 AM
03-11-2005 05:26 AM
Here goes,
Is there a way to permanently assign multiple static routes to an interface through /etc/rc.config.d/netconf file? I currently have the following config below. What I'd like to do is add one more route for 135.21.108.39 on lan0 and keep lan3 set default. I know it can be done with route add but is there a way to permanently assign it through netconf file? Otherwise what is the most practical way to config this scenario.
/etc/rc.config.d/netconf entries :
IP_ADDRESS[0]=135.91.18.21
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[0]=lan3
BROADCAST_ADDRESS[0]=135.91.18.255
INTERFACE_STATE[0]=up
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="135.91.18.251"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
INTERFACE_NAME[3]=lan0
IP_ADDRESS[3]=135.91.20.23
SUBNET_MASK[3]=255.255.255.0
BROADCAST_ADDRESS[3]=135.91.20.255
INTERFACE_STATE[3]=up
DHCP_ENABLE[3]=0
ROUTE_DESTINATION[3]="net 135.91.20.0"
ROUTE_MASK[3]=""
ROUTE_GATEWAY[3]="135.91.20.251"
ROUTE_COUNT[3]="1"
ROUTE_ARGS[3]=""
netstat -rn :
# />netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
135.91.20.23 135.91.20.23 UH 0 lan0 4136
135.91.18.21 135.91.18.21 UH 0 lan4 4136
135.91.20.0 135.91.20.23 U 2 lan0 1500
135.91.18.0 135.91.18.21 U 2 lan4 1500
135.91.20.0 135.91.20.251 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 135.91.18.251 UG 0 lan4 0
Thanks!
Is there a way to permanently assign multiple static routes to an interface through /etc/rc.config.d/netconf file? I currently have the following config below. What I'd like to do is add one more route for 135.21.108.39 on lan0 and keep lan3 set default. I know it can be done with route add but is there a way to permanently assign it through netconf file? Otherwise what is the most practical way to config this scenario.
/etc/rc.config.d/netconf entries :
IP_ADDRESS[0]=135.91.18.21
SUBNET_MASK[0]=255.255.255.0
INTERFACE_NAME[0]=lan3
BROADCAST_ADDRESS[0]=135.91.18.255
INTERFACE_STATE[0]=up
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="135.91.18.251"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
INTERFACE_NAME[3]=lan0
IP_ADDRESS[3]=135.91.20.23
SUBNET_MASK[3]=255.255.255.0
BROADCAST_ADDRESS[3]=135.91.20.255
INTERFACE_STATE[3]=up
DHCP_ENABLE[3]=0
ROUTE_DESTINATION[3]="net 135.91.20.0"
ROUTE_MASK[3]=""
ROUTE_GATEWAY[3]="135.91.20.251"
ROUTE_COUNT[3]="1"
ROUTE_ARGS[3]=""
netstat -rn :
# />netstat -rn
Routing tables
Destination Gateway Flags Refs Interface Pmtu
127.0.0.1 127.0.0.1 UH 0 lo0 4136
135.91.20.23 135.91.20.23 UH 0 lan0 4136
135.91.18.21 135.91.18.21 UH 0 lan4 4136
135.91.20.0 135.91.20.23 U 2 lan0 1500
135.91.18.0 135.91.18.21 U 2 lan4 1500
135.91.20.0 135.91.20.251 UG 0 lan0 0
127.0.0.0 127.0.0.1 U 0 lo0 0
default 135.91.18.251 UG 0 lan4 0
Thanks!
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2005 05:54 AM
03-11-2005 05:54 AM
Solution
You are on the right track. Add the additional array member (using the next subscript) describing the new route to the netconf file. This file takes care of subsequent reboots of the box but does not do anything about the currently running configuration. You need to do an explicit "route add" command now and then the netconf entries take care of assigning the routes in future reboot cycles automatically. Your entries in netconf simply are arguments for the route command executed by the rc scripts.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2005 06:18 AM
03-11-2005 06:18 AM
Re: multiple static routes on one lan and "default" on another
provided you do not have a [4] indexed route in netconf file (if you do, find the next available index and replace 4s with that) adding the following block to your netconf will give you a permanent route to this 135.21.108.39 ip address from your lan 0
ROUTE_DESTINATION[4]="135.21.108.39"
ROUTE_MASK[4]=""
ROUTE_GATEWAY[4]="135.91.20.251"
ROUTE_COUNT[4]="1"
ROUTE_ARGS[4]=""
to make this change to take effect, you either need to stop/restart networking, after updating netconf file, by executing
/sbin/init.d/net stop
/sbin/init.d/net start
or you can add the route dynamically (my preferred method) by executing the following command:
route add 135.21.108.39 135.91.20.251 1
one thing though, since the ip address of the gateway, i.e., 135.91.20.251, is quite a bit different from the destination host ip address (135.21.108.39) make sure by talking to your network folks that these two entities can see and talk to each other.
ROUTE_DESTINATION[4]="135.21.108.39"
ROUTE_MASK[4]=""
ROUTE_GATEWAY[4]="135.91.20.251"
ROUTE_COUNT[4]="1"
ROUTE_ARGS[4]=""
to make this change to take effect, you either need to stop/restart networking, after updating netconf file, by executing
/sbin/init.d/net stop
/sbin/init.d/net start
or you can add the route dynamically (my preferred method) by executing the following command:
route add 135.21.108.39 135.91.20.251 1
one thing though, since the ip address of the gateway, i.e., 135.91.20.251, is quite a bit different from the destination host ip address (135.21.108.39) make sure by talking to your network folks that these two entities can see and talk to each other.
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2005 08:26 AM
03-11-2005 08:26 AM
Re: multiple static routes on one lan and "default" on another
Thanks for the input - helps a lot when you can talk to people that really know their stuff!
Vanja
Vanja
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP