Understanding the Function of Switches to LAN Traffic Management

In summary: LAN.In summary, a switch sends packets to the appropriate devices on the LAN, but will not send packets to all devices on the LAN.
  • #1
AdityaDev
527
33
In my computer textbook, on one page, its given that switches can't stop traffic from traveling to all other LAN segments.
WP_20150320_19_46_45_Pro.jpg

On the next page, it says that switches send traffic only to appropriate connections.
WP_20150320_19_51_53_Pro.jpg


On a YouTube video, it says both will happen. First it send the packets to all workstations, learns the address, and then next time, sends data only to the required destination.

I am totally confused. Everyone has their own definition for a switch. Can someone give the actual working of a switch?
 
Technology news on Phys.org
  • #2
It definitely will help you if you know something about the OSI model of communication, as they all work differently because they all work on different levels of it (the OSI).
I would recommend starting here. The book should have mentioned this first, or possibly it's about to.
Hubs work on a very low level, the physical level, as does USB devices. Switches and routers have software built into them. This allows them to work sooooo much differently than a hub, and they're much better at everything they do.
I hope this helps a bit.

http://en.wikipedia.org/wiki/OSI_model
 
  • #3
cptstubing said:
It definitely will help you if you know something about the OSI model of communication
Ok. But how does a switch work? Everyone seems to have their own definition and mechanism gor switch.
 
  • #4
AdityaDev said:
Ok. But how does a switch work? Everyone seems to have their own definition and mechanism gor switch.

Think of a switch (layer 2 device) as a device that connects things on a network (hubs (layer 1 device) are too simple for that task nowadays). Switches know addresses of devices because they remember MAC addresses, and can transmit information from device to device, like a computer to a printer, computer to computer, etc.

A router (layer 3 device) will be attached to a switch, but the router connects everything to a WAN (ie. the internet) The internet needs at least a layer 3 device to talk to it.

If you run out ethernet ports to use on a router, you can buy a switch and connect it to one router port, and then share that one port with more devices that are connected to the switch.

Really, a switch is like a router, except the router connects to a WAN.

Does this help?
 
  • #5
One question.(my only question)
Does a switch transmit data to the required LAN segment or does it replicate the signal and send it to all LAN segments like a hub?
My book says it does and also says it doesn't :(
 
  • #6
Here is another pic. They say switch sends packets only to the target LAN. But they also state that switch sends packets to all LANs like HUB. Soon, I am going to get mad because of this confusion. Please help.
WP_20150320_23_02_47_Pro.jpg
 
  • #7
Here is another picture in the next page of the same book.
WP_20150320_23_07_24_Pro.jpg
 
  • #8
AdityaDev said:
One question.(my only question)
Does a switch transmit data to the required LAN segment or does it replicate the signal and send it to all LAN segments like a hub?
My book says it does and also says it doesn't :(

The book is correct, but a bit vague.

A basic switch will send data packets to all LAN segments, but they won't do what a hub does and keep sending to all devices/connections on that switch. The switch will not send data to all devices PAST itself.
So if you are a switch, and you receive packets from another switch, you will look to see if you have a matching address. If you don't, you'll ignore it. If you do, you will pass it on to the appropriate device.

Btw, it should say MAC address, not MAL address. There are a lot of spelling mistakes in that textbook.
 
  • #9
So you say that Switch does not send the packets to the appropriate segment. But look at the comparison given between hub and switch. It says it sends packets only to appropriate connections.
 
  • #10
Yes, it's correct because it doesn't send packets to each computer behind the switch, only the correct computer behind the switch.
It doesn't send packets to every single device on every single LAN segment. It sends to all LAN segments, but not every device on every LAN segment.
 
  • #11
cptstubing said:
Yes, it's correct because it doesn't send packets to each computer behind the switch, only the correct computer behind the switch.
It doesn't send packets to every single device on every single LAN segment. It sends to all LAN segments, but not every device on every LAN segment.
Switch sends signals to all LAN segments.
Switch stores the MAC address.
Once the signal reaches the LAN segment, then which device filters it?
It should know if the packets received belongs to its segment.
 
  • #12
AdityaDev said:
Switch sends signals to all LAN segments.
Switch stores the MAC address.
Once the signal reaches the LAN segment, then which device filters it?
It should know if the packets received belongs to its segment.

A switch only knows about the devices connected to it. (they OWN the devices, so to speak)
A switch doesn't know about devices connected to other switches. (computers and printers connected to other switches)

Example:
If a computer behind switch A wants to print to a printer that is behind switch F, switch A will need to send the request to all of the other switches it knows, so switches B, C, D, E, and F. Only the switch with that printer behind it will be able to act on the request. The other switches (B, C, D, E) will ignore the request.
 
  • Like
Likes AdityaDev
  • #13
AdityaDev said:
Does a switch transmit data to the required LAN segment or does it replicate the signal and send it to all LAN segments like a hub?
The answer is yes - and no.
When the switch is powered up for the first time, it does not know what devices are connected to its ports (it does, however know whether or not a powered-up device is connected to a port). Then a packet comes in on one of the ports. The switch does two things:
  1. It stores the sender address and the port number in a device list
  2. It then transmits the packet onto every port except the port it arrived on (this is called "flooding")
This behavior continues until a packet arrives where the destination address is already in the table. Then the switch "knows" what port the packet should be transmitted on and only transmits the packet on that port.

After a (short) while, the device list contains the address of all live devices in the system and does not need to use flooding anymore - with two exceptions:
  1. If a new device is powered on, the switch has to learn the address of that device in the same way
  2. The switch also has an internal clock. Every time a packet arrives, the clock value is stored together with the address and port number in the device list. Every minute (or so), the switch looks through the device list and deletes devices it has not heard from for a long time (2 - 5 minutes). This allows devices to be disconnected and reconnected somewhere else in the system.
 
  • Like
Likes AdityaDev
  • #14
Finally. Thank you @Svein and @cptstubing for helping me.
@cptstubing , sorry for troubling you with so many doubts. Now i know how a switch works. Thank you.
 
  • Like
Likes cptstubing

FAQ: Understanding the Function of Switches to LAN Traffic Management

1. What is the purpose of switches in a LAN?

Switches are devices used to connect multiple devices within a local area network (LAN). Their main purpose is to manage and direct traffic between devices, allowing for efficient communication and data transfer.

2. How do switches work?

Switches use a process called packet switching to receive, process, and forward data between devices in a LAN. They analyze the destination address of each data packet and determine the most efficient path for it to reach its destination.

3. What is the difference between a managed and unmanaged switch?

A managed switch allows for more control and customization of the network, such as setting up VLANs and implementing quality of service (QoS), while an unmanaged switch operates with default settings and does not offer as much flexibility.

4. What is VLAN and how is it related to switches?

VLAN (Virtual Local Area Network) is a network segmentation technique that allows for the creation of multiple virtual networks within a single physical network. Switches are used to separate and manage traffic between these different VLANs.

5. How can switches help with network security?

Switches have the ability to segment network traffic and isolate devices, making it more difficult for unauthorized users to access sensitive information. They can also be configured to monitor and filter traffic, preventing potential security threats from entering the network.

Similar threads

Back
Top