HPE Aruba Networking & ProVision-based
1834936 Members
2249 Online
110071 Solutions
New Discussion

Re: Loopback IP in same subnet as VLAN IP

 
JamesHigh
Occasional Advisor

Loopback IP in same subnet as VLAN IP

Hi All,

 We have a HP 5406zl switch configured as an IP router.

In the previous K14 release we had a vlan configured with an IP for routing and a loopback address on the switch within that subnet for management connections (SNMP, SSH, ping, etc)

e.g. 

ip routing
  vlan 100
  name "switch"
  ip address 10.2.2.1 255.255.255.0
  exit
interface loopback 0
  ip address 10.2.2.254
  exit

 

When we upgraded to the K15 release we could no longer ping the loopback IP (10.2.2.254). Manually trying to add it now gives an "Inconsistent value." warning. This loopback is not used for routing, only for management / status checks.

It there anyway to add a secondary IP in the same subnet on a routing switch in K15?

 

Thanks.

7 REPLIES 7
paulgear
Esteemed Contributor

Re: Loopback IP in same subnet as VLAN IP

Hi JamesHigh,

The fact that this worked previously is very surprising to me. I would strongly recommend changing the loopback address and setting aside a dedicated IP range for loopbacks, e.g. if you're using 10.2.0.0/16 as your overall network, you might set aside 10.2.255.0/24 for loopbacks. As long as you set them with a /32 mask and your network statements for OSPF or RIP include them, there should be no problem routing to them.
Regards,
Paul
JamesHigh
Occasional Advisor

Re: Loopback IP in same subnet as VLAN IP

Thanks Paul.

I wish that were possible in our situation but unfortuantely we are just a branch office with an allocated range.

Central uses the 10.2.2.254 loopback address for remote monitoring of the switch, while the devices in the range use the 10.2.2.1 address as the gateway. As they have this set up for a large number of sites they don't want to change it for a single one (automated scripts just change the 10.x.y.254). 

 

I was looking at sub-subnets to have a 10.2.2.254/32 as a small routable part of the 10.2.2.0/24 subnet but could not see anyway to do so on HP switches.

 

Thanks for your help,

 James

paulgear
Esteemed Contributor

Re: Loopback IP in same subnet as VLAN IP

Hi James,

 

Probably the easiest thing to do then is to move the address from the loopback interface to the VLAN interface.  A 5400 switch can have multiple IP addresses on the same VLAN without any difficulty.

Regards,
Paul
JamesHigh
Occasional Advisor

Re: Loopback IP in same subnet as VLAN IP

Thanks again Paul.

I believe it can have multiple IPs on same VLAN as long as they are all on seperate subnets.

If I try:

 # vlan 100 ip address 10.2.2.254 255.255.255.0

it returns

  The IP address (or subnet) 10.2.2.254/24 already exists.

 

Thanks,

 James

paulgear
Esteemed Contributor

Re: Loopback IP in same subnet as VLAN IP

Hi James,

 

I just checked back through my old configs of 5400s and I can't find any places where I've used multiple IP addresses on a single subnet on the same VLAN.  I must have been mixing it up with a 5500 that was on the same network.  Sorry to lead you astray.

 

I would have thought it was possible, but obviously not, given the error message.  I assume you removed the IP from the loopback first?

Regards,
Paul
JamesHigh
Occasional Advisor

Re: Loopback IP in same subnet as VLAN IP

Thanks Paul.

Yes the IP was not assigned to loopback (since the update to K15 it rejects the assignment). 

 

The only work around I have thought of is to divide the subnet in 2 on the same VLAN and then use proxy ARP to act as though it was still a single subnet. This should be OK for routed traffic, as long as nothing is using broadcasts (no DHCP).

e.g.

ip routing
  vlan 100
  name "switch"
  ip address 10.2.2.1 255.255.255.128

  ip address 10.2.2.254 255.255.255.128

  ip proxy-arp
  exit

 

Thanks for your help,

 James

paulgear
Esteemed Contributor

Re: Loopback IP in same subnet as VLAN IP

Yeah - that's a bit icky, but it will probably be as good as you can get in this instance.
Regards,
Paul