Movatterモバイル変換


[0]ホーム

URL:


CN119583418A - A method and device for implementing cross-network routing in a distributed soft bus - Google Patents

A method and device for implementing cross-network routing in a distributed soft bus
Download PDF

Info

Publication number
CN119583418A
CN119583418ACN202411404696.4ACN202411404696ACN119583418ACN 119583418 ACN119583418 ACN 119583418ACN 202411404696 ACN202411404696 ACN 202411404696ACN 119583418 ACN119583418 ACN 119583418A
Authority
CN
China
Prior art keywords
network
link
local area
port
cross
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411404696.4A
Other languages
Chinese (zh)
Inventor
郭晓光
项国强
兰鹤天
杨永贺
常鹏飞
玄正罡
史杰
高月朋
郭志强
张译方
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Ordnance Equipment Group Ordnance Equipment Research Institute
Original Assignee
China Ordnance Equipment Group Ordnance Equipment Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by China Ordnance Equipment Group Ordnance Equipment Research InstitutefiledCriticalChina Ordnance Equipment Group Ordnance Equipment Research Institute
Priority to CN202411404696.4ApriorityCriticalpatent/CN119583418A/en
Publication of CN119583418ApublicationCriticalpatent/CN119583418A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

Translated fromChinese

本发明提出一种在分布式软总线中实现跨网路由的方法和装置,涉及网络通信技术领域。该方法包括:在智能终端上配置网络接口,网络接口包括局域网虚拟网口和跨网虚拟网口,且局域网虚拟网口和跨网虚拟网口通过网桥相连;配置iptables规则,用于实现网段映射和设备映射,使得局域网设备主动访问外网地址,外网设备能够访问局域网设备;根据所配置的iptables规则,对进出网络的数据包进行透明转发,实现跨网路由;根据网络拓扑变化,动态更新所述iptables规则,实现动态路由管理;评估跨网络链路的实时发送速率和拥塞情况,基于优先级对进出网络的数据包进行拥塞管理。该方案能够满足现代分布式系统中跨网通信的需求。

The present invention proposes a method and device for realizing cross-network routing in a distributed soft bus, and relates to the field of network communication technology. The method comprises: configuring a network interface on an intelligent terminal, the network interface comprises a local area network virtual network port and a cross-network virtual network port, and the local area network virtual network port and the cross-network virtual network port are connected through a bridge; configuring iptables rules for realizing network segment mapping and device mapping, so that the local area network device actively accesses the external network address, and the external network device can access the local area network device; according to the configured iptables rules, transparently forwarding the data packets entering and leaving the network to realize cross-network routing; dynamically updating the iptables rules according to the changes in the network topology to realize dynamic routing management; evaluating the real-time sending rate and congestion of the cross-network link, and performing congestion management on the data packets entering and leaving the network based on the priority. The scheme can meet the needs of cross-network communication in modern distributed systems.

Description

