Switch configuring a routed port

On a multilayer switch, also called a Layer 3 switch, it is possible to configure what is known as a routed port. When configured, such a port behaves 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).

To configure a routed port and assign it an IP address, use the following commands:

SW3(config)#interface gi0/1 SW3(config-if)#no switchport SW3(config-if)#ip address 192.168.10.254 255.255.255.0

The no switchport command causes the port to change from a Layer 2 port to a Layer 3 port. After this command, it is possible to assign an IP address, just like you would on a router.

Note that after the no switchport command is applied:

  • the port no longer belongs to any VLANs
  • the port will no longer accept any switchport commands, such as those that configure it as an access or a trunk port.
  • inter-VLAN routing is needed for communication between the subnet of that particular routed port, and VLANs on the switch
  • For multiple hosts to use the IP address of a routed port as a default gateway, an additional switch must be connected to that port to create the appropriate network segment/Layer 2 domain to which hosts of that subnet can connect

An alternative to using a routed port is to use a Switched Virtual Interface or SVI.

Links:

https://networklessons.com/switching/intervlan-routing#Routed_Port

https://forum.networklessons.com/t/hsrp-hot-standby-routing-protocol/1150/152?u=lagapides

https://forum.networklessons.com/t/intervlan-routing/1147/128?u=lagapides