CN110650093A - Multi-network-segment access method and system for single operating system - Google Patents

Multi-network-segment access method and system for single operating system Download PDF

Info

Publication number
CN110650093A
CN110650093A CN201910805286.3A CN201910805286A CN110650093A CN 110650093 A CN110650093 A CN 110650093A CN 201910805286 A CN201910805286 A CN 201910805286A CN 110650093 A CN110650093 A CN 110650093A
Authority
CN
China
Prior art keywords
network
segment
routing
strategy
access
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
CN201910805286.3A
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.)
Suzhou Wave Intelligent Technology Co Ltd
Original Assignee
Suzhou Wave Intelligent Technology Co Ltd
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 Suzhou Wave Intelligent Technology Co Ltd filed Critical Suzhou Wave Intelligent Technology Co Ltd
Priority to CN201910805286.3A priority Critical patent/CN110650093A/en
Publication of CN110650093A publication Critical patent/CN110650093A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Abstract

The invention relates to the technical field of computer networks, and provides a single-operating-system multi-network-segment access method and a system, wherein the method comprises the following steps: receiving access requests of a plurality of external network segments to different network segments under the current single operating system; analyzing the received access request, and judging whether a plurality of external network segments are the same network segment; when a plurality of external network segments are the same network segment, reading a newly-established strategy routing table in a pre-configured routing file; and according to the read strategy routing table, according to the address of the direct connection network segment corresponding to the current network segment recorded in the strategy routing, executing the access action, thereby realizing the cross-network access of different network segments of the single operating system by the external network segment.

Description

