Task: to set or change the IP address for the management VLAN interface - primary or secondary.
Note. At least on the 2950 series switches (and probably others too), only one management VLAN interface can be active. This means it won't be possible to manage the Cisco from two or more VLANs simultaneously (as much as one might want to). Therefore - as soon as you configure and activate a new IP address on some VLAN - the old one will immediately drop and stop working.
So, we log in and:
>enable
#config t
(config)# interface vlan 1
(config-if)# ip address 192.168.0.1 255.255.255.0
In this example we set the address 192.168.0.1 with a /24 mask for VLAN=1.
For the same VLAN you can also set another address (for example, from a different subnet):
(config-if)# ip address 192.168.1.1 255.255.255.0 secondary
In this example the address 192.168.1.1/24 is an additional IP for the management VLAN.
After the address(es) has (have) been set - the new management interface needs to be activated (otherwise it will remain disabled with the message "is administratively down"):
(config-if)# no shutdown
To remove the IP address of the management VLAN:
(config-if)# no ip address 192.168.0.1
Comments