09-06-2023 11:51 AM
Hi,
I am trying to change the IP address on a Catalyst 2960G. I reset the switch and the default IP is 10.0.0.1, which pings and I can access it.
I Telnet into the switch via Putty and enter the below commands:
Switch#
Switch#config terminal
Switch(config)#interface vlan 1
Switch(config-int)#ip address 192.168.1.5 255.255.255.0
The ping times out just once then continues ping 10.0.0.1 successfully. It doesn't time out. My understanding is the change should apply immediately and I would need to reconnect using the new IP. Is my config wrong or is there something wrong with the switch?
Solved! Go to Solution.
09-07-2023 10:21 AM
Correct. Since the 2960G is a layer-2 switch only, it can only have one IP address, which is used for management. Because "no ip address" will disconnect you, you must console to the switch and issue these commands.
HTH
09-06-2023 12:10 PM
An IP address change should be instant. Are you the only device connected to the switch?
After you make the change check the address with show ip interface brief. If you see the correct address for interface VLAN 1 then change your IP to something in that subnet and try pinging/accessing the switch.
09-06-2023 02:13 PM
My device is the only one connected to the switch. I will try the show ip interface brief command and see what happens.
09-06-2023 12:36 PM - edited 09-06-2023 12:37 PM
Your config looks correct, and the address should change instantly.
If it does not change, try this:
Switch#
Switch#config terminal
Switch(config)#interface vlan 1
no ip address
Switch(config-int)#ip address 192.168.1.5 255.255.255.0
HTH
09-06-2023 02:15 PM
What will the no ip address command do?
09-06-2023 06:45 PM
"no ip address" will remove the ip address conf from interface vlan 1. Then again issuing the "ip address command"("Switch(config-int)#ip address 192.168.1.5 255.255.255.0") will assign a new IP address.
Issuing the command takes immediate effect on changing the IP address.
09-07-2023 08:16 AM
When I use the "no ip address" command, it disconnects me from the switch. How do I assign the IP again in this scenario? Do I need to use a console cable?
09-07-2023 10:21 AM
Correct. Since the 2960G is a layer-2 switch only, it can only have one IP address, which is used for management. Because "no ip address" will disconnect you, you must console to the switch and issue these commands.
HTH
09-07-2023 07:28 PM
Console to the switch is one good approach. An alternative would be to power cycle the switch. The config change removed the IP address. But the change was not saved. And a power cycle will restore the config with an IP address.
If you are where the switch is then console is probably the preferred approach. But if you are not where the switch is then having someone at that location power cycle would do what you need.
09-08-2023 07:25 AM
Thank you everyone! I was successfully by just using a console cable. Made the setup process a whole lot easier.
09-08-2023 07:32 AM
Glad it is all working for you!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide