CN109819062B - Method and device for accessing network by using virtual MAC address - Google Patents

Method and device for accessing network by using virtual MAC address Download PDF

Info

Publication number
CN109819062B
CN109819062B CN201910074914.5A CN201910074914A CN109819062B CN 109819062 B CN109819062 B CN 109819062B CN 201910074914 A CN201910074914 A CN 201910074914A CN 109819062 B CN109819062 B CN 109819062B
Authority
CN
China
Prior art keywords
mac address
server
switch
network
address
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.)
Active
Application number
CN201910074914.5A
Other languages
Chinese (zh)
Other versions
CN109819062A (en
Inventor
方小帅
闫治波
李云鹏
沈军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN201910074914.5A priority Critical patent/CN109819062B/en
Publication of CN109819062A publication Critical patent/CN109819062A/en
Application granted granted Critical
Publication of CN109819062B publication Critical patent/CN109819062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a method for accessing a network by utilizing a virtual MAC address and a corresponding device, wherein the method and the device are applied to a video network, the video network comprises a switch and a plurality of monitoring protocol conversion servers, the monitoring protocol conversion servers actively issue an active broadcast packet comprising a protocol conversion MAC address and a target virtual MAC address before accessing the network, the switch searches a target server MAC address corresponding to the target virtual MAC address in an address memory table after receiving the active broadcast packet, when the target server MAC address is not the protocol conversion MAC address, the protocol conversion MAC address corresponds to the target virtual MAC address, and then the switch binds a port bound with the target server MAC address with the protocol conversion MAC address again; when the monitoring protocol conversion server uses the virtual MAC address to access the video network, even if the repeated virtual MAC address is used, the communication path of the monitoring protocol conversion server can be smoothly established in the video network, and the network access efficiency of the monitoring protocol conversion server under the condition that the repeated virtual MAC address is used to access the video network is improved.

Description

Method and device for accessing network by using virtual MAC address
Technical Field
The present application relates to the field of video networking technologies, and in particular, to a method and an apparatus for accessing a network by using a virtual MAC address.
Background
When a protocol conversion server in the existing video network is connected to the video network, a virtual MAC address is usually configured, and the virtual MAC address corresponds to the protocol conversion server. However, in practice, sometimes the virtual MAC address is reused to a different protocol server, and thus, when the next new protocol server uses the used virtual MAC address to connect to the internet of view, a network access failure occurs.
Disclosure of Invention
In view of the above problems, embodiments of the present application are proposed to provide a method for accessing a network using a virtual MAC address and an apparatus for accessing a network using a virtual MAC address, which overcome or at least partially solve the above problems.
In order to solve the technical problem, the present application discloses a method for accessing a network by using a virtual MAC address, where the method is applied to a video network, the video network includes a switch and a plurality of monitoring protocol servers respectively connected to the switch, the switch includes an address memory table, the address memory table includes a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one to one, and the switch is configured with ports bound to the server MAC addresses one to one, and the method includes:
the switch receives an active broadcast packet issued by the monitoring co-transfer server; the active broadcast packet is generated by the monitoring co-transfer server according to triggering operation before network access, and comprises a co-transfer MAC address of the co-transfer server and a target virtual MAC address corresponding to the co-transfer MAC address;
the switch searches a target server MAC address corresponding to the target virtual MAC address in the address memory table aiming at the active broadcast packet;
when the target server MAC address is inconsistent with the protocol conversion MAC address, the switch updates the target server MAC address into the protocol conversion MAC address in the address memory table;
and the switch removes the binding relation between the MAC address of the target server and the first port based on the updated address memory table, and binds the co-transfer MAC address with the first port.
Optionally, when the target server MAC address is inconsistent with the corotation MAC address, the switch updates the target server MAC address to the corotation MAC address in the address memory table, and the method further includes:
when the target server MAC address is inconsistent with the co-transfer MAC address, the switch further judges whether a first port bound by the target server MAC is used;
if not, the switch updates the target server MAC address in the address memory table to the protocol conversion MAC address.
Optionally, the step of the switch determining whether the first port of the target server MAC binding is being used includes:
the switch acquires a current data stream from the first port and judges whether the data stream is 0 or not; if so, the switch determines that the first port is not used; if not, the switch determines that the first port is being used.
Optionally, the video network further comprises a video network server connected to the switch; after the step that the switch removes the binding relationship between the MAC address of the target server and the first port based on the updated address memory table and binds the first port and the protocol conversion MAC address, the method comprises the following steps:
the switch receives an access network broadcast packet sent by the video networking server; wherein the network access broadcast packet comprises a video network server MAC address of the video network server;
the switch binds the MAC address of the video networking server with a second port;
the switch detects whether the second port receives a network access instruction; wherein the network access instruction is generated by the video network server and comprises the target virtual MAC address;
if yes, the switch sends the network access instruction to the monitoring coordination server through the first port.
In order to solve the technical problem, the present application also correspondingly discloses a method for accessing a network by using a virtual MAC address, where the method is applied to a video network, the video network includes a switch, a video network server and a monitoring protocol server, the video network server and the monitoring protocol server are respectively connected to the switch, the switch includes an address memory table, the address memory table includes a plurality of virtual MAC addresses and MAC addresses corresponding to the virtual MAC addresses one to one, and the switch is configured with ports binding the MAC addresses of the servers one to one, and the method includes:
the monitoring co-transfer server generates an active broadcast packet according to a trigger operation before network access; the active broadcast packet comprises a protocol conversion MAC address of the protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the monitoring co-transfer server sends the active broadcast packet to the switch; the switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
Optionally, the video network further comprises a video network server connected to the switch; after the step of sending the active broadcast packet to the switch by the vision-associated monitoring coordination server, the method comprises:
after a preset waiting time, if the monitoring protocol conversion server does not receive a network access instruction forwarded by the switch, updating the active broadcast packet, wherein the updated active broadcast packet comprises a new target virtual MAC address; the network access instruction is generated by the video network server and sent to the switch, and the network access instruction comprises the target virtual MAC address.
And the monitoring co-transfer server sends the updated active broadcast packet to the switch.
In order to solve the technical problem, the present application further discloses a device for accessing a network by using a virtual MAC address, where the device is applied to a video network, the video network includes a switch and a plurality of monitoring coordination servers respectively connected to the switch, the switch includes an address memory table, the address memory table includes a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one to one, and the switch is configured with ports binding the server MAC addresses one to one; the apparatus is located at the switch, and includes:
the active broadcast packet receiving module is used for receiving the active broadcast packet sent by the monitoring co-transfer server; the active broadcast packet is generated by the monitoring co-transfer server according to triggering operation before network access, and comprises a co-transfer MAC address of the co-transfer server and a target virtual MAC address corresponding to the co-transfer MAC address;
the MAC address acquisition module is used for searching a target server MAC address corresponding to the target virtual MAC address in the address memory table aiming at the active broadcast packet;
an address memory table updating module, configured to update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address;
and the port binding module is used for removing the binding relation between the MAC address of the target server and the first port based on the updated address memory table and binding the first port and the protocol conversion MAC address.
Optionally, the apparatus further comprises:
the port judgment module is used for judging whether the first port bound by the MAC of the target server is used;
and the address updating control module is used for controlling the address memory table updating module to update the target server MAC address in the address memory table to the protocol conversion MAC address when the first port bound by the target server MAC is not used.
Optionally, the video network further comprises a video network server connected to the switch; the device further comprises:
the network access broadcast packet receiving module is used for receiving a network access broadcast packet sent by the video network server; wherein the network access broadcast packet comprises a video network server MAC address of the video network server;
the port binding module is also used for binding the MAC address of the video network server with a second port;
the network access instruction receiving module is used for detecting whether the second port receives a network access instruction; wherein the network entry instruction comprises the target virtual MAC address.
And the network access instruction sending module is used for sending the network access instruction to the monitoring transfer server through the first port when the second port receives the network access instruction.
In order to solve the technical problem, the present application further discloses a device for accessing a network by using a virtual MAC address, where the device is applied to a video network, the video network includes a switch and a plurality of monitoring protocol servers respectively connected to the switch, the switch includes an address memory table, the address memory table includes a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one to one, and the switch is configured with ports bound to the server MAC addresses one to one; the device is located the monitoring is cooperative to change the server, includes:
the active broadcast packet generation module is used for generating an active broadcast packet according to triggering operation before network access; the active broadcast packet comprises a protocol conversion MAC address of the protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the active broadcast packet issuing module is used for sending the active broadcast packet to the switch; the switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
Compared with the prior art, the embodiment of the application has the following advantages:
firstly, applying the characteristics of the video networking, before accessing the network, monitoring the protocol server to actively issue an active broadcast packet comprising a protocol MAC address and a target virtual MAC address, after receiving the active broadcast packet, the switch finds the target server MAC address corresponding to the target virtual MAC address in an address memory table, when the target server MAC address is not the protocol MAC address, the protocol MAC address corresponds to the target virtual MAC address, and then the switch binds the port bound to the target server MAC address with the protocol MAC address again; when the monitoring protocol conversion server uses the virtual MAC address to access the video network, even if the repeated virtual MAC address is used, the communication path of the monitoring protocol conversion server can be smoothly established in the video network, and the network access efficiency of the monitoring protocol conversion server under the condition that the repeated virtual MAC address is used to access the video network is improved.
Secondly, when the MAC address of the target server is inconsistent with the MAC address of the corotation, the switch further judges whether the first port bound with the MAC address of the target server is used, if so, the binding relationship between the MAC address of the target server and the first port is not changed, so that the data transmission of the server corresponding to the MAC address of the target server is not forcibly terminated, and the intelligence of the switch for processing the network access service is improved.
And thirdly, a communication path between the switch and the monitoring transfer server is adopted, and then the network access instruction is issued by using the video network server, so that the monitoring transfer server is smoothly connected into the video network, and the initiative of the monitoring transfer server in network access is ensured.
Finally, if the monitoring protocol conversion server cannot receive the network access instruction of the switch within the preset time, the network access failure is indicated, at the moment, the monitoring protocol conversion server can replace the target virtual MAC address, and the network access is performed according to the method of the application again, so that the active response of the monitoring protocol conversion server under the condition that the target virtual MAC address is used is improved, and the network access efficiency is improved.
Drawings
FIG. 1 is a networking schematic of a video network of the present application;
FIG. 2 is a schematic diagram of a hardware architecture of a node server according to the present application;
fig. 3 is a schematic diagram of a hardware architecture of an access switch of the present application;
fig. 4 is a schematic diagram of a hardware structure of an ethernet protocol conversion gateway according to the present application;
fig. 5 is a flowchart illustrating steps of embodiment 1 of a method for accessing a network using a virtual MAC address according to the present application;
fig. 6 is a flowchart illustrating steps of embodiment 2 of a method for accessing a network using a virtual MAC address according to the present application;
fig. 7 is a block diagram illustrating an embodiment 3 of the network access apparatus using a virtual MAC address according to the present application;
fig. 8 is a block diagram of an apparatus embodiment 4 for accessing a network using a virtual MAC address according to the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description.
The video networking is an important milestone for network development, is a real-time network, can realize high-definition video real-time transmission, and pushes a plurality of internet applications to high-definition video, and high-definition faces each other.
The video networking adopts a real-time high-definition video exchange technology, can integrate required services such as dozens of services of video, voice, pictures, characters, communication, data and the like on a system platform on a network platform, such as high-definition video conference, video monitoring, intelligent monitoring analysis, emergency command, digital broadcast television, delayed television, network teaching, live broadcast, VOD on demand, television mail, Personal Video Recorder (PVR), intranet (self-office) channels, intelligent video broadcast control, information distribution and the like, and realizes high-definition quality video broadcast through a television or a computer.
To better understand the embodiments of the present application, the following description refers to the internet of view:
some of the technologies applied in the video networking are as follows:
network technology (network technology)
Network technology innovation in video networking has improved over traditional Ethernet (Ethernet) to face the potentially enormous video traffic on the network. Unlike pure network Packet Switching (Packet Switching) or network Circuit Switching (Circuit Switching), the Packet Switching is adopted by the technology of the video networking to meet the Streaming requirement. The video networking technology has the advantages of flexibility, simplicity and low price of packet switching, and simultaneously has the quality and safety guarantee of circuit switching, thereby realizing the seamless connection of the whole network switching type virtual circuit and the data format.
Switching Technology (Switching Technology)
The video network adopts two advantages of asynchronism and packet switching of the Ethernet, eliminates the defects of the Ethernet on the premise of full compatibility, has end-to-end seamless connection of the whole network, is directly communicated with a user terminal, and directly bears an IP data packet. The user data does not require any format conversion across the entire network. The video networking is a higher-level form of the Ethernet, is a real-time exchange platform, can realize the real-time transmission of the whole-network large-scale high-definition video which cannot be realized by the existing Internet, and pushes a plurality of network video applications to high-definition and unification.
Server Technology (Server Technology)
The server technology on the video networking and unified video platform is different from the traditional server, the streaming media transmission of the video networking and unified video platform is established on the basis of connection orientation, the data processing capacity of the video networking and unified video platform is independent of flow and communication time, and a single network layer can contain signaling and data transmission. For voice and video services, the complexity of video networking and unified video platform streaming media processing is much simpler than that of data processing, and the efficiency is greatly improved by more than one hundred times compared with that of a traditional server.
Storage Technology (Storage Technology)
The super-high speed storage technology of the unified video platform adopts the most advanced real-time operating system in order to adapt to the media contents with super-large capacity and super-large flow, the program information in the server instruction is corresponding to the specific hard disk space, the media contents are not passed through the server any more, and are directly sent to the user terminal instantly, and the general waiting time of the user is less than 0.2 second. The optimized sector distribution greatly reduces the mechanical motion of the magnetic head track seeking of the hard disk, the resource consumption only accounts for 20% of that of the IP internet of the same grade, but concurrent flow which is 3 times larger than that of the traditional hard disk array is generated, and the comprehensive efficiency is improved by more than 10 times.
Network Security Technology (Network Security Technology)
The structural design of the video network completely eliminates the network security problem troubling the internet structurally by the modes of independent service permission control each time, complete isolation of equipment and user data and the like, generally does not need antivirus programs and firewalls, avoids the attack of hackers and viruses, and provides a structural carefree security network for users.
Service Innovation Technology (Service Innovation Technology)
The unified video platform integrates services and transmission, and is not only automatically connected once whether a single user, a private network user or a network aggregate. The user terminal, the set-top box or the PC are directly connected to the unified video platform to obtain various multimedia video services in various forms. The unified video platform adopts a menu type configuration table mode to replace the traditional complex application programming, can realize complex application by using very few codes, and realizes infinite new service innovation.
Networking of the video network is as follows:
the video network is a centralized control network structure, and the network can be a tree network, a star network, a ring network and the like, but on the basis of the centralized control node, the whole network is controlled by the centralized control node in the network.
As shown in fig. 1, the video network is divided into an access network and a metropolitan network.
The devices of the access network part can be mainly classified into 3 types: node server, access switch, terminal (including various set-top boxes, coding boards, memories, etc.). The node server is connected to an access switch, which may be connected to a plurality of terminals and may be connected to an ethernet network.
The node server is a node which plays a centralized control function in the access network and can control the access switch and the terminal. The node server can be directly connected with the access switch or directly connected with the terminal.
Similarly, devices of the metropolitan network portion may also be classified into 3 types: a metropolitan area server, a node switch and a node server. The metro server is connected to a node switch, which may be connected to a plurality of node servers.
The node server is a node server of the access network part, namely the node server belongs to both the access network part and the metropolitan area network part.
The metropolitan area server is a node which plays a centralized control function in the metropolitan area network and can control a node switch and a node server. The metropolitan area server can be directly connected with the node switch or directly connected with the node server.
Therefore, the whole video network is a network structure with layered centralized control, and the network controlled by the node server and the metropolitan area server can be in various structures such as tree, star and ring.
The access network part can form a unified video platform (the part in the dotted circle), and a plurality of unified video platforms can form a video network; each unified video platform may be interconnected via metropolitan area and wide area video networking.
Video networking device classification
1.1 devices in the video network of the embodiment of the present application can be mainly classified into 3 types: servers, switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.). The video network as a whole can be divided into a metropolitan area network (or national network, global network, etc.) and an access network.
1.2 wherein the devices of the access network part can be mainly classified into 3 types: node servers, access switches (including ethernet gateways), terminals (including various set-top boxes, code boards, memories, etc.).
The specific hardware structure of each access network device is as follows:
a node server:
as shown in fig. 2, the system mainly includes a network interface module 201, a switching engine module 202, a CPU module 203, and a disk array module 204;
the network interface module 201, the CPU module 203, and the disk array module 204 all enter the switching engine module 202; the switching engine module 202 performs an operation of looking up the address table 205 on the incoming packet, thereby obtaining the direction information of the packet; and stores the packet in a queue of the corresponding packet buffer 206 based on the packet's steering information; if the queue of the packet buffer 206 is nearly full, it is discarded; the switching engine module 202 polls all packet buffer queues for forwarding if the following conditions are met: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero. The disk array module 204 mainly implements control over the hard disk, including initialization, read-write, and other operations on the hard disk; the CPU module 203 is mainly responsible for protocol processing with an access switch and a terminal (not shown in the figure), configuring an address table 205 (including a downlink protocol packet address table, an uplink protocol packet address table, and a data packet address table), and configuring the disk array module 204.
The access switch:
as shown in fig. 3, the network interface module mainly includes a network interface module (a downlink network interface module 301 and an uplink network interface module 302), a switching engine module 303 and a CPU module 304;
wherein, the packet (uplink data) coming from the downlink network interface module 301 enters the packet detection module 305; the packet detection module 305 detects whether the Destination Address (DA), the Source Address (SA), the packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id) and enters the switching engine module 303, otherwise, discards the stream identifier; the packet (downstream data) coming from the upstream network interface module 302 enters the switching engine module 303; the data packet coming from the CPU module 204 enters the switching engine module 303; the switching engine module 303 performs an operation of looking up the address table 306 on the incoming packet, thereby obtaining the direction information of the packet; if the packet entering the switching engine module 303 is from the downstream network interface to the upstream network interface, the packet is stored in the queue of the corresponding packet buffer 307 in association with the stream-id; if the queue of the packet buffer 307 is nearly full, it is discarded; if the packet entering the switching engine module 303 is not from the downlink network interface to the uplink network interface, the data packet is stored in the queue of the corresponding packet buffer 307 according to the guiding information of the packet; if the queue of the packet buffer 307 is nearly full, it is discarded.
The switching engine module 303 polls all packet buffer queues, which in this embodiment is divided into two cases:
if the queue is from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queued packet counter is greater than zero; 3) obtaining a token generated by a code rate operation module;
if the queue is not from the downlink network interface to the uplink network interface, the following conditions are met for forwarding: 1) the port send buffer is not full; 2) the queue packet counter is greater than zero.
The rate operation module 208 is configured by the CPU module 204, and generates tokens for packet buffer queues from all downstream network interfaces to upstream network interfaces at programmable intervals to control the rate of upstream forwarding.
The CPU module 304 is mainly responsible for protocol processing with the node server, configuration of the address table 306, and configuration of the code rate operation module 308.
Ethernet protocol conversion gateway
As shown in fig. 4, the apparatus mainly includes a network interface module (a downlink network interface module 401 and an uplink network interface module 402), a switching engine module 403, a CPU module 404, a packet detection module 405, a code rate operation module 408, an address table 406, a packet buffer 407, a MAC adding module 409, and a MAC deleting module 410.
Wherein, the data packet coming from the downlink network interface module 401 enters the packet detection module 405; the packet detection module 405 detects whether the ethernet MAC DA, the ethernet MAC SA, the ethernet length or frame type, the video network destination address DA, the video network source address SA, the video network packet type, and the packet length of the packet meet the requirements, and if so, allocates a corresponding stream identifier (stream-id); then, the MAC deletion module 410 subtracts MAC DA, MAC SA, length or frame type (2byte) and enters the corresponding receiving buffer, otherwise, discards it;
the downlink network interface module 401 detects the sending buffer of the port, and if there is a packet, obtains the ethernet MAC DA of the corresponding terminal according to the destination address DA of the packet, adds the ethernet MAC DA of the terminal, the MAC SA of the ethernet protocol gateway, and the ethernet length or frame type, and sends the packet.
The other modules in the ethernet protocol gateway function similarly to the access switch.
A terminal:
the system mainly comprises a network interface module, a service processing module and a CPU module; for example, the set-top box mainly comprises a network interface module, a video and audio coding and decoding engine module and a CPU module; the coding board mainly comprises a network interface module, a video and audio coding engine module and a CPU module; the memory mainly comprises a network interface module, a CPU module and a disk array module.
1.3 devices of the metropolitan area network part can be mainly classified into 2 types: node server, node exchanger, metropolitan area server. The node switch mainly comprises a network interface module, a switching engine module and a CPU module; the metropolitan area server mainly comprises a network interface module, a switching engine module and a CPU module.
2. Video networking packet definition
2.1 Access network packet definition
The data packet of the access network mainly comprises the following parts: destination Address (DA), Source Address (SA), reserved bytes, payload (pdu), CRC.
As shown in the following table, the data packet of the access network mainly includes the following parts:
DA SA Reserved Payload CRC
wherein:
the Destination Address (DA) is composed of 8 bytes (byte), the first byte represents the type of the data packet (such as various protocol packets, multicast data packets, unicast data packets, etc.), there are 256 possibilities at most, the second byte to the sixth byte are metropolitan area network addresses, and the seventh byte and the eighth byte are access network addresses;
the Source Address (SA) is also composed of 8 bytes (byte), defined as the same as the Destination Address (DA);
the reserved byte consists of 2 bytes;
the payload part has different lengths according to different types of datagrams, and is 64 bytes if the datagram is various types of protocol packets, and is 32+1024 or 1056 bytes if the datagram is a unicast packet, of course, the length is not limited to the above 2 types;
the CRC consists of 4 bytes and is calculated in accordance with the standard ethernet CRC algorithm.
2.2 metropolitan area network packet definition
The topology of a metropolitan area network is a graph and there may be 2, or even more than 2, connections between two devices, i.e., there may be more than 2 connections between a node switch and a node server, a node switch and a node switch, and a node switch and a node server. However, the metro network address of the metro network device is unique, and in order to accurately describe the connection relationship between the metro network devices, parameters are introduced in the embodiment of the present application: a label to uniquely describe a metropolitan area network device.
In this specification, the definition of the Label is similar to that of the Label of MPLS (Multi-Protocol Label Switch), and assuming that there are two connections between the device a and the device B, there are 2 labels for the packet from the device a to the device B, and 2 labels for the packet from the device B to the device a. The label is classified into an incoming label and an outgoing label, and assuming that the label (incoming label) of the packet entering the device a is 0x0000, the label (outgoing label) of the packet leaving the device a may become 0x 0001. The network access process of the metro network is a network access process under centralized control, that is, address allocation and label allocation of the metro network are both dominated by the metro server, and the node switch and the node server are both passively executed, which is different from label allocation of MPLS, and label allocation of MPLS is a result of mutual negotiation between the switch and the server.
As shown in the following table, the data packet of the metro network mainly includes the following parts:
DA SA Reserved label (R) Payload CRC
Namely Destination Address (DA), Source Address (SA), Reserved byte (Reserved), tag, payload (pdu), CRC. The format of the tag may be defined by reference to the following: the tag is 32 bits with the upper 16 bits reserved and only the lower 16 bits used, and its position is between the reserved bytes and payload of the packet.
Based on the characteristics of the video network, one of the core concepts of the embodiment of the application is provided, the monitoring and coordination server actively issues an active broadcast packet before the network is accessed according to a protocol of the video network, wherein the active broadcast packet comprises a coordination MAC address and a target virtual MAC address of the monitoring and coordination server, and after the switch receives the active broadcast packet, the switch updates the binding relationship between the address and the instrument and the port, so that a communication link with the monitoring and coordination server is established; when the monitoring coordination server is deployed to a new place and uses a new virtual MAC address to connect into the video network, even if the repeated virtual MAC address is used, a communication path with the switch can be smoothly established, and the network access efficiency of the monitoring coordination server under the condition of using the repeated virtual MAC address to access into the network is improved.
Example one
Referring to fig. 5, a flowchart of steps of embodiment 1 of a method for accessing a network by using virtual MAC addresses is shown, in this embodiment, the method may be applied to a video network, the video network may include a switch, a plurality of monitoring protocol conversion servers that may be respectively connected to the switch, the switch may include an address memory table, the address memory table may include a plurality of virtual MAC addresses and server MAC addresses that correspond to the virtual MAC addresses one to one, and a port that is bound to each of the server MAC addresses one to one may be configured on the switch.
In the embodiment of the present application, the switch may be an ethernet switch; a monitoring co-ordination server may be understood as a network bridge server for connecting monitoring devices within the video network to the video network.
The virtual MAC address is understood to mean a MAC address registered in the internet-of-view server, which corresponds to a network number of the monitoring protocol server in the internet-of-view.
The address memory table can be understood as the correspondence between the MAC addresses of the source terminal and the destination terminal recorded by the switch for the communication operation that occurred before, so that when the switch receives the data information sent by a certain source terminal later, the switch can send the data information of the source terminal to the destination terminal along the communication link memorized in the address memory table according to the correspondence in the address memory table.
The port can be understood as a network data interface in the switch, in practice, the switch can bind a port for a destination terminal MAC address and a port for a source terminal MAC address according to an address memory table, so that when the switch receives data information sent by a certain source terminal again, the switch can know the destination terminal MAC address corresponding to the source terminal MAC address through the address memory table, and then know the port bound with the destination terminal MAC address according to the binding relationship between the destination terminal MAC address and the port, and then send the data information received from the source terminal to the destination terminal through the port bound with the destination terminal MAC address.
In the embodiment of the application, the switch is applied to the video network, and the monitoring protocol conversion server needs to access the network through the virtual MAC address, so that the address memory table of the switch in the embodiment of the application can be used for recording the one-to-one correspondence relationship between the virtual MAC address and the MAC address of the server, wherein the MAC address of the server can be the MAC address of the monitoring protocol conversion server or the MAC address of other types of servers; the switch memorizes the virtual MAC address and a certain server MAC address and binds the server MAC address and a certain port, so that the position of the server can be calibrated through the virtual MAC address when the server is added into the video network.
In the embodiment of the application, the virtual MAC address can be a video network number with a standard coding format and can be universal in the video network, so that a server in the Internet can solve the problem that the Internet and the video network are different in network access mode by providing the virtual MAC address, and further the communication connection with the video network is established.
The method for accessing the network by using the virtual MAC address in the embodiment of the application specifically comprises the following steps:
step 501, the switch receives an active broadcast packet issued by the monitoring corotation server.
The active broadcast packet is generated by the monitoring co-transfer server according to a triggering operation before network access, and comprises a co-transfer MAC address of the co-transfer server and a target virtual MAC address corresponding to the co-transfer MAC address.
In practice, when a monitoring protocol conversion server is deployed to a new position or is a newly added monitoring protocol conversion server, when the monitoring protocol conversion server joins the video network, firstly, a virtual MAC address to be used by the monitoring protocol conversion server is determined to serve as a network number in the video network, then, an active broadcast packet is issued, and when the active broadcast packet is issued, the protocol conversion MAC address of the monitoring protocol conversion server can be automatically included in the active broadcast packet.
In a specific implementation, the active broadcast packet may be a broadcast data packet sent by a data sheath interface of the monitoring and coordination server.
Step 502, the switch searches the address memory table for a target server MAC address corresponding to the target virtual MAC address for the active broadcast packet.
And after receiving the active broadcast packet, the switch reads the target virtual MAC address and the protocol conversion MAC address from the active broadcast packet, and searches the target server MAC address according to the target virtual MAC address from the address memory table.
In practice, if the target virtual MAC address used by the monitoring protocol conversion server is a new virtual MAC address, the target virtual MAC address is not recorded in the address memory table, and the switch cannot find the target virtual MAC address in the address memory table, at this time, the switch adds the target virtual MAC address and the protocol conversion MAC addresses corresponding to the target virtual MAC address one to one in the address memory table, that is, a one-to-one correspondence relationship between the target virtual MAC address and the protocol conversion MAC address is newly established in the address memory table.
Step 503, when the target server MAC address is inconsistent with the corotation MAC address, the switch updates the target server MAC address to the corotation MAC address in the address memory table.
In the embodiment of the application, the address memory table records a one-to-one correspondence relationship between a virtual MAC address and MAC addresses of other servers, and if a target virtual MAC address sent by a monitoring protocol server is used by another server, the target server MAC address corresponding to the target virtual MAC address is not consistent with the protocol MAC address, so that the target server MAC address corresponding to the target virtual MAC address in the address memory table needs to be updated. Otherwise, even if the switch receives the data information sent to the protocol conversion server again, the switch still sends the data information to other servers corresponding to the original target server MAC address according to the original address corresponding relation, namely the monitoring protocol conversion server cannot receive the fed-back data information after sending the data information, namely the monitoring protocol conversion server cannot successfully join the video network.
The operation in step 503 is executed, and the corresponding relationship between the target virtual MAC address and the protocol MAC address may be remembered again, so that when data information sent to the monitoring protocol server by another server is received again, the switch may finally send the data information to the monitoring protocol server according to the updated address memory table, so that the monitoring protocol server can receive the data information in the video network, thereby solving the problem that the monitoring protocol server cannot successfully join the video network when accessing the network by using the repeated virtual MAC address.
In practice, if the target virtual MAC address sent by the monitoring protocol server is consistent with the protocol MAC address, it is no longer necessary to remember again.
Step 504, the switch removes the binding relationship between the target server MAC address and the first port based on the updated address memory table, and binds the corotation MAC address with the first port.
In practice, port resources of the switch are not unlimited but have an upper limit, and if a plurality of monitoring protocol conversion servers use a duplicate virtual MAC address for network access, after an address memory table is updated, a plurality of ports are all in an idle state, which wastes port resources. Therefore, after the switch re-determines the corresponding relation of the target virtual MAC address in the address memory table for the repeated target virtual MAC address, the binding relation between the original target server MAC address and the first port can be removed, the cooperative MAC address is bound with the first port, namely, the server corresponding to the target server MAC address is not connected to the port of the switch any more, so that the idle of the port is avoided, and the port resource of the switch is saved.
As an optional example of the embodiment of the present application, step 503 may specifically include the following sub-steps:
substep 5031, when the switch judges that the target server MAC address is inconsistent with the corotation MAC address, further judging whether the first port bound by the target server MAC is being used; if not, go to step 5032; if used, no action is taken.
In practice, when the target virtual MAC address sent by the monitoring co-transformation server is a duplicate address, the duplicate target virtual MAC address may be in use, that is, other servers are performing data communication using the target virtual MAC address, and may also be unused. If the MAC address is used, the operation of updating the MAC address of the target server in the address memory table to the protocol conversion MAC address is not executed, so that the data transmission of other servers is not forcibly terminated, and the intelligence of the switch for processing the network access service is improved.
Substep 5032, the switch updates the destination server MAC address in the address memory table to the protocol MAC address.
And if the other servers do not utilize the target virtual MAC address for data communication, the other servers execute the operation of updating the target server MAC address in the address memory table into the protocol conversion MAC address.
As an optional example of the embodiment of the present application, step 5031 may specifically include the following sub-steps:
the switch acquires a current data stream from the first port and judges whether the data stream is 0 or not; if yes, the switch judges that the first port is not used; if not, the switch judges that the first port is being used.
This step may determine whether other servers are using the target virtual MAC address for data communication in a manner of obtaining the current data stream on the first port. In specific implementation, a flow probe or packet capturing software can be deployed on the switch to read the data stream of the first port; if the size of the data stream is 0mb, indicating that other servers do not utilize the target virtual MAC address to carry out data communication; if the size of the data stream is larger than 0mb, it indicates that other servers are using the target virtual MAC address for data communication.
In particular, in implementation, the data stream flowing from the first port within a time period from the current time may also be acquired, so as to avoid misjudgment caused by that other servers do not communicate only within the current 1 second or 2 seconds.
As an optional example of the embodiment of the present application, after step 504, the following step may be further included:
and 505, the switch receives the network access broadcast packet sent by the video network server.
Wherein the network access broadcast packet comprises a video network server MAC address of the video network server.
In the embodiment of the application, the MAC address of the internet-of-things server of the network-accessing broadcast packet informs the switch of the position of the internet-of-things server in the internet of things.
Step 506, the switch binds the video networking server MAC address with the second port.
The second port is a special port of the video network server in the switch, and all communication data sent by the subsequent video network server pass through the second port.
Step 507, the switch detects whether the second port receives a network access instruction; if yes, go to step 508.
Wherein the network access instruction is generated by the video network server and comprises the target virtual MAC address.
When a certain monitoring protocol conversion server needs to be accessed to the network, the monitoring protocol conversion server needs to be registered in the video network server, and when the monitoring protocol conversion server needs to be registered, a target virtual MAC address used by the monitoring protocol conversion server is recorded into the video network server; and then, the video network server sends a network access instruction to the monitoring protocol server, wherein the network access instruction sent by the video network server comprises a target virtual MAC address used by the monitoring protocol server in the video network.
And step 508, the switch sends the network access instruction to the monitoring coordination server through the first port.
The method comprises the steps that after a network access instruction is received by a switch, a target virtual MAC address in the network access instruction is read, then a protocol conversion MAC address corresponding to the target virtual MAC address is found in an address memory table, namely, the network access instruction is sent to a first port bound with the protocol conversion MAC address, and then the network access instruction is finally sent to a monitoring protocol conversion server through the first port, and after the network access instruction is received by the monitoring protocol conversion server, subsequent network access service is carried out.
In the embodiment of the application, the switch receives an active broadcast packet actively issued by a monitoring protocol server before the network is accessed, determines whether a target server MAC address corresponding to a target virtual MAC address is a protocol MAC address or not in an address memory table, determines the protocol MAC address as a corresponding address of the target virtual MAC address if the target server MAC address is not the protocol MAC address, and then binds a port bound with the target server MAC address with the protocol MAC address again. When the monitoring protocol conversion server uses the repeated virtual MAC address to access the network, the switch can establish a communication path for the protocol conversion server to carry out normal communication in the video network, thereby improving the network access efficiency under the condition that the monitoring protocol conversion server uses the repeated virtual MAC address to access the network.
Example two
Referring to fig. 6, a flowchart of steps of embodiment 2 of a method for accessing a network by using virtual MAC addresses is shown, in this embodiment, the method may be applied to a video network, the video network may include a switch, a plurality of monitoring protocol conversion servers that may be respectively connected to the switch, the switch may include an address memory table, the address memory table may include a plurality of virtual MAC addresses and server MAC addresses that correspond to the virtual MAC addresses one to one, and a port that is bound to each of the server MAC addresses one to one may be configured on the switch.
The method in the embodiment of the present application may specifically include the following steps:
step 601, the monitoring cooperative transmission server generates an active broadcast packet according to a trigger operation before network access. The active broadcast packet comprises a protocol conversion MAC address of the protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address.
The triggering operation before network access may be a triggering operation of a data packet socket executed on the monitoring protocol server, so that the data packet socket can generate an active broadcast packet, and a target virtual MAC address therein may be preset by a user or may be automatically generated.
Step 602, the monitoring coordination server sends the active broadcast packet to the switch.
The switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
The specific process of step 602 may refer to the description of step 502 to step 504 in embodiment 1.
As an optional example of the embodiment of the present application, the video network further includes a video network server connected to the switch, and after step 602, the method further includes the following steps:
step 603, after a preset waiting time, if the monitoring protocol conversion server does not receive the network access instruction forwarded by the switch, updating the active broadcast packet, wherein the updated active broadcast packet comprises a new target virtual MAC address; the network access instruction is generated by the video network server and sent to the switch, and the network access instruction comprises the target virtual MAC address.
The preset waiting time can be flexibly set according to actual conditions, such as 10 seconds or 1 minute, and is not particularly limited herein. After the monitoring protocol conversion server issues the broadcast packet, if the network access instruction is still not received after the preset waiting time, the network access failure is indicated, and the reason of the network access failure may be that the duplicate address is being used, or the network environment is not good.
In the embodiment of the application, no matter what the reason of the network access failure is, the monitoring protocol conversion server can replace the target virtual MAC address.
Step 604, the monitoring coordination transfer server sends the updated active broadcast packet to the switch.
In step 604, the switch performs the operation in step 602 again, so that if the network re-entry is unsuccessful, it may be estimated that the cause of the network entry failure is a poor network environment, and if the network re-entry is successful, the active response of the monitoring and coordination server under the condition that the target virtual MAC address is being used is improved, thereby improving the network entry efficiency.
In the embodiment of the application, before the monitoring protocol conversion server is connected to the network, an active broadcast packet comprising a protocol conversion MAC address of the monitoring protocol conversion server and a target virtual MAC address is actively issued to inform a switch to determine whether the target server MAC address corresponding to the target virtual MAC address is the protocol conversion MAC address in an address memory table, if not, the switch determines the protocol conversion MAC address as the corresponding address of the target virtual MAC address, and then the switch binds a port bound with the target server MAC address with the protocol conversion MAC address again; when the monitoring coordination server is deployed to a new place and uses a new virtual MAC address to connect into the video network, even if the repeated virtual MAC address is used, a communication path with the switch can be smoothly established, and the network access efficiency of the monitoring coordination server under the condition of using the repeated virtual MAC address to access into the network is improved.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
EXAMPLE III
As shown in fig. 7, an apparatus for accessing a network by using a virtual MAC address according to embodiment 3 of the present application, in comparison with the method of embodiment 1, the apparatus may be applied to a video network, the video network may include a switch, a plurality of monitoring protocol conversion servers respectively connected to the switch, the switch may include an address memory table, the address memory table may include a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one to one, a port bound to each of the server MAC addresses one to one may be configured on the switch, and the apparatus may be located at the switch, and the apparatus may include the following modules:
an active broadcast packet receiving module 701, configured to receive an active broadcast packet sent by the monitoring collaboration server; the active broadcast packet is generated by the monitoring co-transfer server according to triggering operation before network access, and comprises a co-transfer MAC address of the co-transfer server and a target virtual MAC address corresponding to the co-transfer MAC address;
a MAC address obtaining module 702, configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table;
an address memory table updating module 703, configured to update the MAC address of the target server to the protocol MAC address in the address memory table when the MAC address of the target server is inconsistent with the protocol MAC address;
a port binding module 704, configured to release the binding relationship between the MAC address of the target server and the first port based on the updated address memory table, and bind the first port and the cooperative MAC address.
As an optional example of the embodiment of the present application, the apparatus may further include the following modules:
a port determining module 705, configured to determine whether the first port bound by the MAC of the target server is being used;
an address update control module 706, configured to control the address memory table updating module 703 to update the target server MAC address in the address memory table to the corotation MAC address when the first port of the target server MAC binding is not used.
As an optional example of the embodiment of the present application, the video network further includes a video network server connected to the switch; the apparatus may further include the following modules:
an access broadcast packet receiving module 707, configured to receive an access broadcast packet sent by the video networking server; wherein the network access broadcast packet comprises a video network server MAC address of the video network server;
the port binding module 704 is further configured to bind the MAC address of the internet of view server with a second port;
a network access instruction receiving module 708, configured to detect whether the second port receives a network access instruction; wherein the network entry instruction comprises the target virtual MAC address.
A network access instruction sending module 709, configured to send the network access instruction to the monitoring coordination server through the first port when the second port receives the network access instruction.
As an optional example of the embodiment of the present application, the port determination module may be a traffic probe or a packet capture tool.
Example four
As shown in fig. 8, an apparatus for accessing a network by using a virtual MAC address according to embodiment 4 of the present application, in comparison with the method of embodiment 2, the apparatus may be applied to a video network, where the video network may include a switch, a plurality of monitoring protocol conversion servers respectively connected to the switch, the switch may include an address memory table, the address memory table may include a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one to one, and the switch may be further configured with ports bound to the server MAC addresses one to one; the device is located the monitoring is cooperative to change the server, includes:
an active broadcast packet generating module 801, configured to generate an active broadcast packet according to a trigger operation before network access; the active broadcast packet comprises a protocol conversion MAC address of the protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
an active broadcast packet issuing module 802, configured to send the active broadcast packet to the switch; the switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address in the address memory table to the protocol MAC address when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
As an optional example of the embodiment of the present application, the apparatus may further include the following modules:
a virtual address updating module 803, configured to update the active broadcast packet after a preset waiting time, if a network access instruction forwarded by the switch is not received, where the updated active broadcast packet includes a new target virtual MAC address; the network access instruction is generated by the video network server and sent to the switch, and the network access instruction comprises the target virtual MAC address.
The active broadcast packet issuing module 802 is further configured to send the updated active broadcast packet to the switch.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The method for accessing to the network by using the virtual MAC address and the corresponding device for accessing to the network by using the virtual MAC address provided by the present application are introduced in detail above, and specific examples are applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiments is only used to help understanding the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for accessing network by using virtual MAC addresses is characterized in that the method is applied to a video network, the video network comprises a switch and a plurality of monitoring protocol conversion servers respectively connected with the switch, the switch comprises an address memory table, the address memory table comprises a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one by one, and the switch is provided with ports which are bound with the server MAC addresses one by one, and the method comprises the following steps:
the switch receives an active broadcast packet issued by the monitoring co-transfer server; the active broadcast packet is generated by the monitoring protocol conversion server according to triggering operation before network access, and comprises a protocol conversion MAC address of the monitoring protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the switch searches a target server MAC address corresponding to the target virtual MAC address in the address memory table aiming at the active broadcast packet;
when the target server MAC address is inconsistent with the protocol conversion MAC address, the switch updates the target server MAC address into the protocol conversion MAC address in the address memory table;
and the switch removes the binding relation between the MAC address of the target server and the first port based on the updated address memory table, and binds the co-transfer MAC address with the first port.
2. The method of claim 1, wherein the step of the switch updating the target server MAC address to the corotation MAC address in the address memory table when the target server MAC address is not consistent with the corotation MAC address further comprises:
when the target server MAC address is inconsistent with the co-transfer MAC address, the switch further judges whether a first port bound by the target server MAC is used;
if not, the switch updates the target server MAC address in the address memory table to the protocol conversion MAC address.
3. The method of claim 2, wherein the step of the switch determining whether the first port of the target server MAC binding is being used comprises:
the switch acquires a current data stream from the first port and judges whether the data stream is 0 or not; if so, the switch determines that the first port is not used; if not, the switch determines that the first port is being used.
4. The method of claim 1 or 2, wherein the video network further comprises a video network server connected to the switch; after the step that the switch removes the binding relationship between the MAC address of the target server and the first port based on the updated address memory table and binds the first port and the protocol conversion MAC address, the method comprises the following steps:
the switch receives an access network broadcast packet sent by the video networking server; wherein the network access broadcast packet comprises a video network server MAC address of the video network server;
the switch binds the MAC address of the video networking server with a second port;
the switch detects whether the second port receives a network access instruction; wherein the network access instruction is generated by the video network server and comprises the target virtual MAC address;
if yes, the switch sends the network access instruction to the monitoring coordination server through the first port.
5. A method for accessing network by using virtual MAC addresses is characterized in that the method is applied to a video network, the video network comprises a switch and a plurality of monitoring protocol conversion servers respectively connected with the switch, the switch comprises an address memory table, the address memory table comprises a plurality of virtual MAC addresses and server MAC addresses corresponding to the virtual MAC addresses one by one, and the switch is provided with ports which are bound with the server MAC addresses one by one, and the method comprises the following steps:
the monitoring co-transfer server generates an active broadcast packet according to a trigger operation before network access; the active broadcast packet comprises a protocol conversion MAC address of the monitoring protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the monitoring co-transfer server sends the active broadcast packet to the switch; the switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
6. The method of claim 5, wherein the video network further comprises a video network server connected to the switch; after the step of sending the active broadcast packet to the switch by the monitoring co-transfer server, the method comprises the following steps:
after a preset waiting time, if the monitoring protocol conversion server does not receive a network access instruction forwarded by the switch, updating the active broadcast packet, wherein the updated active broadcast packet comprises a new target virtual MAC address; the network access instruction is generated by the video network server and sent to the switch, and comprises the target virtual MAC address;
and the monitoring co-transfer server sends the updated active broadcast packet to the switch.
7. A device for accessing a network by using virtual MAC addresses is characterized in that the device is applied to a video network, the video network comprises a switch and a plurality of monitoring protocol conversion servers respectively connected with the switch, the switch comprises an address memory table, the address memory table comprises a plurality of virtual MAC addresses and server MAC addresses in one-to-one correspondence with the virtual MAC addresses, and the switch is provided with ports which are one-to-one bound with the server MAC addresses; the apparatus is located at the switch, and includes:
the active broadcast packet receiving module is used for receiving the active broadcast packet sent by the monitoring co-transfer server; the active broadcast packet is generated by the monitoring protocol conversion server according to triggering operation before network access, and comprises a protocol conversion MAC address of the monitoring protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the MAC address acquisition module is used for searching a target server MAC address corresponding to the target virtual MAC address in the address memory table aiming at the active broadcast packet;
an address memory table updating module, configured to update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address;
and the port binding module is used for removing the binding relation between the MAC address of the target server and the first port based on the updated address memory table and binding the first port and the protocol conversion MAC address.
8. The apparatus of claim 7, further comprising:
the port judgment module is used for judging whether the first port bound by the MAC of the target server is used;
and the address updating control module is used for controlling the address memory table updating module to update the target server MAC address in the address memory table to the protocol conversion MAC address when the first port bound by the target server MAC is not used.
9. The apparatus of claim 7 or 8, wherein the video network further comprises a video network server connected to the switch; the device further comprises:
the network access broadcast packet receiving module is used for receiving a network access broadcast packet sent by the video network server; wherein the network access broadcast packet comprises a video network server MAC address of the video network server;
the port binding module is also used for binding the MAC address of the video network server with a second port;
the network access instruction receiving module is used for detecting whether the second port receives a network access instruction; wherein the network entry instruction comprises the target virtual MAC address;
and the network access instruction sending module is used for sending the network access instruction to the monitoring transfer server through the first port when the second port receives the network access instruction.
10. A device for accessing a network by using virtual MAC addresses is characterized in that the device is applied to a video network, the video network comprises a switch and a plurality of monitoring protocol conversion servers respectively connected with the switch, the switch comprises an address memory table, the address memory table comprises a plurality of virtual MAC addresses and server MAC addresses in one-to-one correspondence with the virtual MAC addresses, and the switch is provided with ports which are one-to-one bound with the server MAC addresses; the device is located the monitoring is cooperative to change the server, includes:
the active broadcast packet generation module is used for generating an active broadcast packet according to triggering operation before network access; the active broadcast packet comprises a protocol conversion MAC address of the monitoring protocol conversion server and a target virtual MAC address corresponding to the protocol conversion MAC address;
the active broadcast packet issuing module is used for sending the active broadcast packet to the switch; the switch is configured to search, for the active broadcast packet, a target server MAC address corresponding to the target virtual MAC address in the address memory table, update the target server MAC address to the protocol MAC address in the address memory table when the target server MAC address is inconsistent with the protocol MAC address, release a binding relationship between the target server MAC address and the first port based on the updated address memory table, and bind the first port to the protocol MAC address.
CN201910074914.5A 2019-01-25 2019-01-25 Method and device for accessing network by using virtual MAC address Active CN109819062B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910074914.5A CN109819062B (en) 2019-01-25 2019-01-25 Method and device for accessing network by using virtual MAC address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910074914.5A CN109819062B (en) 2019-01-25 2019-01-25 Method and device for accessing network by using virtual MAC address

