CN108881381A - A kind of message routing determines method, apparatus and four-layer load-equalizing device - Google Patents
A kind of message routing determines method, apparatus and four-layer load-equalizing device Download PDFInfo
- Publication number
- CN108881381A CN108881381A CN201810420154.4A CN201810420154A CN108881381A CN 108881381 A CN108881381 A CN 108881381A CN 201810420154 A CN201810420154 A CN 201810420154A CN 108881381 A CN108881381 A CN 108881381A
- Authority
- CN
- China
- Prior art keywords
- address
- directly
- connected network
- clear text
- gateway
- 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
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
- H04L67/63—Routing a service request depending on the request content or context
-
- 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
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
Abstract
The embodiment of the invention provides a kind of message routings to determine method, apparatus and four-layer load-equalizing device.Method includes:Determine whether the purpose IP address of clear text is located in directly-connected network section, the directly-connected network section is the network segment of directly-connected network belonging to the four-layer load-equalizing device;If the destination IP address is located in the directly-connected network section, target MAC (Media Access Control) address is obtained, the target MAC (Media Access Control) address is the MAC Address that the network equipment of the directly-connected network is accessed using the destination IP address;Next-hop mac address by the target MAC (Media Access Control) address, as the clear text.The embodiment of the present invention, it can be located in directly-connected network section in the purpose IP address for determining clear text, directly using target MAC (Media Access Control) address as the next-hop mac address of clear text, complete the determination of message routing, it no longer needs to determine message routing using routing rule complicated in kernel protocol stack, effectively improves the efficiency of four-layer load-equalizing device.
Description
Technical field
The present invention relates to network transmission technology fields, determine method, apparatus and four layers more particularly to a kind of message routing
Load balancer.
Background technique
In order to obtain higher calculated performance, can be provided using multiple servers as a server cluster for client
Service, client are directed to the message of the server set pocket transmission, can be first sent to the load balancer of the server cluster
In, then be sent in the server cluster in some server by load balancer.In the prior art, load balancer can be with
The 4th layer worked in OSI (Open System Interconnect, open interconnection information system) seven layer model (passes
Defeated layer), this load balancer is commonly referred to as four-layer load-equalizing device, and four layers of balanced device, can be according to interior after receiving message
Routing rule specified in core protocol stack determines message routing, and sends the message according to determining routing.
Inventor has found that at least there are the following problems for the prior art in the implementation of the present invention:
The routing rule of kernel protocol stack defined in four-layer load-equalizing device, what is be often designed is complex, because
This determines message routing according to the routing rule, and biggish resource overhead and time may be brought to spend, limit four layers of load
The efficiency of balanced device transmission message.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of high-performance method for routing, device and four-layer load-equalizing device, with
Realize the efficiency for simplifying routing rule to improve four-layer load-equalizing device.Specific technical solution is as follows:
In the embodiment of the present invention in a first aspect, providing a kind of message routing determines method, it is equal to be applied to four layers of load
Weighing apparatus, including:
Determine whether the purpose IP address of clear text is located in directly-connected network section, the directly-connected network section is described four
The network segment of directly-connected network belonging to layer load balancer;
If the destination IP address is located in the directly-connected network section, acquisition target MAC (Media Access Control) address, the purpose MAC
Location is the MAC Address that the network equipment of the directly-connected network is accessed using the destination IP address;
Using the target MAC (Media Access Control) address as the next-hop mac address of the clear text.
With reference to first aspect, in the first possible implementation, in the destination IP of the determining clear text
Before whether location is located in directly-connected network section, the method also includes:
Whether the purpose IP address for determining clear text is local IP address;
If the destination IP address is local IP address, the clear text is sent to upper-layer protocol;
If the destination IP address is not local IP address, the purpose IP address for executing the determining clear text is
The no step in directly-connected network section.
With reference to first aspect, in the second possible implementation, in the destination IP of the determining clear text
After whether location is located in directly-connected network section, the method also includes:
If the destination IP address is not located in the directly-connected network section, using the MAC Address of gateway as next
Hop MAC address, the gateway belong to the directly-connected network.
The possible implementation of second with reference to first aspect is incited somebody to action described in the third possible implementation
Before the MAC Address of gateway is as next-hop mac address, the method also includes:
Determine that, with the presence or absence of effective routing in routing table that gateway is saved, the effective routing is to include the mesh
IP address routing;
If executed described by gateway there are the effective routing in the routing table that the gateway is saved
The step of MAC Address is as next-hop mac address;
If the effective routing is not present in the routing table that the gateway is saved, discharge the report to be processed
Text.
With reference to first aspect, in the fourth possible implementation, described using the MAC Address of gateway as under
Before one hop MAC address, the method also includes:
It determines in routing table that gateway is saved with the presence or absence of the routing comprising the destination IP address;
According to directly-connected network from the sequence of length, it is described straight successively to determine whether the purpose IP address of clear text is located at
Even network segment uh.
In second aspect provided in an embodiment of the present invention, a kind of message routing determining device is provided, including:
Address detected module, it is described for determining whether the purpose IP address of clear text is located in directly-connected network section
In directly-connected network section, the directly-connected network section is in the network segment of directly-connected network belonging to the four-layer load-equalizing device;
Address acquisition module, if be located in the directly-connected network section for the destination IP address, with obtaining purpose MAC
Location, the target MAC (Media Access Control) address are the MAC Address that the network equipment of the directly-connected network is accessed using the destination IP address;
Target determination module, using the target MAC (Media Access Control) address as the next-hop mac address of the clear text.
In conjunction with second aspect, in the first possible implementation, the address detected module is also used to described true
Determine clear text purpose IP address whether be located in directly-connected network section before, determine that the purpose IP address of clear text is
No is local IP address;If the destination IP address is not local IP address, the purpose of the determining clear text is executed
Whether IP address is located at the step of directly-connected network section;
The target determination module, if being also used to the destination IP address is local IP address, by the report to be processed
Text is sent to upper-layer protocol.
In conjunction with second aspect, in the second possible implementation, the target determination module is also used to described true
Whether the purpose IP address for determining clear text is located at after directly-connected network section, if the destination IP address be not located at it is described straight
Even in network segment, using the MAC Address of gateway as next-hop mac address, the gateway belongs to the directly-connected network.
In conjunction with second of possible implementation of second aspect, in the third possible implementation, the address
Before detection module is also used to described using the MAC Address of gateway as next-hop mac address, determine that gateway is protected
It whether there is effective routing in the routing table deposited, the effective routing is the routing comprising the target ip address;If described
The effective routing is not present in the routing table that gateway is saved, discharges the clear text;
The target determination module, if be also used in the routing table that the gateway is saved, there are effective roads
By executing described using the MAC Address of gateway as the step of next-hop mac address.
In conjunction with second aspect, in the fourth possible implementation, the address detected module is specifically used for according to straight
The even sequence of network segment from long to short successively determines whether the purpose IP address of clear text is located at the directly-connected network section
It is interior.
In the third aspect of the embodiment of the present invention, a kind of four-layer load-equalizing device is provided, including processor, communication connect
Mouth, memory and communication bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any message of preceding claim
Route determining methods.
In the fourth aspect implemented of the present invention, a kind of computer readable storage medium is provided, it is described computer-readable to deposit
Instruction is stored in storage media, when run on a computer, so that computer executes any of the above-described message routing
Determine method.
At the 5th aspect that the present invention is implemented, a kind of computer program product comprising instruction is provided, when it is being calculated
When being run on machine, so that computer executes any of the above-described message routing and determines method.
Message routing provided in an embodiment of the present invention determines method, apparatus and four-layer load-equalizing device, can determine to
The purpose IP address of processing message is located in directly-connected network section, directly using target MAC (Media Access Control) address as the next-hop of clear text
MAC Address completes the determination of message routing, it is no longer necessary to determine message road using routing rule complicated in kernel protocol stack
By effectively improving the efficiency of four-layer load-equalizing device.Certainly, implement any of the products of the present invention or method it is not absolutely required to
Reach all the above advantage simultaneously.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described.
Fig. 1 is a kind of flow diagram that message routing provided in an embodiment of the present invention determines method;
Fig. 2 is another flow diagram that message routing provided in an embodiment of the present invention determines method;
Fig. 3 is another flow diagram that message routing provided in an embodiment of the present invention determines method;
Fig. 4 is another flow diagram that message routing provided in an embodiment of the present invention determines method;
Fig. 5 is another flow diagram that message routing provided in an embodiment of the present invention determines method;
Fig. 6 is a kind of structural schematic diagram of message routing determining device provided in an embodiment of the present invention;
Fig. 7 is a kind of structural schematic diagram of four-layer load-equalizing device provided in an embodiment of the present invention.
Specific embodiment
The embodiment of the invention provides a kind of message routings to determine method, apparatus and four-layer load-equalizing device, below will knot
The attached drawing in the embodiment of the present invention is closed, technical solution in the embodiment of the present invention is described.
It is shown a kind of flow diagram that message routing provided in an embodiment of the present invention determines method referring to Fig. 1, Fig. 1,
May include:
S110, determines whether the purpose IP address of clear text is located in directly-connected network section.
Wherein, directly-connected network section is the network segment of directly-connected network belonging to four-layer load-equalizing device.Purpose IP address refers to
The clear text IP to be sent to (Internet Protocol, Internet protocol) address, can be by four-layer load-equalizing
Device parses clear text.Directly-connected network refers to the condition of satisfaction:Four-layer load-equalizing device can without
Under the premise of other routing devices, message is forwarded directly to the network of each network equipment in the network, illustratively, direct-connected net
Network can be multiple servers, connect the local area network to be formed by four-layer load-equalizing device.
A network segment can have been only included in directly-connected network, also may include there are multiple network segments, it can only one
A directly-connected network section can also exist simultaneously multiple directly-connected network sections, convenient to discuss, below will be with there are multiple directly-connected networks
It discusses for section, it is to be understood that the case where only one directly-connected network section is also similarly.Each directly-connected network segment table
Show the section IP, can be whether determining purpose IP address is located in these sections IP, if purpose IP address is located at these
In the section IP, it is determined that purpose IP address is located in directly-connected network section, illustratively, it is assumed that there are two directly-connected network sections,
In the section IP represented by a directly-connected network section be 192.168.0.0-192.168.255.255, another directly-connected network section
The represented section IP is 172.16.0.0-172.31.255.255, if purpose IP address is 192.168.1.16, purpose
IP address is located in the section IP represented by previous directly-connected network section, if purpose IP address is 172.18.126.5, mesh
IP address be located in the section IP represented by the latter directly-connected network section, and if purpose IP address be 10.126.53.1,
Purpose IP address is not located in the section IP represented by the two directly-connected network sections.
Specifically, can be the subnet mask for being utilized respectively multiple directly-connected network sections, the network in purpose IP address is determined
Network position in position and four-layer load-equalizing device local IP address, if identical.If the two network positions are identical, it is determined that
Purpose IP address is located in directly-connected network section, if the two network positions are not identical, it is determined that purpose IP address is not located at direct-connected
In network segment.Wherein, the network position of an IP address is four layers for indicating network segment locating for the IP address, local IP address
Load balancer accesses IP address used in directly-connected network.
S120 obtains target MAC (Media Access Control) address if purpose IP address is located in directly-connected network section.
Wherein, purpose MAC (Media Access Control, media access control) address is to utilize purpose IP address
Access the MAC Address of the network equipment of directly-connected network, it is to be understood that in four-layer load-equalizing device with having can store MAC
Location table, the mac address table are stored with the MAC Address of each network equipment and these equipment in directly-connected network and access direct-connected net
The IP address that network is passed through.Target MAC (Media Access Control) address is obtained, can be the mac address table of inquiry four-layer load-equalizing device local, is searched
The MAC Address of the network equipment of directly-connected network is accessed by purpose IP address, as a purpose MAC Address.
S130, the next-hop mac address by target MAC (Media Access Control) address, as clear text.
The MAC Address of next-hop refers to that clear text next-hop to be jumped the MAC Address of the past network equipment.It selects
The embodiment can be located in directly-connected network section in the purpose IP address for determining clear text, directly make target MAC (Media Access Control) address
For the next-hop mac address of clear text, do not need to determine message routing using routing rule complicated in kernel protocol stack,
It reduces resource overhead brought by determining message routing and the time spends, improve the effect that four-layer load-equalizing device sends message
Rate.
Also, in a kind of optional application scenarios, four-layer load-equalizing device is based on DPDK (Data Plane
Development Kit, data plane development kit) technology four-layer load-equalizing device, since DPDK technology is compared to tradition
Based on linux kernel send message, application space poll receive message, it is no longer necessary to generate interrupt to receive message, therefore
The receiving efficiency of message is obviously improved.Along with the promotion of the receiving efficiency of message, if needed for each message received
More resource and time is spent to determine message routing, then four-layer load-equalizing device cannot achieve the hair to match with receiving efficiency
Efficiency is sent, the performance of four-layer load-equalizing device is limited, and the embodiment of the present invention can solve this technical problem.
In an alternative embodiment, as shown in Fig. 2, before S110, can also include:
S141 determines whether the purpose IP address of clear text is local IP address, if purpose IP address is the machine
IP address then executes S142, if purpose IP address is not local IP address, executes S110.
Specifically, whether the purpose IP address that can be determining clear text is identical as local IP address, wherein the machine
IP address can be what the routing table that inquiry four-layer load-equalizing device is locally saved was got.In the present embodiment, it bears for four layers
Carrying can save in balanced device there are two routing table, one of them is host routing table, for storing local IP address, another
IP address for network routing table, for other network equipments in directly-connected network belonging to storing.
Clear text is sent to upper-layer protocol by S142.
It is understood that IP address corresponds to OSI (Open System Interconnect, open system interconnection)
Network layer (third layer) in reference model, upper-layer protocol refer to the agreement more than network layer in OSI Reference Model.Specifically
, it can be the information (such as value of upper-layer protocol field) of the upper-layer protocol according to included in clear text, it will be wait locate
Reason message is sent to corresponding upper-layer protocol.As determining whether purpose IP address is workload required for local IP address,
Whether it is located at less than determining purpose IP address, required work in the network segment of directly-connected network belonging to four-layer load-equalizing device
Amount, therefore the embodiment is selected, can be by preferentially determining whether purpose IP address is local IP address, with determining destination IP
When location is local IP address, clear text is directly sent to upper-layer protocol, it is no longer necessary to determine whether Target IP is located at four
In the network segment of directly-connected network belonging to layer load balancer, significantly reduces and determine required for message routing in this case
Workload further saves determining message routing and spends to four-layer load-equalizing device bring resource overhead and time.
In an alternative embodiment, as shown in figure 3, can also include after S110:
S151, if purpose IP address is not located in directly-connected network section, using the MAC Address of gateway as next-hop
MAC Address.
Wherein, gateway belongs to directly-connected network, for connecting directly-connected network and other preset networks (such as internet),
To realize the communication of directly-connected network and other preset networks.It is understood that when purpose IP address is not located at directly-connected network
Network segment in when, illustration purpose IP address is likely to be in other preset networks, and clear text is sent to default
Other networks need by gateway, therefore can be using the MAC Address of gateway as the MAC Address of next-hop, net
The MAC Address for closing equipment equally can store in the mac address table that four-layer load-equalizing device is locally saved, about MAC
Location table may refer to the description in S120, and details are not described herein.The embodiment is selected, purpose IP address can be compatible with and be not located at four
Situation in the network segment of directly-connected network belonging to layer load balancer.
Further, in an alternative embodiment, as shown in figure 4, can also include before S151:
S150 determines that, with the presence or absence of effective routing in routing table that gateway is saved, effective routing is to include purpose
The routing of IP address executes S151 if there are effective routings in the routing table that gateway is saved, if gateway
In the routing table saved, effective routing is not present, then executes S152.
Wherein, there are effective routings to refer to, in the routing table that gateway is saved, at least there is a routing, meets
Condition:It include purpose IP address in the routing.If in the routing table that gateway is saved, there are effective routings, can recognize
In the routing table saved by gateway, indicate how clear text is sent to purpose IP address from gateway,
Therefore clear text can be sent to gateway, to transfer to gateway to be forwarded.
S152 discharges clear text.
If in the routing table that gateway is saved, effective routing is not present, it is believed that even if by clear text
It is sent to gateway, gateway can not also determine the address of the clear text next-hop, i.e., can not be to be processed by this
Message is sent to purpose IP address, therefore can discharge the clear text.The embodiment is selected, it can not in gateway
In the case that clear text is sent toward purpose IP address, clear text is discharged, avoids further unnecessarily resource
Expense
In an alternative embodiment, as shown in figure 5, S110 can be specifically included:
S111, according to the sequence of directly-connected network section from long to short, successively whether the purpose IP address of determining clear text
In directly-connected network section.
In the present embodiment, there are multiple directly-connected network sections, i.e., include in directly-connected network belonging to four-layer load-equalizing device
Multiple network segments.The length of directly-connected network section refers to the length of network position in IP address that the directly-connected network section is included, direct-connected
The length of network position is longer in the IP address that network segment is included, then directly-connected network Duan Yuechang.Directly-connected network section included
The length of network position in IP address can be and carry out what position was obtained with operation using subnet mask and the IP address, illustratively,
Assuming that network segment includes IP address 192.168.1.156, subnet mask 255.255.255.0, network position is in the IP address
192.168.1.0, indicate that network position is then for 11000000.10101000.00000001.00000000 in binary form
24.
It is understood that directly-connected network Duan Yuechang, then the host bit of IP is shorter in the network segment, i.e. the directly-connected network section
The network equipment that inside may include is fewer, i.e., the directly-connected network section scale may be relatively small, and the lesser directly-connected network of scale
Duan Zhong, route distance between each network equipment often relative close, therefore can preferentially determine purpose IP address whether position
In in longer directly-connected network section, under the premise of not bringing extra resource expense, the transmitting efficiency of message is improved.
A kind of structural schematic diagram of message routing determining device provided in an embodiment of the present invention is shown referring to Fig. 6, Fig. 6,
May include:
Address detected module 601, for determining whether the purpose IP address of clear text is located in directly-connected network section, directly
It is even the network segment of directly-connected network belonging to four-layer load-equalizing device in network segment;
Address acquisition module 602, if be located in directly-connected network section for the destination IP address, with obtaining purpose MAC
Location, target MAC (Media Access Control) address are the MAC Address that the network equipment of directly-connected network is accessed using purpose IP address;
Target determination module 603, using target MAC (Media Access Control) address as the next-hop mac address of clear text.
In an alternative embodiment, the address detected module 601 is also used in the determining clear text
Whether purpose IP address is located at, and before the network segment of directly-connected network belonging to the four-layer load-equalizing device is interior, determines to be processed
Whether the purpose IP address of message is local IP address;If purpose IP address is not local IP address, it is to be processed to execute determination
Whether the purpose IP address of message is located at the step in directly-connected network section;
The target determination module 603 sends clear text if being also used to purpose IP address is local IP address
To upper-layer protocol.
In an alternative embodiment, target determination module 603 are also used in the destination IP for determining clear text
Whether location is located at after directly-connected network section, if purpose IP address is not located in directly-connected network section, by the MAC Address of gateway
As next-hop mac address, the gateway belongs to directly-connected network.
Further, address detected module 601 is also used to, using the MAC Address of gateway as next-hop mac address
Before, determine that, with the presence or absence of effective routing in routing table that gateway is saved, effective routing is to include purpose IP address
Routing;If effective routing is not present in the routing table that the gateway is saved, clear text is discharged;
Target determination module 603, if being also used in the routing table that gateway is saved execute general there are effective routing
The step of MAC Address of gateway is as next-hop mac address.
In an alternative embodiment, address detected module 601, specifically for according to directly-connected network section from long to short
Sequentially, the purpose IP address of clear text is successively determined, if be located in directly-connected network section.
The embodiment of the invention also provides a kind of four-layer load-equalizing devices, as shown in fig. 7, comprises processor 701, communication connect
Mouth 702, memory 703 and communication bus 704, wherein processor 701, communication interface 702, memory 703 pass through communication bus
704 complete mutual communication,
Memory 703, for storing computer program;
Processor 701 when for executing the program stored on memory 703, realizes following steps:
Determine whether the purpose IP address of clear text is located in directly-connected network section, directly-connected network section is described four layers negative
In the network segment for carrying directly-connected network belonging to balanced device;
If the destination IP address is located in the directly-connected network section, acquisition target MAC (Media Access Control) address, the purpose MAC
Location is the MAC Address that the network equipment of the directly-connected network is accessed using the destination IP address;
Using the target MAC (Media Access Control) address as the next-hop mac address of the clear text.
Further, before whether the purpose IP address of the determining clear text is located in directly-connected network section, institute
The method of stating further includes:
Whether the purpose IP address for determining clear text is local IP address;
If the destination IP address is local IP address, the clear text is sent to upper-layer protocol;
If the destination IP address is not local IP address, the purpose IP address for executing the determining clear text is
The no step in directly-connected network section.
Further, after whether the purpose IP address of the determining clear text is located in directly-connected network section, institute
The method of stating further includes:
If the destination IP address is not located in the directly-connected network section, using the MAC Address of gateway as next
Hop MAC address, the gateway belong to the directly-connected network.
Further, before described using the MAC Address of gateway as next-hop mac address, the method is also wrapped
It includes:
Determine that, with the presence or absence of effective routing in routing table that gateway is saved, effective routing is to include the destination IP
The routing of address;
If there are effective routings in the routing table that the gateway is saved, the MAC by gateway is executed
The step of address is as next-hop mac address;
If effective routing is not present in the routing table that the gateway is saved, the clear text is discharged.
Further, whether the purpose IP address of the determining clear text is located in directly-connected network section, including:
According to the sequence of directly-connected network section from long to short, successively determine whether the purpose IP address of clear text is located at directly
Even in network segment.
It may include having multiple cores in processor 701, can be multiple cores cooperation and realize above-mentioned steps, be also possible to
Each core independently completes above-mentioned steps, and the present embodiment is not construed as limiting this.
The communication bus that above-mentioned four-layer load-equalizing device is mentioned can be Peripheral Component Interconnect standard (Peripheral
Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard
Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just
It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned four-layer load-equalizing device and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy
The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also
To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit,
CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal
Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing
It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete
Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can
It reads to be stored with instruction in storage medium, when run on a computer, so that computer executes any institute in above-described embodiment
The message routing stated determines method.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it
When running on computers, so that computer executes any message routing in above-described embodiment and determines method.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program
Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or
It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter
Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium
In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer
Instruction can pass through wired (such as coaxial cable, optical fiber, number from a web-site, computer, server or data center
User's line (DSL)) or wireless (such as infrared, wireless, microwave etc.) mode to another web-site, computer, server or
Data center is transmitted.The computer readable storage medium can be any usable medium that computer can access or
It is comprising data storage devices such as one or more usable mediums integrated server, data centers.The usable medium can be with
It is magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (for example, DVD) or semiconductor medium (such as solid state hard disk
Solid State Disk (SSD)) etc..
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment
Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device,
Four-layer load-equalizing device, computer readable storage medium, computer program product embodiment for, since it is substantially similar to
Embodiment of the method, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (11)
1. a kind of message routing determines method, it is applied to four-layer load-equalizing device, which is characterized in that the method includes:
Determine whether the purpose IP address of clear text is located in directly-connected network section, the directly-connected network section is described four layers negative
Carry the network segment of directly-connected network belonging to balanced device;
If the destination IP address is located in the directly-connected network section, target MAC (Media Access Control) address is obtained, the target MAC (Media Access Control) address is
The MAC Address of the network equipment of the directly-connected network is accessed using the destination IP address;
Using the target MAC (Media Access Control) address as the next-hop mac address of the clear text.
2. the method according to claim 1, wherein the determining clear text purpose IP address whether
Before in directly-connected network section, the method also includes:
Whether the purpose IP address for determining clear text is local IP address;
If the destination IP address is local IP address, the clear text is sent to upper-layer protocol;
Alternatively, executing the purpose IP address of the determining clear text if the destination IP address is not local IP address
The step whether being located in directly-connected network section.
3. the method according to claim 1, wherein the determining clear text purpose IP address whether
After in directly-connected network section, the method also includes:
If the destination IP address is not located in the directly-connected network section, using the MAC Address of gateway as next-hop MAC
Address, the gateway belong to the directly-connected network.
4. according to the method described in claim 3, it is characterized in that, described using the MAC Address of gateway as next-hop
Before MAC Address, the method also includes:
Determine that, with the presence or absence of effective routing in routing table that gateway is saved, the effective routing is to include the destination IP
The routing of address;
If there are the effective routings in the routing table that the gateway is saved, the MAC by gateway is executed
The step of address is as next-hop mac address;
Alternatively, discharging the report to be processed if the effective routing is not present in the routing table that the gateway is saved
Text.
5. the method according to claim 1, wherein the purpose IP address of the determining clear text whether position
In in directly-connected network section, including:
According to the sequence of directly-connected network section from long to short, it is described straight successively to determine whether the purpose IP address of clear text is located at
Even in network segment.
6. a kind of message routing determining device, it is applied to four-layer load-equalizing device, which is characterized in that described device includes:
Address detected module, it is described direct-connected for determining whether the purpose IP address of clear text is located in directly-connected network section
Network segment is in the network segment of directly-connected network belonging to the four-layer load-equalizing device;
Address acquisition module obtains target MAC (Media Access Control) address if be located in the directly-connected network section for the destination IP address,
The target MAC (Media Access Control) address is the MAC Address that the network equipment of the directly-connected network is accessed using the destination IP address;
Target determination module, for using the target MAC (Media Access Control) address as the next-hop mac address of the clear text.
7. device according to claim 6, which is characterized in that the address detected module, be also used to the determination to
Before whether the purpose IP address of processing message is located in directly-connected network section, determine clear text purpose IP address whether be
Local IP address;If the destination IP address is not local IP address, with executing the destination IP of the determining clear text
Whether location is located at the step in directly-connected network section;
The target determination module sends out the clear text if being also used to the destination IP address is local IP address
It send to upper-layer protocol.
8. device according to claim 6, which is characterized in that the target determination module, be also used to the determination to
Whether the purpose IP address of processing message is located at after directly-connected network section, if the destination IP address is not located at the direct-connected net
In network section, using the MAC Address of gateway as next-hop mac address, the gateway belongs to the directly-connected network.
9. device according to claim 8, which is characterized in that the address detected module is also used to set gateway described
Before standby MAC Address is as next-hop mac address, determine in routing table that gateway is saved with the presence or absence of effective road
By the effective routing is the routing comprising the destination IP address;If in the routing table that the gateway is saved not
There are the effective routings, discharge the clear text;
The target determination module, if be also used in the routing table that the gateway is saved there are the effective routing,
It executes described using the MAC Address of gateway as the step of next-hop mac address.
10. device according to claim 6, which is characterized in that the address detected module is specifically used for according to direct-connected net
The sequence of network section from long to short successively determines whether the purpose IP address of clear text is located in the directly-connected network section.
11. a kind of four-layer load-equalizing device, which is characterized in that including processor, communication interface, memory and communication bus,
In, processor, communication interface, memory completes mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810420154.4A CN108881381A (en) | 2018-05-04 | 2018-05-04 | A kind of message routing determines method, apparatus and four-layer load-equalizing device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810420154.4A CN108881381A (en) | 2018-05-04 | 2018-05-04 | A kind of message routing determines method, apparatus and four-layer load-equalizing device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108881381A true CN108881381A (en) | 2018-11-23 |
Family
ID=64327560
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810420154.4A Pending CN108881381A (en) | 2018-05-04 | 2018-05-04 | A kind of message routing determines method, apparatus and four-layer load-equalizing device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108881381A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325554A (en) * | 2008-08-04 | 2008-12-17 | 北京星网锐捷网络技术有限公司 | Method for establishing route, forwarding chip and three-layer switchboard |
US20160094451A1 (en) * | 2014-09-30 | 2016-03-31 | Nicira, Inc | Inline load balancing |
CN107800629A (en) * | 2016-09-07 | 2018-03-13 | 中兴通讯股份有限公司 | A kind of message forwarding method and routing device |
-
2018
- 2018-05-04 CN CN201810420154.4A patent/CN108881381A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101325554A (en) * | 2008-08-04 | 2008-12-17 | 北京星网锐捷网络技术有限公司 | Method for establishing route, forwarding chip and three-layer switchboard |
US20160094451A1 (en) * | 2014-09-30 | 2016-03-31 | Nicira, Inc | Inline load balancing |
CN107800629A (en) * | 2016-09-07 | 2018-03-13 | 中兴通讯股份有限公司 | A kind of message forwarding method and routing device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105207873B (en) | A kind of message processing method and device | |
CN109408257B (en) | Data transmission method and device for Network On Chip (NOC) and electronic equipment | |
US9356844B2 (en) | Efficient application recognition in network traffic | |
US9910687B2 (en) | Data flow affinity for heterogenous virtual machines | |
CN104348677A (en) | Deep packet inspection method and equipment and coprocessor | |
CN105429879B (en) | Flow entry querying method, equipment and system | |
CN109889547A (en) | A kind of detection method and device of abnormal network equipment | |
CN103118149B (en) | Communication control method between same tenant's server and the network equipment | |
CN106155264B (en) | Manage the computer approach and computer system of the power consumption of storage subsystem | |
CN114430394B (en) | Message processing method and device, electronic equipment and readable storage medium | |
CN111382114B (en) | Data transmission method and device for network on chip and electronic equipment | |
CN106533973A (en) | Method and system for distributing service message, and equipment | |
CN104283780A (en) | Method and device for establishing data transmission route | |
CN109951371A (en) | Data forwarding method and device | |
CN104660597A (en) | Three-layer authentication method and device as well as three-layer authentication exchanger | |
CN105634944B (en) | Route loop determines method and apparatus | |
CN105634999B (en) | A kind of aging method and device of Media Access Control address | |
CN108881381A (en) | A kind of message routing determines method, apparatus and four-layer load-equalizing device | |
US10129147B2 (en) | Network-on-chip flit transmission method and apparatus | |
CN113079128B (en) | Information blocking method and device, computing equipment and computer storage medium | |
TWI665932B (en) | Group host selection method for device-to-device network and control platform for selecting group host | |
CN112994942A (en) | SDN control method and device | |
US10462017B2 (en) | Network property verification in hybrid networks | |
CN114567679B (en) | Data transmission method and device | |
CN106130800B (en) | Data frame processing method and device |
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: 20181123 |
|
RJ01 | Rejection of invention patent application after publication |