Cisco Cisco SG300-28 28-Port Gigabit Managed Switch Technical References

Page of 1053
Introduction
40
78-21485-01 Command Line Interface Reference Guide
1
Configuration Examples
Layer 2 Switch
The following example shows how to configure IP on a Layer 2 switch:
The router with IP Address 10.10.10.1 should be configured with the following 
static route: ip route 172.25.13.2 /32 10.10.10.2.
Switch# configure terminal
Switch(config)# interface vlan 1
Switch(config-if)# ip address 10.10.10.2 /24 
default-gateway 10.10.10.1
Switch(config-if)# exit
Switch(config)# interface loopback 1
Switch(config-if)# ip address 172.25.13.2 /32
Switch(config-if)# ipv6 address 
2001:DB8:2222:7272::72/128
Switch(config-if)# exit