Publications (2)

Publication Number Publication Date
CN109819062A CN109819062A (en) 2019-05-28
CN109819062B true CN109819062B (en) 2021-06-11

Family

ID=66605269

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910074914.5A Active CN109819062B (en) 2019-01-25 2019-01-25 Method and device for accessing network by using virtual MAC address

Country Status (1)

Country Link
CN (1) CN109819062B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110351137B (en) * 2019-07-10 2022-07-08 视联动力信息技术股份有限公司 Method, system, electronic device and storage medium for automatically updating configuration information
CN110636044B (en) * 2019-08-19 2021-01-01 视联动力信息技术股份有限公司 Network access method, system and device of virtual terminal and storage medium
CN110474813B (en) * 2019-08-28 2021-01-22 视联动力信息技术股份有限公司 Network management method and video networking system
CN110662195B (en) * 2019-08-28 2020-11-03 视联动力信息技术股份有限公司 Data transmission method, device and system based on mobile command vehicle

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148735A (en) * 2010-02-10 2011-08-10 成都市华为赛门铁克科技有限公司 Virtual link establishing method, communication network element and Ethernet network system
JP2013013032A (en) * 2011-06-30 2013-01-17 Fujitsu Ltd Communication control method and communication control program
CN103281248A (en) * 2013-06-09 2013-09-04 北京星网锐捷网络技术有限公司 Network topology discovering method, device and system
CN105450494A (en) * 2014-08-20 2016-03-30 北京云巢动脉科技有限公司 Virtual network and method for implementing same
CN108134856A (en) * 2017-12-25 2018-06-08 杭州叙简科技股份有限公司 A kind of virtualization MAC Address anti-collision method and device based on network tree

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8144698B2 (en) * 2006-06-09 2012-03-27 Ericsson Ab Scalable data forwarding techniques in a switched network
JP4732257B2 (en) * 2006-07-07 2011-07-27 富士通株式会社 Relay device, route control method, and route control program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102148735A (en) * 2010-02-10 2011-08-10 成都市华为赛门铁克科技有限公司 Virtual link establishing method, communication network element and Ethernet network system
JP2013013032A (en) * 2011-06-30 2013-01-17 Fujitsu Ltd Communication control method and communication control program
CN103281248A (en) * 2013-06-09 2013-09-04 北京星网锐捷网络技术有限公司 Network topology discovering method, device and system
CN105450494A (en) * 2014-08-20 2016-03-30 北京云巢动脉科技有限公司 Virtual network and method for implementing same
CN108134856A (en) * 2017-12-25 2018-06-08 杭州叙简科技股份有限公司 A kind of virtualization MAC Address anti-collision method and device based on network tree

Also Published As

Publication number Publication date
CN109819062A (en) 2019-05-28

Similar Documents

Publication Publication Date Title
CN109617956B (en) Data processing method and device
CN111193788A (en) Audio and video stream load balancing method and device
CN109819062B (en) Method and device for accessing network by using virtual MAC address
CN109474715B (en) Resource configuration method and device based on video network
CN110190973B (en) Online state detection method and device
CN109918104B (en) Automatic upgrading system and method
CN109561072B (en) Link detection method and system
CN109379209B (en) Method and device for upgrading storage service of video network
CN110557319B (en) Message processing method and device based on video network
CN109347844B (en) Method and device for accessing equipment to Internet
CN109151061B (en) Data storage method and device
CN110266577B (en) Tunnel establishment method and video networking system
CN110446058B (en) Video acquisition method, system, device and computer readable storage medium
CN110072154B (en) Video networking-based clustering method and transfer server
CN109698953B (en) State detection method and system for video network monitoring equipment
CN109743360B (en) Information processing method and device
CN111510341A (en) Network testing method and device for video network
CN108881148B (en) Data acquisition method and device
CN110830817A (en) Video transcoding capacity adjusting method and video transcoding server
CN110213533B (en) Method and device for acquiring video stream monitored by video network
CN110224853B (en) Control system
CN109618125B (en) Monitoring method and device based on video network
CN110475160B (en) Method and device for transmitting video data across video network
CN112511787A (en) Conference implementation method, device, equipment and readable storage medium
CN111541858A (en) Audio and video recording method, system and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant