For a switch to be manageable remotely, you give it an IP address on a virtual SVI interface (usually VLAN 1). The PCs, in turn, get an address in the same network.
Steps on the switch
- Enter the VLAN 1 interface.
- Assign an IP address and a mask.
- Bring the interface up with no shutdown.
- Set the switch default gateway.
S1> enable
S1# configure terminal
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
On the PC side
In Packet Tracer you open the Desktop > IP Configuration tab and enter the IP address, the mask and the gateway. A PC on 192.168.1.10 /24 with gateway 192.168.1.1 can then talk to the switch and reach beyond the local network.
Key point: the switch gets an IP on the VLAN 1 SVI; the PC and the switch must share the same network. See Lab 7 – Addressing a switch and a PC.