Aruba & ProVision-based
1754257 Members
3305 Online
108813 Solutions
New Discussion юеВ

Changing Subnet on Procurve switches

 
James Z
New Member

Changing Subnet on Procurve switches

We're in the process of changing our network subnet mask from a /23 to a /22 (255.255.254.0 to 255.255.252.0)

When I attempt to assign the new subnet mask to our older 2512 and 2524 switches, the switch accepts the command. It does disconnect the telnet session, but I can immediately reconnect and see the changes.

When I attempt to assign the new subnet mask to any of our newer switches (26xx and newer) the switch tells me that the subnet already exists and refuses to make the change.

I know I can do this by visiting each switch with a console cable, dropping the ip address from the default vlan and then re-creating it with the new subnet mask.

I think dropping and re-creating the ip assignment won't work remotely, since once I drop the ip... Well you get the idea. Even if I copy & paste a pair of commands, the second one will not be executed.

Is there a way to just change the mask with the CLI?

3 REPLIES 3
James Z
New Member

Re: Changing Subnet on Procurve switches

I found a method.

Using the "menu" interface instead of just the plain CLI allows you to make these changes.
jacob_
New Member

Re: Changing Subnet on Procurve switches

Bumping a super old thread because it came up in a Google search for "hp procurve change subnet mask cli"

If you have:

vlan 100
    name "Super Vlan"
    tagged 5-10
    ip address 192.168.0.1 255.255.255.0
    exit

But you need to expand the subnet mask to offer  192.168.1.0/24  IP's. Then on the switches config, from the CLI, you do the following:

en
conf
vlan 100
no ip address 192.168.0.1 255.255.255.0
ip address 192.168.0.1 255.255.254.0
exit

I am open to improvements on this answer as this thread was a top-ranking result from Google, and some of us simply refuse to use the switches GUI.

BjKo
Frequent Advisor

Re: Changing Subnet on Procurve switches

Well the menu is not really a GUI ;)

the problem with your config is that you will loose the connection after you remove the IP address, if you are connected through that IP.
In that case you could add a temporary IP in another VLAN and connect to it through a device in the same subnet (like the neighbor switch). you can then freely change the IP without loosing the connection, as you are in the same subnet. 
This also works well when you need to change the default gateway to another subnet and don't want to risk a disconnection.