Control Network Newsletter

Newsletter Archives

Ethernet Routers Versus Switches

What's the difference between a router and a switch when networking Ethernet devices? Which do I need? These are very good questions. A switch is typically used to communicate between devices on the same subnet and a router is used to communicate between different subnets. First, some background information. A networked device utilizes two addresses. The Internet Protocol address (IPv4) is a 32-bit address expressed in 4 bytes in decimal format with dots (periods) between each byte (such as 10.0.0.1 or 192.168.0.1). The Media Access Control address (MAC) is a 48-bit address expressed in six bytes in hexadecimal format with colons ( : ) or dashes ( - ) between bytes (such as 00:50:DB:00:00:01). In a snail mail analogy, think of a network as a post office, where the IPv4 address is your house number and the MAC address is your name. So, how does this impact a router versus a switch? The router and switch may look similar, they may have multiple Ethernet ports, but what they do is very different.

What is a Router?

A router is a networking device that connects subnets, for example, connecting an office network with the Internet. Routers are the workhorses that transfer packets of data between networks to establish and sustain communication between two nodes in an internetwork.

A router works at the IP level and blocks broadcasts. It allows devices which are on different IP subnets to communicate. For example, consider a subnet with devices at 192.168.92.68 and 192.168.92.69 on the same subnet. A device at 10.0.0.1 is on a different subnet. A switch would usually be used to communicate between 192.168.92.68 and 192.168.92.69 and a router would be used to communicate between 192.168.92.68 and 10.0.0.1.

How does this happen? An IP device, at 192.168.92.68, will decide that it needs to talk to 10.0.0.1. It will realize that this IP address is outside of its IP range (based on its subnet mask). It will then pass this request onto its default IP gateway. That gateway is an IP router. The router should know how to reach the device at 10.0.0.1 and will pass the message onto this device or onto another router that can reach 10.0.0.1.

There are IP routers with firewalls (NAT routers) and those without. NAT routers typically get you to the Internet and change IP addresses when messages pass through them. Routers can also include VPN capability to provide secure remote Internet access. We offer a wide variety of routers, featuring both wired and wireless connections.

What is a Switch?

A switch connects devices together on a single subnet. Switches use MAC addresses to forward data to the correct destination.

The switch works at the Ethernet level and passes all broadcasts. When a device in the same IP subnet wishes to communicate, say 192.168.92.68 to 192.168.92.69, then the first device will utilize the Address Resolution Protocol (ARP) to identify the second device. This provides the MAC address of the other device, for example 00:50:DB:00:00:02. In this case the first device, whose MAC address is 00:50:DB:00:00:01 will communicate to the second device using Ethernet messages. The switches forward these messages and provide communication optimization by learning the ports which have these devices connected so that they only pass the message onto the appropriate port (otherwise all ports will receive the message).

We offer a variety managed, unmanaged, and diagnostic switches, including some with fiber optics for longer distances between nodes. There are also managed switches that can provide redundancy features, diagnostic features (SNMP), static address tables (static port settings), broadcast storm control (to limit the effect of too much broadcast traffic), and more.

Visit our CTRLink product line to learn more about our Ethernet solutions. For those seeking a more in-depth discussion on this topic, refer to Essentials: Understanding Ethernet Switches and Routers.

 

Previous Story Next Story