what do network switches do

634 views

what do network switches do

In: Technology

6 Answers

Anonymous 0 Comments

Suppose you want to connect a bunch of computers together. There have been many ways of doing it.

You can have a single cable, with taps on it for each computer. You string a long cable through an office, and then attach connectors at the right places. Cheap cabling-wise, but very inconvenient. If the one cable breaks, lots of people have trouble. And you can’t really move equipment around easily.

You can have a ring. Each computer has an input and an output that plugs into the next computer on the line. This also has issues, every computer on the line has to work properly, or the network breaks.

Or, you can connect computers to a central point. That’s what a switch is for. Each computer connects to the switch and the switch connects to everything. So when computer 1 wants to talk to computer 20 the connection goes 1 -> switch -> 20.

Anonymous 0 Comments

Switches are used to route traffic based on the packets destination IP address, so it can send the traffic directly to the device or network segment on a specific port. This is more efficient than a dumb hub which just repeats all traffic to the connected devices on the physical layer, but since the switch needs to know where to route packets, it generally requires additional configuration.

You also have a router which works directly with the packets contents to deal with things like firewall, filtering, forwarding, and other things that require you to know more about the content than just the sender/recipient address.

A good resource with pics: https://medium.com/@fiberstoreorenda/do-you-know-the-difference-between-hub-switch-router-b74c2e8a8143

Anonymous 0 Comments

The basic principle behind a local area network is that any data packet sent out on the network should be delivered to all other computers connected to the network and they will then filter the packets based on the destination address. This is how early network equipment worked. The problem is that this is not very efficient as a single link can quickly become satturated with data packets that is just being discarded on the other end.

The solution to this is to install network switches which try to make smarter decisions about where to send the data packets. The general rule is still to send out all packets on every link, however if the switch knows where the destination is then it will only send the package in that direction. This means that the network links can be used more efficiently increasing bandwidth in the network.

Further on switches will now usually switch not only based on the address of the data package but also on a virtual LAN tag configured on each port. This means that a single switch can act as multiple switches on different networks and that a single computer might have multiple virtual network interfaces on different networks using a single physical link to the switch.

Anonymous 0 Comments

Network switches direct traffic to devices. Without network switches, traffic is sent to all devices, causing congestion if many devices try to send data at the same time. Network switches know the addresses of each device and only send data to the device which is supposed to receive the data.

Anonymous 0 Comments

A network switch makes sure that a layer-2 data packet is sent to the target destination. There are 7 layers in total, and a switch operates on the 2nd layer. In order to understand what this means you’ll need a bit of context.

Devices communicate by means of electromagnetic current “traveling” through a medium such as a wire. This is the simplest form of communication: you put current on the wire and everything connected to the wire will be able to “see” this. This is layer 1. Most commonly known hardware component is a hub, e.g. a USB hub.

In layer 2 we agree on a language with which we put current on the wire. For example, you could use Morse code to signal a message across the wire. Think of it as sending a letter to someone: you write your message using letters on a piece of paper, you put it in an envelope and write the destination address on the front, and your address on the back. This is exactly how layer 2 works. The letter is the payload and the envelope the metadata. There is also some message sequence and error correction info present in case an error would occur on layer 1 (e.g. communication is interrupted).

A switch’s job is to make sure that a data packet is received by the target destination, not by other clients. A switch usually is clever enough to know on which wire a destination is located. It might keep this information in memory so that it is not required to broadcast each packet over all connected wires.

At this point you could wonder why on earth we need a layer 3. Well, that’s because the MAC layer is a good candidate for local networks, aka intranets. It is very efficient and loses minimal cycles on overhead. When you have many of these intranets you might want to connect them and create an internet, but you’ll need additional features to ensure stable and performant communications. That’s where routers come into play. A router is also a switch, but it provides more functionality such as: a firewall, port forwarding, NAT, etc. But this is out of scope here.

Higher levels do not necessarily require specific hardware components, but they could. Layer 7 is what is called the “Application” layer. Sometimes routers provide features to block certain outgoing addresses, this can be done on Layer 7, e.g. in case you would like to restrict access to a specific website.

If you are in a store and unsure whether or not to buy a switch or a router, then you’ll probably need a router.

Anonymous 0 Comments

It connects many computers to each other.

Every computer has a cable that goes to a port on the switch, and it can only sends and receive messages to and from the switch.

A computer sends a message to the switch telling it what other computer it’s intended to reach, the switch has a list of every computer connected to it and send the message to the correct one.