cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1322
Views
0
Helpful
6
Replies

Layer 2 and layer 3 switch

sathyasav
Level 1
Level 1

Hello 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.... 

6 Replies 6

Richard Burts
Hall of Fame
Hall of Fame

If you look up the particular switch on the Cisco web site it should have information in the product description that tells you whether the switch is layer 2 only or is layer2/layer3.

But if you are looking for some way to find out on the switch itself then I would suggest attempting to configure in global config mode the command ip routing

If the command is accepted then it is layer2/layer3 and if the command is rejected then it is layer2 only.

HTH

Rick

HTH

Rick

sathyasav
Level 1
Level 1

                Thanks Richard for your prompt reply .

My another question is what is the difference between ip default-gateway x.x.x.x and ip route 0.0.0.0 0.0.0.0 x.x.x.x command in the cisco switch.

As per my understanding,ip default-gateway x.x.x.x command will act as a default gateway for the switch to reach other subnets/to reach this switch from other subnets.But this command will be only for the Layer 2 switch which doesnt have layer 3 capability(no ip routing).

But the for the layer 3 switch the same thing is achieved through ip route  0.0.0.0 0.0.0.0 x.x.x.x command which requires(ip routing enabled).

Please correct me if my understanding is wrong and add few more points if you feel it is needed.


Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

For general management access to a switch, yes default gateway and default route appear to work alike, but they are different.  Default gateway is really no different from any other host's default gateway.  Default route is a default route and also has an effect on traffic transiting the L3 switch.  Other differences with default router, you can have more than one default route, concurrently active, you can have multiple default routes with different weights, more specific routes will override the default, it might not even be defined on an individual L3 switch (i.e. obtained from the routing protocol), it might be advertised to a routing protocol.

you are correct in what you say,

ip default-gateway x.x.x.x provides the ip default gateway for layer 2 traffic, this will not route to other subnets

ip route 0.0.0.0 0.0.0.0 x.x.x.x will only work on a layer 3 switch, this will route all traffic it does not know about to the configured ip address

Joseph W. Doherty
Hall of Fame
Hall of Fame

Disclaimer

The   Author of this posting offers the information contained within this   posting without consideration and with the reader's understanding that   there's no implied or expressed suitability or fitness for any purpose.   Information provided is for informational purposes only and should not   be construed as rendering professional advice of any kind. Usage of  this  posting's information is solely at reader's own risk.

Liability Disclaimer

In   no event shall Author be liable for any damages whatsoever (including,   without limitation, damages for loss of use, data or profit) arising  out  of the use or inability to use the posting's information even if  Author  has been advised of the possibility of such damage.

Posting

sathyasav wrote:

Hello 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.... 

When you say identify, do you mean as configured or whether capable?  Layer 3 switch might have L3 disabled or not support L3 due to a software feature not available with the installed software.

For actually capability, identification of the hardware would indicate whether switch is just L2 or supports L3.

Feature capability might be determined by examination of the running IOS.

Active L3 capability might be identified by checking config, issuing certain show commands (e.g. show IP route), or trying certain configuration commands (e.g. such as IP routing, as suggested by Rick).

Joseph,

From your post,

For actually capability, identification of the hardware would indicate whether switch is just L2 or supports L3.----Please explain me on this elaborately that how can we identify from the hardware that it is L2 or L3?

Feature capability might be determined by examination of the running IOS.----I dont understand this point

Active L3 capability might be identified by checking config, issuing certain show commands (e.g. show IP route)---Please explain how can identify from sh ip route and what are all the commands are there like this to identify the same.second question is how can we identify by checking config.

I am awaiting for your reply....

Review Cisco Networking for a $25 gift card