Operating System - HP-UX
1834599 Members
3970 Online
110069 Solutions
New Discussion

Packets to LAN3 go to LAN1.

 
joe_91
Super Advisor

Packets to LAN3 go to LAN1.

Team:

We have Nclass (11.0, MC/SG) with 5 NIC cards with lan1 and lan 3 as primary and lan4 and lan5 as standby. lan1 and lan 3 are in diff. subnet. But when i send a packet from an external box to lan3's ip it always goes to lan1. How would that happen? I have asked this question before but have not got the solution. I really don't understand how a packet can come into the switch and across the SSR port with the IP of the LAN3 interface as the destination IP, and still go into the LAN1 interface. It doesn't make sense. Please help me here Gurus..

Thanks
Joe.
5 REPLIES 5
Sridhar Bhaskarla
Honored Contributor

Re: Packets to LAN3 go to LAN1.

Hi Joe,

Can you try turning off ip_forwarding on your Nclass server?.

ndd -set /dev/ip ip_forwarding 0

Then ping from external box to the lan3's IP.

After lunch,
-Sri
You may be disappointed if you fail, but you are doomed if you don't try
joe_91
Super Advisor

Re: Packets to LAN3 go to LAN1.

Thanks Sri:

Still the same result.

Thanks
Joe.
John Dvorchak
Honored Contributor

Re: Packets to LAN3 go to LAN1.

If I am not mistaken, unless the remote box is on the same subnet as lan3, lan1 will always handle the return reply as this is listed as the first default route off of the subnet. Kind of confusing and doesn't make a lot of sense when you first look at it but look at if from the HP box's perspective. You, on a remote LAN (neither lan1 or lan3) connect to the HP box and make a request. From the HP box it looks at you IP address and realises that it is not a local lan. So it does what you told it to do and use the first default gateway off of the LAN to reply. If you want to force all communications from the remote box to to lan3 then on the HP box, set a static route to the LAN the remote is on:

route add net (remoted LAN add 123.123.123.0) (gateway address 111.111.111.1)

man route
If it has wheels or a skirt, you can't afford it.
Ron Kinner
Honored Contributor

Re: Packets to LAN3 go to LAN1.

If you are talking about packets always leaving on Lan1 then look at
netstat -rn

No doubt it will tell the box to use lan1 as the default or at least as the route to the distant network.

If you are talking about packets entering the box then you have to look at your routers' routing tables to see what they are doing.

If you are doing a traceroute to the Lan3 address then the reason you are getting a reply from Lan1 is that the routing table tells it to send a pcaket back to you via that interface and since it does it puts its lan1 IP address on the packet as the source and that's what you see in the results of the traceroute. Look at
netstat -i
and you will see (if there is no other traffic) that the traceroute packets come in on lan3 and go out on lan1. Remember that the outbound routing software does not care how a packet originally got to the box. It just looks up the destination in the routing table and does whatever the table tells it and if the table says use lan1 to get to network x then that's what it does.

Ron
Sridhar Bhaskarla
Honored Contributor

Re: Packets to LAN3 go to LAN1.

Hi Joe,

If you ping to lan3's ip from the remote host, all the top layer IPs (if there is any routing going on somewhere) get ripped off when it reaches lan1 and should get dropped because the IP does not match. If ip_forwarding is on, then lan1 will know about lan3 and take the packet. I assume you are not running gated on the HP box.

Please post your netstat -rn outputs of your Nclass and remote box. Also post the output of 'ping -o Nclass -n 2 ' on the remote.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try