Operating System - HP-UX
1755042 Members
3565 Online
108828 Solutions
New Discussion юеВ

2 subnets on one layer two switch.

 
SOLVED
Go to solution
Joe Disharoon
New Member

2 subnets on one layer two switch.

I have two different subnets on the same layer two switch. I have two independant routers to service each subnet. (see drawing). I thought I could have the HPUX device working through router 2 and the workstation working through router 1 and have them speaking to each other throught the routed link. Both device are set to use the local router as their default route. However in the HPUX machine the arp -a shows the server is learning the mac address of the client local instead of using the router mac address. This leads to the server attempting to talk to the server locally instead of using the path through the routers. We are re-iping the subnets. But in the short term we thought this should work and allow us less pain during the conversion.
7 REPLIES 7
Steven Sim Kok Leong
Honored Contributor

Re: 2 subnets on one layer two switch.

Hi,

>> However in the HPUX machine the arp -a shows the server is learning the mac address of the client local instead of using the router mac address.

I don't find enough information to work on though I hope I have interpreted your query correctly.

This client is in a different layer 2 segment from the HPUX machine which justifies the need for the router (layer 3 routing).

If you can see the MAC address of the client from the HPUX machine, then it must be residing on the same layer 2 segment since arp requests cannot be routed. Verify that your VLANs are setup correctly?

Hope this helps. Regards.

Steven Sim Kok Leong
Ron Kinner
Honored Contributor

Re: 2 subnets on one layer two switch.

I suspect the switch was just plugged in and not configured with separate vlans for the two subnets. The arp gets broadcasted out and the pc sees it and responds faster than the router.

Simplest solution would be to put them in two different VLANS. Actually you can leave one in the default VLAN (1) and just create a new VLAN.

I guess your 4000 probably uses the Catalyst OS so the commnads you need on the Cisco 4000 are:

set vlan 2
set vlan 2 1/1-5

That would create VLAN 2 and assign ports 1/1 through 1/5 to VLAN 2. If you leave off the -5 then it just does 1/1. Don't forget that the port to the router also has to be in the same VLAN.

Of course you need to know which port on the 4000 you are plugged into. Sometimes that is not so easy to determine by looking at the cables. In that case you just look on the router at
sh arp. Find the IP address of the PC then on the same line you will see the MAC address. (if it's not in the arp table try pinging it then look again.) Now do a
show cam dynamic
on the 4000 and it should show you a long list of MAC addresses that are associated with mod/port numbers.

If you don't know the password for the switch or would rather not mess with it then you can use arp -s on the HPUX to set the router's mac to the IP address of the client. See man arp for correct syntax. I think that should fix your problem.

Ron
Joe Disharoon
New Member

Re: 2 subnets on one layer two switch.

Thanks more the responses, but I cannot have these on seperate vlans. There are other hubs in the layer 2 that do not support vlans, but I have to get the systems re-iped with minimal interruptions. I was trying to find why the HPux would be getting arp entries for the server when it is on another layer 3 subnet. According to the default route, it should be sending all packets destined for the other subnet to the router and should not be arping locally for the server, but only arping for the router. Hope that make more sense.
Ron Kinner
Honored Contributor

Re: 2 subnets on one layer two switch.

OK No VLANs.


What version of HPUX do you have?

What do you have for BROADCAST_ADDRESS[0]in /etc/rc.config.d/netconf?

Can we see
netstat -rn
?

Ron
Joe Disharoon
New Member

Re: 2 subnets on one layer two switch.

The version of HP-UX is 10.20 running on i3105lp1, i3105lp1, and i3125lp1.

The BROADCAST_ADDRESS[1]=""

netstat -rn

Routing tables

Destination Gateway Flags Refs Use Interface Pmtu PmtuTime

10.50.251.5 127.0.0.1 UH 17 55221 lo0 4608

10.228.16.1 10.50.251.5 UH 0 0 lan0 1500

127.0.0.1 127.0.0.1 UH 0 0 lo0 4608

default 10.50.248.1 U 17 4518446 lan0 1500

10.50.248.0 10.50.251.5 U 0 268416 lan0 1500

Ron Kinner
Honored Contributor
Solution

Re: 2 subnets on one layer two switch.

BROADCAST_ADDRESS[1]=""

May be your problem. Default broadcast is no doubt 255.255.255.255 so any broadcast will be answered by anyone regardless of the network they are on. ARP is a broadcast. Try changing your broadcast statements to the form:
10.50.255.255
(assuming a Class B mask of 255.255.0.0)
so that only members of the same subnet will see the broadcast.

If that doesn't help let me see your /etc/rc.config.d/netconf
I'm a little confused about your setup. From your diagram we only had one NIC but you are using [1] instead of [0].

Ron

Joe Disharoon
New Member

Re: 2 subnets on one layer two switch.

I will try the broadcast change, that does make some sense to me. I still have a hard time understanding why HPUX arps for anything but the router when the destination is a non local subnet. I think I need to learn more about the inner workings of HPUX. Thanks for your help.