Secondary ip switch trouble

Answered Question
Oct 16th, 2003
User Badges:

Is it possible to put a secondary ip on a switch? More specifically a vlan interface? I would like to change the ip's on a few switches that I have remotely.


I have already tried to add a secondary ip to the vlan interface and the switch appears to take the command however it does not show up in the config afterwards and I cannot ping it.


I haven't tried to add a second default-gateway ip yet. Is this going to fail also? The switches are 1924s and 2924s mostly.

Correct Answer by milan.kulik about 13 years 10 months ago

Hi,

I don't think it's possible to configure two IP addresses and default gateways on a switch.

If you need to change the IP address and default gateway remotely, you can download the running config to your PC, edit the IP address and default gateway values and upload the file via TFTP to startup config to the switch. After successful upload use sh config to check the startup config is OK and reload the switch.

You can even make it without any switch reload:

Just create a text file test.cfg containing lines:

interface VLAN1

ip address .........

ip default-gateway .........

with the new values.

Copy this file to the switch flash via TFTP.

Use copy flash run

answer test.cfg to the filename prompt.

The switch will merge the test.cfg with the running config. You will lose your Telnet connection. But you should be able to connect using the new IP address immediately.

If anything fails for any reason you still can call the remote site and just ask somebody to power the switch off/on and it will come back with the old address and gateway.

This should work for Cat2900/3500XLs. I'm not so familiar with 1900, but I hope they might behave the same way.

Regards,

Milan


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Loading.
Correct Answer
milan.kulik Fri, 10/17/2003 - 00:22
User Badges:
  • Red, 2250 points or more

Hi,

I don't think it's possible to configure two IP addresses and default gateways on a switch.

If you need to change the IP address and default gateway remotely, you can download the running config to your PC, edit the IP address and default gateway values and upload the file via TFTP to startup config to the switch. After successful upload use sh config to check the startup config is OK and reload the switch.

You can even make it without any switch reload:

Just create a text file test.cfg containing lines:

interface VLAN1

ip address .........

ip default-gateway .........

with the new values.

Copy this file to the switch flash via TFTP.

Use copy flash run

answer test.cfg to the filename prompt.

The switch will merge the test.cfg with the running config. You will lose your Telnet connection. But you should be able to connect using the new IP address immediately.

If anything fails for any reason you still can call the remote site and just ask somebody to power the switch off/on and it will come back with the old address and gateway.

This should work for Cat2900/3500XLs. I'm not so familiar with 1900, but I hope they might behave the same way.

Regards,

Milan


andrew.butterworth Fri, 10/17/2003 - 09:24
User Badges:
  • Gold, 750 points or more

What switch is it? Is it a layer-3 switch or Layer-2? If its layer-2 and you are trying to add a secondary IP to the Management interface then no it won't work. If its a Layer-3 switch such as a Cat6K (native IOS or IOS on the MSFC) then it should work.


Andy

Actions

This Discussion