Multi-network-segment access method and system for single operating system
Technical Field
The invention belongs to the technical field of computer networks, and particularly relates to a multi-network-segment access method and system for a single operating system.
Background
When the operating system is normally deployed and the network card configuration file GATEWAY parameter is normally configured, a default route with a destination network segment of 0.0.0.0 is generated in the operating system. Normally, an operating system is not allowed to have multiple GATEWAY parameters, because multiple default routes are generated when multiple GATEWAY parameters are set. The default routes are provided with a plurality of exits, and under the condition of the exits, two links can be utilized and both data can run to realize service access, but the condition of path disturbance exists; that is, data comes in from the link A and goes out from the link B, which causes the round-trip path of the access data to be inconsistent and the data to be unreachable.
Currently, if the GATEWAY parameter is not set for another backup link, setting to be a specific detailed route can also be used, but this case is the case for accessing different network segments of the same single operating system by different network segments outside. For example, an external C network segment accesses an A network segment of the system, and a D network segment accesses a B network segment of the system. But cannot be achieved if the external C-segment simultaneously accesses the A, B segment of the single operating system or the external D-segment simultaneously accesses the A, B segment of the single system.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a multi-network-segment access method for a single operating system, aiming at solving the problem that the external same network segment in the prior art can not access a plurality of network segments of the single operating system simultaneously.
The technical scheme provided by the invention is as follows: a single operating system multiple network segment access method, said method comprising the steps of:
receiving access requests of a plurality of external network segments to different network segments under the current single operating system;
analyzing the received access request, and judging whether a plurality of external network segments are the same network segment;
when a plurality of external network segments are the same network segment, reading a newly-established strategy routing table in a pre-configured routing file;
and according to the read strategy routing table, executing access action according to the direct connection network segment address corresponding to the current network segment recorded in the strategy routing.
As an improved scheme, the step of receiving access requests of external multiple network segments to different network segments under the current single operating system further comprises the following steps:
the method comprises the steps of pre-configuring a strategy routing table in a routing file, wherein the strategy routing table is loaded with a direct connection network segment corresponding to a current network segment, and the direct connection network segment, namely a target routing address, is a network card address segment.
As an improved scheme, the step of pre-configuring the policy routing table in the routing file specifically includes the following steps:
two routing tables are newly established in a single operation system with multiple network cards and multiple network segments;
adding strategy routes into the two newly-built routing tables to form the strategy routing table, wherein the strategy routes are the network card address segments of the destination routing addresses of the current network segments.
As an improved scheme, the newly-built two routing tables are:
echo"192wan_0">>/etc/iproute2/rt_tables;
echo"199wan_4">>/etc/iproute2/rt_tables。
as an improvement, the method further comprises the steps of:
and when the external network segments are judged to be different network segments, controlling to end the subsequent access action.
Another object of the present invention is to provide a single os multi-segment access system, which comprises:
the access request receiving module is used for receiving access requests of a plurality of external network segments to different network segments under the current single operating system;
the network segment attribution judging module is used for analyzing the received access request and judging whether a plurality of external network segments are the same network segment;
the strategy routing table reading module is used for reading a newly-built strategy routing table in a pre-configured routing file when a plurality of external network segments are the same network segment;
and the route access action execution module is used for executing the access action according to the read strategy routing table and the direct connection network segment address corresponding to the current network segment recorded in the strategy routing.
As an improvement, the system further comprises:
and the strategy routing table configuration module is used for pre-configuring a strategy routing table in a routing file, wherein the strategy routing table is loaded with a direct connection network segment corresponding to the current network segment, and the direct connection network segment, namely a target routing address, is a network card address segment.
As an improved scheme, the policy routing table configuration module specifically includes:
the routing table newly-establishing module is used for newly-establishing two routing tables in a single operating system with multiple network cards and multiple network segments;
and the strategy adding module is used for adding strategy routes in the two newly-built routing tables to form the strategy routing table, and the target routing address of the strategy route which is the current network segment is a network card address segment.
As an improved scheme, the newly-built two routing tables are:
echo"192wan_0">>/etc/iproute2/rt_tables;
echo"199wan_4">>/etc/iproute2/rt_tables。
as an improvement, the system further comprises:
and the access ending control module is used for controlling to end the subsequent access action when the external network segments are judged to be different network segments.
In the embodiment of the invention, access requests of a plurality of external network segments to different network segments under the current single operating system are received; analyzing the received access request, and judging whether a plurality of external network segments are the same network segment; when a plurality of external network segments are the same network segment, reading a newly-established strategy routing table in a pre-configured routing file; and according to the read strategy routing table, according to the address of the direct connection network segment corresponding to the current network segment recorded in the strategy routing, executing the access action, thereby realizing the cross-network access of different network segments of the single operating system by the external network segment.
Drawings
In order to more clearly illustrate the detailed description of the invention or the technical solutions in the prior art, the drawings that are needed in the detailed description of the invention or the prior art will be briefly described below. Throughout the drawings, like elements or portions are generally identified by like reference numerals. In the drawings, elements or portions are not necessarily drawn to scale.
FIG. 1 is a flow chart of the implementation of the multi-network access method of the single operating system provided by the present invention;
fig. 2 is a block diagram of a single os multi-segment access system according to the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely for illustrating the technical solutions of the present invention more clearly, and therefore are only examples, and the protection scope of the present invention is not limited thereby.
Fig. 1 is a flowchart of an implementation of a multi-network segment access method of a single operating system according to the present invention, which specifically includes the following steps:
in step S101, a request for accessing different network segments under the current single operating system from a plurality of external network segments is received.
In step S102, the received access request is analyzed, and whether the external network segments are the same network segment is determined.
In step S103, when the external network segments are the same network segment, a newly created policy routing table in a preconfigured routing file is read.
In step S104, according to the read policy routing table, an access action is executed according to the address of the direct connection network segment corresponding to the current network segment recorded in the policy routing.
In this embodiment, when it is determined that the external network segments are different network segments, the control ends the subsequent access action.
In the embodiment of the present invention, the step of receiving access requests of external multiple network segments to different network segments under the current single operating system further includes the following steps before the step of receiving access requests of external multiple network segments to different network segments under the current single operating system:
a policy routing table in a routing file is configured in advance, the policy routing table is loaded with a direct connection network segment corresponding to a current network segment, and the direct connection network segment, namely a destination routing address, is a network card address segment, wherein:
the step of pre-configuring the policy routing table in the routing file specifically includes the following steps:
(1) two routing tables are newly established in a single operation system with multiple network cards and multiple network segments;
the two newly-built routing tables are:
echo"192wan_0">>/etc/iproute2/rt_tables;
echo"199wan_4">>/etc/iproute2/rt_tables。
(2) adding strategy routes into the two newly-built routing tables to form the strategy routing table, wherein the strategy routes are the network card address segments of the destination routing addresses of the current network segments.
In the embodiment of the invention, aiming at the condition that the same system has a plurality of outlets and needs to be capable of accessing the same external service at the same time. That is, the same external C segment should access both the a segment of the same system and the other B segment of the system.
In this embodiment, the policy routing is different from the ordinary routing, the destination network segment of the ordinary routing is the network segment to be reached, and the destination address of the policy routing is the directly connected network segment and the non-destination network segment; then corresponding to different direct connection network segments, appointing different network cards and network card addresses corresponding to the direct connection network segments from the side of the direct connection network segments, after configuration is finished, two more routes with destination addresses being two network card address segments of the direct connection network segments can be seen in a routing table, and outlets respectively correspond to the two network cards, so that the purpose that the same C network segment outside accesses two different network segments A, B of the single operating system in a cross-network-segment mode is achieved.
Fig. 2 is a block diagram of a single-os multi-network segment access system according to the present invention, and for convenience of description, only the relevant portions of the system according to the embodiment of the present invention are shown in the diagram.
The single-operating-system multi-network-segment access system comprises:
an access request receiving module 11, configured to receive access requests of external multiple network segments to different network segments in a current single operating system;
a network segment attribution judging module 12, configured to analyze the received access request, and judge whether external multiple network segments are the same network segment;
a policy routing table reading module 13, configured to read a newly created policy routing table in a preconfigured routing file when a plurality of external network segments are the same network segment;
and the route access action execution module 14 is configured to execute an access action according to the read policy routing table and the direct connection network segment address corresponding to the current network segment recorded in the policy routing.
In this embodiment, the system further comprises:
a policy routing table configuration module 15, configured to pre-configure a policy routing table in a routing file, where the policy routing table is loaded with a direct connection network segment corresponding to a current network segment, and the direct connection network segment, that is, a destination routing address, is a network card address segment;
the policy routing table configuration module 15 specifically includes:
a routing table creation module 16, configured to create two routing tables in a single operating system with multiple network cards and multiple network segments;
and the policy adding module 17 is configured to add a policy route to the newly created two routing tables to form the policy routing table, where the destination routing address of the policy route, which is the current network segment, is a network card address segment.
In this embodiment, the system further comprises:
and an access termination control module 18, configured to control to terminate a subsequent access action when it is determined that the external multiple network segments are different network segments.
The functions of the modules are described in the above embodiments, and are not described herein again.
In the embodiment of the invention, access requests of a plurality of external network segments to different network segments under the current single operating system are received; analyzing the received access request, and judging whether a plurality of external network segments are the same network segment; when a plurality of external network segments are the same network segment, reading a newly-established strategy routing table in a pre-configured routing file; and according to the read strategy routing table, according to the address of the direct connection network segment corresponding to the current network segment recorded in the strategy routing, executing the access action, thereby realizing the cross-network access of different network segments of the single operating system by the external network segment.
The above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present invention, and they should be construed as being included in the following claims and description.

