Prerequisite – Network Devices
A switch is a device which sends a data packet in a local network. What is advantage over hub? A hub floods the network with the packet and only destination system receives that packet while others just drop due to which the traffic increases a lot. To solve this problem switch came into the picture. A switch first learns, by flooding network just like hub to fill MAC- address table, on which port a particular device is connected. After learning it sends packets to that particular host only.
Layer 2 switch work on layer 2 of OSI model i.e. data link layer and sends a “Frames” to destination port using MAC address table which stores the mac address of a device associated with that port. Layer 3 switch work on layer 3 of OSI model i.e. network layer where it route packet by using IP address, it is used widely on VLANs.
|Layer 2 Switch||Layer 3 Swicth|
|Operate on layer 2 (Data link) of OSI model.||Operate on layer 3 (Network Layer) of OSI model.|
|Send “frames” to detination on the basis of MAC address.||Route Packet with help of IP address|
|Work with MAC address only||Can perform functioning of both 2 layer and 3 layer switch|
|Used to reduce traffic on local network.||Mostly Used to implement VLAN (Virtual Local area network)|
|Quite fast as they do not look at the Layer 3 portion of the data packets.||Takes time to examine data packets before sending them to their destination|
|It has single broadcast domain||It has multiple broadcast domain.|
|Can communicate within a network only.||Can communicate within or outside network.|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Types of switches in Computer Network
- Frame forwarding methods on Switches
- Difference between Stop and Wait, GoBackN and Selective Repeat
- Difference between Stop and Wait protocol and Sliding Window protocol
- Difference between VoIP and and POTS
- What’s difference between The Internet and The Web ?
- Difference between HTML and HTTP
- Difference between http:// and https://
- Difference between Circuit Switching and Packet Switching
- Difference between Ping and Traceroute
- Difference between RFID and Barcode
- Difference between Tree Topology and Bus Topology
- Difference between CloudMe and Wuala
- Difference between SMTP and POP3
- Difference between Adaptive and Non-Adaptive Routing algorithms
- Difference between Characteristics of Combinational and Sequential circuits
- Difference between Unicast, Broadcast and Multicast in Computer Network
- Difference between Component and Object
- Difference between SSH and Telnet
- Difference between Classful Routing and Classless Routing
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.
Improved By : atreyarao70