CN104301451A - Cross-network-segment host communication method, device and system - Google Patents
Cross-network-segment host communication method, device and system Download PDFInfo
- Publication number
- CN104301451A CN104301451A CN201410553310.6A CN201410553310A CN104301451A CN 104301451 A CN104301451 A CN 104301451A CN 201410553310 A CN201410553310 A CN 201410553310A CN 104301451 A CN104301451 A CN 104301451A
- Authority
- CN
- China
- Prior art keywords
- arp
- request message
- mac address
- arp request
- source
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 60
- 238000000034 method Methods 0.000 title claims abstract description 57
- 230000008569 process Effects 0.000 description 23
- 238000010586 diagram Methods 0.000 description 14
- 230000003068 static effect Effects 0.000 description 11
- 238000012545 processing Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000006424 Flood reaction Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 241000931705 Cicada Species 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/09—Mapping addresses
- H04L61/10—Mapping addresses of different types
- H04L61/103—Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of communication, and provides a cross-network-segment host communication method, device and system. The method comprises the steps that an ARP request message reported by an OpenFlow switch is received; when it is determined that a source IP and a destination IP in the ARP request message belong to different network segments, an MAC address corresponding to the destination IP in the ARP request message is determined; through the proxy MAC address of the destination IP, an ARP response message is constructed, and the ARP request message is replied, so that a source host is in communication with a destination host through the obtained proxy MAC address. Through the method, cross-network-segment host communication configuration can be simplified, and cross-network-segment host communication efficiency can be improved.
Description
Technical field
The present invention relates to communication technical field, particularly relate to a kind of cross-network segment host communication method, Apparatus and system.
Background technology
Need communication in network between main frame, first initiating communication can be called source host, what be required to carry out to communicate can be called destination host.And existing network is all divide according to the network segment, IP (the Inernet Protocol of such as segment A, Internet protocol) address realm is " 192.168.1.1/24 ~ 192.168.1.254/24 ", the IP address range of network segment B is " 192.168.2.1/24 ~ 192.168.2.254/24 ", then segment A and network segment B cross-network segment network each other.At least one main frame can be comprised in each network segment, between the main frame of different segment, cross-network segment main frame can be called mutually, such as, host A 1 in segment A and the host B 1 in network segment B cross-network segment main frame each other.TCP/IP (Transmission Control Protocol/Internet Protocol, transmission control protocol/Internet Protocol) communication is realized by gateway under normal circumstances between cross-network segment main frame.
Inter-host communication can be divided into main-machine communication between same network segment main-machine communication and cross-network segment.
In prior art same network segment main frame between source host can by obtain destination host MAC (Media Access Control) address after communicate with destination host, concrete, between same network segment, the method for main-machine communication comprises: source host sends ARP (Inernet Protocol, Internet protocol) MAC Address of request message request destination host, source IP is at least comprised in this request message, source MAC and object IP, wherein, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP; After destination host obtains this ARP request message, determine that this ARP request message is after the MAC Address of request oneself, structure ARP back message is to source host; After the ARP back message that source host acquisition destination host sends, obtain the MAC Address of destination host from this ARP back message after, just can be communicated with destination host by the MAC Address of destination host.And when source host and destination host cross-network segment, this communication mechanism but can not produce and process ARP request.
The schematic diagram of a typical cross-network segment communicating is as shown in Figure 1: segment A is corresponding with gateway A A, network segment B is corresponding with gateway BB, then for realizing the communication between cross-network segment host A 1 and B1, needing the gateway configuration of host A 1 is AA, is BB by the gateway configuration of host B 1; In addition, for realizing cross-network segment inter-host communication, each gateway has oneself IP and MAC Address, also can store IP and the MAC Address (obtaining by same network segment main-machine communication mechanism) of corresponding gateway, so that communicate with corresponding gateway in the main frame in each network segment; Usually, each gateway is all configured on router (or being used as the main frame of routing function), router can inquire about the corresponding relation between the network segment and gateway by static routing table, so that can judge it is the communication between network segment internal host according to the object IP in IP message, or the communication between cross-network segment main frame; In addition, each gateway can arrive the path (static routing) of other gateways by self storage in static routing table, communicate with other gateways.If first host A 1 initiates to communicate with host B 1, then host A 1 is source host, main frame for the purpose of host B 1, the process that two main frames realize tcp/ip communication is as follows: host A 1 sends IP message, and (in this IP message, target MAC (Media Access Control) address is gateway A A, object IP is host B 1), gateway A A (i.e. router) is according to the object IP comprised in IP message, be defined as cross-network segment inter-host communication, inquire object IP according to static routing table and belong to gateway BB, after then the target MAC (Media Access Control) address in the IP message of host A 1 is revised as gateway BB by gateway A A, IP message is sent to the down hop in static routing, i.e. gateway BB, gateway BB is again according to the host B 1 that the object IP in IP message is in self network segment, target MAC (Media Access Control) address in amendment IP message is the MAC Address of host B 1, then the IP message revised is sent to host B 1, achieve the communication of host A 1 and host B 1.
But, above-mentionedly realize in the method for cross-network segment inter-host communication, a gateway must be configured on each main frame, in addition, the static routing table used must be two-way, ratio is if any 100 gateways (network segment), then need the IP network section for other 99 gateways of each gateway configuration and gateway corresponding relation, with the path (static routing) arriving other gateways, such as gateway A A and gateway CC can not direct communication time, (such as gateway BB can communicate respectively with between gateway A A and gateway CC then to need to record the path of gateway A A to gateway CC, then the path of gateway A A to gateway CC is then via gateway BB), and the path between gateway is two-way storage, namely in gateway A A side, for gateway A A stores the path arriving gateway CC, in gateway CC side, also the path arriving gateway A A will be stored.Visible, the method for above-mentioned cross-network segment inter-host communication, configures loaded down with trivial details, and because the content stored in static routing table is complicated, causes the search efficiency of static routing table low, thus causes cross-network segment main-machine communication inefficiency.Therefore, need a kind of method of new cross-network segment inter-host communication badly, to simplify the configuration of cross-network segment main-machine communication, improve the efficiency of cross-network segment inter-host communication.
Summary of the invention
The object of this invention is to provide a kind of cross-network segment host communication method, Apparatus and system, complicated with the configuration overcoming cross-network segment main-machine communication in correlation technique, the problem of cross-network segment inter-host communication inefficiency.
The invention provides a kind of cross-network segment host communication method, comprising:
Receive the ARP request message that OpenFlow switch reports, wherein, at least comprise source IP, source MAC and object IP in this ARP request message, wherein, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP;
When the source IP determined in ARP request message and object IP belongs to different segment, determine the MAC Address that object IP in this ARP request message is corresponding; And
Construct ARP back message by the MAC Address of self agency and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
Describedly determine the MAC Address that the object IP in this ARP request message is corresponding, comprising:
The MAC Address that object IP in this ARP request message is corresponding is inquired about in the arp cache table prestored;
When inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
When inquiring about less than MAC Address, this ARP request message is forwarded to the network segment at the object IP place in this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
The ARP back message that described basis listens to determines the MAC Address that the object IP in ARP request message is corresponding.Comprise:
Respond give the correct time when there is the ARP corresponding with this ARP request message in the ARP back message listened to, the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
The corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
The ARP back message that described basis listens to determines the MAC Address that the object IP in ARP request message is corresponding.Comprise:
Respond give the correct time when there is the ARP corresponding with this ARP request message in the ARP back message listened to, the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
The corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
After the ARP request message that described reception OpenFlow switch reports, described method also comprises:
When determining that the object IP in ARP request message is not in the IP network section self acted on behalf of, this ARP request message is abandoned.
The present invention also provides a kind of cross-network segment host communication device, and described device comprises:
Receiver module, for receiving the ARP request message that OpenFlow switch reports, wherein, source IP is at least comprised, source MAC and object IP, wherein in this ARP request message, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP;
Determination module, for when the source IP determined in ARP request message and object IP belongs to different segment, determines the MAC Address that object IP in this ARP request message is corresponding;
Reply module, construct ARP back message for the MAC Address acted on behalf of with self and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
Described determination module, comprising:
Query unit, for inquiring about MAC Address corresponding to object IP in this ARP request message in the arp cache table prestored;
First determining unit, for when inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
Second determining unit, for when inquiring about less than MAC Address, is forwarded to the network segment at the object IP place in this ARP request message by this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
Described second determining unit comprises:
First determines subelement, responds give the correct time for there is the ARP corresponding with this ARP request message in the ARP back message that listen to, and the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
Second determines subelement, for being updated in arp cache table by the corresponding relation of the source IP in ARP back message and source MAC; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
Described second determine subelement also for, before the corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table, ARP request message is stored into and waits to reply in request queue;
Described second determine subelement also for, before whether there is the MAC Address corresponding with the object IP in this ARP request message in the arp cache table after inquiry upgrades, obtain ARP request message from waiting to reply request queue.
Described device also comprises:
Discard module, for after the ARP request message that described receiver module reception OpenFlow switch reports, when determining that the object IP in ARP request message is not in the IP network section self acted on behalf of, abandons this ARP request message.
The present invention also provides a kind of cross-network segment main-machine communication system, comprising:
SDN (Software Defined Network, software defined network) controller, comprise above-mentioned in arbitrary described device;
OpenFlow switch, for SDN controller report ARP request message and/or ARP back message.
The present invention at least has following beneficial effect: by the MAC Address acted on behalf of with self on behalf of answer ARP request message, realize cross-network segment main frame when communicating with without the need to relating to configuration of routers static routing without the need to h.323-configured gateway, ARP request message is replied by acting on behalf of destination host, and need not destination host process be transferred to can to reduce the flow process of process ARP request message by each ARP request message, improve the processing speed to ARP request message, so that source host can communicate as early as possible with destination host, thus improve the efficiency of cross-network segment main-machine communication.In addition, by the arp cache table storing IP of self maintained and the corresponding relation of MAC Address, so that effectively determine the MAC Address that object IP in ARP request message is corresponding fast, so that can reply ARP request message quickly.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the present invention.
Accompanying drawing explanation
Fig. 1 is cross-network segment main-machine communication schematic diagram in prior art;
Fig. 2 is the schematic diagram of cross-network segment main-machine communication system in the embodiment of the present invention;
Fig. 3 is the exemplary process diagram of cross-network segment host communication method in the embodiment of the present invention;
Fig. 4 is another exemplary process diagram of cross-network segment host communication method in the embodiment of the present invention;
Fig. 5 is the schematic diagram of cross-network segment host communication device in the embodiment of the present invention;
Fig. 6 is another schematic diagram of cross-network segment host communication device in the embodiment of the present invention.
Embodiment
Below in conjunction with Figure of description, the preferred embodiments of the present invention are described, be to be understood that, preferred embodiment described herein is only for instruction and explanation of the present invention, be not intended to limit the present invention, and when not conflicting, the embodiment in the present invention and the feature in embodiment can combine mutually.
As shown in Figure 2, be the system schematic of cross-network segment main-machine communication in the embodiment of the present invention, in this system:
SDN controller, lower even Ethernet switch, and by Ethernet switch management OpenFlow switch; OpenFlow switch, is connected with the Ethernet switch being connected SDN controller, and connects main frame, for SDN controller report ARP request message and/or ARP back message down.Wherein, in one embodiment, OpenFlow switch can connect Ethernet switch below, connects main frame under this Ethernet switch.
Based on above-mentioned system, the embodiment of the present invention provides a kind of cross-network segment host communication method, in embodiments of the present invention, when cross-network segment main frame requires to communicate, SDN controller is by the MAC Address structure ARP back message with self agency, realization is acted on behalf of destination host and is replied ARP request message, and then realizes cross-network segment main-machine communication.Without the need to picture prior art in be source host h.323-configured gateway, also without the need to being multiple gateway repeated configuration static routing table, thus can the configuration of simple implementation cross-network segment main-machine communication, realize being communicated by ARP request message between cross-network segment, and agent answers ARP request message, improve the efficiency replying ARP request message, thus improve the efficiency of cross-network segment main-machine communication.Below cross-network segment host communication method in the embodiment of the present invention is described in detail.
As shown in Figure 3, be the exemplary process diagram of cross-network segment host communication method in the embodiment of the present invention, the method comprises the following steps:
Step 301: receive the ARP request message that OpenFlow switch reports, wherein, at least comprise source IP in this ARP request message, source MAC and object IP, wherein, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP.
Step 302: when the source IP determined in ARP request message and object IP belongs to different segment, determines the MAC Address that object IP in this ARP request message is corresponding.
Wherein, in one embodiment, in advance for different segment divides, can determine whether source IP and object IP belongs to different segment by division result.
Step 303: construct ARP back message by the MAC Address of self agency and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
Wherein, after source host obtains the MAC Address of SDN controller agency according to ARP back message, communicated by the MAC Address of this agency, such as that IP message is sent to SDN controller by source host, SDN controller can be corresponding according to this object IP according to the object IP in this IP message MAC Address, this IP message is sent to destination host, thus realizes the communication between two main frames.
Wherein, in one embodiment, the MAC Address that the object IP that can be determined in this ARP request message by following steps is corresponding:
Steps A 1: inquire about the MAC Address that object IP in this ARP request message is corresponding in the arp cache table prestored.
Steps A 2: when inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
When inquiring about less than MAC Address, this ARP request message is forwarded to the network segment at the object IP place in this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
By the corresponding relation of arp cache table storing IP and MAC Address in the embodiment of the present invention, so that the MAC Address that object IP in ARP request message is corresponding can be determined fast and effectively.When there is not MAC Address corresponding to the object IP in ARP request message in this arp cache table, by only this ARP request message is flooded to object IP place the network segment and do not comprise other network segments, the quantity of the ARP request message that floods can be reduced, improve the accuracy of the ARP request message that floods.
Wherein, in one embodiment, in steps A 2, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding, can perform as following two kinds of modes:
Mode one:
Respond give the correct time when there is the ARP corresponding with this ARP request message in the ARP back message listened to, the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding.By monitoring the ARP back message corresponding with ARP request message, receiving the very first time process ARP request message of ARP back message, the processing speed of ARP request message can be improved.
Wherein, in one embodiment, for improving the accuracy of arp cache table, and effectively utilize this arp cache table to greatest extent, after receiving the ARP back message that OpenFlow switch reports, the corresponding relation of the source IP in this ARP back message and source MAC is updated in arp cache table, so that reply the ARP request message received afterwards, and can the ARP request message of not replying be processed.
Mode two:
The corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.By the MAC that the object IP unifying to be determined in ARP request message by arp cache table is corresponding, be conducive to determining corresponding MAC Address in a uniform manner.
Wherein, in one embodiment, in mode two, before the corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table, ARP request message can also be stored into and waits to reply in request queue; Before whether there is the MAC Address corresponding with the object IP in this ARP request message in arp cache table after inquiry upgrades, obtain ARP request message from waiting to reply request queue.
Wait to reply in request queue by ARP request message is stored in, can sort out unanswered ARP request message, so that manage and reply unanswered ARP request message.In addition, by after upgrading arp cache table at every turn namely inquiry have not corresponding with the object IP treating to reply in the ARP request message in request queue MAC Address, reach the object processing the ARP request message treated in answer request queue in time.
Wherein, in one embodiment, the main frame that SDN controller can act on behalf of the preset range network segment replies ARP request message, so that reduce the quantity of the main frame of each SDN controller agency, thus the quantity of SDN controller process ARP request message can be reduced, improve the treatment effeciency of SDN controller, therefore, after the ARP request message that described reception OpenFlow switch reports, can also work as when determining that object IP in ARP request message is not in the IP network section self acted on behalf of, this ARP request message is abandoned.By abandoning ARP request message in non-self acted on behalf of IP network section, reduce the quantity of process ARP request message, so that save own resource.
To sum up, in the embodiment of the present invention, by the MAC Address acted on behalf of with self on behalf of answer ARP request message, realize cross-network segment main frame to be communicated by ARP request message, reply ARP request message by acting on behalf of destination host, and need not destination host process be transferred to can to reduce the flow process of process ARP request message by each ARP request message, improve the processing speed to ARP request message, so that source host can communicate as early as possible with destination host, thus improve the efficiency of cross-network segment main-machine communication.In addition, by the arp cache table storing IP of self maintained and the corresponding relation of MAC Address, so that effectively determine the MAC Address that object IP in ARP request message is corresponding fast, so that can reply ARP request message quickly.
Below by a simple embodiment, cross-network segment host communication method in the embodiment of the present invention is described in detail.As shown in Figure 4, the method comprises:
Step 401: host A 1 sends ARP request message to Ethernet switch, in this ARP request message, object IP is the IP of host B 1.
Step 402: other ports that this ARP request message is forwarded to except source port by Ethernet switch.
Step 403: the OpenFlow switch be connected with Ethernet switch receives after this ARP asks, and reports this ARP request into SDN controller.
Step 404:SDN controller receives the ARP request message that OpenFlow switch reports.
Step 405:SDN controller judges object IP in ARP request message whether in the IP network section self acted on behalf of, and if so, then performs step 406, if not, then terminates.
Step 406:SDN controller is when the source IP determined in ARP request message and object IP belongs to different segment, inquire about in the arp cache table prestored and whether there is the MAC Address corresponding with the object IP in this ARP request message, if so, then perform step 410, then perform step 407 if not.
Step 407:SDN controller is not when inquiring the MAC Address corresponding with the object IP in ARP request message, this ARP request message is forwarded to the network segment at the object IP place in this ARP request message, and this ARP request message is stored into waits to reply in request queue.
The ARP back message that OpenFlow switch reports monitored by step 408:SDN controller, and the corresponding relation of the source IP in this ARP back message and source MAC is updated to arp cache table.
Step 409:SDN controller is after each renewal arp cache table, treat to obtain ARP request message answer request queue from this, wherein be present in this at the ARP request message of source host A to wait to reply in request queue always, to the ARP request message of host A be obtained, and whether there is the MAC Address corresponding with the object IP in the ARP request message of host A in inquiring about the arp cache table after upgrading.
Step 410:SDN controller is when inquiring the MAC Address corresponding with the object IP in ARP request message, construct ARP back message by the MAC Address of self agency and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got.
Wherein, in one embodiment, after waiting that the ARP request message replied in request queue is replied, this ARP request message is deleted from waiting to reply request queue.
Based on identical principle, the embodiment of the present invention also proposes a kind of cross-network segment host communication device, and as shown in Figure 5, this device comprises:
Receiver module 501, for receiving the ARP request message that OpenFlow switch reports, wherein, source IP is at least comprised, source MAC and object IP, wherein in this ARP request message, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP;
Determination module 502, for when the source IP determined in ARP request message and object IP belongs to different segment, determines the MAC Address that object IP in this ARP request message is corresponding;
Reply module 503, construct ARP back message for the MAC Address acted on behalf of with self and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
Wherein, in one embodiment, described determination module 502, comprising:
Query unit 504, for inquiring about MAC Address corresponding to object IP in this ARP request message in the arp cache table prestored;
First determining unit 505, for when inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
Second determining unit 506, for when inquiring about less than MAC Address, is forwarded to the network segment at the object IP place in this ARP request message by this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
Wherein, in one embodiment, as shown in Figure 6, described second determining unit 506 comprises:
First determines subelement, responds give the correct time for there is the ARP corresponding with this ARP request message in the ARP back message that listen to, and the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
Second determines subelement, for being updated in arp cache table by the corresponding relation of the source IP in ARP back message and source MAC; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
Wherein, in one embodiment, second determine subelement also for, before the corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table, ARP request message is stored into and waits to reply in request queue;
Described second determine subelement also for, before whether there is the MAC Address corresponding with the object IP in this ARP request message in the arp cache table after inquiry upgrades, obtain ARP request message from waiting to reply request queue.
Wherein, in one embodiment, as shown in Figure 6, described device also comprises:
Discard module 507, for after the ARP request message that described receiver module reception OpenFlow switch reports, when determining that the object IP in ARP request message is not in the IP network section self acted on behalf of, abandons this ARP request message.
Wherein, in one embodiment, the SDN controller in above-mentioned cross-network segment main-machine communication system can comprise arbitrary above-mentioned device.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Those skilled in the art should understand, embodiments of the invention can be provided as method, system or computer program.Therefore, the present invention can adopt the form of complete hardware embodiment, completely software implementation or the embodiment in conjunction with software and hardware aspect.And the present invention can adopt in one or more form wherein including the upper computer program implemented of computer-usable storage medium (including but not limited to magnetic disc store, CD-ROM, optical memory etc.) of computer usable program code.
The present invention describes with reference to according to the flow chart of the method for the embodiment of the present invention, equipment (system) and computer program and/or block diagram.Should understand can by the combination of the flow process in each flow process in computer program instructions realization flow figure and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame.These computer program instructions can being provided to the processor of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device to produce a machine, making the instruction performed by the processor of computer or other programmable data processing device produce device for realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be stored in can in the computer-readable memory that works in a specific way of vectoring computer or other programmable data processing device, the instruction making to be stored in this computer-readable memory produces the manufacture comprising command device, and this command device realizes the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices is provided for the step realizing the function of specifying in flow chart flow process or multiple flow process and/or block diagram square frame or multiple square frame.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.
Claims (11)
1. a cross-network segment host communication method, is characterized in that, described method comprises:
Receive the ARP request message that OpenFlow switch reports, wherein, in this ARP request message, at least comprise source internet protocol IP, source MAC and object IP, wherein, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP;
When the source IP determined in ARP request message and object IP belongs to different segment, determine the MAC Address that object IP in this ARP request message is corresponding; And
Construct ARP back message by the MAC Address of self agency and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
2. method according to claim 1, is characterized in that, describedly determines the MAC Address that the object IP in this ARP request message is corresponding, comprising:
The MAC Address that object IP in this ARP request message is corresponding is inquired about in the arp cache table prestored;
When inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
When inquiring about less than MAC Address, this ARP request message is forwarded to the network segment at the object IP place in this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
3. method according to claim 2, is characterized in that, the ARP back message that described basis listens to is determined to comprise the MAC Address that the object IP in ARP request message is corresponding:
Respond give the correct time when there is the ARP corresponding with this ARP request message in the ARP back message listened to, the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
The corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
4. method according to claim 3, is characterized in that, before the described corresponding relation by the source IP in ARP back message and source MAC is updated in arp cache table, described method also comprises:
ARP request message is stored into and waits to reply in request queue;
Before whether there is the MAC Address corresponding with the object IP in this ARP request message in arp cache table after described inquiry upgrades, described method also comprises:
ARP request message is obtained from waiting to reply request queue.
5. according to described method arbitrary in claim 1-4, it is characterized in that, after the ARP request message that described reception OpenFlow switch reports, described method also comprises:
When determining that the object IP in ARP request message is not in the IP network section self acted on behalf of, this ARP request message is abandoned.
6. a cross-network segment host communication device, is characterized in that, described device comprises:
Receiver module, for receiving the ARP request message that OpenFlow switch reports, wherein, source internet protocol IP is at least comprised in this ARP request message, source MAC and object IP, wherein, source IP and source MAC are respectively IP and the MAC Address of source host, the IP of main frame for the purpose of object IP;
Determination module, for when the source IP determined in ARP request message and object IP belongs to different segment, determines the MAC Address that object IP in this ARP request message is corresponding;
Reply module, construct ARP back message for the MAC Address acted on behalf of with self and reply ARP request message, so that source host is communicated with destination host by the MAC Address of the agency got; Wherein, in ARP back message, source MAC is the MAC Address of self agency, and the IP of main frame for the purpose of the IP of source, target MAC (Media Access Control) address is the MAC Address of source host, and object IP is the IP of source host.
7. device according to claim 6, is characterized in that, described determination module, comprising:
Query unit, for inquiring about MAC Address corresponding to object IP in this ARP request message in the arp cache table prestored;
First determining unit, for when inquiring MAC Address, the MAC Address this inquired is defined as MAC Address corresponding to object IP in this ARP request message;
Second determining unit, for when inquiring about less than MAC Address, is forwarded to the network segment at the object IP place in this ARP request message by this ARP request message; And monitor the ARP back message that OpenFlow switch reports, the MAC Address that the object IP determined in ARP request message according to the ARP back message listened to is corresponding.
8. device according to claim 7, is characterized in that, described second determining unit comprises:
First determines subelement, responds give the correct time for there is the ARP corresponding with this ARP request message in the ARP back message that listen to, and the source MAC determining in this ARP back message is the MAC Address that the object IP in this ARP request message is corresponding; Or
Second determines subelement, for being updated in arp cache table by the corresponding relation of the source IP in ARP back message and source MAC; And inquiry upgrade after arp cache table in whether there is the MAC Address corresponding with the object IP in this ARP request message, if exist, then the MAC Address that this inquires is defined as the MAC Address that object IP in this ARP request message is corresponding.
9. device according to claim 8, it is characterized in that, described second determine subelement also for, before the corresponding relation of the source IP in ARP back message and source MAC is updated in arp cache table, ARP request message is stored into and waits to reply in request queue;
Described second determine subelement also for, before whether there is the MAC Address corresponding with the object IP in this ARP request message in the arp cache table after inquiry upgrades, obtain ARP request message from waiting to reply request queue.
10., according to described device arbitrary in claim 6-9, it is characterized in that, described device also comprises:
Discard module, for after the ARP request message that described receiver module reception OpenFlow switch reports, when determining that the object IP in ARP request message is not in the IP network section self acted on behalf of, abandons this ARP request message.
11. 1 kinds of cross-network segment main-machine communication systems, is characterized in that, comprising:
Software defined network SDN controller, is connected with Ethernet switch, comprises arbitrary described device in claim 6-10;
Ethernet switch, is connected with SDN controller, and the lower management port connecting OpenFlow switch, for SDN controller, OpenFlow switch is managed;
OpenFlow switch, is connected with Ethernet switch, for SDN controller report ARP request message and/or ARP back message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410553310.6A CN104301451B (en) | 2014-10-17 | 2014-10-17 | A kind of cross-network segment host communication method, apparatus and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410553310.6A CN104301451B (en) | 2014-10-17 | 2014-10-17 | A kind of cross-network segment host communication method, apparatus and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104301451A true CN104301451A (en) | 2015-01-21 |
CN104301451B CN104301451B (en) | 2019-03-01 |
Family
ID=52321013
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410553310.6A Active CN104301451B (en) | 2014-10-17 | 2014-10-17 | A kind of cross-network segment host communication method, apparatus and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104301451B (en) |
Cited By (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105227466A (en) * | 2015-08-20 | 2016-01-06 | 北京百度网讯科技有限公司 | Communication processing method and device |
CN105530330A (en) * | 2015-12-07 | 2016-04-27 | 中国电子科技集团公司第十研究所 | Method for improving operation efficiency of ARP protocol in space information network |
CN106059929A (en) * | 2016-06-02 | 2016-10-26 | 杭州华三通信技术有限公司 | Message responding method and device |
CN106412142A (en) * | 2016-08-30 | 2017-02-15 | 浙江宇视科技有限公司 | Resource device address obtaining method and device |
CN106453298A (en) * | 2016-09-30 | 2017-02-22 | 北京邮电大学 | Scan defending method and device |
CN106657434A (en) * | 2016-11-24 | 2017-05-10 | 紫光华山信息技术有限公司 | Method and device for checking IP address |
WO2017107871A1 (en) * | 2015-12-25 | 2017-06-29 | 华为技术有限公司 | Access control method and network device |
CN107181681A (en) * | 2016-03-10 | 2017-09-19 | 中兴通讯股份有限公司 | SDN layer 2 forwarding methods and system |
CN108183978A (en) * | 2018-03-29 | 2018-06-19 | 北京环境特性研究所 | A kind of communication equipment IP address configuration method and communication equipment |
CN108989340A (en) * | 2018-08-21 | 2018-12-11 | 新开普电子股份有限公司 | A kind of implementation method directly docked with third party system |
CN111147623A (en) * | 2019-12-27 | 2020-05-12 | 深圳市丰润达科技有限公司 | Method for realizing whole-network host scanning, server and computer readable storage medium |
CN111884916A (en) * | 2020-07-24 | 2020-11-03 | 杭州希益丰新业科技有限公司 | Proxy gateway system for realizing transparent transmission based on multi-network-port computer |
CN113132218A (en) * | 2019-12-31 | 2021-07-16 | 中兴通讯股份有限公司 | Home gateway access method, device, system processor and storage medium |
CN113542042A (en) * | 2020-04-13 | 2021-10-22 | 国网电力科学研究院有限公司 | Method for structured detection of host in local area network |
CN113612801A (en) * | 2021-09-30 | 2021-11-05 | 浙江国利信安科技有限公司 | EPA gateway equipment and EPA cross-network communication method |
CN116112315A (en) * | 2022-12-27 | 2023-05-12 | 广东中兴新支点技术有限公司 | A cross-network segment communication transmission method, system, device and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102938794A (en) * | 2012-11-14 | 2013-02-20 | 华为技术有限公司 | Address resolution protocol (ARP) message forwarding method, exchanger and controller |
CN103209092A (en) * | 2013-02-28 | 2013-07-17 | 成都西加云杉科技有限公司 | Method and system for suppressing broadcast storm |
CN103460653A (en) * | 2011-03-31 | 2013-12-18 | 日本电气株式会社 | Computer system, and communication method |
-
2014
- 2014-10-17 CN CN201410553310.6A patent/CN104301451B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103460653A (en) * | 2011-03-31 | 2013-12-18 | 日本电气株式会社 | Computer system, and communication method |
CN102938794A (en) * | 2012-11-14 | 2013-02-20 | 华为技术有限公司 | Address resolution protocol (ARP) message forwarding method, exchanger and controller |
CN103209092A (en) * | 2013-02-28 | 2013-07-17 | 成都西加云杉科技有限公司 | Method and system for suppressing broadcast storm |
Non-Patent Citations (1)
Title |
---|
杨建选: "基于OpenFlow网络的分层路由技术研究", 《中国优秀硕士学位论文全文数据库-信息科技辑》 * |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10574570B2 (en) | 2015-08-20 | 2020-02-25 | Beijing Baidu Netcom Science And Technology Co., Ltd. | Communication processing method and apparatus |
CN105227466B (en) * | 2015-08-20 | 2019-01-11 | 北京百度网讯科技有限公司 | Communication processing method and device |
CN105227466A (en) * | 2015-08-20 | 2016-01-06 | 北京百度网讯科技有限公司 | Communication processing method and device |
CN105530330B (en) * | 2015-12-07 | 2018-08-31 | 中国电子科技集团公司第十研究所 | The method of ARP protocol operational efficiency in room for promotion information network |
CN105530330A (en) * | 2015-12-07 | 2016-04-27 | 中国电子科技集团公司第十研究所 | Method for improving operation efficiency of ARP protocol in space information network |
WO2017107871A1 (en) * | 2015-12-25 | 2017-06-29 | 华为技术有限公司 | Access control method and network device |
CN107181681A (en) * | 2016-03-10 | 2017-09-19 | 中兴通讯股份有限公司 | SDN layer 2 forwarding methods and system |
CN106059929A (en) * | 2016-06-02 | 2016-10-26 | 杭州华三通信技术有限公司 | Message responding method and device |
CN106412142A (en) * | 2016-08-30 | 2017-02-15 | 浙江宇视科技有限公司 | Resource device address obtaining method and device |
CN106453298A (en) * | 2016-09-30 | 2017-02-22 | 北京邮电大学 | Scan defending method and device |
CN106453298B (en) * | 2016-09-30 | 2019-02-19 | 北京邮电大学 | A scanning defense method and device |
CN106657434A (en) * | 2016-11-24 | 2017-05-10 | 紫光华山信息技术有限公司 | Method and device for checking IP address |
CN108183978B (en) * | 2018-03-29 | 2021-01-22 | 北京环境特性研究所 | Communication equipment IP address configuration method and communication equipment |
CN108183978A (en) * | 2018-03-29 | 2018-06-19 | 北京环境特性研究所 | A kind of communication equipment IP address configuration method and communication equipment |
CN108989340A (en) * | 2018-08-21 | 2018-12-11 | 新开普电子股份有限公司 | A kind of implementation method directly docked with third party system |
CN111147623A (en) * | 2019-12-27 | 2020-05-12 | 深圳市丰润达科技有限公司 | Method for realizing whole-network host scanning, server and computer readable storage medium |
CN113132218A (en) * | 2019-12-31 | 2021-07-16 | 中兴通讯股份有限公司 | Home gateway access method, device, system processor and storage medium |
CN113132218B (en) * | 2019-12-31 | 2023-10-20 | 中兴通讯股份有限公司 | Home gateway access method, device, system processor and storage medium |
CN113542042A (en) * | 2020-04-13 | 2021-10-22 | 国网电力科学研究院有限公司 | Method for structured detection of host in local area network |
CN111884916A (en) * | 2020-07-24 | 2020-11-03 | 杭州希益丰新业科技有限公司 | Proxy gateway system for realizing transparent transmission based on multi-network-port computer |
CN113612801A (en) * | 2021-09-30 | 2021-11-05 | 浙江国利信安科技有限公司 | EPA gateway equipment and EPA cross-network communication method |
CN116112315A (en) * | 2022-12-27 | 2023-05-12 | 广东中兴新支点技术有限公司 | A cross-network segment communication transmission method, system, device and storage medium |
CN116112315B (en) * | 2022-12-27 | 2024-05-10 | 广东中兴新支点技术有限公司 | Cross-network-segment communication transmission method, system, equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN104301451B (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104301451A (en) | Cross-network-segment host communication method, device and system | |
US12101250B2 (en) | Methods and apparatus for routing control in a cloud network | |
CN104780080B (en) | Deep message detection method and system | |
US11418405B2 (en) | Systems and methods for determining a topology of a network comprising a plurality of intermediary devices and paths | |
CN104702438B (en) | PE device management methods and device | |
KR101938623B1 (en) | Openflow communication method, system, controller, and service gateway | |
EP3026872B1 (en) | Packet forwarding method, apparatus, and system | |
US11283730B2 (en) | Data migration method and apparatus | |
KR102025680B1 (en) | SDN based ARP implementation method and device | |
CN104301238A (en) | Message processing method, device and system | |
US20190199789A1 (en) | Distributed Stateful Load Balancer | |
US11863630B2 (en) | Connection establishment method, server, accessed node, access node, and storage medium | |
CN103634214A (en) | Route information generating method and device | |
US20150271086A1 (en) | Reducing Network Traffic By Intercepting Address Resolution Messages | |
CN111193756B (en) | VXLAN tunnel load balancing method and related equipment | |
CN103595562A (en) | Method and device for determining terminal topological link and server device | |
CN105142116A (en) | Communication network switching method and switching system for intelligent equipment | |
CN105812495A (en) | Message forwarding method and device | |
US12160431B2 (en) | Monitoring of abnormal host | |
CN116155902B (en) | Load balancing method, device, electronic device and storage medium supporting IPv6 | |
CN109005120B (en) | Message processing method and network equipment | |
CN115460147B (en) | A data processing method and device | |
CN105915471B (en) | Message forwarding method and device | |
CN104363172A (en) | Data transceiving method and device | |
CN106330487B (en) | Automatic configuration method, controller and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder |
Address after: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor Patentee after: RUIJIE NETWORKS CO., LTD. Address before: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor Patentee before: Beijing Star-Net Ruijie Networks Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |