mulli-Layer Switch

Posted filed under Cisco CCNA.

Layer 3 Switch

Now that we have seen how a “router on a stick” works, we can introduce the Layer 3 switch.  In the “router on a stick” topology, what if we could bring the router inside the switch?  In essence, what if we could give the switch (a layer 2 device) the capability to route (a Layer 3 function).  This is what a Layer 3 switch is capable of doing.

There are three points we need to remember:

  • By default, the routing capability is not turned on in a Layer 3 switch. We need to issue the ip routing command to enable it from global config.

    Switch#Switch#conf t

    Enter configuration commands, one per line. End with CNTL/Z.

    Switch(config)#ip routing


  • On a Layer 2 switch the ports cannot be assigned an IP address. If a switch is to act like a router, we need a way to assign IP addresses to ports.  This is done by the command switchport under the interface.  Switchport makes the port behave like a Layer 2 port, whereas no switchport will make it behave like a Layer 3 port; is it a toggle.  By default, a Layer 3 switch will have all of the ports in Layer 2 mode.  By issuing the no switchport command, we will be able to assign IP addresses to Layer 3 ports.

    Switch(config)#Switch(config)#conf t

    Switch(config)#interface fa0/5

    Switch(config-if)#no switchport


    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to down

    %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/5, changed state to up

    Switch(config-if)#ip address


  • If the switch needs to route using the virtual router, we need to be able to assign IP addresses to that virtual router. The virtual router inside the switch will be acting as the Default Gateway.  This is done by creating virtual interfaces using the command interface vlan X, where X is the VLAN ID.  You can shutdown or bring up this interface, just like any other interface.

    Switch(config)#vlan 10Switch(config-vlan)#name Management


    Switch(config)#int vlan 10


    %LINK-5-CHANGED: Interface Vlan10, changed state to up
    %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan10, changed state to up

    Switch(config-if)#ip add
    %SYS-5-CONFIG_I: Configured from console by console

Receive our Cisco CCNA Packet Tracer!
Get our complete tutorial in PDF

We can check for the routed ports by looking at the routing table on the Layer 3 switch.  We use the same command we did on a router, namely sh ip route.


Switch#sh ip route

Codes: C – connected, S – static, I – IGRP, R – RIP, M – mobile, B – BGP

D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area

N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2

E1 – OSPF external type 1, E2 – OSPF external type 2, E – EGP

i – IS-IS, L1 – IS-IS level-1, L2 – IS-IS level-2, ia – IS-IS inter area

* – candidate default, U – per-user static route, o – ODR

P – periodic downloaded static route

Gateway of last resort is not set is subnetted, 1 subnets
C is directly connected, Vlan10
C is directly connected, FastEthernet0/5

Let’s see the Layer 3 switch in action.  Build the following topology:

[bs_icon name=”glyphicon glyphicon-expand”] Watch the video and you will be able to understand how to configure Multi-Layer Switch much better and Please subscribe to our YouTube Channel.


Want more information on how to become Cisco CCNA Certified? Learn more!
Join our Cisco CCNA facebook study group!

Also published on Medium.

Comments are closed.