- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Routing via specified interface
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-02-2002 05:37 AM
12-02-2002 05:37 AM
I've got a problem with routing on my HP: i heve an interface lan1 with IP 126.16.13.107 which is my default connection to the rest of network:
126.16.13.107/255.255.255.255 126.16.13.107 UH 0 lan1 4136
126.16.13.0/255.255.255.0 126.16.13.107 U 2 lan1 1500
default/0.0.0.0 126.16.13.254 UG 0 lan1 0
Then, I've got another interface lan0:
lan0: flags=842
inet 126.16.13.109 netmask ffffff00 broadcast 126.16.13.255
I want to create a route to the one computer (eg. 126.17.57.237) via gateway - 126.16.13.254 - but using lan0 interface. I can route it like:
route add host 126.17.57.237 126.16.13.254
But how to specify which interface this route will use? I want to use lan0.
Thanks,
Tomek
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 05:58 AM
12-02-2002 05:58 AM
Re: Routing via specified interface
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 06:03 AM
12-02-2002 06:03 AM
Re: Routing via specified interface
As the Gateway is on the same subnet as lan 0 the machine should use this subnet to reach the gateway specified.
This is the way that I have had to setup my own network in order to get machines connected via gigabit to not go out accross the default gateway which is only 10Mb.
If you set this up and do a traceroute you will see that the system is smart enough to realise that when a card is directly attached to a network there is no point going routing off around the world to get there.
Kind regards,
Robert Thorneycroft
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 06:22 AM
12-02-2002 06:22 AM
Re: Routing via specified interface
ROUTE_DESTINATION[0]="default"
ROUTE_MASK[0]=""
ROUTE_GATEWAY[0]="defgw"
ROUTE_COUNT[0]="1"
ROUTE_ARGS[0]=""
ROUTE_DESTINATION[1]="126.17.57.237"
ROUTE_MASK[1]=""
ROUTE_GATEWAY[1]="126.16.13.254"
ROUTE_COUNT[1]="1"
ROUTE_ARGS[1]=""
As the Gateway is on the same subnet as lan 0 the machine should use this subnet to reach the gateway specified.
Then just stop and start your networking with /sbin/init.d/net stop then /sbin/init.d/net start.
You can check everything is working by using either traceroute or ping -o to check the interfaces being used.
Hope this helps,
Robert Thorneycroft
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 07:18 AM
12-02-2002 07:18 AM
Re: Routing via specified interface
In the other words:
I've got a network 126.16.13.0 255.255.255.0 with a gateway 126.16.13.254 connecting me to the rest of the net.
On one box i've got two interfaces:
lan1 126.16.13.107
lan0 126.16.13.109
- connected to the same router (.254)
I want to have:
1. route to the network 126.16.13.0/24 via lan1 and gateway .254
2. default route via lan1 and gw .254
3. route to the one host (126.17.57.237) via lan0 and gw .254
1. and 2. is obvious so now i have:
126.16.13.107/255.255.255.255 126.16.13.107 UH 0 lan1 4136
126.16.13.0/255.255.255.0 126.16.13.107 U 2 lan1 1500
default/0.0.0.0 126.16.13.254 UG 0 lan1 0
but i also want to have:
126.16.13.109/255.255.255.255 126.16.13.109 UH 0 lan0 4136
126.17.57.237/255.255.255.255 126.16.13.254 UH 0 lan0
Is it possible on HPUX? I am asking because i made a similar routing tables on the other unixes - and there it was working.
if i just add a route:
route add host 126.17.57.237 126.16.13.254
- i cannot specify lan0 as an interface - and the routing for this host will be sent via lan1:
126.17.57.237/255.255.255.255 126.16.13.254 UH 0 lan1
Regards,
Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 07:38 AM
12-02-2002 07:38 AM
Re: Routing via specified interface
The only thing I would suggest would be to take a look at the ifconfig manual page as:
ifconfig interface address_family [address [dest_address]] [parameters]
Looks like it might be the command you are looking for, however without a test system with your network setup I am unable to test if this can be used to achieve your desired results.
Sorry I could not be of more help,
Robert Thorneycroft
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 07:51 AM
12-02-2002 07:51 AM
SolutionI hate to be the bearer of bad news , it is simply not allowed to have 2 lancards in the same subnet on HP-UX , it is possible to have 1 lancard have multiple IP's in the same subnet but not on separate cards and this because the routing table itselfs adheres to a strick first-entry-found first-entry-used procedure , meaning the second interface will effectively be ignored , there is not setup in HP-UX to make this work , I would like to know if the reason you are asking this is for loadbalancing purposes or not , if loadbalancing is the issue then a product exists called APA , it allows multiple interfaces to be bundeled in 1 virtual one with much higher bandwith effectively carrying one IP spread over all the interfaces in the aggregation , if it is just to direct traffic differently depending on the destination then another network is needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 07:58 AM
12-02-2002 07:58 AM
Re: Routing via specified interface
So now the only way to solve my problem is to divide my network to have one card in one network.
Regards,
Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 08:10 AM
12-02-2002 08:10 AM
Re: Routing via specified interface
For several questions I've read that it's bad idea to have two netwok cards in the same subnet under HP. Look at:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x64e0cdec06f1d61190050090279cd0f9,00.html
However in your special case I was thinking if simply adding one more routing couldn't help. Try:
route add host 126.17.57.237 126.16.13.254 1
together with
route add host 126.16.13.254 126.16.13.107
This could force all traffic to 126.16.13.254 to be routed through IP of lan1, so if this host were a gateway it could work also...
Good luck
Adam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2002 08:23 AM
12-02-2002 08:23 AM
Re: Routing via specified interface
I've already tried something similar, but it doesn't work..
I just didnt know that two network cards in one network in HP are not supported - in this case i'll divide my network.
Thanks,
Tomek
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2002 11:22 AM
12-03-2002 11:22 AM
Re: Routing via specified interface
but will point-out that setting ip_strong_es_model to a value of one will cause the source IP address to be included in the route lookup along with the destination.
if applications bind to local IP's besides INADDR_ANY before they try to call connect(), this does have some interesting effects, among them providing per-interface default routes and having replies go out the interface on which they arrived.
ip_strong_es_model is in the list of supported ndd settings.
the downside is that with ip_strong_es_model set, the system will only accept traffic to a give IP on the NIC to which that IP is bound. if such traffic arrives on another NIC it will be discarded.
shifting gears slightly if the router on the network connected to lan0 supports ProxyARP, you could have the route to that one destination be through the lan0 IP as the gateway with a metric of 0. then the system should ARP for that IP address just like it was local, and the router should reply with his MAC address.
if the router does not do proxy ARP, you might be able to put an ARP entry into the arp cache that maps the remote IP to the router's MAC. I'm not sure though how ARP desides to which interface the ARP entry is to be associated.