Configure Switch's Static Ip Address

While logged into the cli:

console# configure
console(config)# interface vlan 1
console(config-if)# ip address www.xxx.yyy.zzz 255.255.255.0 mmm.nnn.ooo.ppp

(where www.xxx.yyy.zzz is the static IP address you would like to assign to the switch, 255.255.255.0 is the netmask and mmm.nnn.ooo.ppp is the default gateway)

This applies to the standard configuration where VLAN 1 is the administrative VLAN. If you have changed the administrative VLAN to something else, modify the interface specification above accordingly.

Note that (at least on my SRW2008 switch), if trying to set an IP address on more than one VLAN interface at a time, the switch reacts rather badly:

switch(config)# int vlan 6
switch(config-if)# ip address 10.10.10.10 255.255.255.0
ip address table overflow

This means that you must remove the IP address from the current management VLAN, which in turn is a bad thing if you are logged in through telnet/ssh. Because of this, if you change management VLAN to something else (and not merely changing the IP on the current management VLAN), the management VLAN's IP address must be set using the serial console cable.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License