- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to add a 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
Discussions
Discussions
Discussions
Forums
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
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
тАО05-04-2010 10:53 AM
тАО05-04-2010 10:53 AM
How to add a route
I need to add a route to my servers (HP-UX 11.23) in windows is like this.
route add -p 192.168.100.0 mask 255.255.255.0 192.168.6.12 metric 1
but in HP-UX i dont know how to do it.
Can anybody help me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 11:04 AM
тАО05-04-2010 11:04 AM
Re: How to add a route
route [-f] [-n] add [net | host] destination gateway [count]
In your example:
route add net 192.168.100.0 255.255.255.0 192.168.6.12 1
Also, you have to add it to file "/etc/rc.config.d/netconf" to not lose it after a reboot
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 12:28 PM
тАО05-04-2010 12:28 PM
Re: How to add a route
If count is not specified, HP-UX "route" command will assume it is 0, which makes no sense with gateway routes. As a result, trying to manipulate a gateway route without specifying the count will always fail with a cryptic-looking error message.
The "route" commands of most other OSs have a logic like "if the route entry contains a gateway and count is not specified, assume count=1; else assume count=0."
This little omission has caused much confusion to new HP-UX sysadmins.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 12:51 PM
тАО05-04-2010 12:51 PM
Re: How to add a route
--> route add net 192.168.100.0 255.255.255.0 192.168.6.12 1
add net 192.168.100.0: gateway 255.255.255.0: Network is unreachable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-04-2010 07:41 PM
тАО05-04-2010 07:41 PM
Re: How to add a route
Can you post this output
netstat -in
netstat -nr
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 05:29 AM
тАО05-05-2010 05:29 AM
Re: How to add a route
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 05:55 AM
тАО05-05-2010 05:55 AM
Re: How to add a route
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 06:24 AM
тАО05-05-2010 06:24 AM
Re: How to add a route
The thing is that i need to add the another route,
route add -p 192.168.100.0 mask 255.255.255.0 192.168.6.12 metric 1
net 192.168.100.0
mask 255.255.255.0
gateway 192.168.6.12
with the first command that you gave me, is showing me that the network is unrecheable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 06:25 AM
тАО05-05-2010 06:25 AM
Re: How to add a route
It's hard to say. Define "help".
> route [-f] [-n] add [net | host] destination gateway [count]
I don't see a netmask in there.
> route add net 192.168.100.0 255.255.255.0 192.168.6.12 1
I see a netmask (value) in there.
For an accurate synopsis of the "route"
command, I'd try:
man route
I don't have 11.23, but on my 11.11 and 11.31
systems, that says:
/usr/sbin/route [-f] [-n] [-p pmtu] add [net|host] destination
[netmask mask] gateway [count] [source src]
which suggests that the command might need to
look more like this:
route add net 192.168.100.0 netmask 255.255.255.0 192.168.6.12 1
> add net 192.168.100.0: gateway 255.255.255.0: Network is unreachable
"gateway 255.255.255.0" should be a clue.
Apparently, that "netmask" keyword is
important when specifying a netmask.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 07:17 AM
тАО05-05-2010 07:17 AM
Re: How to add a route
It work perfectly, yes this keyword is important.
Now i have 2 question, first how can i add this thing in netconf file?.
Second in a server with cluster can i add by the same way?.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-05-2010 08:43 AM
тАО05-05-2010 08:43 AM
Re: How to add a route
Reading the "man" pages can be helpful.
> [...] how can i add this thing in netconf
> file?.
Have you looked at the comments in that file?
I thought that SAM (or what's left of it)
could manage that file.
On my 11.31 system, SMH (Tools -> Network
Services Configuration -> Route) seems to do
this:
/usr/sam/lbin/samx -C -s route /usr/sam/lib/C/route.ui
whose help seems to say that it does the job.
> [...] cluster [...]
I know almost nothing about HP-UX clusters,
and I know exactly nothing about yours.