Method and device for realizing cross-network routing in distributed soft bus
Technical Field
The invention belongs to the field of network communication, and particularly relates to a method and a device for realizing cross-network routing in a distributed soft bus.
Background
In conventional network environments, cross-network routing and data transmission often require reliance on dedicated routers and protocols for packet forwarding. However, this approach has certain limitations and disadvantages in coping with complex network topology changes and flexible configuration requirements. With the rapid development of internet of things, intelligent devices and distributed systems, there is an increasing demand for cross-network routing and data transmission. Ad hoc networking and data transmission between devices are becoming more important under the support of system communication services such as a distributed soft bus. However, current technology also presents challenges in implementing cross-network routing, such as complex configuration, high cost, difficulty in coping with dynamic network environments, and the like. Therefore, a new solution is needed to solve these challenges. The present invention addresses these problems by providing an efficient and flexible way to implement cross-network routing and data transfer in a distributed soft bus. The invention aims to provide a simple and efficient solution to meet the requirements of cross-network communication in a modern distributed system through the application of key technologies such as flexible configuration of network interfaces, flexible configuration of iptables rules, transparent forwarding of data packets, dynamic routing management and the like.
Disclosure of Invention
In view of this, the present invention provides a method for implementing cross-network routing in a distributed soft bus, wherein the method includes:
step S1, configuring a network interface on an intelligent terminal, wherein the network interface comprises a local area network virtual network port and a cross-network virtual network port, and the local area network virtual network port is connected with the cross-network virtual network port through a network bridge;
Step S2, configuring iptables rules, wherein the iptables rules are used for connecting local area network equipment and external network equipment through network segment mapping and equipment mapping;
Step S3, according to the configured iptables rule,
For a data packet from the local area network device entering from a local area network virtual network port, forwarding the data packet to a first link between a cross-network virtual network port and an external network device for communication;
Forwarding a data packet from the external network equipment entering from a cross-network virtual network port to a second link between the local area network virtual network port and the local area network for communication;
Step S4, dynamically updating the iptables rule of the first link and the second link when the network topology changes;
And S5, evaluating the real-time sending rate and congestion conditions of the first link and the second link, and carrying out congestion management on the data packets entering and exiting the local area network virtual network port and the cross-network virtual network port based on the priority.
In particular, in step S5, evaluating the real-time transmission rate across the network link specifically includes:
in the first link and the second link, data substreams of different applications are included;
The real-time transmission rate in the link at time point r is calculated according to the following formula:
Wherein Sa (r) represents the real-time transmission rate of the link a at the time point r, τa represents the basic transmission rate of the link a, K E K, K represents the set of all the data transmission substreams on the link a, K represents the kth data transmission substream on the link a, wk represents the weighting factor of the data transmission substream K, and Ek(ra\r) represents the actual transmission rate of the substream K of the link a at other time points except the time point r.
In particular, in step S5, evaluating congestion conditions across network links specifically includes:
congestion risk index of link a at time point rThe calculation mode of (a) is as follows:
where R '∈ra \r, R' represents a certain point in time associated with link a, Ra represents a set of all points in time associated with link a, and Ra \r represents the removal of point in time R in set Ra; Indicating a function, wherein the number of elements used for counting and meeting a certain condition is only 0 or 1, if the condition in a bracket is met, the value of the indicating function is 1, otherwise, 0;uar indicates the bandwidth utilization lower limit of a link a at a time point r; the upper bandwidth utilization limit for link a at point in time r' is indicated.
In particular, in step S5, congestion management of packets entering and exiting the network based on priority includes dividing different application flows into different priorities according to service types;
When the calculated congestion risk index of the link a exceeds a preset threshold, the transmission rate of the low-priority application flow is reduced and the transmission priority of the high-priority application flow is improved by adjusting the weighting factor wk of the data transmission sub-flow k.
In particular, the method further comprises:
when the local area network interface is found to be started, the network segment mapping rule is configured according to the local area network segment and the subnet mask;
When the local area network equipment is monitored to be online, equipment mapping rules are configured according to the IP address and the port of the local area network equipment and the IP address and the port of the external network;
When the local area network interface is found to be deactivated, deleting the corresponding network segment mapping rule;
And when the local area network equipment is monitored to be offline, deleting the corresponding equipment mapping rule.
The invention also discloses a device for realizing the cross-network routing in the distributed soft bus, which comprises:
The network interface configuration module is used for configuring a network interface on the intelligent terminal, wherein the network interface comprises a local area network virtual network port and a cross-network virtual network port, and the local area network virtual network port is connected with the cross-network virtual network port through a network bridge;
the iptables rule configuration module is used for configuring iptables rules, and the iptables rules are connected with local area network equipment and external network equipment through network segment mapping and equipment mapping;
A data forwarding module, configured to, according to the configured iptables rule,
For a data packet from the local area network device entering from a local area network virtual network port, forwarding the data packet to a first link between a cross-network virtual network port and an external network device for communication;
Forwarding a data packet from the external network equipment entering from a cross-network virtual network port to a second link between the local area network virtual network port and the local area network for communication;
the dynamic route management module is used for dynamically updating the iptables rule of the first link and the second link when the network topology changes;
And the rate and congestion management module is used for evaluating the real-time sending rate and congestion conditions of the first link and the second link and carrying out congestion management on the data packets entering and exiting the local area network virtual network port and the cross-network virtual network port based on the priority.
The beneficial effects are that:
by the technical scheme of the invention, the method and the device for realizing the cross-network routing in the distributed soft bus are realized, and have the following technical effects:
The intelligent terminal can flexibly configure network interfaces, including local area network virtual network ports and cross-network virtual network ports, and are connected through a network bridge, so that network connectivity among devices is realized.
Flexible iptables rule configuration is provided, network segment mapping and device mapping are realized, so that local area network devices and external network devices can access each other, and basic support is provided for data transmission.
According to the configured iptables rule, the data packet entering and exiting the network is forwarded transparently, so that a cross-network routing function is realized, and data can be transferred between different networks in a seamless manner.
The method can dynamically update the iptables rule according to the network topology change, realize dynamic route management and ensure the real-time performance and stability of network communication.
And the real-time sending rate and congestion condition of the cross-network link are evaluated, and the congestion management is carried out on the data packets entering and exiting the network through the priority, so that the efficiency and the reliability of data transmission are improved.
Drawings
FIG. 1 is a method for implementing cross-network routing in a distributed soft bus according to the present invention;
Fig. 2 is a schematic diagram of a device for implementing cross-network routing in a distributed soft bus according to the present invention.
Detailed Description
The invention will now be described in detail by way of example with reference to the accompanying drawings.
The invention provides a method for realizing cross-network routing in a distributed soft bus, which is shown in figure 1 and comprises the following steps:
The method comprises the steps of configuring a network interface on an intelligent terminal, wherein the network interface comprises a local area network virtual network port and a cross-network virtual network port, the local area network virtual network port and the cross-network virtual network port are connected through a network bridge, and firstly, configuring a network, namely configuring different network interfaces and IP addresses according to actual network environments and requirements to ensure connectivity among different networks.
The intelligent terminal is configured by creating a local area network virtual portal and a cross-network virtual portal and connecting them through a bridge.
1) And configuring a virtual network port LAN port of the local area network. A virtual portal is created for the intelligent terminal to become part of the local area network. A local IP address is assigned to the virtual portal for communication with other devices in the same local area network. This configuration may ensure that the device is able to communicate directly with other devices in the local area network.
2) Configuring a cross-network virtual network port WAN port. A virtual portal is created for the intelligent terminal so that the intelligent terminal can communicate across different networks. An IP address, i.e. the entry address of the entire subnet, is assigned to the virtual portal. In this way, the device is able to communicate with devices on other sub-networks.
3) The local area network virtual network port and the cross-network virtual network port are connected through the network bridge. A bridge is a network device that may connect multiple network interfaces together to logically represent a network. The local network virtual network port and the cross-network virtual network port are added into the network bridge, so that the communication between the local network virtual network port and the cross-network virtual network port is ensured.
By the configuration, the data transmission of the device between the local area network and other networks can be realized. The lan virtual portal allows devices to communicate directly with other devices within the lan, while the lan virtual portal allows devices to communicate with devices on other networks. By connecting the network bridge, the two virtual network ports can realize seamless forwarding and transmission of data.
And secondly, the iptables rule is configured to forward and process the data packet entering and exiting the network by configuring the iptables rule, so that the flexible data packet filtering and forwarding strategy can be realized by using various matching conditions and actions provided by the iptables rule.
The mapping table is managed using the iptables mechanism, mapping for segments:
iptables-t nat-APOSTROUTING-s 172.17.0.0/16-j MASQUERADE
the 172.17.0.0/16 part is the LAN segment ip and mask that need to be configured. After the configuration is completed, when the local area network equipment actively accesses the external network address, the proxy node automatically establishes random port mapping for the local area network equipment.
For device mapping:
iptables-t nat-A PREROUTING-d 10.152.227.173-p tcp--dport 10088-jDNAT--to 172.17.0.2:8888
The 10.152.227.173,10088,172.17.0.2:8888 parts are the intranet ip+port to be mapped and the extranet ip+port after mapping. The external network ip address can be obtained by searching the proxy interface address, and the external network port number searches an unused port for configuration. After configuration is completed, when the external network equipment accesses the local area network equipment, the external network equipment can access through the external network ip+port, so that the effect of network crossing is achieved.
And when the data packet reaches the intelligent terminal node, forwarding the data packet to a target network according to rule configuration and action definition. Thus, the data packet can realize transparent transmission among different networks and realize the function of cross-network routing;
When the local area network discovers the corresponding interface up, the module performs network segment automatic mapping. After the configuration is completed, when the local area network equipment actively accesses the external network address, the proxy node automatically establishes random port mapping for the local area network equipment.
When local area network equipment is on line, the module performs single equipment monitoring port mapping. After configuration is completed, when the external network equipment accesses the local area network equipment, the external network equipment can access through the external network ip+port, so that the effect of network crossing is achieved.
When the cross-network data is transmitted, the data of the transmitting end (the intelligent device 1) passes through the hong-Monte device (the cross-network route), and the source address is automatically switched into the external network IP. When the data arrives at the opposite-end hong Menu device, the destination address is switched to intranet IP again, and finally arrives at the intelligent device 6.
Dynamically updating the iptables rule according to the network topology change to realize dynamic route management;
dynamic route management may be implemented by updating and modifying iptables rules based on network topology and dynamic changes. In this way, the network can be flexibly route-adjusted and optimized according to real-time requirements.
1) When the local area network discovers the corresponding interface up, the cross-network route management module performs network segment automatic mapping,
2) When local area network equipment is on line, mapping and storing records of monitoring ports of single equipment are carried out across network route management module interfaces;
3) When the local area network discovers that the corresponding interface is down, the cross-network route management module deletes the automatic mapping of the network segments;
4) When local area network equipment is off line, deleting single equipment monitoring port mapping and deleting records across a network route management interface;
and evaluating the real-time sending rate and congestion condition of the cross-network link, and carrying out congestion management on the data packets entering and exiting the network based on the priority.
Assessing the real-time transmission rate across the network link specifically includes:
in the first link and the second link, data substreams of different applications are included;
The real-time transmission rate in the link at time point r is calculated according to the following formula:
Wherein Sa (r) represents the real-time transmission rate of the link a at the time point r, τa represents the basic transmission rate of the link a, K E K, K represents the set of all the data transmission substreams on the link a, K represents the kth data transmission substream on the link a, wk represents the weighting factor of the data transmission substream K, and Ek(ra\r) represents the actual transmission rate of the substream K of the link a at other time points except the time point r.
In particular, in step S5, evaluating congestion conditions across network links specifically includes:
congestion risk index of link a at time point rThe calculation mode of (a) is as follows:
where R '∈ra \r, R' represents a certain point in time associated with link a, Ra represents a set of all points in time associated with link a, and Ra \r represents the removal of point in time R in set Ra; Indicating a function, wherein the number of elements used for counting and meeting a certain condition is only 0 or 1, if the condition in a bracket is met, the value of the indicating function is 1, otherwise, 0;uar indicates the bandwidth utilization lower limit of a link a at a time point r; the upper bandwidth utilization limit for link a at point in time r' is indicated.
In step S5, the evaluation of congestion conditions across network links specifically includes:
congestion risk index of link a at time point rThe calculation mode of (a) is as follows:
where R '∈ra \r, R' represents a certain point in time associated with link a, Ra represents a set of all points in time associated with link a, and Ra \r represents the removal of point in time R in set Ra; Indicating a function, wherein the number of elements used for counting and meeting a certain condition is only 0 or 1, if the condition in a bracket is met, the value of the indicating function is 1, otherwise, 0;uar indicates the bandwidth utilization lower limit of a link a at a time point r; the upper bandwidth utilization limit for link a at point in time r' is indicated.
In step S5, the congestion management of the data packet entering and exiting the network based on the priority comprises dividing different application flows into different priorities according to the service type;
When the calculated congestion risk index of the link a exceeds a preset threshold, the transmission rate of the low-priority application flow is reduced and the transmission priority of the high-priority application flow is improved by adjusting the weighting factor wk of the data transmission sub-flow k.
The invention also discloses a device for realizing the cross-network routing in the distributed soft bus, as shown in figure 2, comprising:
The network interface configuration module is used for configuring a network interface on the intelligent terminal, wherein the network interface comprises a local area network virtual network port and a cross-network virtual network port, and the local area network virtual network port is connected with the cross-network virtual network port through a network bridge;
the iptables rule configuration module is used for configuring iptables rules, and the iptables rules are connected with local area network equipment and external network equipment through network segment mapping and equipment mapping;
A data forwarding module, configured to, according to the configured iptables rule,
For a data packet from the local area network device entering from a local area network virtual network port, forwarding the data packet to a first link between a cross-network virtual network port and an external network device for communication;
Forwarding a data packet from the external network equipment entering from a cross-network virtual network port to a second link between the local area network virtual network port and the local area network for communication;
the dynamic route management module is used for dynamically updating the iptables rule of the first link and the second link when the network topology changes;
And the rate and congestion management module is used for evaluating the real-time sending rate and congestion conditions of the first link and the second link and carrying out congestion management on the data packets entering and exiting the local area network virtual network port and the cross-network virtual network port based on the priority.
The solution claimed by the device corresponds to the solution in the previous method embodiment one by one, so that a description thereof is omitted.
In summary, the above embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
It will be evident to those skilled in the art that the embodiments of the invention are not limited to the details of the foregoing illustrative embodiments, and that the embodiments of the present invention may be embodied in other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are, therefore, to be considered in all respects as illustrative and not restrictive, the scope of embodiments being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned. Furthermore, it is evident that the word "comprising" does not exclude other elements or steps, and that the singular does not exclude a plurality. A plurality of units, modules or means recited in a system, means or terminal claim may also be implemented by means of software or hardware by means of one and the same unit, module or means. The terms first, second, etc. are used to denote a name, but not any particular order.
Finally, it should be noted that the above-mentioned embodiments are merely for illustrating the technical solution of the embodiment of the present invention, and not for limiting, and although the embodiment of the present invention has been described in detail with reference to the above-mentioned preferred embodiments, it should be understood by those skilled in the art that modifications and equivalent substitutions can be made to the technical solution of the embodiment of the present invention without departing from the spirit and scope of the technical solution of the embodiment of the present invention.

Claims (6)

CN202411404696.4A2024-10-102024-10-10 A method and device for implementing cross-network routing in a distributed soft busPendingCN119583418A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202411404696.4ACN119583418A (en)2024-10-102024-10-10 A method and device for implementing cross-network routing in a distributed soft bus

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202411404696.4ACN119583418A (en)2024-10-102024-10-10 A method and device for implementing cross-network routing in a distributed soft bus

Publications (1)

Publication NumberPublication Date
CN119583418Atrue CN119583418A (en)2025-03-07

Family

ID=94800609

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202411404696.4APendingCN119583418A (en)2024-10-102024-10-10 A method and device for implementing cross-network routing in a distributed soft bus

Country Status (1)

CountryLink
CN (1)CN119583418A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090157916A1 (en)*2007-12-182009-06-18Nvidia CorporationScalable Port Controller Architecture Supporting Data Streams Of Different Speeds
CN111866947A (en)*2020-07-082020-10-30中国科学院计算机网络信息中心 A MEC-based wireless network transmission optimization method and system
CN115396323A (en)*2022-08-122022-11-25徐州恒佳电子科技有限公司Port real-time data flow visualization method and system based on finite-state machine
CN117176694A (en)*2023-11-032023-12-05烽台科技(北京)有限公司Network construction method, device, electronic equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20090157916A1 (en)*2007-12-182009-06-18Nvidia CorporationScalable Port Controller Architecture Supporting Data Streams Of Different Speeds
CN111866947A (en)*2020-07-082020-10-30中国科学院计算机网络信息中心 A MEC-based wireless network transmission optimization method and system
CN115396323A (en)*2022-08-122022-11-25徐州恒佳电子科技有限公司Port real-time data flow visualization method and system based on finite-state machine
CN117176694A (en)*2023-11-032023-12-05烽台科技(北京)有限公司Network construction method, device, electronic equipment and storage medium

Similar Documents

PublicationPublication DateTitle
US10673741B2 (en)Control device discovery in networks having separate control and forwarding devices
JP4060378B2 (en) Multi-layer distributed network element
EP0937353B1 (en)Routing in a multi-layer distributed network element
JP4076586B2 (en) Systems and methods for multilayer network elements
US6088356A (en)System and method for a multi-layer network element
US6631136B1 (en)Methods and apparatus for data communication using a hybrid transport switching protocol
US6014380A (en)Mechanism for packet field replacement in a multi-layer distributed network element
EP3042476B1 (en)Buffer-less virtual routing
CN114073052A (en)Slice-based routing
CN112448900A (en)Data transmission method and device
WO2012119372A1 (en)Message processing method, device and system
CN119583418A (en) A method and device for implementing cross-network routing in a distributed soft bus
TWI556599B (en)Network controlling method and network controller
CiscoConfiguring Banyan VINES
CN108429686A (en) A Routing Method Based on Regular Topological Structure Network
EP2226952B1 (en)An automatically switched optical network and method for data transmission in the network
US20250247324A1 (en)Global first non-minimal routing in dragonfly toplogies
KR102023901B1 (en)Method, apparatus and computer program for routing packets of software defined network
US20080267180A1 (en)Stacked tagging for broadcasting through hierarchy of meshes
JPH09149084A (en) Virtual network routing method
HK1226212B (en)Buffer-less virtual routing

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp