Communication loopback fault detection method and device in a kind of communication network
Technical field
The present invention relates to regarding networking technology field, more particularly to the communication loopback fault detect side in a kind of communication network
A kind of communication loopback failure detector in method, communication network and a kind of communication loopback failure in communication network
The interchanger of detection.
Background technology
Currently, with the fast development of the network technology, the two-way communications such as video conference, video teaching user life,
Work, study etc. are widely available.In the network architecture for the communication network for carrying out the two-way communications such as video conference, video teaching
In, usually form a tree-shaped physical network with region zones, for example, central area setting there are one central server and
Center switch, then center switch is responsible is communicated with multiple secondary switch for belonging to different zones, and secondary exchanges
Machine connects multiple communicating terminals and secondary servers again, to by the interchanger of each level realize secondary servers, in it is genuinely convinced
Data interaction is realized between business device, each communicating terminal.
However, applicant it has been investigated that, the same communicating terminal may be connected due to mistake in practical application
To multiple switch or register communicating terminal MAC Address (physical address) when input error cause different communicating terminals
Using reasons such as identical MAC Address, cause the communication network that communication loopback failure occurs.When communication loopback occurs for communication network
When failure, the object of mistake may be sent data between communicating terminal, between communicating terminal and server, so as to cause
It is unable to operate normally communication traffic.
Invention content
The technical problem to be solved is that the communication loopback fault detects in a kind of communication network of offer for the embodiment of the present invention
Communication loopback failure detector, a kind of communication loopback failure inspection in communication network in method, a kind of communication network
The interchanger of survey.
To solve the above-mentioned problems, the present invention provides the communication loopback fault detection method in a kind of communication network, institutes
It includes at least one interchanger and multiple communicating terminals to state communication network, and the interchanger includes for logical with the communicating terminal
Multiple communication interfaces of news, the method includes:
Obtain the address table of interchanger;Described address record sheet correspond to preserve each communicating terminal physical address and
With the communication interface of each communicating terminal communication;
Determine the same target physical address existed in described address record log corresponding to different communication interfaces, and
Judging the communication network, there is currently communication loopback failures;
The target communication terminal indicated to the target physical address sends communication loopback fault cues notice, to indicate
Target communication terminal is stated to communicate with interchanger pause.
Optionally, the method further includes:
Communication loopback fault cues notice is sent to the interchanger, to indicate that the interchanger is whole with the target communication
End pause communication.
Optionally, described address record sheet includes newer address table, and the determination is in described address record log
In correspond to different communication interfaces the same target physical address include:
Search each physical address communication interface corresponding in newer address table;
If some physical address is corresponding with different communication interfaces, for the target physical by some physical address tag
Location.
Optionally, described address record sheet includes the address table of each period, and the determination is remembered in described address
Include in the presence of the same target physical address corresponding to different communication interfaces in record daily record:
Search each physical address corresponding communication interface in the address table of each period;
It is the object by some physical address tag if the corresponding communication interface of some physical address is different
Manage address.
Optionally, the address table for obtaining interchanger includes:
The address table upload function module of the interchanger is called, and indicates described address record sheet upload function mould
Described address record sheet is sent to communication loopback fault detect server by block.
Optionally, the address table for obtaining interchanger further includes:
When the address table upload function module failure for calling the interchanger, then local remote control mould is called
Block;
Described address record sheet is extracted from the interchanger using the remote control module.
To solve the above-mentioned problems, the present invention also provides the communication loopback fault detection method in a kind of communication network,
The method is applied to interchanger, and the communication network includes at least one interchanger and multiple communicating terminals, the interchanger
Include multiple communication interfaces for being communicated with the communicating terminal, the method includes:
Obtain the address table of interchanger;Described address record sheet correspond to preserve the physical address of each communicating terminal with
The communication interface that each communicating terminal is accessed;
Determine the same target physical address existed in described address record log corresponding to different communication interfaces, and
Judging the communication network, there is currently communication loopback failures;
The target communication terminal indicated to the target physical address sends communication loopback fault cues notice, to indicate
Target communication terminal is stated to communicate with interchanger pause.
Optionally, the communicating terminal includes that data send terminal and data receiving terminal, and the communication interface includes number
According to receiving interface and data transmission interface, before the address table for obtaining interchanger, the method further includes:
It obtains the data and sends the communication data that terminal is sent to the data receiver interface;The communication data carries
The data send the physical address of terminal and the data receiving terminal;
According to the physical address of the data receiving terminal, the communication data is sent using the data transmission interface
To the data receiving terminal;
The data are sent into terminal and the data receiver interface, and, the data receiving terminal and the data
Transmission interface, correspondence are stored in described address record sheet.
To solve the above-mentioned problems, the present invention also provides the communication loopback failure detector in a kind of communication network,
The communication network includes at least one interchanger and multiple communicating terminals, the interchanger include for the communicating terminal
Multiple communication interfaces of communication, described device include:
Address table acquisition module, the address table for obtaining interchanger;Described address record sheet, which corresponds to, to be preserved
The communication interface for having the physical address of each communicating terminal and being communicated with each communicating terminal;
Fault determination module exists in described address record log corresponding to the same of different communication interfaces for determining
A target physical address, and judge the communication network there is currently communication loopback failure;
Notification module, the target communication terminal for being indicated to the target physical address send communication loopback fault cues
Notice, to indicate that the target communication terminal is communicated with interchanger pause.
To solve the above-mentioned problems, the present invention also provides a kind of communication loopback fault detects in communication network
Interchanger, the communication network include at least one interchanger and multiple communicating terminals, the interchanger include for it is described
Multiple communication interfaces of communicating terminal communication, the interchanger include:
Address table acquisition module, the address table for obtaining interchanger;Described address record sheet, which corresponds to, to be preserved
The communication interface for having the physical address of each communicating terminal and being communicated with each communicating terminal;
Fault determination module exists in described address record log corresponding to the same of different communication interfaces for determining
A target physical address, and judge the communication network there is currently communication loopback failure;
Notification module, the target communication terminal for being indicated to the target physical address send communication loopback fault cues
Notice, to indicate that the target communication terminal is communicated with interchanger pause.
Compared with prior art, the embodiment of the present invention includes following advantages:
According to embodiments of the present invention, by searching for the same physical address corresponding to different communication interfaces, judgement is current
In the presence of communication loopback failure, and correspondingly pause target communication terminal is communicated with interchanger, to avoid because communicating loopback
The Communications such as data transmission fault caused by failure ensure that the communication traffic of communication network can be with normal operation.
Description of the drawings
Fig. 1 is a kind of networking schematic diagram regarding networking of the present invention;
Fig. 2 is a kind of hardware architecture diagram of node server of the present invention;
Fig. 3 is a kind of hardware architecture diagram of access switch of the present invention;
Fig. 4 is that a kind of Ethernet association of the present invention turns the hardware architecture diagram of gateway;
Fig. 5 is the step flow of the communication loopback fault detection method in a kind of communication network of the embodiment of the present invention one
Figure;
Fig. 6 is the step flow of the communication loopback fault detection method in a kind of communication network of the embodiment of the present invention two
Figure;
Fig. 7 is the structure diagram of the communication loopback failure detector in a kind of communication network of the embodiment of the present invention three;
Fig. 8 is a kind of knot of interchanger for the communication loopback fault detect in communication network of the embodiment of the present invention four
Structure block diagram;
Fig. 9 is a kind of schematic diagram of hard loopback failure of the present invention;
Figure 10 is that a kind of flexi-ring of the present invention returns the schematic diagram of failure;
Figure 11 is a kind of loopback fault detection system schematic diagram of the present invention;
Figure 12 is a kind of structural schematic diagram of communication loopback fault detect server of the present invention;
Figure 13 is a kind of structural schematic diagram of loopback information collecting server of the present invention.
Specific implementation mode
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings and specific real
Applying mode, the present invention is described in further detail.
Firstly the need of explanation, present invention could apply in the communication network of networking.It is network Development depending on networking
Important milestone, be a real-time network, can realize HD video real-time Transmission, push numerous the Internet, applications to high definition
Video, high definition are face-to-face.
Real-time high-definition video switching technology is used depending on networking, it can be such as high in a network platform by required service
Clear video conference, Intellectualized monitoring analysis, emergency command, digital broadcast television, delay TV, the Web-based instruction, shows video monitoring
Field live streaming, VOD program requests, TV Mail, individual character recording (PVR), Intranet (manage) channel, intelligent video Broadcast Control, information publication by oneself
All be incorporated into a system platform etc. services such as tens of kinds of videos, voice, picture, word, communication, data, by TV or
Computer realizes that high-definition quality video plays.
To make those skilled in the art more fully understand the embodiment of the present invention, below to being introduced depending on networking:
Depending on networking, applied portion of techniques is as described below:
Network technology (Network Technology)
Network technology innovation depending on networking improves traditional ethernet (Ethernet), potential huge on network to face
Video flow.(Circuit is exchanged different from simple network packet packet switch (Packet Switching) or lattice network
Switching), Streaming demands are met using Packet Switching depending on networking technology.Has grouping depending on networking technology
Flexible, the simple and low price exchanged, is provided simultaneously with quality and the safety assurance of circuit switching, it is virtually electric to realize the whole network switch type
The seamless connection of road and data format.
Switching technology (Switching Technology)
Depending on two advantages of asynchronous and packet switch networked using Ethernet, it is scarce under the premise of complete be compatible with to eliminate Ethernet
It falls into, has the end-to-end seamless connection of the whole network, direct user terminal directly carries IP data packets.User data is in network-wide basis
It is not required to any format conversion.It is the more advanced form of Ethernet depending on networking, is a real-time exchange platform, can realizes at present mutually
The whole network large-scale high-definition realtime video transmission that networking cannot achieve pushes numerous Internet video applications to high Qinghua, unitizes.
Server technology (Server Technology)
It is different from traditional server, its Streaming Media depending on the server technology in networking and unified video platform
Transmission be built upon it is connection-oriented on the basis of, data-handling capacity is unrelated with flow, communication time, single network layer energy
Enough include signaling and data transmission.For voice and video business, handled depending on networking and unified video platform Streaming Media
Complexity many simpler than data processing, efficiency substantially increase hundred times or more than traditional server.
Reservoir technology (Storage Technology)
The ultrahigh speed reservoir technology of unified video platform in order to adapt to the media content of vast capacity and super-flow and
State-of-the-art real time operating system is used, the programme information in server instruction is mapped to specific hard drive space, media
Content is no longer pass through server, and moment is directly delivered to user terminal, and user waits for typical time to be less than 0.2 second.It optimizes
Sector distribution greatly reduces the mechanical movement of hard disc magnetic head tracking, and resource consumption only accounts for the 20% of the internets ad eundem IP, but
The concurrent flow more than 3 times of traditional disk array is generated, overall efficiency promotes 10 times or more.
Network security technology (Network Security Technology)
Structural design depending on networking by servicing independent licence system, equipment and the modes such as user data is completely isolated every time
The network security problem that puzzlement internet has thoroughly been eradicated from structure, does not need antivirus applet, fire wall generally, has prevented black
The attack of visitor and virus, provide structural carefree secure network to the user.
Service innovative technology (Service Innovation Technology)
Business and transmission are merged by unified video platform, whether single user, private user or a net
The sum total of network is all only primary automatic connection.User terminal, set-top box or PC are attached directly to unified video platform, obtain rich
The multimedia video service of rich colorful various forms.Unified video platform is substituted using " menu type " with table schema traditional
Complicated applications program, and can use considerably less code that complicated application can be realized, and realize the new business innovation of " endless ".
Networking depending on networking is as described below:
It is a kind of central controlled network structure depending on networking, which can be Tree Network, Star network, ring network etc. class
Type, but centralized control node is needed to control whole network in network on this basis.
As shown in Figure 1, being divided into access net and Metropolitan Area Network (MAN) two parts depending on networking.
The equipment of access mesh portions can be mainly divided into 3 classes:Node server, access switch, terminal (including various machines
Top box, encoding board, memory etc.).Node server is connected with access switch, and access switch can be with multiple terminal phases
Even, and Ethernet can be connected.
Wherein, node server is the node that centralized control functions are played in access net, can control access switch and terminal.
Node server can directly be connected with access switch, can also directly be connected with terminal.
Similar, the equipment of metropolitan area mesh portions can also be divided into 3 classes:Metropolitan area server, node switch, node serve
Device.Metropolitan area server is connected with node switch, and node switch can be connected with multiple node servers.
Wherein, node server is the node server for accessing mesh portions, i.e. node server had both belonged to access wet end
Point, and belong to metropolitan area mesh portions.
Metropolitan area server is the node that centralized control functions are played in Metropolitan Area Network (MAN), can control node switch and node serve
Device.Metropolitan area server can be directly connected to node switch, can also be directly connected to node server.
It can be seen that be entirely a kind of central controlled network structure of layering depending on networking network, and node server and metropolitan area
The network controlled under server can be the various structures such as tree-shaped, star-like, cyclic annular.
Visually claim, access mesh portions can form unified video platform (part in virtual coil), and multiple unified videos are flat
Platform can be formed regarding networking;Each unified video platform can be interconnected by metropolitan area and wide area depending on networking.
Classify depending on networked devices
1.1 embodiment of the present invention can be mainly divided into 3 classes depending on the equipment in networking:Server, interchanger (including ether
Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).Depending on networking can be divided on the whole Metropolitan Area Network (MAN) (or
National net, World Wide Web etc.) and access net.
The equipment of 1.2 wherein access mesh portions can be mainly divided into 3 classes:Node server, access switch (including ether
Net gateway), terminal (including various set-top boxes, encoding board, memory etc.).
The particular hardware structure of each access network equipment is:
Node server:
As shown in Fig. 2, including mainly Network Interface Module 201, switching engine module 202, CPU module 203, disk array
Module 204;
Wherein, Network Interface Module 201, the Bao Jun that CPU module 203, disk array module 204 are come in enter switching engine
Module 202;Switching engine module 202 to the packet come in look into the operation of address table 205, to obtain the navigation information of packet;
And the packet is stored according to the navigation information of packet the queue of corresponding pack buffer 206;If the queue of pack buffer 206 is close
It is full, then it abandons;All pack buffer queues of 202 poll of switching engine mould, are forwarded if meeting the following conditions:1) port
It is less than to send caching;2) the queue package counting facility is more than zero.Disk array module 204 mainly realizes the control to hard disk, including
The operations such as initialization, read-write to hard disk;CPU module 203 is mainly responsible between access switch, terminal (not shown)
Protocol processes, to address table 205 (including descending protocol packet address table, uplink protocol package address table, data packet addressed table)
Configuration, and, the configuration to disk array module 204.
Access switch:
As shown in figure 3, including mainly Network Interface Module (downstream network interface module 301, uplink network interface module
302), switching engine module 303 and CPU module 304;
Wherein, the packet (upstream data) that downstream network interface module 301 is come in enters packet detection module 305;Packet detection mould
Whether mesh way address (DA), source address (SA), type of data packet and the packet length of the detection packet of block 305 meet the requirements, if met,
Corresponding flow identifier (stream-id) is then distributed, and enters switching engine module 303, is otherwise abandoned;Uplink network interface mould
The packet (downlink data) that block 302 is come in enters switching engine module 303;The data packet that CPU module 204 is come in enters switching engine
Module 303;Switching engine module 303 to the packet come in look into the operation of address table 306, to obtain the navigation information of packet;
It is gone toward uplink network interface if the packet into switching engine module 303 is downstream network interface, in conjunction with flow identifier
(stream-id) packet is stored in the queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full,
It abandons;If the packet into switching engine module 303 is not that downstream network interface is gone toward uplink network interface, according to packet
Navigation information is stored in the data packet queue of corresponding pack buffer 307;If the queue of the pack buffer 307 is close full,
Then abandon.
All pack buffer queues of 303 poll of switching engine module, are divided to two kinds of situations in embodiments of the present invention:
It is gone toward uplink network interface if the queue is downstream network interface, meets the following conditions and be forwarded:1)
It is less than that the port sends caching;2) the queue package counting facility is more than zero;3) token that rate control module generates is obtained;
It is gone toward uplink network interface if the queue is not downstream network interface, meets the following conditions and be forwarded:
1) it is less than to send caching for the port;2) the queue package counting facility is more than zero.
Rate control module 208 is configured by CPU module 204, to all downlink networks in programmable interval
The pack buffer queue that interface is gone toward uplink network interface generates token, to control the code check of forwarded upstream.
CPU module 304 is mainly responsible for the protocol processes between node server, the configuration to address table 306, and,
Configuration to rate control module 308.
Ethernet association turns gateway:
As shown in figure 4, including mainly Network Interface Module (downstream network interface module 401, uplink network interface module
402), switching engine module 403, CPU module 404, packet detection module 405, rate control module 408, address table 406, Bao Huan
Storage 407 and MAC add modules 409, MAC removing modules 410.
Wherein, the data packet that downstream network interface module 401 is come in enters packet detection module 405;Packet detection module 405 is examined
The ethernet mac DA of measured data packet, ethernet mac SA, Ethernet length or frame type, networking mesh way address is regarded
DA, whether meet the requirements depending on networking source address SA, depending on networking data Packet type and packet length, corresponding stream is distributed if meeting
Identifier (stream-id);Then, MAC DA, MAC SA, length or frame type are subtracted by MAC removing modules 410
(2byte), and enter corresponding order caching, otherwise abandon;
Downstream network interface module 401 detects the transmission caching of the port, if there is Bao Ze regarding with networking mesh according to packet
Address D A knows the ethernet mac DA of corresponding terminal, adds the ethernet mac DA of terminal, Ethernet assists the MAC for turning gateway
SA, Ethernet length or frame type, and send.
The function that Ethernet association turns other modules in gateway is similar with access switch.
Terminal:
Include mainly Network Interface Module, Service Processing Module and CPU module;For example, set-top box mainly connects including network
Mouth mold block, video/audio encoding and decoding engine modules, CPU module;Encoding board includes mainly Network Interface Module, video encoding engine
Module, CPU module;Memory includes mainly Network Interface Module, CPU module and disk array module.
The equipment of 1.3 metropolitan area mesh portions can be mainly divided into 2 classes:Node server, node switch, metropolitan area server.
Wherein, node switch includes mainly Network Interface Module, switching engine module and CPU module;Metropolitan area server includes mainly
Network Interface Module, switching engine module and CPU module are constituted.
2, networking data package definition is regarded
2.1 access network data package definitions
The data packet for accessing net includes mainly following sections:Destination address (DA), source address (SA), reserve bytes,
payload(PDU),CRC。
As shown in the table, the data packet for accessing net includes mainly following sections:
DA |
SA |
Reserved |
Payload |
CRC |
Wherein:
Destination address (DA) is made of 8 bytes (byte), and first character section indicates type (such as the various associations of data packet
Discuss packet, multicast packet, unicast packet etc.), be up to 256 kinds of possibility, the second byte to the 6th byte is metropolitan area net address,
Seven, the 8th bytes are access net address;
Source address (SA) is also to be made of 8 bytes (byte), is defined identical as destination address (DA);
Reserve bytes are made of 2 bytes;
The parts payload have different length according to the type of different datagrams, are if it is various protocol packages
64 bytes are 32+1024=1056 bytes if it is single group unicast packets words, are not restricted to above 2 kinds certainly;
CRC is made of 4 bytes, and computational methods follow the Ethernet CRC algorithm of standard.
2.2 Metropolitan Area Network (MAN) packet definitions
The topology of Metropolitan Area Network (MAN) is pattern, may there is 2 kinds, connection even of more than two kinds, i.e. node switching between two equipment
2 kinds can be all can exceed that between machine and node server, node switch and node switch, node switch and node server
Connection.But the metropolitan area net address of metropolitan area network equipment is unique, is closed to accurately describe the connection between metropolitan area network equipment
System, introduces parameter in embodiments of the present invention:Label uniquely describes a metropolitan area network equipment.
(Multi-Protocol Label Switch, multiprotocol label are handed over by the definition of label and MPLS in this specification
Change) label definition it is similar, it is assumed that between device A and equipment B there are two connection, then data packet from device A to equipment B just
There are 2 labels, data packet also there are 2 labels from equipment B to device A.Label is divided into label, outgoing label, it is assumed that data packet enters
The label (entering label) of device A is 0x0000, and the label (outgoing label) when this data packet leaves device A may reform into
0x0001.The networking flow of Metropolitan Area Network (MAN) is to enter network process under centralized control, also means that address distribution, the label of Metropolitan Area Network (MAN)
Distribution is all dominated by metropolitan area server, and node switch, node server are all passive execution, this point with
The label distribution of MPLS is different, and the distribution of the label of MPLS is the result that interchanger, server are negotiated mutually.
As shown in the table, the data packet of Metropolitan Area Network (MAN) includes mainly following sections:
DA |
SA |
Reserved |
Label |
Payload |
CRC |
That is destination address (DA), source address (SA), reserve bytes (Reserved), label, payload (PDU), CRC.Its
In, the format of label, which can refer to, such as gives a definition:Label is 32bit, wherein high 16bit retains, only with low 16bit, its position
Set is between the reserve bytes and payload of data packet.
Based on the above-mentioned characteristic regarding networking, it is proposed that one of the core concepts of the embodiments of the present invention, it then follows regard the association of networking
View, judges whether physical address drifts about.So-called drift is that some physical address connects in some period and some communication
Mouth communication is communicated again with another communication interface in another period, or is communicated simultaneously from different communication interfaces.When
There is the drift of physical address, you can judgement, which regards in networking, has communication loopback failure.More specific scheme will be in embodiment one
In illustrate.
Embodiment one
Fig. 5 shows that the step of communication loopback fault detection method in a kind of communication network of the embodiment of the present invention one flows
Cheng Tu mainly provides the communication loopback fault detect in a kind of communication network from the angle of communication loopback fault detect server
Method, the communication network include at least one interchanger and multiple communicating terminals, and the interchanger includes for leading to described
Multiple communication interfaces of terminal called are interrogated, the method can specifically comprise the following steps:
Step 101, the address table of interchanger is obtained;Described address record sheet corresponds to the object for preserving each communicating terminal
Manage address and the communication interface with the communication of each communicating terminal.
In practical application, it may cause the communication network that communication loopback failure occurs due to various reasons depending on networking.Wherein,
Communication loopback failure includes that hard loopback failure and flexi-ring return failure.
Fig. 9 shows a kind of schematic diagram of hard loopback failure of the present invention.It can be seen that due to artificial connection error
Or hardware fault, communicating terminal 01 is connected to secondary switch 01 and secondary switch 02 simultaneously, when 01 He of communicating terminal
When communicating terminal 02 carries out the communication traffic of video conference etc., there are two communications between communicating terminal 01 and communicating terminal 02
Path, respectively " communication of the communication interface 01- center switch of communicating terminal 01- secondary switch 01- center switch connects
Mouth 03- secondary switch 02- communicating terminals 02 " and " communication interface of communicating terminal 01- secondary switch 03- center switch
The communication interface 03- secondary switch 02- communicating terminals 02 " of 02- center switch.It causes logical there are two between communicating terminal
The reason of interrogating path is depending on there are physics loop, " communicating terminal 01- secondary switch 01- center switch-secondary is handed in networking
It changes planes 03- communicating terminals 01 ".Therefore, when carrying out video conference, what communicating terminal 01 was sent out will pass through respectively depending on networking data
Two communication paths reach communicating terminal 02, and to cause to regard, networking data is discontinuous, and the video in video conference then will appear
Situations such as interim card, frame-skipping.
Figure 10 shows that a kind of flexi-ring of the present invention returns the schematic diagram of failure.It can be seen that in networking, there are two
The communicating terminal of identical MAC Address, to cause soft to gain failure.Communication is mainly determined according to MAC Address due to regarding networking
Two communicating terminals may be considered the same communicating terminal 01, when one of communicating terminal 01 exists by terminal depending on networking
When carrying out video conference, another communicating terminal 01 can also receive the data of video conference, cause to regard networking data flow direction
The object of mistake.In addition there are a kind of reasons to cause soft to gain failure.Specifically, since communicating terminal needs first in server
Upper registration could enjoy communication traffic, and actual communication is not present eventually when registering MAC Address for communicating terminal 03 in user
End 03, and user fills in the MAC Address of communicating terminal 01 due to clerical mistake, so as to cause identical there are two in networking
MAC Address.
In order to realize the detection to communicating loopback failure, several communication links can be disposed in the communication network depending on networking etc.
Fault detect server is returned, communication loopback fault detect server can be deployed with communication loopback fault detection program, by communicating
Loopback fault detection program periodically obtains the address table of several interchangers and is analyzed, and judges whether occur physically
The drift of location.
It should be further noted that interchanger needs to be remembered according to address when the data to communicating terminal are forwarded
Record table determines the object of forwarding.It specifically, can be from communication data when interchanger receives the communication data of some communicating terminal
Communications protocol in learn the target communication terminal for needing to receive the communication data and its physical address.
Interchanger searches whether to have existed the MAC Address of the communicating terminal in address table.If not on ground
In the record sheet of location, exchange opportunity broadcast transmission, target communication on all movable communication interfaces by the communication data received
If terminal is online, the communication data can be obtained by the active communicators interface connected and return to confirmation message, for same
Sample gets the non-targeted communicating terminal of communication data, then can abandon the communication data.
Interchanger can accordingly protect the MAC Address of target communication terminal communication interface corresponding with target communication terminal
There are in address table.
In practical application, the address table of interchanger can also carry out quiet other than above-mentioned dynamic learning mode
The mode of state being manually specified.For example, when specifying the MAC Address of some communicating terminal, it can be in some specified VLAN
The MAC Address that some communication interface of (Virtual Local Area Network, virtual LAN) receives.Table 1 is shown
A kind of example of address table:
Vlan |
Mac Address |
Type |
Ports |
2 |
0013.1a2f.0680 |
DYNAMIC |
Fa0/1 |
3 |
0013.1a2f.0681 |
DYNAMIC |
Fa0/2 |
Table 1
It can be seen in table 1 that address table can correspond to the MAC Address of the number, communicating terminal of preserving Vlan, obtain
The mode of MAC Address and the number of communication interface.
Optionally, the step 101 includes:
Sub-step S11, calls the address table upload function module of the interchanger, and indicates described address record sheet
Described address record sheet is sent to communication loopback fault detect server by upload function module.
In the specific implementation, the acquisition of address table can be realized by way of calling functional modules.For example, using
Snmp protocol (Simple Network Management Potocol, Simple Network Management Protocol) obtains, Shi Yong "
1.3.6.1.2.1.17.4.3.1.1"This Mib oid obtains address table, by SNMP communication modules is dealt into interchanger
On.Wherein, SNMP is made of the standard of one group of network management, including an application layer protocol (Application Layer
Protocol), database model (Database Schema) and one group of resource object.The agreement can support Network Management Department
System, to monitor whether the equipment being connected on network has any the case where causing to manage upper concern.With pipe in SNMP messages
Variable is managed to describe the management object in interchanger (some application function).For the management object in unique mark interchanger,
SNMP identifies management object with hierarchical structure nomenclature scheme.Entire hierarchical structure indicates management just as one tree, the node of tree
Object indicates some Mib oid.
Optionally, the step 101 includes:
Sub-step S12 is then called local remote when the address table upload function module failure for calling the interchanger
Process control module;
Sub-step S13 extracts described address record sheet using the remote control module from the interchanger.
After using snmp protocol failure, Telnet agreements (remote control protocol) may be used and carry out address table
It obtains.Wherein, Telnet agreements are a member in TCP/IP protocol suite, be Internet telnet services standard agreement and
Major way.It has provided the ability for completing distance host work on the local computer to the user.In the electricity of terminal user
Telnet programs are used on brain, and server is connected to it.Terminal user can input order in Telnet programs, these
Order can be run on the server, just as being inputted directly on the console of server.Locally it can control clothes
Business device.
In practical application, directly address table can also be obtained by the way of Telnet agreements.In addition, this field skill
Art personnel may be used various ways and obtain address table from interchanger.
Step 102, the same object existed in described address record log corresponding to different communication interfaces is determined
Manage address, and judge the communication network there is currently communication loopback failure.
Optionally, described address record sheet includes newer address table, and the determination is in described address record log
In correspond to different communication interfaces the same target physical address include:
Sub-step S31 searches each physical address communication interface corresponding in newer address table;
Some physical address tag is described if some physical address is corresponding with different communication interfaces by sub-step S32
Target physical address.
In the specific implementation, the communication interface corresponding to each physical address can be searched in address table, if looked into
It finds some physical address and is corresponding with multiple and different communication interfaces, then can be target physical by the physical address tag
Address, at the same can be determined that current communication network there is communication loopback failure.
Described address record sheet includes the address table of each period, and the determination is in described address record log
Include in the presence of the same target physical address corresponding to different communication interfaces:
Sub-step S41 searches each physical address corresponding communication interface in the address table of each period;
Sub-step S42, if the corresponding communication interface difference of some physical address, is by some physical address tag
The target physical address.
In the specific implementation, since address table regularly updates address table, interchanger can be collected each
The address table of period, and search corresponding communication in the address table of each period for each physical address and connect
Mouthful.If the same physical address is corresponding with not in the same address table or multiple address tables in different time periods
The physical address tag can be target physical address, while can be determined that current communication network is deposited by same communication interface
In communication loopback failure.
Step 103, the target communication terminal indicated to the target physical address sends communication loopback fault cues notice,
To indicate that the target communication terminal is communicated with interchanger pause.
When find in communication network occur communication loopback failure, can using target physical address indicate communicating terminal as
Target communication terminal, and communication loopback fault cues notice is sent to target communication terminal, to indicate the target communication terminal
Suspend with the interchanger and communicates.
Optionally, the method further includes:
Communication loopback fault cues notice is sent to the interchanger, to indicate that the interchanger is whole with the target communication
End pause communication.
When finding occur communication loopback failure in communication network, communication loopback failure can also be sent to corresponding interchanger
Prompt notice, to indicate that interchanger is communicated with target communication terminal pause.
Communication loopback fault cues notice can be the message being arranged according to certain predetermined format.As the following table 2 shows one
The schematic diagram of kind communication loopback fault cues notice.As seen from the table, prompt notice may include packet header and the packet for having data packet
The information such as time, the IP address of interchanger, the physical address of communicating terminal, the communication interface that tail, notice generate.
Packet header |
Length |
Alarm time |
Interchanger ip |
Mac |
Former port |
New port |
Packet tail |
4 bytes |
2 bytes |
4 bytes |
4 bytes |
6 bytes |
1 byte |
1 byte |
4 bytes |
0xFFFFFFFF |
|
|
|
|
|
|
0xEEEEEEEE |
Table 2
In practical application, loopback information collecting server can be set in communication network, it will by the way of udp protocol
Communication loopback fault cues notice is sent to the loopback information collecting server.Loopback information collecting server can be directed to notice
Send out alarm prompt sound.Figure 11 shows a kind of loopback fault detection system schematic diagram of the present invention.It can be seen that communication link
Fault detect server is returned to obtain address table from the interchanger depending on networking and analyze when there are communication links for forward sight networking
Failure is returned, and corresponding communication loopback fault cues notice is sent to by loopback information collecting server by udp protocol.
It should be noted that being said in embodiments of the present invention to technical scheme of the present invention for depending on networking
It is bright.It is appreciated that in communication network similar with the network architecture regarding networking, for example, LAN, it is equally possible to which there are logical
Loopback failure is interrogated, therefore, technical solution provided in an embodiment of the present invention can be applied in LAN, to solve communication loopback
The problem of failure.
According to embodiments of the present invention, by searching for the same physical address corresponding to different communication interfaces, judgement is current
In the presence of communication loopback failure, and correspondingly pause target communication terminal is communicated with interchanger, to avoid because communicating loopback
The Communications such as data transmission fault caused by failure ensure that the communication traffic of communication network can be with normal operation.
Embodiment two
Fig. 6 shows that the step of communication loopback fault detection method in a kind of communication network of the embodiment of the present invention two flows
Cheng Tu, mainly from the angle of interchanger a kind of communication network is provided in communication loopback fault detection method, the communication network
Including at least one interchanger and multiple communicating terminals, the interchanger includes multiple logical for being communicated with the communicating terminal
Communication interface, the method can specifically comprise the following steps:
Step 201, the address table of interchanger is obtained;Described address record sheet corresponds to the object for preserving each communicating terminal
The communication interface that reason address is accessed with each communicating terminal.
It should be noted that the embodiment of the present invention can be applied in the interchanger of networking.In the specific implementation, interchanger
It can call and be stored in local address table, to judge whether the drift for physical address occur by analyzing address table
It moves, and accordingly whether judgement currently occurs communicating loopback failure.
Optionally, the communicating terminal includes that data send terminal and data receiving terminal, and the communication interface includes number
According to receiving interface and data transmission interface, before the address table for obtaining interchanger, the method further includes:
It obtains the data and sends the communication data that terminal is sent to the data receiver interface;The communication data carries
The data send the physical address of terminal and the data receiving terminal;
According to the physical address of the data receiving terminal, the communication data is sent using the data transmission interface
To the data receiving terminal;
The data are sent into terminal and the data receiver interface, and, the data receiving terminal and the data
Transmission interface, correspondence are stored in described address record sheet.
In the specific implementation, terminal can be sent using the communicating terminal of currently transmitted data as data, and will currently receive
The communicating terminal of data is as data receiving terminal.It, correspondingly, can be according to current hair for the communication interface of interchanger
Communication interface is defined as data receiver interface and data transmission interface by the state for sending or receiving data.
After some communication data is sent to interchanger by data transmission terminal by some data receiver interface of interchanger,
Interchanger can get the physical address that data send terminal and data receiving terminal from the communication data.Interchanger can be with
According to the physical address of data receiving terminal, corresponding data transmission interface is called, communication data is sent to data receiver end
End.Meanwhile data are sent into terminal and data receiving interface, and, data receiving terminal and data transmission interface are accordingly protected
There are in address table.
Step 202, the same object existed in described address record log corresponding to different communication interfaces is determined
Manage address, and judge the communication network there is currently communication loopback failure.
Step 203, the target communication terminal indicated to the target physical address sends communication loopback fault cues notice,
To indicate that the target communication terminal is communicated with interchanger pause.
According to embodiments of the present invention, by searching for the same physical address corresponding to different communication interfaces, judgement is current
In the presence of communication loopback failure, and correspondingly pause target communication terminal is communicated with interchanger, to avoid because communicating loopback
The Communications such as data transmission fault caused by failure ensure that the communication traffic of communication network can be with normal operation.
It should be noted that for embodiment of the method, for simple description, therefore it is all expressed as a series of action group
It closes, but those skilled in the art should understand that, the embodiment of the present invention is not limited by the described action sequence, because according to
According to the embodiment of the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art also should
Know, embodiment described in this description belongs to preferred embodiment, and the involved action not necessarily present invention is implemented
Necessary to example.
In order to which those skilled in the art deeply understand the present invention, said below with reference to the specific example of Figure 12 and Figure 13
It is bright.Figure 12 shows a kind of structural schematic diagram of communication loopback fault detect server of the present invention.It can be seen that communication loopback
Fault detect server may include multiple modules, and the processing that each module is carried out is as follows:
Xml document parsing module:Using xml document as configuration file, configuration file storage is interchanger to be obtained
Essential information, including the mostly upper time take a mac table, the addresses ip of interchanger, snmp protocol massages group name, snmp orders
Stand-by period, number of retries, port, telnet login names, password, telnet command-line prompts accord with ((<H3C>) etc..
Wherein, the xml configuration file formats of snmp agreements are as follows:
Wherein, the xml configuration file formats of Telnet agreements are as follows:
Mac table acquisition modules:The mac address tables of timing acquisition interchanger, fixed time interval come from configuration file, acquiescence 30
Second.
Oid parsing modules:Parse "1.3.6.1.2.1.17.4.3.1.1"This oid issues interchanger and obtains interchanger
Mac tables;The oid that interchanger returns is parsed, the addresses mac and port are therefrom obtained.
Snmp communication modules:Responsible and switch communication.
Canonical parsing module:Telnet inquires interchanger mac, return the result is that textual form, need to parse text, this
Invention parses text using regular expression.Use this ([0-9a-fA-F]{4})(([/\s:-][0-9a-fA-F]{4})
{2}).*([0-9][/][0-9]+) regular expression obtains mac-port values pair.
Telnet communication modules:It is responsible for and switch communication is responsible for for one sending to interchanger using 2 threads
Telnet orders are responsible for for one receiving the telnet bidding protocols that interaction machine returns.
Comparison module:The mac address tables for comparing 2 times find that same mac on different port, then has mac drifts, group
At alarm information, it is put into the message queue of alarm sending module.
Wherein, in relatively mac address table, the mac tables of the map data types storage interaction machine of stl, structure may be used
It is as follows:
map<ip,pair<mac,port>>, using the ip of interchanger as key, using mac and port values to as value.
Alert sending module:As soon as monitoring a message queue, discovery has message to take out, and is sent to and is disappeared using udp socket
Cease collection procedure.
Wherein, by above-mentioned multiple modules, testing process below may be implemented:
S1 starts detection program, xml configuration files is read in, by the configuration information read-in programme of interchanger;
The mac tables of S2, Mac table acquisition module timing acquisition interchanger, time interval can match, and configure in xml configuration files
In;
S3 is obtained mac address tables and is first obtained using snmp agreements, Shi Yong "1.3.6.1.2.1.17.4.3.1.1"This
Oid obtains mac address tables, is dealt on interchanger by snmp communication modules;
S4 reuses the reacquisition of Telnet agreements when snmp protocol failures;
After the acquisition of S5, Mac address table comes up, is compared by the mac tables with last time, find the mac of drift;
S6, the mac that will be drifted about are sent to collection procedure according to the alarm information format of definition.
Figure 13 shows a kind of structural schematic diagram of loopback information collecting server of the present invention.It can be seen that loopback is believed
It includes multiple modules that breath, which collects server, and the processing that each module is carried out is as follows:
Alert receiving module:It receives loopback detection program and pushes the alarm information to come, using udp socket, select
Realize multichannel I/O multiplexings.
Warning analysis module:The alarm information received is parsed, is put into database.Database uses mysql5.5.It will solution
In the MacFlapping tables for the alarm deposit LoopDetection databases analysed.
Alert sound module:While storage, sound module is sent in this alarm, sends out alarm sound.
Embodiment three
Corresponding with embodiment one, the embodiment of the present invention three additionally provides the communication loopback fault detect in a kind of communication network
Device, the device can be applied particularly to communication loopback fault detect server.Fig. 7 shows one kind of the embodiment of the present invention three
The structure diagram of communication loopback failure detector in communication network, the communication network includes at least one interchanger and more
A communicating terminal, the interchanger include multiple communication interfaces for being communicated with the communicating terminal, and described device specifically may be used
To include following module:
Address table acquisition module 701, the address table for obtaining interchanger;Described address record sheet, which corresponds to, to be protected
The communication interface for having the physical address of each communicating terminal and being communicated with each communicating terminal;
Fault determination module 702 exists in described address record log corresponding to different communication interfaces for determining
The same target physical address, and judge the communication network there is currently communication loopback failure;
Notification module 703, the target communication terminal for being indicated to the target physical address send communication loopback failure
Prompt notice, to indicate that the target communication terminal is communicated with interchanger pause.
Optionally, described device further includes:
Interchanger notification module, for sending communication loopback fault cues notice to the interchanger, to indicate the friendship
It changes planes to suspend with the target communication terminal and communicate.
Optionally, described address record sheet includes newer address table, and the fault determination module 702 includes:
First communication interface searches submodule, corresponding in newer address table for searching each physical address
Communication interface;
First object physical address tag submodule will if being corresponding with different communication interfaces for some physical address
Some physical address tag is the target physical address.
Optionally, described address record sheet includes the address table of each period, and the fault determination module 702 wraps
It includes:
Second communication interface searches submodule, divides in the address table of each period for searching each physical address
Not corresponding communication interface;
Second target physical address marks submodule, if different for the corresponding communication interface of some physical address,
It is then the target physical address by some physical address tag.
Optionally, described address record sheet acquisition module 701 includes:
Upload function module calling submodule, the address table upload function module for calling the interchanger, and
Described address record sheet is sent to communication loopback fault detect server by instruction described address record sheet upload function module.
Optionally, described address record sheet acquisition module 701 includes:
Remote control module calls submodule, for when the address table upload function module mistake for calling the interchanger
It loses, then calls local remote control module;
Address table extracting sub-module, it is described for being extracted from the interchanger using the remote control module
Location record sheet.
According to embodiments of the present invention, by searching for the same physical address corresponding to different communication interfaces, judgement is current
In the presence of communication loopback failure, and correspondingly pause target communication terminal is communicated with interchanger, to avoid because communicating loopback
The Communications such as data transmission fault caused by failure ensure that the communication traffic of communication network can be with normal operation.
Example IV
Corresponding with embodiment two, the embodiment of the present invention four additionally provides a kind of communication loopback failure in communication network
The interchanger of detection.Fig. 8 shows a kind of communication loopback fault detect in communication network of the embodiment of the present invention four
The structure diagram of interchanger, the communication network include at least one interchanger and multiple communicating terminals, and the interchanger 800 wraps
Multiple communication interfaces for being communicated with the communicating terminal are included, the interchanger 800 can specifically include following module:
Address table acquisition module 801, the address table for obtaining interchanger;Described address record sheet, which corresponds to, to be protected
There is the physical address of each communicating terminal and communication interface that each communicating terminal is accessed.
Fault determination module 802 exists in described address record log corresponding to different communication interfaces for determining
The same target physical address, and judge the communication network there is currently communication loopback failure.
Notification module 803, the target communication terminal for being indicated to the target physical address send communication loopback failure
Prompt notice, to indicate that the target communication terminal is communicated with interchanger pause.
Optionally, the communicating terminal includes that data send terminal and data receiving terminal, and the communication interface includes number
According to receiving interface and data transmission interface, before the address table for obtaining interchanger, the interchanger 800 also wraps
It includes:
Communication data acquisition module sends the communication that terminal is sent to the data receiver interface for obtaining the data
Data;The communication data carries the physical address that the data send terminal and the data receiving terminal;
Communication data forwarding module is sent for the physical address according to the data receiving terminal using the data
The communication data is sent to the data receiving terminal by interface;
Address table preserving module is used to the data sending terminal and the data receiver interface, and, it is described
Data receiving terminal and the data transmission interface, correspondence are stored in described address record sheet.
According to embodiments of the present invention, by searching for the same physical address corresponding to different communication interfaces, judgement is current
In the presence of communication loopback failure, and correspondingly pause target communication terminal is communicated with interchanger, to avoid because communicating loopback
The Communications such as data transmission fault caused by failure ensure that the communication traffic of communication network can be with normal operation.
For device embodiments, since it is basically similar to the method embodiment, so fairly simple, the correlation of description
Place illustrates referring to the part of embodiment of the method.
Each embodiment in this specification is described in a progressive manner, the highlights of each of the examples are with
The difference of other embodiment, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiment of the embodiment of the present invention can be provided as method, apparatus or calculate
Machine program product.Therefore, the embodiment of the present invention can be used complete hardware embodiment, complete software embodiment or combine software and
The form of the embodiment of hardware aspect.Moreover, the embodiment of the present invention can be used one or more wherein include computer can
With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code
The form of the computer program product of implementation.
In a typical configuration, the computer equipment includes one or more processors (CPU), input/output
Interface, network interface and memory.Memory may include the volatile memory in computer-readable medium, random access memory
The forms such as device (RAM) and/or Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is to calculate
The example of machine readable medium.Computer-readable medium includes that permanent and non-permanent, removable and non-removable media can be with
Information storage is realized by any method or technique.Information can be computer-readable instruction, data structure, the module of program or
Other data.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM
(SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory
(ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, CD-ROM are read-only
Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or
Other magnetic storage apparatus or any other non-transmission medium can be used for storage and can be accessed by a computing device information.According to
Herein defines, and computer-readable medium does not include non-persistent computer readable media (transitory media), such as
The data-signal and carrier wave of modulation.
The embodiment of the present invention be with reference to according to the method for the embodiment of the present invention, terminal device (system) and computer program
The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions
In each flow and/or block and flowchart and/or the block diagram in flow and/or box combination.These can be provided
Computer program instructions are set to all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals
Standby processor is to generate a machine so that is held by the processor of computer or other programmable data processing terminal equipments
Capable instruction generates for realizing in one flow of flow chart or multiple flows and/or one box of block diagram or multiple boxes
The device of specified function.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing terminal equipments
In computer-readable memory operate in a specific manner so that instruction stored in the computer readable memory generates packet
The manufacture of command device is included, which realizes in one flow of flow chart or multiple flows and/or one side of block diagram
The function of being specified in frame or multiple boxes.
These computer program instructions can be also loaded into computer or other programmable data processing terminal equipments so that
Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus
The instruction executed on computer or other programmable terminal equipments is provided for realizing in one flow of flow chart or multiple flows
And/or in one box of block diagram or multiple boxes specify function the step of.
Although the preferred embodiment of the embodiment of the present invention has been described, once a person skilled in the art knows bases
This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as
Including preferred embodiment and fall into all change and modification of range of embodiment of the invention.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap
Those elements are included, but also include other elements that are not explicitly listed, or further include for this process, method, article
Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited
Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device including the element.
Technical solution provided by the present invention is described in detail above, specific case used herein is to this hair
Bright principle and embodiment is expounded, the explanation of above example is only intended to help understand the present invention method and its
Core concept;Meanwhile for those of ordinary skill in the art, according to the thought of the present invention, in specific implementation mode and application
There will be changes in range, in conclusion the content of the present specification should not be construed as limiting the invention.