- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- adding new 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
01-18-2005 05:29 AM
01-18-2005 05:29 AM
I have two gateway ip addresses. i have to add routes. Can you help?
what is the format?
This machine ip and the gateway ips are different.
Is this how I should add?
/usr/sbin/route
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 05:40 AM
01-18-2005 05:40 AM
Re: adding new route
Try
route add subnet subnet_gw_ip 1
To make the changes permanent edit the /etc/rc.config.d/netconf file.
also take a look at this thread,
http://docs.hp.com/en/B2355-90147/ch02s04.html#bcfdebbg
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 05:41 AM
01-18-2005 05:41 AM
SolutionWell, no. IF you have a default route already - check with
netstat -rn
Then *all* other routes need to be static routes to either hosts or subnets - added as follows:
route add host host_ip_here netmask mask_ip_here_if_needed gateway_ip_here 0
"Usually" the gateway will be the outbound I/F hence a 0 hop count
OR
route add net 111.222.111 netmask mask_ip_here_iff_needed gateway_ip_here 0
Of course all these static routes can be added to the /etc/rc.config/netconf file to be added at every boot.
You can only have *one* default route so that's why all others must be static.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 07:34 AM
01-18-2005 07:34 AM
Re: adding new route
All I have is the ip address of gateway. So is this right?
route add host host_ip_here netmask mask_ip_here_if_needed gateway_ip_here 0
route add host_name_this_machine this_ip netmask gateway_net_mask gateway_ip 0.
How to get gateway netmask?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 07:58 AM
01-18-2005 07:58 AM
Re: adding new route
If all you know is the gateway's address then there is no point in adding a route. The question you need to ask yourself (or the owner of the gateway) is where does the gateway know how to go? If your answer is the Internet and you already have a default route pointing to a gateway that knows how to get to the internet then this can only be a backup route which I don't think is really supported in HPUX unless you are running gated. Ideally your answer will be: It can go to subnet A.B.C.0 with mask 255.255.255.0 or perhaps subnet 10.0.0.0 with mask 255.0.0.0.
Note that you will lose your route at the first reboot. You need to edit /etc/rc.config.d/netconf in order for it to stay.
Which version of HPUX do you have?
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 08:06 AM
01-18-2005 08:06 AM
Re: adding new route
Are you saying that you do not have 2 NICs in this system?
If not then it will be up to the default gateway to route the traffic to the secondary gateway.
Normally one has multiple interfaces in the system & what the static routes do is force the traffic out the secondary NIC where a router on that subnet picks up the traffic & moves it along.
If you do have 2 NICs in the system & let's say these are the assigned IPs
111.123.111.123
123.111.123.111
And let's say that the default gateway is
111.123.111.1
And you're trying to get traffic to the
123.111.125
subnet. Then your route statement would be
route add net 123.111.125 123.111.123.111 0
In this case no netmask was necessary as the router on the 123.111.123 subnet would route it to the 123.111.125 subnet.
If the subnets are ganged up into a supernet then you'd have to ask the network admins what netmask you'll need.
HTH,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2005 09:33 AM
01-18-2005 09:33 AM
Re: adding new route
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2005 07:23 AM
01-26-2005 07:23 AM
Re: adding new route
Are you saying that you do not have 2 NICs in this system?
If not then it will be up to the default gateway to route the traffic to the secondary gateway.
Normally one has multiple interfaces in the system & what the static routes do is force the traffic out the secondary NIC where a router on that subnet picks up the traffic & moves it along.
If you do have 2 NICs in the system & let's say these are the assigned IPs
111.123.111.123
123.111.123.111
And let's say that the default gateway is
111.123.111.1
And you're trying to get traffic to the
123.111.125
subnet. Then your route statement would be
route add net 123.111.125 123.111.123.111 0
In this case no netmask was necessary as the router on the 123.111.123 subnet would route it to the 123.111.125 subnet.
If the subnets are ganged up into a supernet then you'd have to ask the network admins what netmask you'll need.
---
And you're trying to get traffic to the
123.111.125 subnet.
I know the gateway address only. I know that the gateway will link to internet. Is it required to find subnet address?
Please also tell how to check the number of NIC s here.
Please help so that it will solve my problem.