Operating System - HP-UX
1833768 Members
2285 Online
110063 Solutions
New Discussion

Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

 
Dave Truchan
Occasional Advisor

Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

D380 HPUX 11.0. Originally I had this
configuration.
lan0: 192.101.53.1
lan1: 192.101.53.11

Now I have a need to change this.
lan0: 192.101.56.5
lan1: 192.101.53.11
lan1:1 192.101.53.1

Here is the output of netstat -rn:
127.0.0.1 127.0.0.1 UH 0 5806 lo0 4136
192.101.53.1 192.101.53.1 UH 0 83 lan1:1 4136
192.101.56.5 192.101.56.5 UH 0 224 lan0 4136
192.101.53.11 192.101.53.11 UH 0 99135 lan1 4136
192.101.57.103 192.101.53.145 UGH 0 0 lan1 1500
192.101.53.0 192.101.53.11 U 3 0 lan1 1500
192.101.53.0 192.101.53.1 U 3 0 lan1:1 1500
192.101.56.0 192.101.56.5 U 2 0 lan0 1500
127.0.0.0 127.0.0.1 U 0 0 lo0 4136
default 192.101.56.254 UG 0 0 lan0 1500
default 192.101.53.254 UG 0 0 lan1 1500

Now for the problem:
From different subnets I can ping 192.101.56.5 and 192.101.53.11 just fine. I cannot ping
192.101.53.1.

I believe this is because I have ip_strong_es_model set to 1. If I change ip_strong_es_model to 0 I can ping 192.101.53.1 but can no longer ping 192.101.56.5.

Does anyone know how to set up networking
so I can ping 192.101.53.1, 192.101.53.11 and 192.101.56.5 from an outside subnet.

Thanks in advance.

Dave
8 REPLIES 8
Tim D Fulford
Honored Contributor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Dave

What is ip_forwarding set to? 0,1 or 2.. If not 1 then

# ndd -set /dev/tcp ip_forwarding 1

& try again

Tim
-
Tim D Fulford
Honored Contributor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

I just took another look at netstat -rn, why are there two routes set up for 192.101.53.0 ?, are the subnets correct etc?

could you do an ifconfig lan1 & ifconfig lan1:1

Tim
-
Dave Truchan
Occasional Advisor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Tim, Thanks for the response. ip_forwarding was set to 2. I changed it to 1 but still no luck.

Dave
Dave Truchan
Occasional Advisor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Tim,

Here's the output of ifconfig:
fnp_mrp:/# ifconfig lan1
lan1: flags=843
inet 192.101.53.11 netmask ffffff00 broadcast 192.101.53.255
fnp_mrp:/#

fnp_mrp:/# ifconfig lan1:1
lan1:1: flags=843
inet 192.101.53.1 netmask ffffff00 broadcast 192.101.53.255
fnp_mrp:/#

I noticed the multiple routes for 192.101.53.0.
I tried deleting one of them (i.e route delete 192.101.53.0 192.101.53.1 and still no luck).

I think when I ifconfig the lan1:1 it created
the extra 192.101.53.0 route.
Jochen Heuer
Respected Contributor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Hello Dave,

the two route entries for 192.101.53.0 are ok. But one thing does look strange to me:

default 192.101.56.254 UG 0 0 lan0 1500
default 192.101.53.254 UG 0 0 lan1 1500

There are two default routes and I don't think this is ok. Check which one is correct and remove the other one.

Regards,

Jochen
Well, yeah ... I suppose there's no point in getting greedy, is there?

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Dave,

I think I can understand at least part of your problem - as to the solution though, I'm not so sure...

The reason you can't ping 192.101.53.1 when ip_strong_es_model is set to 1, is connected to your two default gateway entries. There's no clever algorithm on how these two default entries are used, the system simply selects the first one, and only uses the other one when the first one isn't responding. This means in your case that all traffic bound for systems for which there is no specific routing entry is sent to 192.101.56.254. However with ip_strong_es_model set, when you attempt to ping 192.101.53.1 the rules of ip_strong_es_model say the packet has to go out of the interface it came in on - which doesn't go to this default gateway! I suspect that as the system is either discarding the packet, as it breaks its rules, or is sending it out onto the 192.101.53.0 network where its just gets 'ignored' as it is bound for 192.101.56.254.

As to why things don't work when you have ip_strong_es_model turned off, I'm not sure...

How to fix your problems completely? I would consider:

a) Using a lot of static routes and only one default gateway (difficult to maintain I know)

b) Using gated in a 'passive' mode where it listens for and stores routing broadcasts from your routers (but doesn't actively route traffic between networks itself)

Hope this helps some,

Duncan

I am an HPE Employee
Accept or Kudo
Tim D Fulford
Honored Contributor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Ducan.. I have set up machines (serviceGuard & non-service guard) whereby an interface has multiple IP. The rules (from my trial & error, NOT documentation) are

1 - uses the lowest possible lan card for the required subnet
2 - uses the lowest lan alias for the required subnet.

so
lan0 193.164.192.x/24
lan1 172.18.19.x/24
lan1:1 193.164.192.x/24

pinging addresses
193.164.192.[1-254] --> lan0 only
172.18.19.[1-254] --> lan1 only

lan0 193.164.192.x/28
lan1 172.18.19.x/24
lan1:1 193.164.192.x/24

pinging addresses
193.164.192.[1-14] --> lan0
172.18.19.[1-254] --> lan1
193.164.192.[1-254] --> lan1:1

so if you pinged 193.164.192.2 it would use lan0, but 193.164.192.50 it would use lan1:1

Tim
-
Dave Truchan
Occasional Advisor

Re: Routing problem: 2 nic cards on different subnet. One nic card has 2 ip's assigned to it.

Jochen,

I've banged my head with this ip_strong_es_model stuff before. In my environment, the only way
I can get both nic cards on different subnets to ping is to setup a default route for each subnet and also set ip_strong_es_model to 1.
I wonder if this has something to do with the routers were using on our network???

I also found this little nugget of information
about running multiple nics on the same subnet.
http://support1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000047992666

Apparently you need auto port aggregation to run this in a supported environment. I guess
in my original configuration with lan0 being 192.101.53.1 and lan1 being 192.101.53.11 I was
fooling myself into thinking that both nic cards were being utilized for outbound traffic.


Duncan,

I've not played around with gated. I'll investigate this option.

Tim,

What does x/24 and x/28 in your examples mean. I'm not familiar with this terminology.

Thanks to all who responded.

Dave