Method for realizing source address route dynamic selection and flow optimization based on VRF

Through the combination of VRF technology and IP routing rules, dynamic routing and traffic optimization based on source addresses are realized, and the problems of limiting the number of routing tables, management complexity and insufficient performance in the existing technology are solved, which significantly improves the flexibility, scalability and management efficiency of the network.

CN119766725APending Publication Date: 2025-04-04SUZHOU MAXNET NETWORK SECURITY TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411971027.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art is difficult to implement refined traffic management based on source addresses in multi-path or complex network environments, with limited number of routing tables, complex configuration and management, insufficient performance and scalability, and lack flexible dynamic adjustment capabilities.

Method used

Through VRF technology, combined with IP routing rules, dynamic routing and traffic optimization based on source addresses are realized. The specific steps include receiving IP messages, grouping through the IP rule engine and matching the VRF instance, the VRF instance selects the best route based on the IP destination address, and sending messages through the bound network card interface.

Benefits of technology

It realizes flexible dynamic routing, breaks through the limit on the number of routing tables, enhances the scalability of the network, simplifies management and configuration, optimizes network performance and resource utilization, and responds to network topology changes in real time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119766725A_ABST
    Figure CN119766725A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing source address route dynamic selection and flow optimization based on a VRF (Very Radio Frequency), which comprises the following steps of: guiding flow to different VRF instances based on conditions such as a source address and the like, and realizing accurate routing and isolation of IP (Internet Protocol) flow of different source addresses by configuring strategies and rules on network equipment. The requirements of multi-hosting and multi-path networks in environments such as enterprise networks are met, and the security and independence of data are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method and device for processing data in a computer network, in particular to a method for realizing dynamic selection of source address routing and flow optimization based on VRF. Background Art

[0002] For a particular computer to communicate with other computers or web servers in a network (such as the Internet), the particular computer must have a unique IP address. There are two versions of IP addresses: IPv4 and IPv6. An IPv4 address is represented by a 32-bit binary number, usually displayed in dotted decimal notation between four decimal numbers (0-255), such as 192.168.1.1. An IPv6 address is represented by a 128-bit binary number, usually represented by 8 groups of hexadecimal numbers, such as 2001:0db8:85a3:0000:0000:8a2e:0370:7334. IP addresses are used in the network to determine the sending and receiving devices of data packets so that communication between different networks can proceed correctly.

[0003] Routing refers to the process of transferring data packets from the source address to the destination address in a computer network. This process is usually implemented through one or more network devices (such as routers). The router will select the best path based on the routing table in the network and gradually transmit the data packet to the destination. The routing table contains the IP addresses of different network segments and their corresponding next-hop addresses or interface information, helping the router decide which path the data packet should be forwarded through. The choice of route can be based on a variety of factors, such as the number of hops, bandwidth, latency, etc., to achieve the most efficient network traffic management and resource utilization.

[0004] like Figure 1 As shown in Figure 1, traditional routers rely on the destination address of the data packet for routing selection. After receiving the data packet, the router will look up the routing table and determine the forwarding path based on the destination IP address of the data packet. However, this method cannot achieve refined traffic management based on the source address, especially in multi-host devices and multi-path environments, and it is difficult to meet the needs of dynamic adjustment and complex traffic control.

[0005] Disadvantages of existing technology: 1. Limitation of the number of routing tables. In traditional networks, each device can only create up to 255 routing tables, which cannot meet the needs of multi-path or complex network environments. Especially in multi-host and multi-tenant scenarios, this limitation greatly affects the flexibility and scalability of the network.

[0006] 2. Complex configuration and management. As the scale of the network expands, managing a large number of routing tables and policies becomes complex and error-prone. The management task of multi-path and multi-host networks increases the difficulty of network operation and maintenance, and traditional dynamic routing protocols cannot solve the limitation of the number of routing tables.

[0007] 3. Performance and scalability issues. As the network scales up, the processing capacity of routers will be limited. When faced with growing routing tables and complex traffic, traditional routing technology may encounter performance bottlenecks and find it difficult to support dynamic adjustment and multi-path optimization.

[0008] 4. Lack of flexible dynamic adjustment capabilities. Existing routing technologies cannot quickly respond and adjust routing paths when faced with changes in network topology. Although policy routing can achieve certain source address control, it is limited by the number of routing tables and is difficult to cope with changes in dynamic network environments.

[0009] Prior art CN200480011093 discloses a method for processing shared services through virtual routing forwarding table (VRF) cognition NAT, providing services and management for multiple VPNs, and realizing service isolation and sharing in a multi-tenant environment through NAT and MPLS labels. This technology realizes data flow isolation between different VPNs through the combination of VRF and NAT, relies on MPLS labels and NAT translation tables to identify routes, has weak dynamic adjustment capabilities, and processes traffic based on fixed configurations, without a flexible routing decision mechanism. Summary of the invention

[0010] The purpose of the present invention is to solve the above problems existing in the prior art and to provide a method for realizing dynamic selection of source address routing and traffic optimization based on VRF, which can flexibly change the routing strategy.

[0011] The purpose of the present invention is achieved through the following technical solutions: A method for implementing dynamic source address routing selection and traffic optimization based on VRF, comprising the following steps: S1, receiving IP packets through the physical network interface; S2. Grouping the IP packets through an IP rule engine, wherein the grouping process is to use the IP source address of the IP packet as a key field and allocate a source address route corresponding thereto; and matching the grouping to a corresponding VRF instance; S3. After the matching is completed, the IP message is directed to the corresponding VRF instance for processing, and the VRF instance selects the best route in the virtual routing table according to the IP destination address; S4. Send the IP message under the optimal route through the network card interface bound to the VRF instance.

[0012] Preferably, before step S1, a preparation step 1 is also included, in which multiple VRF instances are created according to different traffic requirements or different client users, and each VRF instance is bound to a network card interface, wherein each VRF instance corresponds to an independent virtual routing table, which stores all routing entries related to the VRF instance. A preparation step 2 is also included, in which the IP routing rules of the IP rule engine are configured, and the configuration basis is the IP source address and the protocol type.

[0013] Preferably, the IP rule engine accepts dynamic adjustment of IP routing rules and VRF instances according to changes in network traffic, and the basis of the dynamic adjustment is the result of regular inspection of network status and topology changes.

[0014] Preferably, in S2, the IP rule engine also matches other conditions of the IP message, including but not limited to protocol type and port.

[0015] Preferably, step S3 further includes the step of selecting the best route in the virtual routing table by the VRF instance in combination with traffic changes and network topology changes. In step S3, traffic distribution is defined according to the range of IP source addresses, and the VRF instance specifies different forwarding paths for traffic in the range.

[0016] Preferably, the network card interface is a physical network card or a virtual network card, connected to an external or internal network.

[0017] Preferably, the VRF instance is bound to a network card interface in a one-to-one correspondence, or is bound to multiple network card interfaces.

[0018] Compared with the prior art, the present invention has significantly improved flexibility, scalability, management efficiency and resource utilization, and is particularly suitable for dynamic routing control, multi-tenant and multi-path network management and traffic optimization in complex network environments. Through the implementation of the present invention, the main effects and advantages include: 1. Flexible dynamic routing selection The present invention realizes dynamic routing selection based on source address by combining VRF instance and IP routing rules. It can flexibly adjust routing path according to traffic changes and source address differences to ensure that data packets are always transmitted along the optimal path. This dynamic routing selection capability significantly improves the flexibility and adaptability of the network.

[0019] 2. Break through the limit on the number of routing tables and enhance scalability Through VRF technology, the present invention breaks the limitation on the number of routing tables in the existing system, and can create more than 255 virtual routing tables, supporting more complex and diverse routing scenarios; this enables the network to have stronger scalability in multi-host, multi-path or multi-tenant environments, and can flexibly respond to large-scale network needs.

[0020] 3. Simplified management and configuration The present invention binds VRF instances to network interfaces and implements automated and refined traffic management through IP routing rules, significantly simplifying configuration and management in complex network environments; administrators can conveniently adjust IP routing rules and / or VRF instances to accurately control traffic, reduce the risk of configuration errors, and improve management efficiency.

[0021] 4. Optimized network performance and resource utilization Through routing selection based on IP source addresses, the present invention can optimize the distribution of network traffic, avoid traffic congestion and resource waste, and improve the performance of the overall network; especially in multi-path networks, routing strategies can be dynamically adjusted to ensure optimal resource utilization and maximize network performance.

[0022] 5. Real-time response to network topology changes and enhanced network adaptability The present invention can quickly respond to changes in network topology by dynamically adjusting IP routing rules and VRF instance configurations, ensuring that routing strategies match traffic demands; this enables the network to have higher adaptability when facing traffic fluctuations or topology changes, thereby improving the stability and robustness of the network. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a schematic diagram of the process of IP message transmission in the prior art; Figure 2 It is a schematic diagram of IP message transmission of the present invention; Figure 3 It is a flow chart of the method of the present invention. DETAILED DESCRIPTION

[0024] The purpose, advantages and features of the present invention will be illustrated and explained by the non-limiting description of the following preferred embodiments. These embodiments are only typical examples of the application of the technical solution of the present invention, and any technical solution formed by equivalent replacement or equivalent transformation falls within the scope of protection claimed by the present invention.

[0025] The present invention discloses a method for realizing dynamic selection of source address routing and traffic optimization based on VRF, which mainly involves the following structures and components: Physical network devices: The device can be a router, switch or server that supports VRF functions, with multiple network interfaces (network cards) and rich network protocol support capabilities. The physical network device is responsible for hosting multiple VRF instances and implementing flexible routing selection and traffic management through these instances.

[0026] VRF Example: Multiple VRF instances can be created in a physical network device, each VRF instance represents a virtual routing environment with independent routing tables and forwarding logic. The routing tables between VRF instances are isolated from each other, thereby achieving traffic isolation and optimization in a multi-tenant or multi-path environment. In this way, the present invention breaks the limitation of the number of traditional routing tables, can create multiple virtual routing tables according to demand, and supports complex routing strategies.

[0027] Virtual routing table: Each VRF instance is associated with an independent virtual routing table, which stores all routing entries related to the VRF instance. The number of virtual routing tables is no longer limited to the system default of 255. Multiple virtual routing tables can be dynamically created and adjusted according to actual network needs to adapt to dynamic changes in the network.

[0028] Network interface (NIC): VRF instances are bound to the network interfaces (NICs) of physical network devices to ensure that each VRF instance manages and controls the traffic of a specific network interface. NIC interfaces can be physical or virtual NICs, connecting to external or internal networks to achieve flexible management and forwarding of traffic.

[0029] IP routing rules (ip rule): Configure multiple IP routing rules on the physical network device to determine how to select the corresponding VRF instance based on the source address, protocol type, and other conditions of the data packet. The network administrator specifies different traffic forwarding paths for data packets with different IP source address ranges, thereby achieving more refined traffic control and optimization.

[0030] The method of the present invention is as follows Figure 3 As shown, the following steps are included: Preparation step 1: Create multiple VRF instances according to different traffic requirements or different client users, and bind each VRF instance to a network card interface, where each VRF instance corresponds to an independent virtual routing table, which stores all routing entries related to the VRF instance. Preparation step 2: Configure the IP routing rules of the IP rule engine, with the configuration basis being the IP source address and protocol type; Receive IP packets through the physical network interface; The IP message is grouped by an IP rule engine, wherein the grouping process is to use the IP source address of the IP message as a key field and allocate a source address route corresponding thereto; and the corresponding VRF instance is matched according to the grouping; After the match is completed, the IP message is directed to the corresponding VRF instance for processing, and the VRF instance selects the best route in the virtual routing table according to the IP destination address; The IP message is sent under the best route through the network card interface bound to the VRF instance.