Claims (10)

1. A single operating system multi-network segment access method is characterized by comprising the following steps:
receiving access requests of a plurality of external network segments to different network segments under the current single operating system;
analyzing the received access request, and judging whether a plurality of external network segments are the same network segment;
when a plurality of external network segments are the same network segment, reading a newly-established strategy routing table in a pre-configured routing file;
and according to the read strategy routing table, executing access action according to the direct connection network segment address corresponding to the current network segment recorded in the strategy routing.
2. The method for accessing multiple network segments by using a single operating system according to claim 1, wherein the step of receiving the access requests of the external multiple network segments to different network segments under the current single operating system further comprises the following steps:
the method comprises the steps of pre-configuring a strategy routing table in a routing file, wherein the strategy routing table is loaded with a direct connection network segment corresponding to a current network segment, and the direct connection network segment, namely a target routing address, is a network card address segment.
3. The single-os multi-network segment access method according to claim 2, wherein the step of pre-configuring the policy routing table in the routing file specifically comprises the steps of:
two routing tables are newly established in a single operation system with multiple network cards and multiple network segments;
adding strategy routes into the two newly-built routing tables to form the strategy routing table, wherein the strategy routes are the network card address segments of the destination routing addresses of the current network segments.
4. The single operating system multiple network segment access method of claim 3, wherein the two newly created routing tables are:
echo"192wan_0">>/etc/iproute2/rt_tables;
echo"199wan_4">>/etc/iproute2/rt_tables。
5. the single operating system multiple segment access method of claim 4, further comprising the steps of:
and when the external network segments are judged to be different network segments, controlling to end the subsequent access action.
6. A single operating system multiple network segment access system, the system comprising:
the access request receiving module is used for receiving access requests of a plurality of external network segments to different network segments under the current single operating system;
the network segment attribution judging module is used for analyzing the received access request and judging whether a plurality of external network segments are the same network segment;
the strategy routing table reading module is used for reading a newly-built strategy routing table in a pre-configured routing file when a plurality of external network segments are the same network segment;
and the route access action execution module is used for executing the access action according to the read strategy routing table and the direct connection network segment address corresponding to the current network segment recorded in the strategy routing.
7. The single operating system multiple segment access system of claim 6, further comprising:
and the strategy routing table configuration module is used for pre-configuring a strategy routing table in a routing file, wherein the strategy routing table is loaded with a direct connection network segment corresponding to the current network segment, and the direct connection network segment, namely a target routing address, is a network card address segment.
8. The single-os multi-segment access system of claim 7, wherein the policy routing table configuration module specifically comprises:
the routing table newly-establishing module is used for newly-establishing two routing tables in a single operating system with multiple network cards and multiple network segments;
and the strategy adding module is used for adding strategy routes in the two newly-built routing tables to form the strategy routing table, and the target routing address of the strategy route which is the current network segment is a network card address segment.
9. The single os multiple segment access system of claim 8, wherein the two routing tables are newly created as follows:
echo"192wan_0">>/etc/iproute2/rt_tables;
echo"199wan_4">>/etc/iproute2/rt_tables。
10. the single-operating-system multi-segment access system of claim 9, further comprising:
and the access ending control module is used for controlling to end the subsequent access action when the external network segments are judged to be different network segments.
CN201910805286.3A 2019-08-29 2019-08-29 Multi-network-segment access method and system for single operating system Pending CN110650093A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910805286.3A CN110650093A (en) 2019-08-29 2019-08-29 Multi-network-segment access method and system for single operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910805286.3A CN110650093A (en) 2019-08-29 2019-08-29 Multi-network-segment access method and system for single operating system

