Ip a – SMC Networks TigerAccess SMC7816M User Manual
Page 95

S
ETTING
THE
S
WITCH
’
S
IP A
DDRESS
4-13
CLI – Specify the management interface, IP address and default gateway.
This example first sets up a dedicated VLAN for management access. It
adds Port 19 (the management port) to that VLAN and also removes this
port from the VLAN 1, which is left for use by the data network. It then
specifies the management interface, IP address and default gateway. For
information on making these configuration changes through the web
interface, refer to Chapter 13 “VLAN Configuration.”
Console#config
Console(config)#interface vlan 1
Console(config-if)#ip address 10.1.0.253 255.255.255.0
Console(config-if)#exit
Console(config)#ip default-gateway 10.1.0.254
Console(config)#end
Console#show ip interface
IP Address and Netmask: 10.1.0.253 255.255.255.0 on VLAN 2,
Address Mode: User
Console#
Console#config
Console(config)#vlan database
Console(config-vlan)#vlan 2 name management media ethernet
Console(config-vlan)#exit
Console(config)#interface ethernet 1/19
Console(config-if)#switchport allowed vlan add 2
Console(config-if)#switchport native vlan 2
Console(config-if)#switchport allowed vlan remove 1
Console(config-if)#switchport forbidden vlan add 1
Console(config-if)#exit
Console(config)#interface vlan 2
Console(config-if)#ip address 10.1.0.253 255.255.255.0
Console(config-if)#exit
Console(config)#ip default-gateway 10.1.0.254
Console(config)#end
Console#show ip interface
IP Address and Netmask: 10.1.0.253 255.255.255.0 on VLAN 2,
Address Mode: User
Console#