Differences between a switch and a router Differences between a switch and a router

Router Features

A router is a multi-port device that can connect lans and Wans with different transmission rates and operate in a variety of environments. It can also use different protocols. Routers belong to the third layer of the OSI model, the network layer. It guides the transfer of data from one network segment to another, as well as the transfer of data from one network to another.

First, network interconnection: the router supports all kinds of LAN and WAN interfaces, mainly used to interconnect LAN and WAN, realize different networks communicate with each other;

Second, data processing: provides functions including packet filtering, packet forwarding, priority, reuse, encryption, compression and firewall.

Third, network management: the router provides functions such as router configuration management, performance management, fault tolerance management and flow control.

"Routing", refers to send data from one place to another place behavior and actions of the Router, to perform the actions of the machine, its English name for the Router, is a kind of connecting multiple network or segment of the network equipment, it can data between different networks or network segment information to "translate", To enable them to "read" each other's data, thus forming a larger network.

A router also functions as a switch. What if you already have a router and want to use it as a switch? Very simple, there is wan interface on the router, broadband lines are connected to the WAN interface, when the router is used as a switch, unplug the broadband line on the WAN interface, plug into other interfaces, wan empty up.

This picture is provided by registered user "Whimsical", feedback of copyright statement

Differences between a switch and a router Differences between a switch and a router

What is a switch

A Switch is a network device that encapsulates and forwards data packets based on MAC (hardware address of a network adapter) identification. A switch can "learn" MAC addresses and store them in an internal address table, allowing frames to travel directly from the source address to the destination address by establishing a temporary switching path between the originator and the intended recipient. Switches are now classified into layer 2 switches, layer 3 switches, or higher-level switches. Layer-3 switches can also have routing functions and have faster forwarding rates than low-end routers. Its main characteristics are: one route, multiple forwarding.

What is the difference between a switch and a router

(1) Different levels of work

While the original switches worked at the OSI/RM open architecture's data link layer, or Layer 2, routers were originally designed to work at the OSI model's network layer. Because the switch works at the second layer of OSI (data link layer), its working principle is relatively simple, while the router works at the third layer of OSI (network layer), so more protocol information can be obtained and the router can make more intelligent forwarding decisions.

(2) Data forwarding is based on different objects

A switch uses a physical address or MAC address to determine the destination address for forwarding data. Routers use the IDS (IP addresses) of different networks to determine which addresses to forward data to. IP addresses are implemented in software and describe the network where the device resides. Sometimes these layer 3 addresses are also called protocol addresses or network addresses. MAC addresses are usually embedded in the hardware, assigned by the network adapter manufacturer, and have been solidified into the network adapter. Generally speaking, they cannot be changed. IP addresses are usually assigned automatically by network administrators or systems.

(3) Traditional switches can only split conflict domains, but not broadcast domains; Routers can split broadcast domains

The network segments connected by the switch still belong to the same broadcast domain. Broadcast packets are transmitted on all the network segments connected by the switch, causing traffic congestion and security vulnerabilities in some cases. Network segments connected to routers are assigned different broadcast domains, and broadcast data does not pass through routers. Although switches above layer 3 have the VLAN function and can split broadcast domains, they cannot communicate with each other. Routers are still needed for communication between them.

(4) Router provides the service of firewall

A router can prevent broadcast storms by forwarding only packets to specific addresses, not packets that do not support routing protocols and packets from unknown network destinations.

Switches are generally used for LAN-WAN connections. As a bridge, switches are devices at the data link layer. Some switches can also implement layer 3 switching. A router is used for the wan-WAN connection, forwarding packets between opposite networks, and acting on the network layer. They simply accept packets of input from one line and forward them to the other. The two lines may belong to different networks and use different protocols. Comparatively speaking, the function of router is more powerful than that of switch, but the speed is relatively slow and the price is expensive. Layer 3 switch has both the packet forwarding capability of switch line speed and the good control function of router, so it is widely used.

Leave a Comment