[0031] The creation of multiple VRF instances can also be implemented according to the requirements of client user isolation, service isolation, security policy, etc. In a preferred embodiment of the present invention, a VRF technology supported by the Linux kernel is used to create a VRF instance for each network path or link.

[0032] Each VRF instance is associated with an independent virtual routing table. Through VRF instances, independent virtual routing tables can be maintained for different links or paths to ensure path isolation and routing table independence. In the virtual routing table, the link to pass is selected according to the target network and the IP source address is bound. For example: ip rule add from 192.168.1.2 lookup 100 The meaning of the above rules is: when the source address is 192.168.1.2, virtual routing table 100 will be used for routing query.

[0033] In the present invention, (1) the traffic isolation function is implemented by a VRF instance, which creates an independent network space for each link or path to ensure that the links do not affect each other. Each VRF instance has an independent virtual routing table, which makes traffic separation more flexible in complex scenarios. (2) The IP source address table lookup is completed by the IP routing rule. The IP routing rule is the core mechanism of IP source address routing selection, ensuring that each source address is forwarded according to the predefined routing table lookup strategy, and cross-link load sharing is achieved by binding the IP source address and the routing table.

[0034] Since VRF instances provide traffic isolation and routing table management functions, they cannot directly match traffic based on source addresses. IP routing rules (ip rule) provide source address matching functions, but require the routing table of the VRF instance to support its actual routing function. The present invention perfectly combines VRF technology with IP routing rules, realizes routing isolation and dynamic selection based on source addresses, and is suitable for complex network environments, such as multi-link load balancing, internal and external network isolation, and other scenarios; it can also ensure efficient routing selection and traffic forwarding in cross-device scenarios.

[0035] The IP rule engine accepts dynamic adjustment of IP routing rules and VRF instances according to changes in network traffic. The basis of the dynamic adjustment is the regular inspection results of network status and topology changes. Specifically, the present invention monitors changes in IP source addresses or link status through interfaces. When there are changes, the IP routing rules and the virtual routing table content of the corresponding VRF instance are updated in time. The update process is implemented through scripts or services to dynamically adjust the strategy. For example: ip rule del from 192.168.1.2 lookup 100 ip rule add from 192.168.2.2 lookup 101 ip route add 10.1.0.0 / 24 dev eth1 src 192.168.2.2 table 101 The IP rule engine also matches other conditions of the IP message, including but not limited to the protocol type and port. In addition, the IP rule engine sets different IP source address ranges according to user priority (such as VIP users), and assigns high-priority IP rules and paths to them to form priority classification.

[0036] Dynamically adjust multiple virtual routing tables (VRF instances) according to actual network requirements. The preferred embodiment of the present invention is implemented through the following steps: 1. Dynamically create VRF instances Use commands to dynamically create new VRF instances based on network traffic requirements or different user needs. For example: ip link add vrf name vrf1 type vrf table 10 ip link add vrf name vrf2 type vrf table 20 Here, vrf1 and vrf2 instances are created according to different traffic requirements, and different routing tables are assigned to each instance.

[0037] 2. Dynamically adjust the VRF routing table: As the network changes dynamically, you can add, delete, or modify routes for different VRF instances. For example: ip route add 192.168.3.0 / 24 dev vrf1 ip route delete 192.168.4.0 / 24 dev vrf2 According to the changes in network traffic, the routing table of each VRF instance is adjusted in time to ensure that the traffic is forwarded along the required path.

[0038] 3. Automated scripts and configuration management: Use scripts or configuration management tools to automate the creation and adjustment of VRFs to adapt to dynamically changing network requirements.

[0039] 4. Flexible network topology support: When the network topology changes, new VRF instances can be created based on actual needs, and the corresponding routing tables and rules can be adjusted according to the new traffic paths.

[0040] Among them, IP routing rules can also be dynamically adjusted to adapt to changes and needs of network traffic. The preferred embodiment of the present invention is implemented through the following steps: 1. Real-time traffic monitoring: Monitor network traffic in real time to identify traffic changes and demands.

[0041] 2. Adjust IP routing rules based on traffic patterns: Dynamically adjust IP routing rules based on monitored traffic patterns. For example, when traffic from a certain source address increases, you can create new rules for that address range or adjust existing rules to change the forwarding path of the traffic.

[0042] 3.Automated adjustment: The configuration system adjusts IP routing rules periodically or dynamically based on network changes through automated scripts (such as cron scheduled tasks, or automatic adjustment mechanisms based on traffic thresholds).

[0043] 4. Load balancing and traffic scheduling: According to the traffic load, adjust the traffic forwarding path, for example, by changing the routing table or allocating traffic to different VRF instances, to ensure that network resources are used reasonably.

[0044] The steps of the present invention also include the step of selecting the best route in the virtual routing table by combining the traffic change and the network topology change of the VRF instance. The distribution of traffic is defined according to the range of the IP source address, and the VRF instance specifies different forwarding paths for the traffic in the range. The specific operations are as follows: 1. Monitor network topology changes: Network topology changes may involve new subnets, the addition or failure of routers, etc. Administrators need to detect topology changes through regular network status checks and topology analysis tools.

[0045] 2. Dynamically adjust VRF instance configuration: When the topology changes, administrators can adjust the existing VRF instance configuration according to the new traffic requirements or network topology. For example, add or delete VRF instances and modify the routes in the VRF routing table. Example: ip link set dev vrf1 up ip route add 10.0.0.0 / 24 dev vrf1 3. Dynamically adjust IP routing rules: When network topology or traffic demand changes, administrators can dynamically adjust IP routing rules to add or remove corresponding routing rules for new network paths or source addresses.

[0046] For example, when traffic surges, you can add a higher priority IP routing rule for a source address to prioritize traffic forwarding: ip rule add from 192.168.1.0 / 24 table 40 priority 100 4. Load balancing and flow control: As traffic fluctuates, administrators can dynamically adjust IP routing rules based on actual traffic distribution strategies. For example, when traffic on a link is overloaded, the IP routing rules can be adjusted to distribute traffic to another link. Example: ip rule add from 192.168.2.0 / 24 table 50 5. Automation and real-time adjustment: Network traffic and topology may change frequently. Administrators can use automation tools (such as Ansible, Python scripts, etc.) to automatically adjust routing rules and VRF configurations based on network changes.

[0047] By setting thresholds and trigger conditions, rule adjustments can be automatically performed when changes occur in the network, reducing manual intervention.

[0048] Combination Figure 2 As shown, the working process of this preferred embodiment is as follows: 1. Message enters the device When a data packet (IP message) arrives at a network device, it first enters the device through the physical network interface (receiving network card). After the device receives the data packet, it immediately passes it to the IP rule engine for processing. The source IP address of each data packet will be used as a key field for rule matching to determine the routing path that the data packet should choose.

[0049] 2. IP routing rule matching In the IP rule engine, the router checks the IP source address or other identifiers (such as protocol type, port, etc.) of the data packet according to the pre-configured IP routing rules. IP routing rules define the VRF instances that packets with different source address ranges should match, thereby ensuring flexible traffic diversion based on the source address. This process is not only applicable to static rules, but also can be used to dynamically adjust IP routing rules to adjust the routing strategy of the source address in real time when traffic demand changes or network topology changes.

[0050] 3. VRF instance processing Once a data packet matches the corresponding IP routing rule, the data packet will be directed to a specific VRF instance for processing. Each VRF instance corresponds to an independent virtual routing table, which is responsible for managing all routing entries related to the instance. During this process, the VRF instance determines the best forwarding path for the data packet based on its virtual routing table. By binding the source address to the VRF instance, it ensures that in a complex multi-path network, the data packet can flexibly select the optimal path to achieve traffic optimization. For example, it can be segmented based on traffic type (HTTP, TCP / UDP port number), user behavior pattern (frequently visited target address), time period (peak / off-peak period), etc.

[0051] 4. Routing After the VRF instance processes the data packet, it determines the egress interface (sending network card) to which the data packet should be forwarded based on the entries in the virtual routing table. The independence of the virtual routing table enables different VRF instances to select the most suitable forwarding path based on different source addresses or network requirements. Through this method, the present invention effectively optimizes the utilization of network resources and avoids the limitations of selecting paths based on destination addresses in traditional routing technologies.

[0052] 5. Data packet forwarding The final path of the data packet is determined by the query result of the virtual routing table. The system sends the data packet to the next hop device or the target device through the corresponding outbound interface according to the query result. Through this source address routing method, the data packet is effectively diverted to ensure that the network traffic is optimally distributed. Unlike traditional methods, the present invention can dynamically adjust the routing strategy according to the source address to ensure the maximization of network performance and achieve flexible response when the network topology or traffic demand changes.

[0053] When the network topology changes or the traffic demand fluctuates, the administrator can adjust the IP routing rules or the configuration of the VRF instance so that the routing strategy can respond to the new demand in a timely manner, thereby optimizing the overall network performance and ensuring a more reasonable traffic distribution.

[0054] There are many implementation methods of the present invention, and all technical solutions formed by equivalent transformation or equivalent transformation fall within the protection scope of the present invention.

Claims

1. A method for implementing dynamic source address routing selection and traffic optimization based on VRF, characterized in that: The steps include: S1, receiving IP packets through the physical network interface; S2. Grouping the IP packets through an IP rule engine, wherein the grouping process is to use the IP source address of the IP packet as a key field and allocate a source address route corresponding thereto; and matching the grouping to a corresponding VRF instance; S3. After the matching is completed, the IP message is directed to the corresponding VRF instance for processing, and the VRF instance selects the best route in the virtual routing table according to the IP destination address; S4. Send the IP message under the optimal route through the network card interface bound to the VRF instance.

2. The method according to claim 1, characterized in that: Before step S1, a preparation step 1 is also included, in which multiple VRF instances are created according to different traffic requirements or different client users, and each VRF instance is bound to a network card interface, wherein each VRF instance corresponds to an independent virtual routing table, which stores all routing entries related to the VRF instance.

3. The method according to claim 1, characterized in that: Before step S1, a preparation step 2 is also included, which is to configure the IP routing rules of the IP rule engine, and the configuration basis is the IP source address and protocol type.

4. The method according to claim 1, characterized in that: The IP rule engine accepts dynamic adjustment of IP routing rules and VRF instances according to changes in network traffic.

5. The method according to claim 4, characterized in that: The basis for the dynamic adjustment is the results of regular checks on network status and topology changes.

6. The method according to claim 1, characterized in that: In S2, the IP rule engine also matches other conditions of the IP message, including but not limited to protocol type and port.

7. The method according to claim 1, characterized in that: The step S3 also includes a step in which the VRF instance selects the best route in the virtual routing table in combination with traffic changes and network topology changes.

8. The method according to claim 6, characterized in that: In step S3, traffic distribution is defined according to the range of IP source addresses, and the VRF instance specifies different forwarding paths for traffic in the range.

9. The method according to claim 1, characterized in that: The network card interface is a physical network card or a virtual network card, which is connected to an external or internal network.

10. The method according to claim 1, characterized in that: The VRF instance is bound to a network card interface in a one-to-one correspondence, or is bound to multiple network card interfaces.

Citation Information

Patent Citations

  • Apparatus and methods for handling shared services through virtual route forwarding (VRF) -aware-NAT

    CN1781297B

  • Device and method for realizing network address translation protocol under isomerous network system

    CN101150566A

  • Devices, systems and methods for service chains

    CN107113238A

  • Devices, systems and methods for service chains

    CN112134798A