5

Let's say that there is a SVI for VLAN 100 and it's been assigned the first usable IP address in subnet 192.168.1.0/24. There is a host on VLAN 100 with an IP address of 192.168.1.130. We need to change the subnet on the SVI to a /25, but we need to do it without causing a significant disruption to the host or changing it's IP address.

How would you do it?

  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 9 '17 at 22:51
3
  1. Add a secondary IP address to the SVI in the same subnet that is in your new target range.
  2. Change the the subnet mask and default gateway on the host.
  3. Promote the secondary IP address to primary with the new subnet mask and remove the old primary.
  • I don't think this will work, as the /25 will overlap with the existing /24. In the end, if the switch is the hosts default-gateway, he's going to have to change the configuration on the host, if only to update its default-gateway. However, if he's going through that trouble, I would just remask the the switch to a /25 (leaving the existing IP in place), then renumber and remask the host. – Ryan Jul 8 '14 at 13:04
  • I think three steps do exactly that. I could rewrite it to be a bit more verbose... – JDGray Jul 8 '14 at 15:04
  • *cough*proxy-arp*cough* – Ricky Beam Jul 8 '14 at 16:32
  • Ricky, you naughty boy you! ;) – jwbensley Jul 9 '14 at 8:37
  • 1
    You're right, but in this scenario we've added a secondary IP address, i.e.: 192.168.1.128 255.255.255.0 secondary Which allows us to change the host's subnet mask and default gateway without interrupting the host's ability to get traffic out. Once the changes have been made on the host we can then got back and remove the primary, secondary address while at the same time adding a new primary of "192.168.1.128 255.255.255.128" effectively resizing the subnet while avoiding the having the host use a new IP address. Which is the intent of the exercise. – JDGray Jul 9 '14 at 19:16
1

the ip adress is the first usable ip adress of 192.168.0.128/25 supposing that you need to use the second part of the subnet(/24) on another svi:

conf t
interface vlan 100 
no ip adress 192.168.1.1 255.255.255.0
ip adress 192.168.0.1 255.255.255.128
interface vlan 200
ip adress 192.168.1.129 255.255.255.128
no shut
exit
ip route 192.168.1.130 255.255.255.255 vlan 100
end

on cisco it will take about 2 seconds if you paste all config.

0

Also if you are using DHCP make sure to change the DHCP scope to match your new subnet. Also make sure to change the default gateway and subnet mask on EVERYTHING on the subnet (printers, faxes etc).

0

If the SVI must change from 192.168.1.1/24 to 192.168.1.1/25 and the host's IP address cannot change, then the host will lose connectivity unless proxy-arp is configured on the SVI.

Assigning a temporary, secondary IP address to the SVI in the 192.168.1.0/25 subnet violates the requirements because at some point the primary IP will have to be changed and that will cause a disruption to the host.

  • 1
    A momentary disruption (read: brief) is tolerable as long as the host is able to maintain it's current IP address. I need to read up on proxy-arp. – JDGray Jul 13 '14 at 3:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.