The content of the invention
Embodiments of the invention provide a kind of router and find method, SDN controllers, router and network system, can
It was found that the router in SDN.
First aspect, there is provided a kind of router finds method, including:
SDN controllers issue feature flow table to SDN switch, and wherein feature flow table is used to indicate that SDN switch will be route
The feature message that device is sent is sent to SDN controllers;The feature message that SDN switch receiving router is sent, and according to feature
Feature message is forwarded to SDN controllers by flow table, and feature message carries router characteristic information, the router characteristic information bag
Include the condition code of identifier router;SDN controllers obtain the ARP messages that router is sent by SDN switch;SDN controllers
According to feature message and the nodal information of ARP Receive message routers, the nodal information of router includes:IP address, router
Characteristic information.
Second aspect, there is provided a kind of SDN controllers, including:
Transmitting element, for issuing feature flow table to SDN switch, wherein the feature stream table is used to indicate the SDN
Interchanger sends the feature message that router is sent to the SDN controllers;Receiving unit, exchanged for receiving the SDN
The feature message that the router that machine forwards according to the feature flow table is sent, the feature message carry router feature letter
Breath, the router characteristic information include the condition code of identifier router;Receiving unit, is additionally operable to obtain the router and passes through
The ARP messages that SDN switch is sent;Processing unit, for the feature message that is received according to the receiving unit and described
The nodal information of ARP Receive message routers, the nodal information of the router include:IP address, router rs name feature letter
Breath.
The third aspect, there is provided a kind of router, including:
Transmitting element, for sending feature message to SDN controllers by SDN switch, the feature message carries road
By device characteristic information;The transmitting element, it is additionally operable to send ARP messages to the SDN controllers by SDN switch.
Fourth aspect, there is provided a kind of network system, including any of the above-described SDN controllers, at least one SDN switch and
Such as above-mentioned either router;Wherein, the SDN controllers are used for the data forwarding for controlling at least one SDN switch, institute
State any SDN switch connection end host at least one SDN switch, appointing at least one SDN switch
One SDN switch connects the router.
In such scheme, SDN controllers issue feature flow table to SDN switch, and wherein feature flow table is used to indicate SDN
Interchanger sends the feature message that router is sent to SDN controllers;The feature report that SDN switch receiving router is sent
Text, and feature message is forwarded to by SDN controllers according to feature flow table, feature message carries router characteristic information, the road
Include the condition code of identifier router by device characteristic information;SDN controllers obtain the ARP that router is sent by SDN switch
Message;SDN controllers include according to feature message and the nodal information of ARP Receive message routers, the nodal information of router:
IP address, router characteristic information.By the above method, SDN controllers may finally obtain the nodal information of router, therefore
SDN controllers are it can be found that router in SDN, the topology exhibits of SDN controllers can accurately reflect actual physical net
Network topology, it is convenient to be provided for Network deployment.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made
Embodiment, belong to the scope of protection of the invention.
The system architecture and business scenario of description of the embodiment of the present invention are in order to which more clearly the explanation present invention is implemented
The technical scheme of example, does not form the restriction for technical scheme provided in an embodiment of the present invention, those of ordinary skill in the art
Understand, with the differentiation of system architecture and the appearance of new business scene, technical scheme provided in an embodiment of the present invention is for similar
Technical problem, it is equally applicable.
The above method is described in detail with reference to specific embodiment.Shown in reference picture 1, embodiments of the invention should
For following network system, the network system includes:SDN controllers and at least one SDN switch and router;Wherein
SDN controllers are used to controlling the data forwarding of at least one SDN switch, and any SDN at least one SDN switch is exchanged
Machine connection end host (such as PC PC), any SDN switch connection route device at least one SDN switch.
Two SDN switches are illustrate only in wherein Fig. 1, it is to be understood that SDN controllers can also control multiple SDN switches
Between data forwarding, therefore the network system can also include multiple SDN switches, the end host in concrete application scene
Same SDN switch or different SDN switches can be connected with router.
Based on above-mentioned network system, the general principle of the application is:The configuration of routers one for accessing SDN is true
IP address, and neighbours' discovery feature of router is opened, such as:NDSP(Neighbor Device Search
Protocol, neighbor device search protocol) or CDP (Cisco Discovery Protocol, CISCO discovery protocol), pass through
The condition code of agreement identifier router is carried in router characteristic information, is router to identify current device.Controlled in SDN
Device processed issues feature flow table to SDN switch, to obtain NDSP the or CDP feature messages that router issues, to feature report
Text is identified and parsed, and the router characteristic information entrained by this feature message is obtained, by the router characteristic information and this
The ARP messages that router is sent are integrated, and ultimately form the node of router, and this information is write into SDN controllers backstage
Database, so as to complete the discovery of router and identification.In addition, SDN controllers can send probe messages to destination router,
To find that destination router place link is abnormal, or find that destination router is abnormal network node, to carry out aging to it
Processing.Neighbours' discovery feature (NDSP or CDP) of router is used in the program, without extra what's new on the router
Or agreement, you can complete the accurate discovery to router.
Shown in reference picture 2, embodiments of the invention provide a kind of router and find method, shown in reference picture 2, including it is as follows
Step:
S101, SDN controller issue feature flow table to SDN switch, and wherein feature flow table is used to indicate that SDN switch will
The feature message that router is sent is sent to SDN controllers.
S102, router set own IP address and open neighbours' discovery feature, generate feature message, and feature message is
NDSP messages or CDP messages.
Wherein, feature message carries router characteristic information, for example, router characteristic information includes identifier router
Condition code, such as the code characterized by " Router ", SDN controllers can identify the router by the identification code.Router
Characteristic information can also include router rs name, MAC Address, router incoming end slogan, exist on router characteristic information
It is not construed as limiting in the present invention, as long as can realize that SDN controllers identify router and the Topology Discovery to router and control
Management.
The feature message that S103, SDN switch receiving router are sent, and be forwarded to feature message according to feature flow table
SDN controllers.
S104, SDN controller obtain the ARP messages that router is sent by SDN switch.
S105, SDN controller are according to feature message and the nodal information of ARP Receive message routers.
SDN controllers can be according to the characteristic information of feature Receive message router, and according to ARP Receive message routers
IP address.So SDN controllers are according to feature message and the nodal information of ARP Receive message routers.The node of router
Information includes the IP address of router and the characteristic information of router.
After step S105, the nodal information of SDN controllers storage router is to database, so as to complete to router
Discovery feature.Further, since SDN switch there may be router cancellation or again issue or information change (such as:
The replacing of IP address of router, the change of router rs name and change of router access interface etc.), therefore, in step
Also include after S105:The nodal information of more new router after SDN spacing of controls scheduled durations.Here SDN controllers update
The nodal information of router refers to the process for re-executing above-mentioned steps S101-S105, completes the node of the router to newly accessing
Information.
In such scheme, SDN controllers issue feature flow table to SDN switch, and wherein feature flow table is used to indicate SDN
Interchanger sends the feature message that router is sent to SDN controllers;The feature report that SDN switch receiving router is sent
Text, and feature message is forwarded to by SDN controllers according to feature flow table, feature message carries router characteristic information;SDN is controlled
Device obtains the ARP messages that router is sent by SDN switch;SDN controllers are route according to feature message and ARP Receive messages
The nodal information of device.By the above method, SDN controllers may finally obtain the nodal information of router, because router is special
Reference, which ceases, includes the condition code of identifier router, therefore SDN controllers are it can be found that router in SDN, SDN controllers
Topology exhibits can accurately reflect actual physical networks topology, for Network deployment provide facilitate.
In addition, shown in reference picture 3, after the discovery procedure of router is completed, embodiments of the invention are also provided to route
The detection method of device, comprises the following steps:
S201, SDN controller obtain the target ip address of destination router in database.
S202, SDN controller send probe messages according to target ip address to destination router.
Wherein, SDN controllers can periodically obtain the target ip address of destination router, and cycle from database
Property sends probe messages to destination router according to target ip address by packet-out forms.
If S203, SDN controller receive response of the destination router to probe messages, target road is obtained according to response
By the timestamp information of device.
If S204, SDN controller determine that the time interval between timestamp information and current time exceedes time threshold,
It is abnormal network node to determine destination router.
So, when it is determined that destination router is abnormal network node, SDN controllers can determine whether the target road
Whether burin-in process condition is met by device, such as:When router delay exceedes predetermined value, delete the router or renewal should
The relevant information of router.Otherwise, SDN controllers determine time interval between timestamp information and current time not less than when
Between threshold value, it is determined that destination router is normal.
If S205, SDN controller do not receive response of the destination router to probe messages, it is determined that destination router
Link is abnormal.
The detection that router is realized by above-mentioned steps S201-205 is provided convenience for Network deployment.
Shown in reference picture 4, embodiments of the invention provide a kind of SDN controllers, for implementing above-mentioned embodiment of the method,
The SDN controllers include:
Transmitting element 41, for issuing feature flow table to SDN switch, wherein the feature stream table is described for indicating
SDN switch sends the feature message that router is sent to the SDN controllers;
Receiving unit 42, sent for receiving the router that the SDN switch forwards according to the feature flow table
Feature message, the feature message carries router characteristic information, and the router characteristic information includes identifier router
Condition code;
Receiving unit 42, it is additionally operable to obtain the ARP messages that router is sent by SDN switch;
Processing unit 43, for the feature message that is received according to the receiving unit 42 and ARP Receive message routers
Nodal information, the nodal information of router include:IP address, router characteristic information.
Processing unit 43 can be route according to the characteristic information of feature Receive message router, and according to ARP Receive messages
The IP address of device.
Optionally, processing unit 43 is additionally operable to the nodal information of more new router after the scheduled duration of interval.
Wherein, the nodal information of router is stored in database;The SDN controllers also include:Acquiring unit 44, is used for
The target ip address of destination router is obtained in database;Transmitting element 41, it is additionally operable to the target obtained according to acquiring unit 44
IP address sends probe messages to the destination router;Processing unit 43, if being additionally operable to receiving unit 42 receives target road
By response of the device to the probe messages, then according to the timestamp information of response acquisition destination router;Processing unit 43, is also used
In if it is determined that the time interval between timestamp information and current time exceedes time threshold, it is determined that destination router is abnormal
Network node.
Optionally, processing unit 43, if being additionally operable to the receiving unit 42 does not receive the destination router to described
The response of probe messages, it is determined that the link of the destination router is abnormal.
Shown in reference picture 5, embodiments of the invention provide a kind of router, should for implementing above-mentioned embodiment of the method
Router includes:
Transmitting element 51, for sending feature message to SDN controllers by SDN switch, feature message carries route
Device characteristic information, wherein router rs name include the condition code of identifier router;
Transmitting element 51, it is additionally operable to send ARP messages to SDN controllers by SDN switch.
Optionally, in addition to, processing unit 52, for setting own IP address and opening neighbours' discovery feature, generation is special
Message is levied, feature message is:NDSP messages or CDP messages.
In such scheme, SDN controllers issue feature flow table to SDN switch, and wherein feature flow table is used to indicate SDN
Interchanger sends the feature message that router is sent to SDN controllers;The feature report that SDN switch receiving router is sent
Text, and feature message is forwarded to by SDN controllers according to feature flow table, feature message carries router characteristic information;SDN is controlled
Device obtains the ARP messages that router is sent by SDN switch;SDN controllers are route according to feature message and ARP Receive messages
The nodal information of device.By the above method, SDN controllers may finally obtain the nodal information of router, because router is special
Include the identification code of identifier router in reference breath, therefore SDN controllers are it can be found that router in SDN, SDN are controlled
The topology exhibits of device can accurately reflect actual physical networks topology, and it is convenient to be provided for Network deployment.
In addition, also providing a kind of calculating readable media (or medium), including carry out when executed in above-described embodiment
The computer-readable instruction of the operation of method.
In addition, a kind of computer program product is also provided, including above computer readable media (or medium).
It should be understood that in various embodiments of the present invention, the size of the sequence number of above-mentioned each process is not meant to perform suitable
The priority of sequence, the execution sequence of each process should be determined with its function and internal logic, without the implementation of the reply embodiment of the present invention
Process forms any restriction.
Those of ordinary skill in the art are it is to be appreciated that the list of each example described with reference to the embodiments described herein
Member and algorithm steps, it can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
Performed with hardware or software mode, application-specific and design constraint depending on technical scheme.Professional and technical personnel
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, the corresponding process in preceding method embodiment is may be referred to, will not be repeated here.
In several embodiments provided herein, it should be understood that disclosed system, apparatus and method, can be with
Realize by another way.For example, apparatus embodiments described above are only schematical, for example, the unit
Division, only a kind of division of logic function, can there is other dividing mode, such as multiple units or component when actually realizing
Another system can be combined or be desirably integrated into, or some features can be ignored, or do not perform.It is another, it is shown or
The mutual coupling discussed or direct-coupling or communication connection can be the indirect couplings by some interfaces, equipment or unit
Close or communicate to connect, can be electrical, mechanical or other forms.
The unit illustrated as separating component can be or may not be physically separate, show as unit
The part shown can be or may not be physical location, you can with positioned at a place, or can also be distributed to multiple
On NE.Some or all of unit therein can be selected to realize the mesh of this embodiment scheme according to the actual needs
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can also
That unit is individually physically present, can also two or more units it is integrated in a unit.
If the function is realized in the form of SFU software functional unit and is used as independent production marketing or in use, can be with
It is stored in a computer read/write memory medium.Based on such understanding, technical scheme is substantially in other words
The part to be contributed to prior art or the part of the technical scheme can be embodied in the form of software product, the meter
Calculation machine software product is stored in a storage medium, including some instructions are causing a computer equipment (can be
People's computer, server, or network equipment etc.) perform all or part of step of each embodiment methods described of the present invention.
And foregoing storage medium includes:USB flash disk, mobile hard disk, read-only storage (English full name:Read-only memory, English letter
Claim:ROM), random access memory (English full name:Random access memory, English abbreviation:RAM), magnetic disc or light
Disk etc. is various can be with the medium of store program codes.
The foregoing is only a specific embodiment of the invention, but protection scope of the present invention is not limited thereto, any
Those familiar with the art the invention discloses technical scope in, change or replacement can be readily occurred in, should all be contained
Cover within protection scope of the present invention.Therefore, protection scope of the present invention should be based on the protection scope of the described claims.