Layer 2 vs Layer 3 switches












7














I am a bit confused on when I need and should use a layer 2 or layer 3 switch.
In the corporate network we have Aruba 3810 core switches, and all the access switches are HPE 1950 24/48 PoE+.
We have 7 vlans, IT mgmt, workstations, machines, wlan, wlan-guest, wlan-guest2, VoIP.
Most of the the phones are having connected the computers connected to them (built in switch).



I know about routing capabilities of layer 3 switches.
But...
I don't know what happens if I have a layer 2 switch like Aruba 2530 PoE+ connected, what changes and what do I miss. Only the routing between vlans?
If routing has to be enabled for the vlans/devices that are connected on the 2530 it will be done on the core switches or the 1950s?



Thanks in advance!










share|improve this question


















  • 2




    You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
    – John Mahowald
    Dec 31 '18 at 21:50
















7














I am a bit confused on when I need and should use a layer 2 or layer 3 switch.
In the corporate network we have Aruba 3810 core switches, and all the access switches are HPE 1950 24/48 PoE+.
We have 7 vlans, IT mgmt, workstations, machines, wlan, wlan-guest, wlan-guest2, VoIP.
Most of the the phones are having connected the computers connected to them (built in switch).



I know about routing capabilities of layer 3 switches.
But...
I don't know what happens if I have a layer 2 switch like Aruba 2530 PoE+ connected, what changes and what do I miss. Only the routing between vlans?
If routing has to be enabled for the vlans/devices that are connected on the 2530 it will be done on the core switches or the 1950s?



Thanks in advance!










share|improve this question


















  • 2




    You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
    – John Mahowald
    Dec 31 '18 at 21:50














7












7








7


2





I am a bit confused on when I need and should use a layer 2 or layer 3 switch.
In the corporate network we have Aruba 3810 core switches, and all the access switches are HPE 1950 24/48 PoE+.
We have 7 vlans, IT mgmt, workstations, machines, wlan, wlan-guest, wlan-guest2, VoIP.
Most of the the phones are having connected the computers connected to them (built in switch).



I know about routing capabilities of layer 3 switches.
But...
I don't know what happens if I have a layer 2 switch like Aruba 2530 PoE+ connected, what changes and what do I miss. Only the routing between vlans?
If routing has to be enabled for the vlans/devices that are connected on the 2530 it will be done on the core switches or the 1950s?



Thanks in advance!










share|improve this question













I am a bit confused on when I need and should use a layer 2 or layer 3 switch.
In the corporate network we have Aruba 3810 core switches, and all the access switches are HPE 1950 24/48 PoE+.
We have 7 vlans, IT mgmt, workstations, machines, wlan, wlan-guest, wlan-guest2, VoIP.
Most of the the phones are having connected the computers connected to them (built in switch).



I know about routing capabilities of layer 3 switches.
But...
I don't know what happens if I have a layer 2 switch like Aruba 2530 PoE+ connected, what changes and what do I miss. Only the routing between vlans?
If routing has to be enabled for the vlans/devices that are connected on the 2530 it will be done on the core switches or the 1950s?



Thanks in advance!







switch






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 31 '18 at 21:02









kmdkmd

361




361








  • 2




    You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
    – John Mahowald
    Dec 31 '18 at 21:50














  • 2




    You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
    – John Mahowald
    Dec 31 '18 at 21:50








2




2




You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
– John Mahowald
Dec 31 '18 at 21:50




You need to provide what you require from this network design, including the topology and what routing protocols it speaks. Read the manuals to find out what features a given model has, or set up a test lab. FYI, networkengineering.stackexchange.com is a SE entirely about data networking.
– John Mahowald
Dec 31 '18 at 21:50










1 Answer
1






active

oldest

votes


















9














A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.



A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs.



So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.



If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.



Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.






share|improve this answer



















  • 3




    A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
    – yagmoth555
    Dec 31 '18 at 22:52










  • @yagmoth555 Absolutely - I've edit that into the answer.
    – Zac67
    Dec 31 '18 at 23:52






  • 2




    Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
    – Andreas Rehm
    Jan 1 at 1:05










  • @AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
    – Zac67
    Jan 1 at 11:31






  • 1




    That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
    – Zac67
    Jan 1 at 18:06











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f947183%2flayer-2-vs-layer-3-switches%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









9














A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.



A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs.



So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.



If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.



Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.






