- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Adding specific routes
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
тАО09-28-2001 05:51 AM
тАО09-28-2001 05:51 AM
Adding specific routes
Clearing it is not the problem, the "default" entry is OK, but the specific routes return an error.
I use the command "route add 10.128.128.0 netmask 255.255.240.0 10.128.239.254 1".
When I do that, I get the error "netmask: bad value"
I also tried network 10.128.0.0 with netmask 255.255.0.0, but that gives the same error.
I can however set network 10.0.0.0 with netmask 255.0.0.0.
So can anyone tell me what my problem is ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:01 AM
тАО09-28-2001 06:01 AM
Re: Adding specific routes
route add 10.128.128.0 netmask 255.255.240.0 10.128.239.254 1
should be
route add 10.128.128.0 10.128.239.254 netmask 255.255.240.0 1
i.e., the netmask comes after the destination.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:06 AM
тАО09-28-2001 06:06 AM
Re: Adding specific routes
what if you do:
route add 10.128.128.0 10.128.239.254 1
and let it default the netmask to 255.255.0.0?
see if that works.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:19 AM
тАО09-28-2001 06:19 AM
Re: Adding specific routes
i use
#route add 10.128.128.0 10.128.239.254
i never give netmask, i can logon to any servers from India to UK, but i use default gateway
#route add default x.x.x.x y.y.y.y
x.x.x.x is my gateway
y.y.y.y is the system IP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:21 AM
тАО09-28-2001 06:21 AM
Re: Adding specific routes
Some network guru can verify this. I may be wrong. I am pretty bad in binary.
I see a problem with your router
With 255.255.240.0 subnet mask on 10.128.128.0 gives you a range of 4096
subnets (12 subnet bits).
So your range is 10.128.128.1 to 10.128.143.254 and your default router 10.128.239.254 doesn't fall under this range.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:25 AM
тАО09-28-2001 06:25 AM
Re: Adding specific routes
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:32 AM
тАО09-28-2001 06:32 AM
Re: Adding specific routes
Syntax appears ok to me. What are the ifconfigs and sepecially the netmasks of your local attached interfaces ?
How are the netmasks on the interfaces of your gateway (10.128.239.254) ?
That the router IP is not in the range of the target network seems ok for me (this is normaly the reason to use a gateway :-) but the gateway address has to be connected to a network, that belongs to the same of the client.
There has to be a mismatch, most likely in the netmasks. If you use nonstandard netmasks, you might always have mismatches, because somebody or sometool default without asking.
Volker
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 06:54 AM
тАО09-28-2001 06:54 AM
Re: Adding specific routes
When I don't give a netmask myself, I automatically get a correct netmask if I look at "netstat -nrv" : the netmask is 255.255.240.0 ! Nice hint. I must add the "net" option when I do that, otherwise I get netmask 255.255.255.255
That solves the immediate problem, but I'm still curious why it shouldn't work when I give the netmask myself.
So, for Volker : I have 2 operational network cards, one with address 10.128.224.18, netmask 255.255.240.0, gateway 10.128.239.254 and one with address 172.24.8.6, netmask 255.255.252.0, gateway 172.24.11.254. This last one should become the default gateway, but some networks still have to go through the other network card.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 07:06 AM
тАО09-28-2001 07:06 AM
Re: Adding specific routes
see man route, the netmast comes after the destination.
even though i don't have ip addresses in the range you use, i copied and pasted your syntax and then copied and pasted Santosh's. Santosh's would have worked.. see the bellow:
yours gives me:
netmask: bad value
Santosh's gives me:
add host 10.128.128.0: gateway 10.128.239.254: Network is unreachable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-28-2001 08:20 AM
тАО09-28-2001 08:20 AM
Re: Adding specific routes
"man route" says:
SYNOPSIS
/usr/sbin/route [-f] [-n] [-p pmtu] add [net|host] destination [netmask mask] gateway [count]
So "netmask" apears to be at the right position.
I know from Solaris, that "-netmask" is an option, that is set to the end of the command.
Now I tried the exactly same command with a small variation:
# route add 10.128.128.0 netmask 255.255.240.0 10.128.239.254 1
netmask: bad value
# route add net 10.128.128.0 netmask 255.255.240.0 10.128.239.254 1
add net 10.128.128.0: gateway 10.128.239.254: Network is unreachable
The only diffrence is between "add" and "add net". I must state, that I do not fully understand the manpage on route's strategie when "net" or "host" is omitted, but it seems to make a diffrence.
I think with "route add net ..." your command will work.
Volker