Layer 2 vs Layer 3 switches
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
New contributor
add a comment |
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
New contributor
1
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
6 hours ago
add a comment |
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
New contributor
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
switch
New contributor
New contributor
New contributor
asked 7 hours ago
kmd
161
161
New contributor
New contributor
1
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
6 hours ago
add a comment |
1
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
6 hours ago
1
1
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
6 hours ago
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
6 hours ago
add a comment |
1 Answer
1
active
oldest
votes
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.
1
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
add a comment |
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
});
}
});
kmd is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
1
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
add a comment |
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.
1
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
add a comment |
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.
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.
edited 4 hours ago
answered 5 hours ago
Zac67
3,7032415
3,7032415
1
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
add a comment |
1
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
1
1
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♦
5 hours ago
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♦
5 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
@yagmoth555 Absolutely - I've edit that into the answer.
– Zac67
4 hours ago
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
3 hours ago
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
3 hours ago
add a comment |
kmd is a new contributor. Be nice, and check out our Code of Conduct.
kmd is a new contributor. Be nice, and check out our Code of Conduct.
kmd is a new contributor. Be nice, and check out our Code of Conduct.
kmd is a new contributor. Be nice, and check out our Code of Conduct.
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
1
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
6 hours ago