IP addressing on a Switch
Layer 2 switches have switchports, or Layer 2 ports. These don’t have IP addresses and cannot be assigned IP addresses, because a layer 2 switch cannot route packets.
Now on a layer 3 switch, it is possible to configure what is known as a routed port. When configured, such a port would behave exactly the same as a port on a router, with an assigned IP address in a unique subnet (unique compared to other IP addresses assigned to interfaces on the local device).
This differs somewhat from IP Addressing on a Router.