CN106487691A - The data processing method of virtual router, device and virtual router - Google Patents
The data processing method of virtual router, device and virtual router Download PDFInfo
- Publication number
- CN106487691A CN106487691A CN201610895814.5A CN201610895814A CN106487691A CN 106487691 A CN106487691 A CN 106487691A CN 201610895814 A CN201610895814 A CN 201610895814A CN 106487691 A CN106487691 A CN 106487691A
- Authority
- CN
- China
- Prior art keywords
- routing table
- sent
- newly
- virtual router
- packet
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
Abstract
The invention discloses a kind of data processing method of virtual router, device and virtual router.Wherein, the method includes:Added in virtual router with pre-set priority and increase routing table newly, in each newly-increased routing table, include a routing rule corresponding with virtual router public network gateway;In the case that the destination address of packet to be sent belongs to virtual router public network, according to the corresponding newly-increased routing table of the source address of packet to be sent, packet to be sent is sent to destination address;Wherein, pre-set priority is less than priority and the priority regular higher than default route of Intranet routing rule.The present invention solves the different public network network segments used in prior art needs to cause increased the technical problem of the complexity using virtual router using different virtual routers.
Description
Technical field
The present invention relates to network communication field, in particular to a kind of data processing method of virtual router, device
And virtual router.
Background technology
Virtual router is commonly used in IAAS cloud computing, for forwarding each subnet being attached thereto (including interior
Net and public network) between packet, and IP address conversion between Intranet and public network.
The implementation method of the currently known virtual router based on Linux is:Physics in operation (SuSE) Linux OS
On server or virtual server, according to access subnet acquiescence routing table (main table) in arrange forwarding routing rule and
IP address conversion (NAT) rule.After virtual router receives packet, can be by netmask length in routing table from growing to
Short order, is mated with the rule in routing table according to purpose IP in packet, by packet from coupling after successful match
Interface in rule is forwarded, and coupling is unsuccessful, abandons the packet.Purpose IP address are the packet of Intranet, according to bright
True purpose IP address section is transferred from corresponding interface.Because virtual router is generally required is connected to public network (internet),
Purpose IP enormous amount, it is impossible to which 1 routing rule is all set for these purposes IP, so 1 default route can be typically set,
Make the purpose IP address of packet when coupling is less than other routing table rules, acquiescence defers to the routing forwarding rule.Acquiescence road
It is by difference of the rule with common routing rule:When deferring to default route rule, packet need to be forwarded to corresponding gateway (number
The mac of gateway is changed to according to bag purpose mac), processed by gateway;When deferring to common routing rule, not corresponding gateway.
For example, table one is the routing table (main table) of certain virtual router, if packet rs destination IP is 172.17.0.x (1-255),
The packet is forwarded from qr1;If packet rs destination IP is 172.18.0.x (1-255), the packet is transferred from qr2
Go;If packet rs destination IP is 202.16.1.x (1-127), the packet is forwarded from qg;Other packets are deferred to silent
Recognize routing rule, 202.16.1.1 is forwarded to from qg.
Table one
The currently known virtual router based on Linux only employs the main routing table of acquiescence, and main routing table
" a give tacit consent to " routing rule is only had, corresponding 1 gateway;In other words, the existing virtual router based on Linux only supports 1
Individual gateway.
Fig. 1 is the schematic diagram of a kind of routing table of the virtual router according to prior art and main table routing rule.Its
In 0,32766,32767 priority for representing routing table lookups, the less priority of numerical value is higher;Local, main, default table
Show the route table name in virtual router, the routing rule in local routing table is that main is acquiescence with regard to local routing
The routing table for using, default are the routing tables of default route rule.
Fig. 2 is the signal for sending data packets to different public network gateways according to a kind of virtual router of prior art
Figure, it can be seen that because only employing main routing table, source address passes through interface for the packet of 172.17.0.10
Qr matches the routing table that priority is 32766 in routing table rule, then source address improvement is changed to corresponding public network
IP123.103.10.1, and Target IP is sent data packets to by qg interface.Source address is the packet of 172.17.0.11
Transmitting procedure is identical for the transmitting procedure of the packet of 172.17.0.10 with source address.A virtual road due to prior art
1 public network gateway can only be reached by the packet in device, if therefore data are forwarded a packet to 2 public network gateways by demand, needed
Using 2 virtual routers.
In IAAS cloud computing, the multiple public network gateways of 1 data center in the case of having 2 kinds, occur:1) in same number
According in have different Virtual network operators at heart, the different carrier gateway of correspondence;2) the public network network segment is typically superimposed application, uses
Complete one section of public network IP applies for another section again, can thus produce multiple public network network segments, and each public network network segment corresponds to 1 virtual flow-line
Device gateway.Above-mentioned 1 virtual router cannot support multiple gateways, cause will to use using the different public network network segments different
Virtual router, increased using complexity and management workload.
Needing to cause increased using different virtual routers for the different public network network segments used in prior art makes
With the problem of the complexity of virtual router, effective solution is not yet proposed at present.
Content of the invention
A kind of data processing method of virtual router, device and virtual router is embodiments provided, so that
Solving the different public network network segment used in prior art less needs to cause to increased using virtual using different virtual routers
The technical problem of the complexity of router.
A kind of one side according to embodiments of the present invention, there is provided data processing method of virtual router, including:With
Pre-set priority adds newly-increased routing table in virtual router, public with virtual router comprising one in each newly-increased routing table
The corresponding routing rule of net gateway;In the case that the destination address of packet to be sent belongs to virtual router public network, according to
The corresponding newly-increased routing table of the source address of packet to be sent, packet to be sent is sent to destination address;Wherein, preset excellent
First level is less than priority and the priority regular higher than default route of Intranet routing rule.
Further, searched in the newly-increased routing table of virtual router and source ground according to the source address of packet to be sent
The corresponding newly-increased routing table in location;The routing rule of coupling newly-increased routing table corresponding with source address;According to corresponding with source address
The routing rule of newly-increased routing table sends packet to be sent to destination address.
Further, the source address of packet to be sent is converted into corresponding public network address;Determine that public network address is corresponded to
Gateway belonging to routing table be the corresponding newly-increased routing table of source address.
Further, in the case that the destination address in data to be sent belongs to virtual router Intranet, by Intranet
Packet to be sent is forwarded to destination address by interface.
Further, the master meter in the virtual router is split, wherein, the master meter includes:Intranet route
Rule and default route rule;The default route rule that fractionation is obtained is moved in the new routing table with pre-set priority.
Another aspect according to embodiments of the present invention, additionally provides a kind of data processing equipment of virtual router, including:
Add module, increases routing table newly for adding in virtual router with pre-set priority, includes one in each newly-increased routing table
Individual routing rule corresponding with virtual router public network gateway;Sending module, belongs to for the destination address in packet to be sent
In the case of virtual router public network, according to the corresponding newly-increased routing table of the source address of packet to be sent, by number to be sent
Send to destination address according to bag;Wherein, pre-set priority is less than the priority of Intranet routing rule and higher than default route rule
Priority.
Further, sending module includes:Submodule is searched, for according to the source address of packet to be sent on virtual road
By lookup newly-increased routing table corresponding with source address in the newly-increased routing table of device;Matched sub-block, for coupling and source address pair
The routing rule of the newly-increased routing table that answers;Sending submodule, for the route rule according to newly-increased routing table corresponding with source address
Then packet to be sent is sent to destination address.
Further, searching submodule includes:Converting unit, for the source address of packet to be sent to be converted into corresponding to
Public network address;Determining unit, for determining that the routing table belonging to the corresponding gateway of public network address is that source address is corresponding newly-increased
Routing table.
Further, in the case that the destination address in data to be sent belongs to virtual router Intranet, by Intranet
Packet to be sent is forwarded to destination address by interface.
Further, module, for being split the master meter in the virtual router, wherein, the master meter are split
Including:Intranet routing rule and default route rule;Mobile module, is moved to tool for will split the default route rule for obtaining
Have in the new routing table of pre-set priority.
Another aspect according to embodiments of the present invention, additionally provides a kind of virtual router, including:In above-described embodiment
The data processing equipment of virtual router.
In embodiments of the present invention, by be less than Intranet routing rule and higher than default route rule priority in void
Intend adding in router and increase routing table newly, in the case that packets need to be sent is sent to public network, according to newly-increased route
Table sends data packets to destination address.Due to being provided with above-mentioned newly-increased routing table corresponding to altogether toward the routing rule of gateway,
Therefore the data of destination address different public gateway can be sent out by a virtual router by way of increasing routing table newly
Send, it is not necessary to multiple virtual routers are disposed, need using not so as to solve the different public network network segments used in prior art
Same virtual router causes increased the technical problem of the complexity using virtual router, and having reached can be in many public networks net
A virtual router is used only in the case of pass, reduce the complexity that virtual router is used, reduce the virtual road of management
Workload by device.
Description of the drawings
Accompanying drawing described herein is used for providing a further understanding of the present invention, constitutes the part of the application, this
Bright schematic description and description does not constitute inappropriate limitation of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the schematic diagram of a kind of routing table of the virtual router according to prior art and main table routing rule;
Fig. 2 is the signal for sending data packets to different public network gateways according to a kind of virtual router of prior art
Figure;
Fig. 3 is the flow chart of the data processing method of virtual router according to embodiments of the present invention;
Fig. 4 is the corresponding relation of a kind of optional source address, routing table and public network gateway according to embodiments of the present invention
Schematic diagram;
Fig. 5 is that a kind of virtual router according to embodiments of the present invention sends data packets to showing for different public network gateways
It is intended to;
Fig. 6 is a kind of routing table of virtual router and the schematic diagram of routing rule according to the embodiment of the present application;And
Fig. 7 is a kind of schematic diagram of the data processing equipment of the virtual router according to the embodiment of the present application.
Specific embodiment
In order that those skilled in the art more fully understand the present invention program, below in conjunction with the embodiment of the present invention
Accompanying drawing, is clearly and completely described to the technical scheme in the embodiment of the present invention, it is clear that described embodiment is only
The embodiment of a present invention part, rather than whole embodiments.Based on the embodiment in the present invention, ordinary skill people
The every other embodiment obtained under the premise of creative work is not made by member, should all belong to the model of present invention protection
Enclose.
It should be noted that description and claims of this specification and the term " first " in above-mentioned accompanying drawing, "
Two " be etc. for distinguishing similar object, without for describing specific order or precedence.It should be appreciated that so using
Data can exchange in the appropriate case, so as to embodiments of the invention described herein can with except here diagram or
Order beyond those of description is implemented.Additionally, term " comprising " and " having " and their any deformation, it is intended that cover
Lid is non-exclusive to be included, and for example, the process, method, system, product or the equipment that contain series of steps or unit are not necessarily limited to
Those steps that clearly lists or unit, but may include clearly not list or for these processes, method, product
Or intrinsic other steps of equipment or unit.
Embodiment 1
According to embodiments of the present invention, there is provided a kind of embodiment of the data processing method of virtual router, explanation is needed
, can hold in the such as computer system of one group of computer executable instructions the step of the flow process of accompanying drawing is illustrated
OK, and, although show logical order in flow charts, but in some cases, can be to be different from order herein
Execute shown or described step.
Fig. 3 is the flow chart of the data processing method of virtual router according to embodiments of the present invention, as shown in figure 3, should
Method comprises the steps:
Step S302, is added in virtual router with pre-set priority and increases routing table newly, is wrapped in each newly-increased routing table
Containing a routing rule corresponding with virtual router public network gateway.
Step S304, in the case that the destination address of packet to be sent belongs to virtual router public network, according to pending
The corresponding newly-increased routing table of source address of packet is sent, packet to be sent is sent to destination address;Wherein, pre-set priority
Priority and the priority regular higher than default route less than Intranet routing rule.
Specifically, above-mentioned source address can be source IP, and destination address can also be Target IP.
In above-mentioned steps, increase route after Intranet routing rule priority, before default route rule prioritization
Table, arranges 1 default route rule (corresponding 1 virtual router public network gateway) in each newly-increased routing table, and arranges
Policybased routing searches corresponding routing table according to the source IP address in packet.The Intranet IP address conversion side intersegmental with many public networks
Method can be by Iptables (IPtables is the IP packet filtration system integrated with 3.5 newest version linux kernels)
Realize.When the purpose IP address of packet belong to virtual router Intranet, priority match Intranet routing rule, from interior network interface
Forward;When the purpose IP address of packet belong to virtual router public network, corresponding route is searched according to source IP address
Table, mates the default route rule in the routing table, is forwarded to corresponding public network gateway from public network interface.
From the foregoing, it will be observed that the application above-mentioned steps pass through be less than Intranet routing rule and regular higher than default route preferential
Level adds newly-increased routing table in virtual router, in the case that packets need to be sent is sent to public network, according to new
Increase routing table and send data packets to destination address.Due to being provided with corresponding to altogether toward the route of gateway in above-mentioned newly-increased routing table
Rule, therefore can be by way of increasing routing table newly, by the data of destination address different public gateway by a virtual flow-line
Device sends, it is not necessary to dispose multiple virtual routers, needs to make so as to solve the different public network network segments used in prior art
Cause increased the technical problem of the complexity using virtual router with different virtual routers, having reached can be how public
A virtual router is used only in the case of net gateway, reduce the complexity that virtual router is used, reduce management empty
Intend the workload of router.
Optionally, according to the above embodiments of the present application, according to the corresponding newly-increased routing table of the source address of packet to be sent,
Packet to be sent is sent to destination address, including:
Step S3041, the source address according to packet to be sent are searched and source in the newly-increased routing table of virtual router
The corresponding newly-increased routing table in address.
Step S3043, mates the routing rule of newly-increased routing table corresponding with source address.
Step S3045, according to the routing rule of newly-increased routing table corresponding with source address by packet to be sent send to
Destination address.
From the foregoing, it will be observed that the application above-mentioned steps according to the source address of packet to be sent virtual router newly-increased route
Newly-increased routing table corresponding with source address is searched in table, mates the routing rule of newly-increased routing table corresponding with source address, according to
The source address of packet to be sent searches newly-increased routing table corresponding with source address in the newly-increased routing table of virtual router.On
The scheme of stating achieves the effect for sending data packets to corresponding public network gateway by increasing routing table newly.
Optionally, according to the above embodiments of the present application, according to the source address of packet to be sent in the new of virtual router
Increase in routing table and newly-increased routing table corresponding with source address is searched, including:
Step S30411, the source address of packet to be sent is converted into corresponding public network address.
Step S30413, determines that the routing table belonging to the corresponding gateway of public network address is the corresponding newly-increased route of source address
Table.
In order to the corresponding relation of source IP, routing table, public network gateway is expanded on further, Fig. 4 is according to embodiments of the present invention
A kind of schematic diagram of the corresponding relation of optional source address, routing table and public network gateway, according to Fig. 4, packet is turned
Before being dealt into public network, source IP address can be converted into a public network IP address, it is (corresponding that the public network IP must correspond to a public network gateway
Relation is determined by group-network construction in advance), and each public network gateway corresponds to a routing table and (increases the routing table stage newly certainly adding
Definition), then each source IP address corresponds to a routing table, and a routing table can correspond to multiple source IP address.
Therefore, it can the corresponding relation according to source IP address, routing table and public network gateway, packet to be sent is changed
After corresponding public network IP, the routing table belonging to the corresponding gateway of the public network IP is the corresponding newly-increased routing table of the packet.
Fig. 5 is that a kind of virtual router according to embodiments of the present invention sends data packets to showing for different public network gateways
It is intended to, in a kind of optional embodiment, in conjunction with the example shown in Fig. 5, outer net has 2 network segments, the wherein network segment
123.103.10.0/24 the IP of corresponding gateway A for the IP of 123.103.10.1,202.16.0.0/24 corresponding gateway B is
202.16.0.1;Packet a source IP will be converted into 123.103.10.3 for Intranet IP172.17.0.11, therefore go out from gateway A
Net, packet b source IP will be converted into 202.16.0.4 for Intranet IP172.17.0.12, therefore go out outer net from gateway B.Two numbers
The table 12 that priority is 32768 and the table that priority is 32769 are respectively matched in the routing table by qr interface according to Bao Jun
13, and former IP is converted to the public network IP of corresponding table 12 and table 13, and Target IP is transmitted separately to by qg interface.Can be in void
Intend running in router above-described embodiment is realized to issue orders:
ip route delete default
ip rule add from all table 2 pref 32770
ip route add default via
ip rule add from 172.17.0.11 table 12 pref 32768
ip rule add from 172.17.0.12 table 13 pref 32769
ip route add default via 123.103.10.1 dev qg table 12
ip route add default via 202.16.0.1 dev qg table 13
Optionally, according to the above embodiments of the present application, belong to virtual router Intranet in the destination address of data to be sent
In the case of, packet to be sent is forwarded to by destination address by the interface of Intranet.
Optionally, according to the above embodiments of the present application, newly-increased being added in the virtual router with pre-set priority
Routing table, in each described newly-increased routing table comprising routing rule corresponding with the virtual router public network gateway it
Before, methods described also includes:
Step S306, the master meter in the virtual router is split, and wherein, the master meter includes:Intranet route
Rule and default route rule.
Step S308, the default route rule that fractionation is obtained are moved in the new routing table with pre-set priority.Can
Choosing, the pre-set priority of above-mentioned new routing table can be lowest priority.
Fig. 6 is a kind of routing table of virtual router and the schematic diagram of routing rule according to the embodiment of the present application, in conjunction with
Example described in Fig. 4, former Intranet routing rule are all present in main routing table with default route rule, and the routing table for newly increasing is looked into
Look for priority again between Intranet routing rule and default route rule, so first main routing table is decoupled,
For convenience of arranging, Intranet routing rule is remained in main routing table, and it is excellent that former default route rule is moved to lookup
First level is than relatively low routing table (needing many reserved certain priority space to increase policybased routing table to facilitate below).With Fig. 1
Contrast, former default route rule is moved to new routing table from main routing table by Fig. 6, and (table number scope is 1-252, and in figure is
2), the lookup priority of the policybased routing is set to minimum (in figure is 32770), when the high routing table of priority or routing table are advised
When then the match is successful, it will mate this default rule;And source IP address 172.17.0.10 and public network are drawn according to Fig. 1 method
The corresponding relation of gateway 123.103.10.1, Provisioning Policy route make source IP address new for the packet lookup of 172.17.0.10
The routing table (in figure is 12) of increasing carries out rule match, and arranging default rule in the routing table forwards a packet to all data
Public network gateway 123.103.10.1, in the same manner source IP address be forwarded to public network gateway for the packet of 172.17.0.11
202.16.0.1.The routing table for newly increasing, searches priority and have to be lower than main and the road being located higher than default route rule
By table (in figure is respectively 32728,32769).
Embodiment 2
According to embodiments of the present invention, there is provided a kind of embodiment of the data processing equipment of virtual router, Fig. 7 is basis
A kind of schematic diagram of the data processing equipment of virtual router of the embodiment of the present application, in conjunction with shown in Fig. 7, the device includes:
Add module 70, increases routing table newly for adding in virtual router with pre-set priority, each newly-increased route
Include a routing rule corresponding with virtual router public network gateway in table;
Sending module 72, in the case of belonging to virtual router public network in the destination address of packet to be sent, root
According to the corresponding newly-increased routing table of the source address of packet to be sent, packet to be sent is sent to destination address;
Wherein, pre-set priority is less than priority and the priority regular higher than default route of Intranet routing rule.
From the foregoing, it will be observed that the application said apparatus and are advised higher than default route to be less than Intranet routing rule by add module
Priority then add in virtual router increase newly routing table, by sending module packets need to be sent send to
In the case of public network, destination address is sent data packets to according to newly-increased routing table.Due to being provided with above-mentioned newly-increased routing table
Corresponding to the routing rule of past gateway altogether, therefore can be by way of increasing routing table newly, by destination address different public gateway
Data sent by a virtual router, it is not necessary to dispose multiple virtual routers, used in solving prior art
The different public network network segments needs to cause increased the technology of the complexity using virtual router using different virtual routers
Problem, has reached and can reduce virtual router use only using a virtual router in the case of many public networks gateway
Complexity, reduce management virtual router workload.
Optionally, according to the above embodiments of the present application, sending module includes:
Submodule is searched, for searching in the newly-increased routing table of virtual router according to the source address of packet to be sent
Newly-increased routing table corresponding with source address;
Matched sub-block, for mating the routing rule of newly-increased routing table corresponding with source address.
Sending submodule, for sending out packet to be sent according to the routing rule of newly-increased routing table corresponding with source address
Deliver to destination address.
From the foregoing, it will be observed that the application said apparatus are by searching source address of the submodule according to packet to be sent on virtual road
By newly-increased routing table corresponding with source address is searched in the newly-increased routing table of device, mated by matched sub-block corresponding with source address
Newly-increased routing table routing rule, by sending submodule according to the source address of packet to be sent in the new of virtual router
Increase in routing table and search newly-increased routing table corresponding with source address.Such scheme is achieved to be sent out packet by increasing routing table newly
Deliver to the effect of corresponding public network gateway.
Optionally, according to the above embodiments of the present application, searching submodule includes:
Converting unit, for being converted into corresponding public network address by the source address of packet to be sent.
Determining unit, for determining that the routing table belonging to the corresponding gateway of public network address is the corresponding newly-increased route of source address
Table.
Optionally, according to the above embodiments of the present application, belong to virtual router Intranet in the destination address of data to be sent
In the case of, packet to be sent is forwarded to by destination address by the interface of Intranet.
Optionally, according to the above embodiments of the present application, said apparatus also include:
Module is split, for the master meter in the virtual router is split, wherein, the master meter includes:Intranet
Routing rule and default route rule.
Mobile module, is moved to the new routing table with pre-set priority for will split the default route rule for obtaining
In.
Embodiment 3
According to embodiments of the present invention, there is provided a kind of embodiment of virtual router, the virtual router include embodiment 2
In any one virtual router data processing equipment.
In above-mentioned steps, increase route after Intranet routing rule priority, before default route rule prioritization
Table, arranges 1 default route rule (corresponding 1 virtual router public network gateway) in each newly-increased routing table, and arranges
Policybased routing searches corresponding routing table according to the source IP address in packet.The Intranet IP address conversion side intersegmental with many public networks
Method can be realized by Iptables.When the purpose IP address of packet belong to virtual router Intranet, priority match Intranet
Routing rule, forwards from interior network interface;When the purpose IP address of packet belong to virtual router public network, according to source IP
The corresponding routing table of address search, mates the default route rule in the routing table, is forwarded to corresponding public network from public network interface
Gateway.
The data processing equipment of the virtual router included by virtual reason device that the above embodiments of the present application are proposed passes through
Add module is with less than Intranet routing rule and the priority higher than default route rule adds newly-increased road in virtual router
By table, by sending module in the case that packets need to be sent is sent to public network, according to newly-increased routing table by data
Bag is sent to destination address.Due to being provided with corresponding to altogether toward the routing rule of gateway in above-mentioned newly-increased routing table, therefore permissible
By way of increasing routing table newly, the data of destination address different public gateway are sent by a virtual router, it is not necessary to
Multiple virtual routers are disposed, is needed using different virtual roads so as to solve the different public network network segments used in prior art
Cause increased the technical problem of the complexity using virtual router by device, having reached can be in the case of many public networks gateway
Only a virtual router is used, the complexity that virtual router is used is reduced, reduce the work of management virtual router
Amount.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
In the above embodiment of the present invention, the description to each embodiment all emphasizes particularly on different fields, and does not have in certain embodiment
The part of detailed description, may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed technology contents, can pass through other
Mode is realized.Wherein, device embodiment described above is only the schematically division of for example described unit, Ke Yiwei
A kind of division of logic function, can have when actually realizing other dividing mode, for example multiple units or component can in conjunction with or
Person is desirably integrated into another system, or some features can be ignored, or does not execute.Another, shown or discussed is mutual
Between coupling direct-coupling or communication connection can be the INDIRECT COUPLING or communication link of unit or module by some interfaces
Connect, can be electrical or other forms.
The unit that illustrates as separating component can be or may not be physically separate, aobvious as unit
The part for showing can be or may not be physical location, you can be located at a place, or can also be distributed to multiple
On unit.Some or all of unit therein can be selected according to the actual needs to realize the purpose of this embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it is also possible to
It is that unit is individually physically present, it is also possible to which two or more units are integrated in a unit.Above-mentioned integrated list
Unit both can be realized in the form of hardware, it would however also be possible to employ the form of SFU software functional unit is realized.
If the integrated unit is realized and as independent production marketing or use using in the form of SFU software functional unit
When, can be stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially
The part in other words prior art being contributed or all or part of the technical scheme can be in the form of software products
Embody, the computer software product is stored in a storage medium, use so that a computer including some instructions
Equipment (can be personal computer, server or network equipment etc.) execute each embodiment methods described of the present invention whole or
Part steps.And aforesaid storage medium includes:USB flash disk, read-only storage (ROM, Read-Only Memory), arbitrary access are deposited
Reservoir (RAM, Random Access Memory), portable hard drive, magnetic disc or CD etc. are various can be with store program codes
Medium.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should
It is considered as protection scope of the present invention.
Claims (11)
1. a kind of data processing method of virtual router, it is characterised in that include:
Added in the virtual router with pre-set priority and increase routing table newly, in each described newly-increased routing table, include one
Routing rule corresponding with the virtual router public network gateway;
In the case that the destination address of packet to be sent belongs to the virtual router public network, according to packet to be sent
The corresponding newly-increased routing table of source address, the packet to be sent is sent to the destination address;
Wherein, the pre-set priority is less than priority and the priority regular higher than default route of Intranet routing rule.
2. method according to claim 1, it is characterised in that according to the corresponding newly-increased road of the source address of packet to be sent
By table, the packet to be sent is sent to the destination address, including:
Source address according to packet to be sent is searched and the source address pair in the newly-increased routing table of the virtual router
The newly-increased routing table that answers;
The routing rule of coupling newly-increased routing table corresponding with the source address;
Routing rule according to the newly-increased routing table corresponding with the source address sends the packet to be sent to institute
State destination address.
3. method according to claim 2, it is characterised in that according to the source address of packet to be sent on the virtuality road
By searching newly-increased routing table corresponding with the source address in the newly-increased routing table of device, including:
The source address of the packet to be sent is converted into corresponding public network address;
Determine that the routing table belonging to the corresponding gateway of the public network address is the corresponding newly-increased routing table of the source address.
4. method according to claim 1, it is characterised in that belong to the void in the destination address of the data to be sent
In the case of intending router Intranet, the packet to be sent is forwarded to by the destination address by the interface of the Intranet.
5. method according to claim 1, it is characterised in that added in the virtual router with pre-set priority
Newly-increased routing table, includes a routing rule corresponding with the virtual router public network gateway in each described newly-increased routing table
Before, methods described also includes:
Master meter in the virtual router is split, wherein, the master meter includes:Intranet routing rule and default route
Rule;
The default route rule that fractionation is obtained is moved in the new routing table with pre-set priority.
6. a kind of data processing equipment of virtual router, it is characterised in that include:
Add module, increases routing table, each described newly-increased road newly for adding in the virtual router with pre-set priority
By comprising a routing rule corresponding with the virtual router public network gateway in table;
Sending module, in the case of belonging to the virtual router public network in the destination address of packet to be sent, according to
The corresponding newly-increased routing table of the source address of packet to be sent, the packet to be sent is sent to the destination address;
Wherein, the pre-set priority is less than priority and the priority regular higher than default route of Intranet routing rule.
7. device according to claim 6, it is characterised in that the sending module includes:
Submodule is searched, for searching in the newly-increased routing table of the virtual router according to the source address of packet to be sent
Newly-increased routing table corresponding with the source address;
Matched sub-block, for mating the routing rule of newly-increased routing table corresponding with the source address;
Sending submodule, for will be described to be sent according to the routing rule of the newly-increased routing table corresponding with the source address
Packet is sent to the destination address.
8. device according to claim 7, it is characterised in that the lookup submodule includes:
Converting unit, for being converted into corresponding public network address by the source address of the packet to be sent;
Determining unit, for determining that the routing table belonging to the corresponding gateway of the public network address is that the source address is corresponding newly-increased
Routing table.
9. device according to claim 6, it is characterised in that belong to the void in the destination address of the data to be sent
In the case of intending router Intranet, the packet to be sent is forwarded to by the destination address by the interface of the Intranet.
10. device according to claim 6, it is characterised in that described device also includes:
Module is split, for the master meter in the virtual router is split, wherein, the master meter includes:Intranet route
Rule and default route rule;
Mobile module, is moved in the new routing table with pre-set priority for will split the default route rule for obtaining.
11. a kind of virtual router, it is characterised in that including the virtual router described in any one in claim 6 to 10
Data processing equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610895814.5A CN106487691A (en) | 2016-10-13 | 2016-10-13 | The data processing method of virtual router, device and virtual router |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610895814.5A CN106487691A (en) | 2016-10-13 | 2016-10-13 | The data processing method of virtual router, device and virtual router |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106487691A true CN106487691A (en) | 2017-03-08 |
Family
ID=58269352
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610895814.5A Pending CN106487691A (en) | 2016-10-13 | 2016-10-13 | The data processing method of virtual router, device and virtual router |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106487691A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109039913A (en) * | 2018-08-23 | 2018-12-18 | 郑州云海信息技术有限公司 | Virtual routing device and virtual machine communication system |
CN111884936A (en) * | 2020-07-22 | 2020-11-03 | 深信服科技股份有限公司 | Routing method, routing device, electronic equipment and storage medium |
CN113472907A (en) * | 2020-03-30 | 2021-10-01 | 中兴通讯股份有限公司 | Network access method, router, electronic device and computer readable medium |
CN115334171A (en) * | 2022-06-24 | 2022-11-11 | 华能国际电力江苏能源开发有限公司 | Method for compatible intercommunication of IP addresses of different network segments into single data chain |
CN115426313A (en) * | 2022-08-31 | 2022-12-02 | 中电云数智科技有限公司 | NAT optimization device and method based on OVN virtual machine network |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013066422A1 (en) * | 2011-10-21 | 2013-05-10 | Uniloc Luxembourg S.A. | Traceback packet transport protocol |
CN103259717A (en) * | 2012-02-17 | 2013-08-21 | 华为技术有限公司 | Routing method and routing device based on strategy customization |
-
2016
- 2016-10-13 CN CN201610895814.5A patent/CN106487691A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013066422A1 (en) * | 2011-10-21 | 2013-05-10 | Uniloc Luxembourg S.A. | Traceback packet transport protocol |
CN103259717A (en) * | 2012-02-17 | 2013-08-21 | 华为技术有限公司 | Routing method and routing device based on strategy customization |
Non-Patent Citations (5)
Title |
---|
CHENGXUYONGHU: "《IP-route管理路由》", 《51CTO》 * |
SAMMYLIU: "《理解 OpenStack 高可用(HA)(3):Neutron 分布式虚拟路由(Neutron Distributed Viirrttuall》", 《博客园》 * |
VINCENT VAN GOGH: "关于ip route 线路负载均衡的一些总结", 《博客园》 * |
田林: "利用Linux策略路由实现Internet多出口链路互联", 《楚雄师范学院学报》 * |
黄继海 等: "《国家网络技术水平认证考试指南 基础与Windows篇》", 30 September 2003, 河南科学技术出版社 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109039913A (en) * | 2018-08-23 | 2018-12-18 | 郑州云海信息技术有限公司 | Virtual routing device and virtual machine communication system |
CN113472907A (en) * | 2020-03-30 | 2021-10-01 | 中兴通讯股份有限公司 | Network access method, router, electronic device and computer readable medium |
CN111884936A (en) * | 2020-07-22 | 2020-11-03 | 深信服科技股份有限公司 | Routing method, routing device, electronic equipment and storage medium |
CN115334171A (en) * | 2022-06-24 | 2022-11-11 | 华能国际电力江苏能源开发有限公司 | Method for compatible intercommunication of IP addresses of different network segments into single data chain |
CN115426313A (en) * | 2022-08-31 | 2022-12-02 | 中电云数智科技有限公司 | NAT optimization device and method based on OVN virtual machine network |
CN115426313B (en) * | 2022-08-31 | 2023-08-18 | 中电云数智科技有限公司 | NAT optimization device and method based on OVN virtual machine network |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106487691A (en) | The data processing method of virtual router, device and virtual router | |
US9098601B2 (en) | Ternary content-addressable memory assisted packet classification | |
US8107376B2 (en) | Managing hierarchically organized subscriber profiles | |
US20150131666A1 (en) | Apparatus and method for transmitting packet | |
CN105591863B (en) | A kind of method and apparatus for realizing virtual private cloud network Yu external network intercommunication | |
CN105791214B (en) | Method and equipment for converting RapidIO message and Ethernet message | |
RU2661768C2 (en) | Arp processing method, switch device and control module | |
US20180287942A1 (en) | Forwarding Data Packets | |
CN107113240A (en) | Expansible VLAN file transmitting method, computer equipment and computer-readable recording medium | |
CN107113241A (en) | Route determining methods, network collocating method and relevant apparatus | |
CN103152269B (en) | A kind of message forwarding method based on NAT and equipment | |
CN102035735A (en) | Device and method for providing forwarding and qos information | |
CN112448887B (en) | Segmented routing method and device | |
US9300758B2 (en) | Efficient name management for named data networking in datacenter networks | |
JP2018515052A (en) | Multicast data packet forwarding | |
CN104486229B (en) | A kind of method and apparatus for realizing the forwarding of VPN message | |
CN107707474A (en) | A kind of route distribution method and system | |
CN103763195B (en) | A kind of method and device of transmitting message | |
EP1673920B1 (en) | Method and apparatus for translating data packets from one network protocol to another | |
US9819641B2 (en) | Method of and a processing device handling a protocol address in a network | |
WO2017032145A1 (en) | Domain name forwarding method and apparatus | |
CN107360089A (en) | A kind of method for routing foundation, business datum conversion method and device | |
CN116982307A (en) | Method and computing device for enforcing functional filtering rules in a clustered infrastructure | |
CN104883325B (en) | PVLAN interchangers and its method for being connected to non-PVLANs device | |
EP2996303A1 (en) | Input parameter generation method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170308 |