- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: standby 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
12-23-2003 04:38 AM
12-23-2003 04:38 AM
standby route
I use the commands:
route add net 172.19.5.0 netmask 255.255.255.0 router1 1
route add net 172.19.5.0 netmask 255.255.255.0 router2 2
trying to set metrics of 1 and 2 for primary and standby route.
A netstat -r command shows the following
172.19.5.0 router2 UG 0 0 lan1 1500
172.19.5.0 router1 UG 0 0 lan1 1500
Problem is router2 though it has a metric of 2 appears first and if this is not available I can not see the 172.19.5 network. If I delete this second route with route delete then I can contact the 172.19.5 network.
I know its a silly mistake, but what am I doing wrong??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2003 05:05 AM
12-23-2003 05:05 AM
Re: standby route
That final value in a route command is a hop count - not a metric or index value. It defines how many devices the packet must traverse to reach that device. If it's on the same subnet as the host - the count would always be 1.
Also the route stack is just that. The last statement added to it is the first used & listed.
So it's probably the mistaken hop count that messes up the route & when you delete it then it works again.
But bottom-line is you can't have two route statements for the same route.
IF it's truly a standby router then it should handle the function itself - you shouldn't have to add anything to the local system. Just add the route to the device & let the two devices decide amongst themselves which will handle the traffic.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2003 10:13 AM
12-23-2003 10:13 AM
Re: standby route
From man route(1M):
"count An integer that indicates whether the gateway is a remote host or the local host. If the route leads to a destination through a remote gateway, count should be a number greater than 0. If the route leads to destination and the gateway is the local host, count should be 0. The default for count is zero. The result is not defined if count is negative. "
and
"Flags
The values of the count and destination type fields in the route command determine the presence of the G and H flags in the netstat -r display and thus the route type, as shown in the following table.
Count Destination Type Flags Route Type
=0
network
U
Route to a network directly from the local host
>0
network
UG
Route to a network through a remote host gateway
=0
host
UH
Route to a remote host directly from the local host
>0
host
UGH
Route to a remote host through a remote host gateway
=0
default
U
Wildcard route directly from the local host
>0
default
UG
Wildcard route through a remote host gateway"
From man routing(7):
"To select a route for forwarding an IP packet, the network facilities select the complete set of "matching" routing table entries from the routing table. A routing table entry is considered a match, if the result of the bit-wise AND operation between the netmask in the routing entry and the IP packet's destination address equals to the destination address in the routing entry.
The network facilities then select from the set the routing entries that have the longest netmask. The length of a netmask is defined as the number of contiguous 1 bits starting from the leftmost bit position in the 32-bit netmask field. In other words, the network facilities select the routing entry that specifies the narrowest range of IP addresses. For example, the host route entry that has a destination/netmask pair of (147.253.56.1, 0xffffffff), is more specific than the network route entry that has a destination/netmask pair of (147.253.56.0, 0xfffffe00), therefore the network facilities select the host route entry. The default route by default has a destination/netmask pair of (0,0). Therefore the default route matches all destinations but it is also the least specific. The default route will be selected only if there is not a more specific route.
There may still be multiple routing entries remaining. In that case the IP packet is routed over the first entry displayed by netstat -r. Such multiple routes include:
Two or more routes to a host via different gateways.
Two or more routes to a network via different gateways.
Two default routes. "
It appears that the order they are listed in netstat -r is critical. I wonder if you change router2's name by adding a "z" in front if it would then appear second. (I assume that they are not really named router1 and router2.) Your other possibility would be to use 172.19.0.0 netmask 255.255.0.0 for router2. This would be a poorer match than router1 so would always let router1 have first crack at the traffic.
As Jeff said tho, normally you would set up the both routers using HSRP (Hot Standby Router Protocol) which would then automatically switch between routers without the host being aware of the change. With HSRP the two router create a virtual IP and MAC which is used as the gateway by all hosts and whichever is prime responds to any traffic to the virtual address. The backup one only responds if the prime dies.
Ron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-23-2003 09:25 PM
12-23-2003 09:25 PM
Re: standby route
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2003 04:42 AM
12-27-2003 04:42 AM
Re: standby route
I think.........
In the routing table, mention only one route pointing to router1 and put another router's static IP as the default gateway.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2003 06:08 AM
12-27-2003 06:08 AM
Re: standby route
Ron