When configuring the Cisco 3560 switch in the morning with the Cisco Packet Tracer practice, it is found that the IP address of the port cannot be configured in port configuration mode.
Switch>
Switch>enable
Switch#configure Terminal
Switch (config) #interface F0/1
Switch (config-if) #?
Dhcp
Only DHCP commands are available. Check on the Internet, the original switch port is Switchport, that is, the two-layer switch port, and the IP address is the third tier, so to configure the port IP address, the port must belong to the third tier
Switch>
Switch>enable
Switch#configure Terminal
Switch (config) #interface F0/1
Switch (config-if) #no switchport //Start layer three function
Switch (config-if) #ip address 192.168.0.1 255.255.255.0
Switch (config-if) #no shutdown
Switch (config-if) #end
That's all you can do.
The two-tier switch configures the IP address primarily to manage devices, such as using Telnet, SNMP, and so on. The three-layer switch configures the IP address to be used for both managing devices and for communication, such as the default gateway for users.
Cisco Router Switch Learning