Different application scenarios between Router and Switch
Switch: Mainly used in internal core access, internal data exchange, and more commonly used in LAN.
Router: Es handelt sich um einen Netzanschluss, der hauptsächlich für die Zusammenschaltung mit den Betreibern zuständig ist und in der Regel für die Verbindung mit externen Netzen verwendet wird.
Beispielsweise kann es in einer Netzwerkumgebung Tausende von Switches geben, aber die Anzahl der in derselben Umgebung verwendeten Industrierouter liegt vielleicht nur im einstelligen Bereich. Mit anderen Worten: Wenn Sie von einem Bürogebäude zu einem Wohnheim kommunizieren wollen, brauchen Sie nur einen Switch zu verwenden; wenn Sie jedoch von einem Bürogebäude zu einer weit entfernten Werkstatt oder einem Fließband in einer Fabrik kommunizieren wollen, werden die meisten Router für die Fernkommunikation verwendet.
Verschiedene funktionale Unterschiede
Schalter: Seine Hauptfunktion ist der Austausch interner Daten und die Verwaltung von Subnetz-IP. Er hat nicht die Funktion, eine Verbindung zum externen Netz herzustellen;
Router: Durch die Funktion der Verbindung mit dem externen Netzwerk unterstützt er die Datenübertragung anderer Geräte, wie z. B. serielle Server oder SPS usw.

Usually routers have AP functions, firewalls, routing protocols, etc. Industrial routers have VPN private network tunnels to protect private data transmission. For example, this function is often used in the financial industry. Because routers are rich in functions, they are often used in traffic aggregation environments.
Normalerweise haben Switches diese Funktionen nicht, aber einige Switches haben auch Firewall-Funktionen, wie z. B. eine bestimmte Serie von Cisco.
Unterschiedliche Schnittstellenanforderungen
Schalter: Die meisten Switches werden für Ethernet-Ports, elektrische Ports, optische Ports usw. verwendet;
Router: hauptsächlich LAN-Anschluss oder WAN-Anschluss. Einige industrielle Szenarien erfordern auch einen seriellen RS232-Anschluss, z. B. USR-G800 V2.
In most cases, Routers are used in conjunction with switches. The Switch is responsible for managing the subnet and exchanging internal data, and the router is responsible for connecting to the external network. For example, the intelligent parking lot transmission solution: wireless networking is optional at the gate, and WAN 4G networking is optional indoors. The network connection is fast, the network is smooth and the data is complete. Remote management is more convenient. Accurately transmit parking space status data to create a comfortable parking experience.
Technical Principles Overview
The switch works at the data link layer and is primarily responsible for data forwarding within the LAN. It recognizes and processes data packets through the MAC address table to ensure that the data reaches the target device quickly. In the work of the switch, full-duplex communication technology is used so that multiple devices can exchange data at the same time. This reduces network conflicts and improves overall efficiency.
Routers, on the other hand, work at the network layer and are responsible for data transmission between different networks. Through IP addresses, routers are able to determine the best forwarding path to deliver packets accurately to their destinations. Routers are not only capable of connecting LANs to WANs, but also support Network Address Translation (NAT), which allows multiple devices to share a common IP address. In addition, routers support a variety of routing protocols and dynamically update routing information to ensure the efficient transmission of data in complex networks.

Working Together
In real-world network environments, switches and routers often work together to form an efficient network architecture. Switches are responsible for fast communication between devices on the LAN, while routers handle traffic from external networks. Through this collaboration, the network is able to achieve a stable and secure connection that meets the communication needs of different scenarios.


