cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1612
Views
0
Helpful
3
Replies

Assign IP address to switch

k_bhavsar
Level 1
Level 1

Hi All,

I have one switch connected to network. Currently IP address is assigned though DHCP. I want to assign same IP address statically though remote.

How can I assign static IP address.

Switch is cisco 2960G.

current config. on switch.

intreface vlan 1

ip address dhcp

3 Replies 3

Seb Rupik
VIP Alumni
VIP Alumni

Hi Krunal,

The syntax is

ip address

eg:

!

interface vlan1

  ip address 192.168.25.1 255.255.255.0

!

cheers,

Seb.

devils_advocate
Level 7
Level 7

Please don't use Vlan1, pick another Vlan for your management.

Make sure you do a no shut on the Vlan Interface once you have assigned the IP address. The VlanID also needs to be allowed across any trunk links before it will show as Up.

Static routing is supported on Catalyst 2960-L switches
Step 1 enable Enables privileged EXEC mode.
Example:
Switch> enable
• Enter your password if prompted.
configure terminal Enters the global configuration mode.
Example:
Switch# configure terminal
Step 2
ip route prefix mask {address | interface} Establish a static route.
[distance]
Step 3
Example:
Switch(config)# ip route prefix mask
gigabitethernet 1/0/4
end Returns to privileged EXEC mode.
Example:
Switch(config)# end
Step 4
Displaysthe currentstate of the routing table
to verify the configuration.
show ip route
Example:
Switch# show ip route
Step 5
(Optional) Saves your entries in the
configuration file.
copy running-config startup-config
Example:
Switch# copy running-config
Step 6
startup-config

Review Cisco Networking products for a $25 gift card