cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1196
Views
1
Helpful
10
Replies

IP Address will not change on Catalyst 2960G

jmins
Level 1
Level 1

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?

1 Accepted Solution

Accepted Solutions

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

View solution in original post

10 Replies 10

Ben Walters
Level 4
Level 4

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. 

My device is the only one connected to the switch.  I will try the show ip interface brief command and see what happens.

Reza Sharifi
Hall of Fame
Hall of Fame

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

 

What will the no ip address command do? 

adarsing
Cisco Employee
Cisco Employee

"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.

jmins
Level 1
Level 1

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?

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

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.

HTH

Rick

jmins
Level 1
Level 1

Thank you everyone!  I was successfully by just using a console cable.  Made the setup process a whole lot easier.

Glad it is all working for you!

Review Cisco Networking for a $25 gift card