Operating System - HP-UX
1851683 Members
3270 Online
104061 Solutions
New Discussion

route on NT vs. route on HP-UX

 

route on NT vs. route on HP-UX

If I have a node, nodeA configured as follows:

Two interfaces on the same subnet:
Interface 1 - 10.10.1.5/subnet 255.255.0.0
Interface 2 - 10.10.1.6/subnet 255.255.0.0

There is a router on the 10.10.x.x subnet with IP address 10.10.0.1, which is also connected to subnet 10.20.x.x, where there is another node, nodeB with IP address 10.20.1.4.

Now I want to make sure that *all* IP traffic from nodeA to nodeB goes through the second interface (10.10.1.6). On an NT system I can accomplish this with a static route as follows:

route -p add 10.20.1.4 10.10.0.1 metric 1 if 2

But on a HP-UX system... I can't specify the interface to use!

Is there any way of getting around this (e.g. with gated)
I am aware of the 'ip_strong_es_model' option that can be set with ndd, and this is not an option for me.

10 points for a workable solution.

Cheers

Duncan

I am an HPE Employee
Accept or Kudo
19 REPLIES 19
George A Bodnar
Trusted Contributor

Re: route on NT vs. route on HP-UX

Did you try the following:

route add host 10.20.1.4 10.10.1.6

I couldn't test this (don't have 2 cards on same network) but I think it will work.

One other option would be to use APPA software to make the two interfaces look like one - I know this is not what you are asking but might be a good alternative to trying to load balance manually and this software is pretty cheap.
T G Manikandan
Honored Contributor

Re: route on NT vs. route on HP-UX

To my knowledge hpux does not allow two network cards cannot be in the same subnet but can be under different subnets.

I think you are using APA

You can achieve this by making a entry in the routing table as
route add host

But make sure that the routing table takes its priority as from top to bottom list.


Thanks

Re: route on NT vs. route on HP-UX

George,

No this would only work if the destination node was on the same subnet.

T G,

Again the straight route add won't work.


APA is not an option in this situation (the network kit won't support it, and I do need to segregate the traffic, rather than just have more bandwidth)

Thanks

Duncan

I am an HPE Employee
Accept or Kudo
Anil C. Sedha
Trusted Contributor

Re: route on NT vs. route on HP-UX

Here you go Duncan,

route add -net 10.20.1.4 netmask 255.255.252.0 10.10.1.6 0

Let me know if you were able to do this or not.

I believe this will be fine. I had done this a long time back.. would give you the correct one if this doesn't work and would probably check in the meantime.

Regards,
Anil
If you need to learn, now is the best opportunity
Anil C. Sedha
Trusted Contributor

Re: route on NT vs. route on HP-UX

sorry,
the subnet should be the same 255.255.0.0

I mistakenly used mine.

Regards,
Anil
If you need to learn, now is the best opportunity
Anil C. Sedha
Trusted Contributor

Re: route on NT vs. route on HP-UX

One more thing.

Add a route back from node A to node B

route add -net 10.10.1.6 netmask 255.255.0.0 gateway(ip addr of second interface on nodeA)

This has to be a two way process.

Regards,
Anil
If you need to learn, now is the best opportunity
Wodisch
Honored Contributor

Re: route on NT vs. route on HP-UX

Hi Duncan,

I second T.G. on your two cards in the same network!
But you could try to enter TWO routes, one for each LANIC, but the metric for the one you don't like would be much higher...

Just an idea,
Wodisch
Anil C. Sedha
Trusted Contributor

Re: route on NT vs. route on HP-UX

Finally Duncan,

I got my mail which i sent to my peers after doing this.

if 10.10.1.18 is second nic card address on node A

On node A

route add -net 10.10.1.6 netmask 255.255.0.0 10.10.1.18 0

On node B

route add -net 10.10.1.18 netmask 255.255.0.0 10.10.1.6 0

This will resolve the problem. But don't forget to configure the second nic card addresses in the /etc/netconf file and bounce your network client services if it was not configured and you have just done it.


Regards,
Anil
If you need to learn, now is the best opportunity
Christopher Caldwell
Honored Contributor

Re: route on NT vs. route on HP-UX

static routing on HP is destination based (tell me where you're going; I'll tell you how to get there).

Network boxen like Ciscos have a concept called policy routing which can convert destination based routing into source based routing (if you're from here going there go through this interface) or protocol based routing (if you're running ftp go through this pipe, if you're running http go through that pipe).

HP isn't that fancy - and I'm not really sure they should be. Thus, IMHO, your situation isn't fixable _unless_ you stick a router in between your outputs on the HP host and your destination. Even if you use the router, you can balance the output of the two NIC cards on HP. (Interestingly enough - on some routers you can have multiple default routes and balance traffic to destinations on a packet by packet or IP by IP basis).

Re: route on NT vs. route on HP-UX

Anil,

Yes I know this would work fine *if* both boxes were on the same subnet, but in my situation they are not... Remember with static routing you can only tell the system what the next hop is, so if I were to add a route such as:

route add host 10.20.1.4 10.10.1.6 1

This would simply mean that traffic for nodeB would be sent to 10.10.1.6, which would of course just splurge this out on the 10.10 subnet, where no system would pick it up.

Of course if the node I was trying to reach was on the same subnet (say 10.10.1.7) then:

route add host 10.10.1.7 10.10.1.6 1

would work fine. BUT any traffic between subnet 10.10 and 10.20 needs to be directed to the router, otherwise it will never get there!

Wodisch,

I do agree with you and TG, I wouldn't choose to configure my networks this way! Unfortunatley I am working at a site where this is non-negotiable, so I have to do the best I can. With respect to two routes with different weights, again thats fine when the destination host is on the same subnet, but it just isn't going to work when the host is elsewhere.

Chris,

I fear you are rightm, there doesn't seem to be an elegant solution to this problem. WHat I was hoping for was that some configuration options in gated.conf would allow me to configure 'per interface routes' (if you get my meaning)

So any gated experts out there let me know if this is possible!

10 points still available for a working solution!

Thanks

Duncan

I am an HPE Employee
Accept or Kudo
U.SivaKumar_2
Honored Contributor

Re: route on NT vs. route on HP-UX

Hi,
Some gated solutions for you

1) gated.conf
static {
host 10.20.1.4 mask xxx.xxx.xxx.xxx
gateway 10.10.0.1
interface 10.10.1.6
retain ;

};

2) Assuming your router supports proxy ARP then
gated.conf

static {
host 10.20.1.4 mask xxx.xxx.xxx interface 10.10.1.6 retain;

};

regards,
U.SivaKumar
Innovations are made when conventions are broken

Re: route on NT vs. route on HP-UX

U.SivaKumar,

Thanks - I will try this out today and assign points if this works...

Duncan


I am an HPE Employee
Accept or Kudo

Re: route on NT vs. route on HP-UX

Okay, so the answer might be gated somewhere, but I can't get it to work with what you gave me! here's an example gated.conf file:

interfaces {
options strictintfs ;
interface lan0 lan1 passive ;
} ;

rip yes {
nobroadcast ;
interface all noripout ;
} ;

static {
host 10.20.1.4
gateway 10.10.0.1
interface 10.10.1.6
preference 8
retain ;
} ;

However this doesn't seem to configure the static route at all! In a similar way to the 'route' command it works if I simply specify the gateway without the interface, or vice versa in terms of the route getting added, but trying to tell it that I want to talk to *that* gateway out of *that* host just doesn't work!

I'm starting to think I'm on a wild goose chase here...

Duncan

I am an HPE Employee
Accept or Kudo

Re: route on NT vs. route on HP-UX

ping!

10 points still on offer for this!

Cheers

Duncan

I am an HPE Employee
Accept or Kudo
Joaquin Gil de Vergara
Respected Contributor

Re: route on NT vs. route on HP-UX

Duncan

Two NICs in the same subnet is not very well.. you may have problems of routing

Why don't you define two subnets and route between it?

It works better
Teach is the best way to learn

Re: route on NT vs. route on HP-UX

Joaquin,

Yes I agree 100% with you! Unfortunately its not my network, and I don't have any control over its configuration.

Thanks anyway.

Duncan

I am an HPE Employee
Accept or Kudo
Joaquin Gil de Vergara
Respected Contributor

Re: route on NT vs. route on HP-UX

I understand you completely!

Good Luck!
Teach is the best way to learn
Shannon Petry
Honored Contributor

Re: route on NT vs. route on HP-UX

I think you were correct when you stated you were on a wild goose chase.
WHY? HP-UX while supporting multiple interfaces does not support them being in the same subnet.
While it lets you configure them that way, and will be up and running, respond to pings only the primary(1st) interface is the only one that does it all when it comes to sending traffic.
You could try to answer your own question by swapping the IP's on the cards and then adding the route to see if it works.
However it may fail depending on how the remote system sees the HP-UX box.
SunOS 5.8/solaris 8 is the same way. I can receive traffic on either card but only send from the main interface within the same subnet.
PC's dont really care as M$ does not really use netmasks. Sniff a windowz box and no matter how you configure the netmask you will still see traffic on all possible broadcast addresses.

Regards,
Shannon
Microsoft. When do you want a virus today?

Re: route on NT vs. route on HP-UX

Shannon,

much as I expected I'm afraid - still it is a shame that NT seems to have some functionality that UNIX doesn't (albeit by incorrectly implementing the IP stack!). I'm still holding out some hope that there's a kludge which will let me acheive this (I'm a born optimist!) so no rabbit yet...

Cheers

Duncan

I am an HPE Employee
Accept or Kudo