Method and equipment for realizing forwarding table item resource expansion
By setting up a global virtual resource pool and virtual next-hop index in distributed devices, the problem of insufficient global next-hop index on the service board is solved, the expansion and synchronization of forwarding table resources is realized, and business stability is improved.
Patent Information
- Application Number
- CN202410872749.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-06-28
AI Technical Summary
In distributed devices, the global next hop index of the service board is insufficient, causing forwarding table entry synchronization to fail, affecting business stability.
Set up a global virtual resource pool with the total number of virtual next-hop indexes equal to the total number of next-hop indexes in the hardware global resource pool, apply for virtual next-hop indexes for software adjacency table entries, generate the longest prefix matching LPM table entry, and send it to the switching chip Synchronize the virtual next hop index and MAC address, and expand forwarding entry resources.
This avoids forwarding table synchronization failure caused by insufficient global next-hop index and improves business stability and resource utilization.
Smart Images

Figure CN118740720A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to communication technology, and more specifically to a method and device for implementing forwarding table resource expansion. Background Art
[0002] In a distributed device, the processor of the service board receives an ARP (Address Resolution Protocol) message or an ND (Neighbor Discovery) message sent by the switching chip, generates a software ARP table entry or a software ND table entry as a software adjacency table entry, and then applies for a global next hop index from the next hop resource pool of the service board to point to the MAC address of the Layer 3 interface corresponding to the IP address of the software adjacency table entry and the VLAN to which it belongs.
[0003] The processor of the service board configures LPM (Longest Prefix Match) entries for Layer 3 forwarding for each switching chip on the board, records the IP address, global next hop index, and outbound port in the software adjacency entry, and writes the MAC address of the Layer 3 interface corresponding to the IP address of the software adjacency entry and the VLAN to which it belongs in the storage location pointed to by the global next hop index of each switching chip.
[0004] In this way, when a switching chip on the service board searches for a matching LPM entry in the LPM table based on the destination IP address of the forwarded IP message, if the egress port is a port of another switching chip, the global next hop index and egress port in the found LPM entry are sent to the switching chip where the egress port is located; if the egress port is a local switching chip port, the MAC address of the Layer 3 interface and the VLAN to which it belongs are read according to the global next hop index of the LPM entry, the Ethernet header is re-encapsulated and forwarded through the port of the LPM entry.
[0005] However, the next-hop index of each service board in the distributed device is divided into a global next-hop index for unicast routing and a local next-hop index for multicast or some local services. The number of resources for the global next-hop index allocated based on the adjacency table entry is limited. When there is no available global next-hop index on a switching chip, the LPM table entry cannot be synchronized to it, resulting in packet loss and affecting service stability. Summary of the invention
[0006] The purpose of the present application is to provide a method and device for implementing forwarding table entry resource expansion, so as to avoid forwarding table entry synchronization failure caused by insufficient global next hop index of a switching chip.
[0007] To achieve the above-mentioned purpose, the present application provides a method for implementing forwarding table resource expansion, the method comprising: setting a global virtual resource pool; the total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; the first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool; obtaining the host IP address prefix, the MAC address of the next hop and the VLAN to which it belongs, and the egress port based on the software adjacency table item; applying for the virtual next hop index from the global virtual resource pool for the MAC address and the VLAN to which it belongs; when the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, generating the first longest prefix match LPM table item; wherein the host IP address prefix points to the virtual next hop index and the egress port; synchronizing the first LPM table item and the MAC address and the VLAN to which the next hop pointed to by the virtual next hop index to each switching chip.
[0008] To achieve the above-mentioned purpose, the present application also provides a device for implementing resource expansion of forwarding table items, which can be applied as a service board including a processor, a memory, and multiple switching chips; wherein the processor performs the following operations by running the processor executable instructions in the memory to set a global virtual resource pool; the total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; the first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool; based on the software adjacency table item, the host IP address prefix, the MAC address of the next hop and the VLAN to which it belongs, and the egress port are obtained; for the MAC address and the VLAN to which it belongs, a virtual next hop index is applied from the global virtual resource pool; when the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, a first longest prefix match LPM table item is generated; wherein the host IP address prefix points to the virtual next hop index and the egress port; the first LPM table item and the MAC address and the VLAN to which the virtual next hop index points to are synchronized to each switching chip. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A schematic diagram of an embodiment of a method for implementing forwarding table entry resource expansion provided by the present application;
[0010] Figure 2 A schematic diagram of synchronization of the longest prefix match table entry with a virtual next hop index provided by this application;
[0011] Figure 3 A schematic diagram of synchronization of the longest prefix match table entry with a local next hop index provided by this application;
[0012] Figure 4A schematic diagram of performing layer-3 unicast forwarding based on the longest prefix match table entry provided in this application;
[0013] Figure 5 A schematic diagram of an embodiment of a device for implementing forwarding table entry resource expansion provided by the present application. DETAILED DESCRIPTION
[0014] The present invention will be described in detail with multiple examples shown in multiple figures. In the following detailed description, multiple specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components and circuits are not described in detail in the examples to avoid making these examples difficult to understand.
[0015] Among the terms used, the term "include" means including but not limited to; the term "contain" means including but not limited to; the terms "above", "within" and "below" are inclusive of the number; the terms "greater than" and "less than" are exclusive of the number. The term "based on" means based on at least a part thereof.
[0016] Figure 1 A schematic diagram of an embodiment of a method for implementing forwarding table entry resource expansion provided by the present application; the method comprises:
[0017] Step 101, setting a global virtual resource pool;
[0018] The total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; the first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool;
[0019] Step 102, obtaining the host IP address prefix, the next hop MAC address and the VLAN to which it belongs, and the egress port based on the software adjacency table entry;
[0020] Step 103, applying for a virtual next hop index from the global virtual resource pool for the MAC address and VLAN of the next hop;
[0021] Step 104, when the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, generate a first longest prefix match LPM table entry;
[0022] Step 105: Synchronize the first LPM table entry and the MAC address and VLAN to which the next hop pointed to by the virtual next hop index to each switch chip.
[0023] Figure 2 A schematic diagram of synchronization of the longest prefix matching table entry with a virtual next hop index provided by the present application.
[0024] The switch chip 11 of the service board 1 receives the ARP message 201 from the terminal T1 through the port port a, and the switch chip 11 sends the ARP request message 201 to the processor 14 of the service board 1 .
[0025] The processor 14 is based on receiving an ARP request message 201, wherein the sender IP address is the IP address 10.1.1.7 of the VLAN100 layer 3 interface of port b, the sender MAC address is the MAC B of the VLAN100 layer 3 interface of port b; and the target IP address is the IP address 10.1.1 of port a.
[0026] The processor 14 learns the software ARP entry 202 based on the sender IP address 10.1.1.7, the sender MAC address MAC B, port a and the VLAN 100 to which port a belongs; that is, 10.1.1.7->(MAC B, VLAN 100), port a.
[0027] The processor 14 generates an ARP response message for the ARP request message 201, and sends the ARP response message to the switching chip 11 where porta is located according to the software ARP table entry 202; the switching chip 11 sends the ARP response message to the terminal T1, and the terminal T1 learns the ARP table entry; for the specific process, please refer to the ARP protocol principle, which will not be repeated in this application.
[0028] The memory (not shown) of the service board 1 records the global virtual resource pool 151. The total number of virtual next-hop indexes of the global virtual resource pool 151 is equal to the total number of next-hop indexes of the hardware global resource pool of the switching chips 11-13; the first n virtual next-hop indexes of the global virtual resource pool 151 correspond one-to-one to the first n global next-hop indexes of the hardware global resource pool of the switching chips 11-13.
[0029] The memory of the service board 1 records the chip local resource pool 152. The chip local resource pool 152 records the idle local next hop indexes of the switching chips 11, 12, and 13 respectively; the processor 14 searches the chip local resource pool 152 according to the switching chip identifier as the index.
[0030] Similarly, the memory (not shown) of the service board 2 records the global virtual resource pool 251. The total number of virtual next hop indexes of the global virtual resource pool 251 is equal to the total number of next hop indexes of the hardware global resource pools of the switching chips 21, 22, and 23; the first n virtual next hop indexes of the global virtual resource pool 251 correspond one-to-one to the first n global next hop indexes of the hardware global resource pools of the switching chips 21-23.
[0031] The memory of the service board 2 records the chip local resource pool 252. The chip local resource pool 252 records the idle local next hop indexes of the switching chips 21, 22, and 23; the processor 24 searches the local next hop index of each switching chip in the chip local resource pool 152 according to the switch chips 21, 22, and 23 being identified as indexes.
[0032] Processor 14 applies for virtual next-hop index n from global virtual resource pool 151 for MAC B and VLAN 100 of software ARP entry 202; that is, in software ARP entry 202, MAC B and VLAN 100 are the MAC address and VLAN of the next hop interface to IP address 10.1.1.7.
[0033] The processor 14 determines that the applied n virtual next hop indexes do not exceed the total number n of global next hop indexes in the hardware global resource pool.
[0034] The processor 14 sets the state of the virtual next-hop index n in the global virtual resource pool 151 to placeholder.
[0035] The processor 14 generates an LPM entry 203, that is, 10.1.1.7 / 32->virtual next-hop index n, porta. The processor 14 synchronizes the LPM entry 203 and the MAC B and VLAN 100 corresponding to the virtual next-hop index n to the switching chips 11, 12, and 13.
[0036] The switch chips 11, 12, and 13 each record the LPM entry 203 in the local LPM table, and record MAC B and VLAN 100 in the storage location pointed to by virtual next-hopindex n.
[0037] Processor 14 synchronizes the software ARP entry 202 and the virtual next-hop index virtualnext-hop index n to processor 24 via the inter-board CPU link.
[0038] The processor 24 determines, according to the index value of virtual next-hop index n, that the applied virtual next-hop index does not exceed the total number n of global next-hop indexes in the hardware global resource pool.
[0039] Processor 24 sets the state of virtual next-hop index n in global virtual resource pool 251 to placeholder. Processor 24 generates LPM table entry 203 according to synchronized software ARP table entry 202 and virtual next-hop index virtual next-hopindex n, i.e., 10.1.1.7 / 32->virtual next-hop index n, port a. Processor 24 synchronizes MAC B and VLAN 100 corresponding to LPM table entry 203 and virtual next-hop index n to switching chips 21, 22, and 23. Switching chips 21, 22, and 23 each record LPM table entry 203 in a local LPM table, and record MAC B and VLAN 100 in the storage location pointed to by virtual next-hopindex n.
[0040] Figure 3 A schematic diagram of synchronization of the longest prefix matching table entry with a local next hop index provided by the present application.
[0041] The switch chip 11 of the service board 1 receives the ARP message 301 from the terminal T2 through the port port a, and the switch chip 11 sends the ARP request message 301 to the processor 14 of the service board 1 .
[0042] The processor 14 is based on receiving an ARP request message 301, wherein the sending end IP address is the IP address 10.1.1.8 of the VLAN100 layer 3 interface of port c, the sending end MAC address is MAC C of the VLAN100 layer 3 interface of port c; the target end IP address is the IP address 10.1.1.7 of the VLAN100 of porta.
[0043] The processor 14 learns the software ARP entry 302 based on the sender IP address 10.1.1.8, the sender MAC address MAC C, port a and the corresponding VLAN 100; that is, 10.1.1.8->(MAC C, VLAN 100), port a.
[0044] The processor 14 generates an ARP response message for the ARP request message 301, and sends the ARP response message to the switch chip 11 where porta is located according to the software ARP table entry 302; the switch chip 11 sends the ARP response message to the terminal T2, and the terminal T2 learns the ARP table entry.
[0045] Processor 14 applies for virtual next-hop index n+1 from global virtual resource pool 151 for MAC C of software ARP entry 302 and VLAN 100 to which it belongs. According to index value index n+1, the total number of global next-hop indexes n is exceeded.
[0046] The processor 14 searches for the idle local next-hop index local next-hop index 11 of the switch chip 21 from the chip local resource pool 152, and generates an LPM entry 304, wherein 10.1.1.8 / 32->local next-hop index11, port a. The processor 14 synchronizes the LPM entry 304, the MAC C corresponding to the local next-hop index 11, and the VLAN 100 to the switch chip 11. The switch chip 11 records the LPM entry 304 in the local LPM table, and records the MAC C and the VLAN 100 in the storage location pointed to by the local next-hop index11.
[0047] The processor 14 searches for the idle local next-hop index local next-hop index 13 of the switch chip 22 from the chip local resource pool 152, and generates an LPM entry 305, wherein 10.1.1.8 / 32->local next-hop index13, port a. The processor 14 synchronizes the LPM entry 305, the MAC C corresponding to the local next-hop index 13, and the VLAN 100 to the switch chip 12. The switch chip 12 records the LPM entry 305 in the local LPM table, and records the MAC C and the VLAN 100 in the storage location pointed to by the local next-hop index13.
[0048] The processor 14 searches for the idle local next-hop index local next-hop index 17 of the switch chip 13 from the chip local resource pool 152, and generates an LPM entry 306, wherein 10.1.1.8 / 32->local next-hop index17, port a. The processor 14 synchronizes the LPM entry 306, the MAC C corresponding to the local next-hop index 17, and the VLAN 100 to the switch chip 13. The switch chip 13 records the LPM entry 306 in the local LPM table, and records the MAC C and the VLAN 100 in the storage location pointed to by the local next-hop index17.
[0049] Processor 14 synchronizes the software ARP entry 302 and the virtual next-hop index virtualnext-hop index n+1 to processor 24 via the inter-board CPU link.
[0050] The processor 24 determines, based on the index value of virtual next-hop index n+1, that the applied virtual next-hop index has exceeded the total number n of global next-hop indexes in the hardware global resource pool.
[0051] Processor 24 searches for the idle local next-hop index local next-hop index 1 of switch chip 21 from chip local resource pool 252, and generates LPM entry 306, where 10.1.1.8 / 32->local next-hop index1, port a. Processor 24 synchronizes LPM entry 306, MAC C corresponding to local next-hop index 1, and VLAN 100 to switch chip 21. Switch chip 21 records LPM entry 306 in the local LPM table, and records MAC C and VLAN 100 in the storage location pointed to by local next-hop index 1.
[0052] Processor 24 searches for the idle local next-hop index local next-hop index 3 of switch chip 22 from chip local resource pool 252, and generates LPM entry 307, where 10.1.1.8 / 32->local next-hop index3, port a. Processor 24 synchronizes LPM entry 307, MAC C corresponding to local next-hop index 3, and VLAN 100 to switch chip 22. Switch chip 22 records LPM entry 307 in the local LPM table, and records MAC C and VLAN 100 in the storage location pointed to by local next-hop index 3.
[0053] Processor 24 searches for the idle local next-hop index local next-hop index 7 of switch chip 23 from chip local resource pool 252, and generates LPM entry 308, where 10.1.1.8 / 32->local next-hop index7, port a. Processor 24 synchronizes LPM entry 308, MAC C corresponding to local next-hop index 7, and VLAN 100 to switch chip 23. Switch chip 23 records LPM entry 308 in the local LPM table, and records MAC C and VLAN 100 in the storage location pointed to by local next-hop index 7.
[0054] Figure 2-Figure 3 The embodiment takes the ARP request message as an example to illustrate the implementation process of synchronizing the LPM table entries. Figure 2-Figure 3 The service board of the distributed device shown in the figure generates an adjacency table entry based on the ARP response message or the ND message of the IPv6 protocol. Figure 2-Figure 3 In this way, the LPM table entries are synchronized to the switching chip according to the generated / synchronized adjacency table entries. Figure 4 A schematic diagram of performing three-layer unicast forwarding based on the longest prefix matching table entry provided in this application.
[0055] The switching chip 13 receives the Ethernet message 401 , finds that the destination MAC address of the Ethernet message 401 is a MAC address with layer 3 attributes, and performs layer 3 forwarding for the Ethernet message 401 .
[0056] The switch chip 13 searches the LPM table entry 203 according to the destination IP address 10.1.1.7 of the Ethernet message 401 , and determines that the next hop index Virtual Next-hop index n in the LBM table entry is the global next hop index; the egress port is located at the switch chip 11 .
[0057] Because the first n virtual next-hop indexes of the global virtual resource pool 151 correspond one-to-one to the first n global next-hop indexes of the hardware global resource pool, Virtual Next-hop index n is identified as the global next-hop index.
[0058] The switch chip 13 sends the Ethernet message 401 , the Virtual Next-hop index n, and the egress port port a to the switch chip 11 .
[0059] The switch chip 11 receives the Ethernet message 401, Virtual Next-hop index n, and the output port porta, and reads the next hop MAC B and VLAN 100 from the storage location pointed to by Virtual Next-hop index n. The switch chip 11 re-encapsulates the Ethernet header for the Ethernet message 401, where the source MAC address is MAC A, the destination MAC address is MAC B, and the VLAN is VLAN 100.
[0060] The switch chip 11 sends the re-encapsulated Ethernet message 4011 to the terminal T1 through port a. When the destination IP address of the Ethernet message received by other switch chips matches the LPM table entry 203, the same process is performed.
[0061] Figure 4 In the example, the switch chip 23 receives the Ethernet message 402 , finds that the destination MAC address of the Ethernet message 4021 is a MAC address with layer 3 attributes, and performs layer 3 forwarding for the Ethernet message 402 .
[0062] The switch chip 23 searches the LPM table entry 308 according to the destination IP address 10.1.1.8 of the Ethernet message 402 , and determines that the next hop index local Next-hop index 7 in the LBM table entry 308 is the local next hop index; the egress port port a is located at the switch chip 11 .
[0063] The switch chip 23 reads the next hop MAC C, VLAN 100 from the storage location pointed to by local Next-hop index 7. The switch chip 23 re-encapsulates the Ethernet header for the Ethernet message 402, wherein the source MAC address is the MAC address of the VLAN 100 layer 3 interface on the switch chip 23; the destination MAC address is MAC C, and the VLAN is VLAN 100.
[0064] The switch chip 23 sends the re-encapsulated Ethernet message 4021 to the switch chip 11 where the egress port porta is located through the inter-board chip link.
[0065] The switching chip 11 sends the re-encapsulated Ethernet message 4021 to the terminal T1 through port a.
[0066] Figure 2-Figure 4 In the embodiment, when the software ARP table entry on the processor 14 or 24 ages, the switch chip on the board is notified to delete the LPM table entry corresponding to the IP address in the ARP table entry.
[0067] Figure 5A schematic diagram of a device embodiment for implementing forwarding table resource expansion provided by the present application. The device can be applied as a service board including a processor, a memory, and multiple switching chips; wherein the processor performs the following operations by running the processor executable instructions in the memory to set a global virtual resource pool; the total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; the first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool; the host IP address prefix, the MAC address of the next hop, the VLAN to which it belongs, and the egress port are obtained based on the software adjacency table item; for the MAC address and the VLAN to which it belongs, a virtual next hop index is applied from the global virtual resource pool; when the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, the first longest prefix match LPM table item is generated; wherein the host IP address prefix points to the virtual next hop index and the egress port; the first LPM table item and the MAC address and the VLAN to which the next hop pointed to by the virtual next hop index are synchronized to each switching chip.
[0068] The processor also performs the following operations by running the storage instruction: when the total number of applied virtual next hops exceeds the total number of global next hop indexes in the hardware global resource pool; for the MAC address of the next hop and the VLAN to which it belongs, find an idle local next hop index of each switching chip; generate a second LPM table item for each switching chip; in each second LPM table item, the host IP address prefix points to the local next hop index and the egress port of each switching chip, and the local next hop index of each switching chip points to the MAC address of the next hop and the VLAN to which it belongs; synchronize each second LPM table item and its local next hop index to point to the MAC address of the next hop and the VLAN to which it belongs to each switching chip.
[0069] The processor performs the following operations by running the instructions: the table entry synchronization module is also used to delete the adjacency table entry that reaches the aging time; and notify each switching chip to delete the LPM table entry corresponding to the aged adjacency table entry.
[0070] Any one of the multiple switching chips can be used to determine whether to perform three-layer forwarding for a received Ethernet message; based on the next hop of the destination IP address of the Ethernet message, find the first LPM table entry; determine that the egress port of the first LPM table entry is located in other switching chips; and send the Ethernet message, the virtual next hop index and the egress port of the first LPM table entry to the switching chip where the egress port of the first LPM table entry is located.
[0071] Any of the multiple switching chips can be used for any switching chip to determine that three-layer forwarding is performed for a received Ethernet message; based on the next hop of the destination IP address of the Ethernet message, a second LPM table entry is found; it is determined that the egress port of the second LPM table entry is located in other switching chips; according to the next hop MAC and the VLAN to which it belongs of the second LPM table entry, the Ethernet message is re-encapsulated; and the re-encapsulated Ethernet message is sent to the switching chip where the egress port of the second LPM table entry is located.
[0072] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for implementing forwarding table resource expansion, characterized in that: The method comprises, Setting a global virtual resource pool; the total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; The first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool; Obtain the host IP address prefix, the next hop MAC address, the VLAN to which it belongs, and the egress port based on the software adjacency table entry; Applying for a virtual next hop index from the global virtual resource pool for the MAC address and VLAN of the next hop; When the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, a first longest prefix match LPM table entry is generated; wherein the host IP address prefix points to the virtual next hop index and the egress port; The first LPM table entry and the MAC address and the VLAN to which the next hop pointed to by the virtual next hop index are synchronized to each switching chip.
2. The method according to claim 1, characterized in that The method further comprises, When the total number of applied virtual next hops exceeds the total number of global next hop indexes in the hardware global resource pool; For the MAC address and VLAN of the next hop, find an idle local next hop index of each switch chip; Generate a second LPM table entry for each switching chip; in each second LPM table entry, the host IP address prefix points to the local next hop index of each switching chip and the egress port, and the local next hop index of each switching chip points to the MAC address of the next hop and the VLAN to which it belongs; Each second LPM table entry and its local next hop index pointing to the MAC address of the next hop and the VLAN to which it belongs are synchronized to each switching chip.
3. The method according to claim 1, characterized in that The method further comprises, Delete the adjacency table entries that have reached the aging time. Notify each switch chip to delete the LPM entry corresponding to the aged adjacency entry.
4. The method according to claim 1, characterized in that: The method further comprises, Any switching chip determines to perform layer 3 forwarding for the received Ethernet message; Find the first LPM table entry based on the next hop of the destination IP address of the Ethernet message; Determining that the first LPM table entry egress port is located in another switching chip; The Ethernet message, the virtual next hop index and the egress port of the first LPM table entry are sent to the switching chip where the egress port of the first LPM table entry is located.
5. The method according to claim 2, characterized in that: The method further comprises, Any switching chip determines to perform layer 3 forwarding for the received Ethernet message; Find the second LPM table entry based on the next hop of the destination IP address of the Ethernet message; Determining that the egress port of the second LPM table entry is located in another switching chip; Re-encapsulate the Ethernet message according to the next-hop MAC and the VLAN to which the second LPM table entry belongs; The re-encapsulated Ethernet message is sent to the switching chip where the egress port of the second LPM table entry is located.
6. A device for implementing forwarding table resource expansion, characterized in that: The device can be applied as a service board including a processor, a memory, and a plurality of switching chips; wherein the processor is used to perform the following operations by running the processor executable instructions in the memory: Setting a global virtual resource pool; the total number of virtual next hop indexes of the global virtual resource pool is equal to the total number of next hop indexes of the hardware global resource pool; the first n virtual next hop indexes of the global virtual resource pool correspond one-to-one to the n global next hop indexes of the hardware global resource pool; Obtain the host IP address prefix, the next hop MAC address, the VLAN to which it belongs, and the egress port based on the software adjacency table entry; Applying for a virtual next hop index from the global virtual resource pool for the MAC address and VLAN of the next hop; When the total number of applied virtual next hops does not exceed the total number of global next hop indexes in the hardware global resource pool, a first longest prefix match LPM table entry is generated; wherein the host IP address prefix points to the virtual next hop index and the egress port; The first LPM table entry and the MAC address and the VLAN to which the next hop pointed to by the virtual next hop index are synchronized to each switching chip.
7. The device according to claim 6, characterized in that The processor further performs the following operations by executing the storage instruction: When the total number of applied virtual next hops exceeds the total number of global next hop indexes in the hardware global resource pool; Find an idle local next hop index of each switch chip for the MAC address and VLAN of the next hop; Generate a second LPM table entry for each switching chip; in each second LPM table entry, the host IP address prefix points to the local next hop index of each switching chip and the egress port, and the local next hop index of each switching chip points to the MAC address of the next hop and the VLAN to which it belongs; Each second LPM table entry and its local next hop index pointing to the MAC address of the next hop and the VLAN to which it belongs are synchronized to each switching chip.
8. The device according to claim 6, characterized in that The processor executes the following operations by executing the instructions: The table entry synchronization module is also used to delete the adjacency table entries that have reached the aging time; and to notify each switching chip to delete the LPM table entries corresponding to the aged adjacency table entries.
9. The device according to claim 6, characterized in that Any of the plurality of switch chips may be used to determine to perform layer 3 forwarding for the received Ethernet message; and find the first LPM table entry based on a next hop of a destination IP address of the Ethernet message; Determining that the first LPM table entry egress port is located in another switching chip; The Ethernet message, the virtual next hop index and the egress port of the first LPM table entry are sent to the switching chip where the egress port of the first LPM table entry is located.
10. The device according to claim 7, characterized in that Any of the plurality of switching chips may be used for any of the switching chips to determine that a received Ethernet message is to be forwarded at layer 3; and based on a next hop of a destination IP address of the Ethernet message, the second LPM table entry is found; Determining that the egress port of the second LPM table entry is located in another switching chip; Re-encapsulate the Ethernet message according to the next-hop MAC and the VLAN to which the second LPM table entry belongs; The re-encapsulated Ethernet message is sent to the switching chip where the egress port of the second LPM table entry is located.
Citation Information
Patent Citations
Extended processing method, device and network equipment of routing table
CN102045254A
MAC (Media Access Control) address synchronization method for distributed data communication device
CN106790703A
Table entry maintenance method and device for switch chip
CN109639581A
Message forwarding method and equipment
CN115484206A
Message forwarding method and device in VXLAN (Virtual eXtensible Local Area Network), computer equipment and storage medium
CN116743681A
