In simple terms, a router is a device that enables network interconnection with routing and forwarding functions. Additionally, it can adapt subnet speeds, isolate subnets, and define access rules.
Definition: A router is a device that enables network interconnection and operates at the third layer of the OSI model—the network layer. It provides two key mechanisms: routing and forwarding.
Routing: Determines the path a data packet takes from the source to the destination (the optimal transmission path between hosts). This process is called routing.
Forwarding: Transfers data packets from the router’s input port to the appropriate output port (this happens internally within the router).
02. Typical Router Structure
(Note: The diagram mentioned in the original text is not included here.)
03. How a Router Works
Routing (Software, Control Layer):
The routing protocol selects and generates routing entries, which are added to the routing table.
The routing table is mapped into the forwarding engine in memory and stored in the cache area of the ASIC chip.
Packet Forwarding (Hardware, Data Layer):
After the data link layer removes the frame header and trailer, the packet is sent to the network layer.
The network layer uses the IP header’s key fields to search the forwarding table and determine the output interface.
04. Hardware Routing Forwarding Table
The hardware routing forwarding table can be searched within a single clock cycle, regardless of its size.
CAM Table:
Performs binary matching (1 or 0). It either fully matches or does not match at all.
Used for MAC address lookups.
TCAM Forwarding Table:
Performs ternary matching (0, 1, or “don’t care”).
Sorted from precise to imprecise matches.
Used for routing table policies, routing matches, firewalls, and routing rule matching.
05. NP (Network Processor) Chip
The NP chip is programmable and can accelerate hardware processing for multiple services simultaneously. Before its introduction, routers were specialized devices. With the NP chip, all-service routers became possible.
Advantages of NP over ASIC:
Higher Performance: Integrates dozens of CPUs, hardware co-processors, and accelerators. Even with complex QoS functions like congestion management and queue scheduling, it can still achieve line-speed forwarding (“hard forwarding”).
Greater Flexibility: Programmable user interfaces allow for flexible expansion.
Strong Service Support: Quickly supports new value-added services (e.g., MPLS, QoS, multicast).
Convenient Management and Development: Significantly shortens the secondary development cycle.
IPv6 Compatibility: Reserved IPv6 interfaces allow for smooth software upgrades.
High Reliability: Chips undergo rigorous fatigue testing before production, making them suitable for telecom-grade equipment development.
06. Multi-Stage Switching Structure Routers
A multi-stage switching structure consists of multiple interconnected switching units. Each switching unit has a complete set of input and output interfaces, similar to a standard switch, providing input-output connections.
07. Cluster Routers
Cluster routers are composed of multiple router nodes, including several routing entities and switching entities.
The switching structure aggregates multiple switching structures, offering a distributed architecture that meets performance, scalability, and size requirements.
It includes multiple control nodes with routing computation capabilities, enabling distributed implementation of routing and control protocols.
The cluster router architecture is considered the next-generation high-performance router architecture that aligns with the needs of internet development.
As the name suggests, network packet loss refers to the situation where some data packets fail to successfully transmit from the source address to the destination address during data transmission, getting "lost" or "discarded" midway.
In various industrial application scenarios, efficiently collecting and analyzing data is a critical challenge facing industrial enterprises today. How can collected data be utilized effectively? In the search for reliable solutions, IoT cloud pla...
In the global industrial communication sector, 3G technology was once a core wireless data transmission solution. However, with the rapid adoption of 4G LTE and 5G, the market share of 3G industrial routers has significantly declined in recent years.
The Controller Area Network (CAN) is a field bus technology developed by Bosch, essentially a serial asynchronous communication bus. It is widely used in automotive electronic control systems and industrial control scenarios.