Switch> enable
Switch# configure terminal
Switch(config)# hostname S1
S1(config)# enable secret 123
S1(config)# interface vlan 1
S1(config-if)# ip address 192.168.1.2 255.255.255.0
S1(config-if)# no shutdown
S1(config-if)# exit
S1(config)# ip default-gateway 192.168.1.1
S1(config)# exit
S1# copy running-config startup-config
Switch> enable
Switch# configure terminal
Switch(config)# hostname S2
S2(config)# enable secret 123
S2(config)# interface vlan 1
S2(config-if)# ip address 192.168.1.3 255.255.255.0
S2(config-if)# no shutdown
S2(config-if)# exit
S2(config)# ip default-gateway 192.168.1.1
S2(config)# exit
S2# copy running-config startup-config
S1# show interface vlan 1