Lessons · Network switches · the management address
Giving it an address
`ip address <address> <mask>` on the VLAN interface sets where the switch answers, and the mask has to match the rest of that network.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
Without it, every change needs somebody standing at the rack with a console cable. With it, the switch is a device on the network like any other.
How to think about it
Choose an address inside the management VLAN's range, outside the DHCP pool, and write it down. Then check with `show ip interface brief` rather than believing you typed it right.
Worked example
enableThe # prompt.
configure terminalInto configuration mode.
interface vlan 1The management VLAN's interface.
ip address 192.168.10.2 255.255.255.0Address and mask together; the switch will not take one without the other.
endOut.
show ip interface briefVlan1 192.168.10.2 YES manual up up. Manual means somebody typed it, which is what you want on a switch.
write memorySaved, because an address you lose on reboot is worse than no address at all.
Your turn
Give the VLAN interface 192.168.10.2 with a 24-bit mask.
ip address 192.168.10.2
Console into a switch
The trap
Giving it an address in a different subnet from the VLAN it sits on. The command succeeds, the interface comes up, and nothing can reach it.