Layer 2 and layer 3 switch

Answered Question
Jul 13th, 2011
User Badges:

ello everyone,



Can any one explain the below terms to me?


How to identify of find whether the switch is layer 3 switch or layer 2 switch?


For example, If i have one cisco switch,then how i can idendify is it a layer 3 or layer 2 switch?.Is there any command we can execute in the switch or is there any term we need to serach in the switch config to identify this.Please explain....i am blasting my head for the answer.... 

Correct Answer by SunilKhanna about 5 years 9 months ago

As such there is no command which will give an output mentioning the switch is layer 2 or layer 3. Its the operational functionality which determines if a switch is L3 compatible. For example....


Enable routing on the switch by using the ip             routing command.


Switch(config)#ip routing


Check the show running-configuration.                 Verify whether ip routing is enabled. 

hostname Switch
!
!
ip subnet-zero
ip routing


Regards,

Sunil.


If you think the post was helpful, please do not forget to mark it as Answered.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (1 ratings)
Loading.
Correct Answer
SunilKhanna Wed, 07/13/2011 - 23:13
User Badges:
  • Silver, 250 points or more

As such there is no command which will give an output mentioning the switch is layer 2 or layer 3. Its the operational functionality which determines if a switch is L3 compatible. For example....


Enable routing on the switch by using the ip             routing command.


Switch(config)#ip routing


Check the show running-configuration.                 Verify whether ip routing is enabled. 

hostname Switch
!
!
ip subnet-zero
ip routing


Regards,

Sunil.


If you think the post was helpful, please do not forget to mark it as Answered.

sathyasav Wed, 07/13/2011 - 23:59
User Badges:

Thanks a lot Sunil Ji,Now am clear.But i have one more question from your answer.


1.The command IP ROUTING is enabled by default in all layer 3 switches or we have have to enable it manually.

2.If i want to configure the static default route using the command ip route 0.0.0.0 0.0.0.0 x.x.x.x then is it mandatory to enable ip routing.

Richard Burts Thu, 07/14/2011 - 11:56
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

  • Cisco Designated VIP,

    2017 LAN, WAN

While ip routing is enabled by default on routers you will find that on switches it is not enabled by default. If you want the switch to do layer 3 forwarding/routing you must enable ip routing.


This also helps to answer your second question. If you configure the static default route then you want the switch to do layer 3 forwarding/routing and you must enable ip routing.


HTH


Rick

Actions

This Discussion