share|improve this answer



















  • 3




    A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
    – yagmoth555
    Dec 31 '18 at 22:52










  • @yagmoth555 Absolutely - I've edit that into the answer.
    – Zac67
    Dec 31 '18 at 23:52






  • 2




    Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
    – Andreas Rehm
    Jan 1 at 1:05










  • @AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
    – Zac67
    Jan 1 at 11:31






  • 1




    That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
    – Zac67
    Jan 1 at 18:06
















9














A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.



A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs.



So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.



If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.



Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.






share|improve this answer



















  • 3




    A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
    – yagmoth555
    Dec 31 '18 at 22:52










  • @yagmoth555 Absolutely - I've edit that into the answer.
    – Zac67
    Dec 31 '18 at 23:52






  • 2




    Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
    – Andreas Rehm
    Jan 1 at 1:05










  • @AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
    – Zac67
    Jan 1 at 11:31






  • 1




    That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
    – Zac67
    Jan 1 at 18:06














9












9








9






A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.



A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs.



So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.



If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.



Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.






share|improve this answer














A layer-2 switch forwards frames solely based on layer-2 information, ie. the destination MAC address of each frame. Forwarding happens exclusively between ports belonging the same VLAN.



A layer-3 switch has the additional ability to forward layer-3 IP packets based on the destination IP of each packet. This forwarding usually happens between different VLANs.



So, if you need a fast, yet simple router a layer-3 switch often is a good solution. If you don't need a router you can just as well use a layer-2 switch.



If you need to control traffic between VLANs most L3 switches support ACLs to filter unwanted traffic. Note that ACLs are usually stateless (unlike most firewalls), so you need to configure rules for both directions.



Edit: As @yagmoth555 has appropriately pointed out, L3 switches can differ significantly in their routing protocol support. Basic L3 switches often support only static routes or sometimes RIP while more advanced switches also support OSPF and other modern protocols. Additionally, there may be differences in the maximum number of routes that can be configured/learned.







share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 31 '18 at 23:50

























answered Dec 31 '18 at 22:44









Zac67Zac67

3,8632415




3,8632415








  • 3




    A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
    – yagmoth555
    Dec 31 '18 at 22:52










  • @yagmoth555 Absolutely - I've edit that into the answer.
    – Zac67
    Dec 31 '18 at 23:52






  • 2




    Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
    – Andreas Rehm
    Jan 1 at 1:05










  • @AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
    – Zac67
    Jan 1 at 11:31






  • 1




    That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
    – Zac67
    Jan 1 at 18:06














  • 3




    A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
    – yagmoth555
    Dec 31 '18 at 22:52










  • @yagmoth555 Absolutely - I've edit that into the answer.
    – Zac67
    Dec 31 '18 at 23:52






  • 2




    Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
    – Andreas Rehm
    Jan 1 at 1:05










  • @AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
    – Zac67
    Jan 1 at 11:31






  • 1




    That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
    – Zac67
    Jan 1 at 18:06








3




3




A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
– yagmoth555
Dec 31 '18 at 22:52




A side note to your excellent answer, some layer 3 switch can have a limitated stacks to learn dynamic route if you use it as a router, I had to issue command on some cisco to allow it to use more its memory for such task.
– yagmoth555
Dec 31 '18 at 22:52












@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
Dec 31 '18 at 23:52




@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
Dec 31 '18 at 23:52




2




2




Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
– Andreas Rehm
Jan 1 at 1:05




Another point is that only one switch needs to be layer 3 routing enabled. Is does not make sense to have this enabled on all switches and therefor one layer 3 core switch does everything - the access switches do not need to be layer 3 capable.
– Andreas Rehm
Jan 1 at 1:05












@AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
– Zac67
Jan 1 at 11:31




@AndreasRehm That depends on the network design. While a small network often only routes at the core, a large spine-leaf network may also be routed at the distribution layer or even at the access layer.
– Zac67
Jan 1 at 11:31




1




1




That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
– Zac67
Jan 1 at 18:06




That all depends on your network design which you haven't given us many details about. It'll be fine with L2 switches unless you require a router in that place.
– Zac67
Jan 1 at 18:06


















draft saved

draft discarded




















































Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f947183%2flayer-2-vs-layer-3-switches%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Can a sorcerer learn a 5th-level spell early by creating spell slots using the Font of Magic feature?

Does disintegrating a polymorphed enemy still kill it after the 2018 errata?

A Topological Invariant for $pi_3(U(n))$