- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to config default route to use LAN1 instead of...
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
08-20-2004 03:09 AM
08-20-2004 03:09 AM
How to config default route to use LAN1 instead of LAN0?
We have this system with the following card setups:
100Mb card (lan0) 172.16.2.2
1Gb card (lan1) 172.16.2.1
The gtw for this subnet is 172.16.2.254
Now I noticed that netconf always configure the system and assign the default route to use lan0.
Note: currently on each reboot we have manually to do the following to fix this the default route, to go through lan1 and not through lan0.
route delete default 172.16.2.254
ifconfig lan0 down
route add default 172.16.2.254
ifconfig lan0 up
Would you know a way to have the default route to using lan1 instead of lan0 in the netconf? Many thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 03:12 AM
08-20-2004 03:12 AM
Re: How to config default route to use LAN1 instead of LAN0?
That's because 2 IPs in the same subnet is an unsupported config. For the exact reason you're seeing. You cannot guarantee just *which* NIC the traffic will go out.
I'm afraid there's not much you can do about this - other than *not* having 2 NICs in the same subnet.
Rgds,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 03:38 AM
08-20-2004 03:38 AM
Re: How to config default route to use LAN1 instead of LAN0?
If you want to default setting to make lan0 to lan1 then,
change the /etc/rc.config.d/netconf file's
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="xx.xx.xx.xxx"
ROUTE_COUNT[0]="0"
ROUTE_ARGS[0]=""
settings.
change the ip there on gateway.
Olympian explained the problems out there.
HTH.
+muthu+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 03:47 AM
08-20-2004 03:47 AM
Re: How to config default route to use LAN1 instead of LAN0?
muthu's solution may or may *not* work. There are a lot of switches out there that just do not like traffic coming back to them from a different MAC than they sent it to.
You just have to accept the fact that you're out there in uncharted, unsupported waters & live with the consequences. You really should rethink the whole architecture. IF you need two IPs then just use one NIC & virtual IPs - i.e. lan0 & lan0:1. IF you need the bandwidth then look at HP's APA (Auto POrt Aggregration) SW to get it.
My 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 04:20 AM
08-20-2004 04:20 AM
Re: How to config default route to use LAN1 instead of LAN0?
The interface configurations in this file are set up as arrays. Ignite and SAM aren't too smart about how they set the default gateway, always making lan0 the interface that gets assigned the default route.
Take the following example of how these are configured by Ignite-UX if you configure two interfaces and the route in it's interface regardless which interface you specify that you want to be the primary:
INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="192.168.5.11"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="192.168.0.1"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
INTERFACE_NAME[1]="lan1"
IP_ADDRESS[1]="192.168.0.16"
SUBNET_MASK[1]="255.255.255.0"
DHCP_ENABLE[1]=0
To correct this, simply change the array index of the ROUTE variables to the one used for the interface you want to use instead. In this case the change would look like this:
INTERFACE_NAME[0]="lan0"
IP_ADDRESS[0]="192.168.5.11"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[1]="default"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="192.168.0.1"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""
INTERFACE_NAME[1]="lan1"
IP_ADDRESS[1]="192.168.0.16"
SUBNET_MASK[1]="255.255.255.0"
DHCP_ENABLE[1]=0
There are few different scripts that are run at startup to set up the interfaces so it's usually easier to reboot the system to be sure the routing table gets reconfigured with the new setting properly.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 04:34 AM
08-20-2004 04:34 AM
Re: How to config default route to use LAN1 instead of LAN0?
My (last) 2 cents,
Jeff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 04:46 AM
08-20-2004 04:46 AM
Re: How to config default route to use LAN1 instead of LAN0?
INTERFACE_NAME[0]=lan1
IP_ADDRESS[0]=172.16.2.1
SUBNET_MASK[0]=255.255.255.0
BROADCAST_ADDRESS[0]=172.16.2.255
INTERFACE_STATE[0]=up
DHCP_ENABLE[0]=0
INTERFACE_NAME[1]=lan0
IP_ADDRESS[1]=172.16.2.2
SUBNET_MASK[1]=255.255.255.0
BROADCAST_ADDRESS[1]=172.16.2.255
INTERFACE_STATE[1]=up
ROUTE_DESTINATION[0]=default
ROUTE_MASK[0]=255.255.255.0
ROUTE_GATEWAY[0]=172.16.2.254
ROUTE_COUNT[0]=0
ROUTE_ARGS[0]=""
Before I had this system rerouting incoming traffic through lan0 and going out through lan1 (If Im not wrong or incomining through lan1 and going out through lan0). This before setting a default routing.
The main objective is to use lan1 (1Gb) as production and lan0(100Mb) for adm use like rcps/backups, etc. (I' aware that HP APA provides outbound load balancing but isn't what we want to achieve with this 2 nics.)
I've been "playing" with netconf changing the assignations (the [0] and [1]) but the OS simple ignore them and assign the default route to lan0 always. I've including set lan0 as down to see what would happen and after boot the default route didn't even appear to be set.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 04:58 AM
08-20-2004 04:58 AM
Re: How to config default route to use LAN1 instead of LAN0?
If I were in his shoes, I would simply disable lan0 and configure lan1 as the only active interface in the first place. If they really need access to both addresses for the system for some reason, your mention of the configuring virtual IPs on the desired interface is definitely the way to go. In this case, the netconf entries would look like this:
INTERFACE_NAME[0]="lan1"
IP_ADDRESS[0]="172.16.2.1"
SUBNET_MASK[0]="255.255.255.0"
BROADCAST_ADDRESS[0]=""
INTERFACE_STATE[0]=""
DHCP_ENABLE[0]=0
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="172.16.2.254"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
INTERFACE_NAME[1]="lan1:1"
IP_ADDRESS[1]="172.16.2.2"
SUBNET_MASK[1]="255.255.255.0"
DHCP_ENABLE[1]=0
(SAM might handle this configuration better than it does for the different subnet case. I typically avoid using it, however, so am not sure.)
Your subnet mask may vary.
Jeff Traigle
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-20-2004 05:03 AM
08-20-2004 05:03 AM
Re: How to config default route to use LAN1 instead of LAN0?
I agree with you forcing all trafic to go through one card automatically is like as disabling the 2nd one.
But, lets forget for now the card 100Mb(Lan0) and the objectives set for it.
Now that all inbound/outbound goes through lan1, since the default route is set to lan1...
So doing a telnet to lan0 will fail because will not get reply packet though lan0 since will lost.
Its also true that if a default route is set for one card (example lan1) then lan0 is doing nothing then could be considered down all the time even during the boot.
But a problem remains. The system boots, and lan0 is identified as down the default route will not be set. On other hand if the Lan0 is set as up then the default route will be set to use Lan0.
My issue here is: I'd like to find a way to get the default route be set to use lan1 only . And not to go by system defaults (since that is one known factor configured somewere in unknown location)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-21-2004 12:50 AM
08-21-2004 12:50 AM
Re: How to config default route to use LAN1 instead of LAN0?
Since you know that the following works:
route delete default 172.16.2.254
ifconfig lan0 down
route add default 172.16.2.254
ifconfig lan0 up
why not just put a little script together and make it executable and let it run at boot after the NICs come up?
Ron