Method for realizing three-layer routing communication according to ACL module
By using the ACL module in the layer 2 managed switch to realize layer 3 routing communication, it solves the problem that the layer 2 switch does not support cross-network segment communication, improves the ease of use and stability, reduces the operating cost, and realizes layer 3 routing. Communication function.
Patent Information
- Application Number
- CN202410835617.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-01
AI Technical Summary
Existing Layer 2 managed switches do not support cross-network segment communication and need to be networked with routers, resulting in high maintenance and operation costs. They do not support simple routing functions, which limits the realization of cross-network segment communication.
Implement Layer 3 routing communication through the ACL module. Specific steps include creating interface IP address entries, host routing table entries and network segment routing table entries, configuring Layer 3 and Layer 2 entries, associating interface MAC addresses with routing indexes, and delivering related field to the ACL module, and set the priority to implement Layer 3 routing and forwarding at the software level.
It improves the ease of use and network stability of the switch, reduces deployment work and operating costs, and realizes the function of three-layer routing communication without the need for a router to join the network.
Smart Images

Figure CN118740719A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network communication, and in particular to a method for realizing three-layer routing communication according to an ACL module. Background Art
[0002] Users have increasingly diverse demands for managed switches, and cross-segment communication is a relatively important function. Currently, common Layer 2 managed switches can only control communication within the LAN and do not support simple routing functions. Currently, Layer 2 managed switches support cross-segment communication, which requires a Layer 2 managed switch and a router to form a network to implement this solution. The cost of a Layer 3 managed switch is greater than this solution, which is not conducive to customer needs.
[0003] In the current cross-segment communication scenario, Layer 2 managed switches are used as access devices. Access devices belong to different network segments and need to interact with each other through business messages. Routers are needed to establish connections through routing to communicate business messages across network segments. As shown in the network deployment diagram 1, switches that do not support routing need to use routers to communicate across networks during network deployment, which increases maintenance and operation costs. Layer 2 managed switches do not support simple routing, and their limitation is that they do not support cross-segment communication. Summary of the invention
[0004] The present invention provides a method for realizing three-layer routing communication according to an ACL module, aiming at realizing a cross-network communication solution of a two-layer management switch by software when a switching chip does not support a routing function.
[0005] The present invention provides a method for implementing three-layer routing communication according to an ACL module, comprising the following steps:
[0006] S1. Create a Layer 3 interface and record the interface index and interface MAC address;
[0007] S2. Create an interface IP address table entry, configure the Layer 3 table entry and the Layer 2 table entry in turn, send the interface IP address, mask, action TRAP CPU, and unicast route fields to the ACL module, set the priority to low, and record the interface IP address table entry information;
[0008] S3. Create host routing table entries, configure Layer 3 entries and Layer 2 entries in sequence, send the fields including host IP address, mask, action hardware forwarding, and dynamic unicast routing to the ACL module, set the priority to high, and record the host routing table entry information;
[0009] S4. Create a network segment routing table entry, configure the three-layer table entry and the two-layer table entry in sequence, send the fields including the host IP address, mask, and dynamic unicast route to the ACL module and set the priority to low, and record the network segment routing table entry information.
[0010] As a further improvement of the present invention, in the step S2 of creating the interface IP address table entry, configuring the layer-3 table entry includes: associating the interface MAC address with the routing index.
[0011] As a further improvement of the present invention, in the step S2 interface IP address table entry creation, configuring the second-layer table entry includes: associating the interface MAC address with the second-layer table entry next hop flag and routing index and obtaining the ACL module unicast routing index, and recording the next hop related information.
[0012] As a further improvement of the present invention, in the step S3 of creating the network segment route, configuring the three-layer table entry includes: associating the host MAC address with the route index.
[0013] As a further improvement of the present invention, in the step S3 of creating the network segment route, configuring the layer 2 table entry includes: associating the host MAC address with the layer 2 table entry next hop flag and routing index and obtaining the ACL module unicast routing index, and recording the next hop related information.
[0014] As a further improvement of the present invention, in the step S4 of creating the network segment routing table entry, configuring the three-layer table entry includes: associating the host MAC address with the routing index.
[0015] As a further improvement of the present invention, in the step S4 of creating the network segment routing table entry, configuring the layer 2 table entry includes: associating the host MAC address with the layer 2 table entry next hop flag and routing index and obtaining the ACL module unicast routing index, and recording the next hop related information.
[0016] As a further improvement of the present invention, in step S1, when a three-layer interface is created, it is first determined whether an interface IP address table entry is to be created. If an interface IP address table entry is to be created, step S2 is executed. Otherwise, it is continued to be determined whether a host routing table entry is to be created. If a host routing table entry is to be created, step S3 is executed. Otherwise, step S4 is executed.
[0017] The beneficial effects of the present invention are: the method improves the usability of the switch and reduces the learning cost; when building a network system and constructing a network structure, it can reduce deployment work and reduce operating costs; at the same time, it also improves the stability of the network environment, and does not require the addition of a router to achieve three-layer routing communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 It is a network deployment diagram when a Layer 2 managed switch is used as an access device in the prior art;
[0019] Figure 2 It is a network deployment diagram of three-layer routing communication in the present invention;
[0020] Figure 3 The present invention is a flow chart of a method for implementing a three-layer routing communication method according to an ACL module. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0022] The present invention proposes a method for realizing three-layer routing forwarding by software according to an ACL module, and the network deployment based on the method is as follows: Figure 2 As shown. Figure 3 , the specific steps of this method include:
[0023] S1. First, create a Layer 3 interface and record the interface index and interface MAC address.
[0024] When creating a Layer 3 interface, first determine whether to create an interface IP address table entry. If so, execute step S2. If not, continue to determine whether to create a host routing table entry. If so, execute step S3. If not, execute step S4.
[0025] S2. Create the interface IP address table entry, configure the Layer 3 table entry, associate the interface MAC address with the route index; configure the Layer 2 table entry, associate the interface MAC address with the Layer 2 table entry next hop flag and route index, obtain the ACL module unicast route index, and record the next hop related information; send the interface IP address, mask, action TRAP CPU, unicast route and other fields to the ACL module and set the priority to low, and record the interface IP address table entry information. After the IP table entry is successfully created, the interface IP address table entry information will be automatically recorded.
[0026] S3. Create host routing table entries, configure layer 3 entries, associate the host MAC address with the routing index; configure layer 2 entries, associate the host MAC address with the layer 2 entry next hop flag and routing index, obtain the ACL module unicast routing index, and record the next hop related information; send the host IP address, mask, action hardware forwarding, unicast routing and other fields to the ACL module and set the priority to high, and record the host routing table information. After the host routing table entry is successfully created, the interface IP address table information will be automatically recorded.
[0027] S4. Create a network segment routing table entry, configure the third-layer table entry, associate the host MAC address with the routing index; configure the second-layer table entry, associate the host MAC address with the second-layer table entry next-hop flag and routing index and obtain the unicast routing index of the ACL module, and record the next-hop related information; send the host IP address, mask, dynamic unicast routing and other fields to the ACL module and set the priority to low, and record the network segment routing table entry information.
[0028] The relevant information of ACL module, Layer 2 entry, and Layer 3 entry is as follows:
[0029] ACL module:
[0030] Function: Unicast routing type and routing table entry characteristics.
[0031] Part of the content is as follows:
[0032]
[0033] The unicast routing communication status can be learned based on the type, forwarding control, priority, and function.
[0034] Layer 2 entries:
[0035] Function: All fields and functions of the second-layer table items.
[0036] Some of the contents are shown in the following table:
[0037]
[0038] Layer 3 entries:
[0039] Function: Layer 3 table entry interface and function.
[0040] Some of the contents are shown in the following table:
[0041]
[0042] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.
Claims
1. A method for implementing three-layer routing communication based on an ACL module, characterized in that: The following steps are involved: S1. Create a Layer 3 interface and record the interface index and interface MAC address; S2. Create an interface IP address table entry, configure the Layer 3 table entry and the Layer 2 table entry in turn, send the interface IP address, mask, action TRAP CPU, and unicast route fields to the ACL module, set the priority to low, and record the interface IP address table entry information; S3. Create host routing table entries, configure Layer 3 entries and Layer 2 entries in sequence, send the fields including host IP address, mask, action hardware forwarding, and dynamic unicast routing to the ACL module, set the priority to high, and record the host routing table entry information; S4. Create a network segment routing table entry, configure the three-layer table entry and the two-layer table entry in sequence, send the fields including the host IP address, mask, and dynamic unicast route to the ACL module and set the priority to low, and record the network segment routing table entry information.
2. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S2 of creating the interface IP address table entry, configuring the layer 3 table entry includes associating the interface MAC address with the routing index.
3. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S2 of creating the interface IP address table entry, configuring the layer 2 table entry includes: associating the interface MAC address with the layer 2 table entry next hop flag and routing index and obtaining the ACL module unicast routing index, and recording the next hop related information.
4. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S3 of creating the network segment route, configuring the three-layer table entry includes: associating the host MAC address with the route index.
5. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S3 of creating the network segment route, configuring the layer 2 table entry includes: associating the host MAC address with the layer 2 table entry next hop flag and the route index and obtaining the ACL module unicast route index, and recording the next hop related information.
6. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S4 of creating the network segment routing table entry, configuring the layer 3 table entry includes associating the host MAC address with the routing index.
7. The method for implementing three-layer routing communication based on the ACL module according to claim 1, characterized in that: In the step S4 of creating the network segment routing table entry, configuring the layer 2 table entry includes: associating the host MAC address with the layer 2 table entry next hop flag and routing index and obtaining the ACL module unicast routing index, and recording the next hop related information.
8. The method for implementing layer 3 routing communication based on the ACL module according to claim 1, characterized in that: In step S1, when a layer 3 interface is created, first determine whether to create an interface IP address table entry. If so, execute step S2. Otherwise, continue to determine whether to create a host routing table entry. If so, execute step S3. Otherwise, execute step S4.