Publications (1)

Publication Number Publication Date
CN110650093A true CN110650093A (en) 2020-01-03

Family

ID=68991043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910805286.3A Pending CN110650093A (en) 2019-08-29 2019-08-29 Multi-network-segment access method and system for single operating system

Country Status (1)

Country Link
CN (1) CN110650093A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464446A (en) * 2020-04-08 2020-07-28 广州虎牙科技有限公司 Communication method and device for multi-line server access and server

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123540A (en) * 2007-08-21 2008-02-13 广东志成冠军集团有限公司 A monitoring method and system based on heterogeneous network
CN104935515A (en) * 2015-06-02 2015-09-23 浪潮电子信息产业股份有限公司 FTP server and WEB server network configuration method in linux system
US9350663B2 (en) * 2013-09-19 2016-05-24 Connectivity Systems Incorporated Enhanced large data transmissions and catastrophic congestion avoidance over TCP/IP networks
CN108600170A (en) * 2018-03-20 2018-09-28 大势至(北京)软件工程有限公司 A kind of method and system of control multisegment environment lower network equipment internet behavior
CN108600415A (en) * 2018-05-28 2018-09-28 郑州云海信息技术有限公司 A kind of virtual network accesses method, system and the SDN controllers of outer net

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101123540A (en) * 2007-08-21 2008-02-13 广东志成冠军集团有限公司 A monitoring method and system based on heterogeneous network
US9350663B2 (en) * 2013-09-19 2016-05-24 Connectivity Systems Incorporated Enhanced large data transmissions and catastrophic congestion avoidance over TCP/IP networks
CN104935515A (en) * 2015-06-02 2015-09-23 浪潮电子信息产业股份有限公司 FTP server and WEB server network configuration method in linux system
CN108600170A (en) * 2018-03-20 2018-09-28 大势至(北京)软件工程有限公司 A kind of method and system of control multisegment environment lower network equipment internet behavior
CN108600415A (en) * 2018-05-28 2018-09-28 郑州云海信息技术有限公司 A kind of virtual network accesses method, system and the SDN controllers of outer net

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111464446A (en) * 2020-04-08 2020-07-28 广州虎牙科技有限公司 Communication method and device for multi-line server access and server
CN111464446B (en) * 2020-04-08 2022-04-12 广州虎牙科技有限公司 Communication method and device for multi-line server access and server

Similar Documents

Publication Publication Date Title
US11576114B2 (en) Data packet processing method, network traffic management method, apparatus, and system
EP4024784A1 (en) Methods and apparatuses for sending and receiving segment routing traffic engineering policy, network element, and computer-readable storage medium
CN112087312A (en) Method, device and equipment for providing edge service
CN109302466B (en) Data processing method, related device and computer storage medium
CN107241272B (en) Method, system and apparatus for improving forwarding capability during route convergence
CN110177010B (en) Link switching method and device
KR20210023194A (en) Mec(mobile edge computing) system and control method thereof
CN114143283A (en) Tunnel self-adaptive configuration method and device, center-end equipment and communication system
US9720755B2 (en) Information processing device
CN110650093A (en) Multi-network-segment access method and system for single operating system
CN113900939A (en) Test environment access method and device, readable storage medium and computer equipment
CN110392416B (en) Network selection method of android system
CN110830598B (en) Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session
CN110324202B (en) Method and device for detecting line quality
US11811635B2 (en) Network traffic migration method and apparatus
CN114826825B (en) Networking method and device of cloud network and cloud network
CN108023774B (en) Cross-gateway migration method and device
CN113438159B (en) Transmission method and device of segmented routing strategy and network transmission system
US20200201667A1 (en) Virtual machine live migration method, apparatus, and system
CN112653626A (en) High-delay link determining method, route publishing method and device
CN108023801B (en) Resource scheduling method and system for heterogeneous network
US8165137B2 (en) Fast database migration
JP2012203421A (en) Information processing method, management server and management program
CN110266597B (en) Flow control method, device, equipment and storage medium
CN110046120B (en) Data processing method, device and system based on IIC protocol and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20200103

RJ01 Rejection of invention patent application after publication