What is Layer-3 Switching?

In IT Network, to build Data Centre, Branch office or to connect multiple services and to communicate those services to each other a layer-3 device is required. It can be a Router. But can Router do Switching? Obviously Not. So, we need a layer-3 devices which has capabilities to can layer-2 Switching, Layer-3 Switching or Inter-Vlan Communication and Routing as well. So Welcome to world of Layer-3 Switch and Layer-3 Switching. It will make your life easy.

So, Let’s Start to understand.

What is Layer-3 switching
What is Layer-3 switching

 

What is Layer-3 switching

Layer-3 Switching worked on network Layer is third layer of OSI.

In addition to performing Layer-2 switching functions, a Layer-3 switch also have Routing capabilities. But we all knows Router also works on network Layer will do routing, then why Layer-3 Switch or Switching is required. Why we cannot use router for Routing.

You are Right! Router is for Routing, but only for Routing, can not do Switching. Yes, Router can not do Routing but Layer-3 switch can do both Routing and Switching. That’s beauty of Layer-3 Switch.

So, we can say that a Layer-3 switch is still a router, but Router is not a Switch.

Features of Layer-3 switch

Below are some features which we will discuss in this article.

  1. Layer-3 Switch is network layer device
  2. It can perform both Switching and routing
  3. It works on both Layer-2 and Layer-3 on OSI Layer.
  4. Its helps to communicate different VLAN.
  5. It helps for Inter-Vlan Communication
  6. It provides more security
  7. It provides more Scalability and Flexibility
  8. It allows us to configure and design our network as our requirement

Where Layer-3 Switch used in network architecture.

In ICT Network architecture, there are 3-layer Hierarchical Architecture. It includes Core, Distribution and Access layer.

 

Layer-3 Switch used in network architecture
Layer-3 Switch used in network architecture

 

In Above diagram, you can see ISP cloud, Router, Firewall, Ext FW, Core Layer, Dist Layer and Access layer.

Here we discuss about Core, Dist. and Access layer:

Access Layer:

All LAN network and End devices/user connected on Access Switch either on POE or non-POE Ports. This layer we have already discuss in above section that how Access Layer works and how Layer-2 switch works. On this Access layer all Switches are Layer-2 switches which used to provide the connectivity to end user in specific VLAN. Here Routing is not Possible, only same VLAN can communicate and no Inter-Vlan communication possible.

For read how Layer-2 Switching works.. please visit https://techblog.kbrosistechnologies.com/what-is-layer-2-switching/

Distribution Layer:

This Layer is worked as Mediator between Core and Access Layer. This layer worked on Network Layer in OSI model and capable to perform Routing and Inter-Vlan Communication.

The distribution layer plays a crucial role in network architecture by providing

  • Aggregation
  • Segmentation
  • Routing
  • Policy enforcement
  • High availability
  • Service integration

It enables efficient traffic flow, enhances network scalability and performance, and helps enforce network policies and security measures.

Aggregation:  It Aggregates traffic from multiple access layer switches or devices and forwards it towards the appropriate destination with inter-Vlan or same Vlan Communication.

Segmentation: It also divide the traffic in different Segment in different domain or VLAN.

Routing:  Distribution Switch act as a default Gateways for all Layer-2 VLAN created on Access Switches. Layer-3 VLAN created on these Dist. switches for those layer-2 VLAN. So, on end devices when we give IP address then we need to give default Gateways as well. That default Gateway is nothing but the that Vlan Interface IP address which is created on Dist. Switch and will act as Default Gateway for deliver or route the traffic/packet at desire destination.

Policy enforcement: As Dist. layer is also called boundary layer as well, all Policies, QoS, bandwidth allocation for critical Services, ACL and other Security policies are implemented at this layer.

High availability: The distribution layer provides redundancy and fault tolerance to ensure high availability of network services in terms of Hardware, Link level, Vlan level and service level. In above topology you can see that all Dist, switches are connected with Core switches in Cross connections. To maintain HA, configure technologies called VRRP, HSRP, EtherChannel etc.

Service integration: All other services and Hardware like WLC, Server, MZ and all other service is integrated at this layer.

Intercommunication: At this layer all Switches are Layer-3 Switches and perform Layer-3 Switching.

 

How Inter-VLAN Routing Works

Layer-3 Switching and Inter-VLAN Routing
Layer-3 Switching and Inter-VLAN Routing

In Above example, let me first explain the Topology, then we will discuss for both L2 and L3 switching

  1. Layer-3 Switch- Distribution Layer
  2. Layer-2 Switches- Access Layer
  3. Block port in Spanning Tree
  4. FW Port in Spanning Tree
  5. Root Port

In this topology both Layer-2 and Layer-3 Switching is working. Let discuss for Layer-3 Switching.

To read more on how Layer-2 works, please read- https://techblog.kbrosistechnologies.com/best-guide-4-how-switch-works/

In Above section when we explain how Layer-2 switch works, on that section we understood that at Access Layer two different Vlan or Subnet can not communicate or we can say Inter-Vlan communication can not possible. But at Layer-3 switch it is possible.

Let’s review the L3 switch Configuration first

Layer-3 Config Snaps

  1. In Layer-3 switch we have configured Vlan 10 and 20 as Layer-3 Vlan as we given them IP address.
  2. Then we enable routing by command “Ip routing”, by this command Switch works as Layer-3.
  3. Then we configure EIGRP routing protocol, you can configure any other protocol as well like, OSPF, Static.
  4. Configure all connected port as Trunk.

5. Then we have configured Default gateway in all PC as per their assigned VLAN,

Now as Routing is enabled and inter-Vlan communication is enable. So, we can ping another subnet PC as well.

 

Inter-Vlan communication Output
Inter-Vlan communication Output

As you can see Laptop / PC with subnet 10.1.1.0 is able to ping PC with subnet 20.1.1.0

In below Tract route, when we ping 20.1.1.5 from 10.1.1.5, its showing, that packet goes to their default Gateways which is Vlan 10 IP address and EIGRP is running on L3 Switch, so Vlan 10 have route and know who is 20.1.1.5

This is the Layer-3 Switching.

Now, Let’s understand Layer-2 functionality as well with the same topology.

All three Switch are connected in a Tringle shape like both L2 switch connected with L3 switch, now:

  1. Along with L3 functionality L3 switch performing as L2 as well.
  2. It allowing all Vlan via trunk port
  3. It Avoided loops via Spanning Tree
FAQ

Q. What is Layer-3 Switch?

A. Layer-3 devices or switch has capabilities to to Switching and Routing both.

Q. What is Layer-3 Switching?

A. When we need to communicate different Subnet or Inter-Vlan Communication or Routing then we use Layer-3 Switching.

Q. What is Inter-Vlan Communication?

A. When Two different Vlan communicate to ping each other to send/received the data is called Inter-Vlan Communication,

Q. Can  a Layer-2 Switch do Inter-vlan Communication?

A, No, Layer-2 Switch can not to perform Inter-Vlan communication.

 

Watch more Video  https://www.youtube.com/channel/UCpcd6IshE1caAbf9EdJd3gw 

https://www.youtube.com/channel/UCTbOmLTSlHggEBkt5wFGNRA

 

Please Share