CN111131532B - Method and system for automatically changing MAC address, computer equipment and medium - Google Patents

Method and system for automatically changing MAC address, computer equipment and medium Download PDF

Info

Publication number
CN111131532B
CN111131532B CN201911178848.2A CN201911178848A CN111131532B CN 111131532 B CN111131532 B CN 111131532B CN 201911178848 A CN201911178848 A CN 201911178848A CN 111131532 B CN111131532 B CN 111131532B
Authority
CN
China
Prior art keywords
mac
media
terminal
source mac
channel
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
CN201911178848.2A
Other languages
Chinese (zh)
Other versions
CN111131532A (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.)
Shenzhen Genew Technologies Co Ltd
Original Assignee
Shenzhen Genew Technologies 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 Shenzhen Genew Technologies Co Ltd filed Critical Shenzhen Genew Technologies Co Ltd
Priority to CN201911178848.2A priority Critical patent/CN111131532B/en
Publication of CN111131532A publication Critical patent/CN111131532A/en
Application granted granted Critical
Publication of CN111131532B publication Critical patent/CN111131532B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M7/00Arrangements for interconnection between switching centres
    • H04M7/006Networks other than PSTN/ISDN providing telephone service, e.g. Voice over Internet Protocol (VoIP), including next generation networks with a packet-switched transport layer
    • H04M7/0075Details of addressing, directories or routing tables

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application relates to a method and a system for automatically changing MAC addresses, computer equipment and media, wherein the method comprises the following steps: the terminal self-learning media packet is adopted, the terminal monitors whether the source MAC of the RTP stream coming from the media channel is changed, if so, a new source MAC is learned, and then the learned source MAC is set to the target MAC corresponding to the learned channel, so that the target MAC address of the media channel is changed, and the DSP can send out the RTP packet by using the new target MAC later. The terminal automatically changes the MAC to reduce the MGC master-slave switching and intensively sends the message of media connection modification; the load of the system can be effectively reduced, and the condition that the media stream is not communicated can be avoided when the MGC (media gateway) mainboard is switched.

Description

Method and system for automatically changing MAC address, computer equipment and medium
Technical Field
The present application relates to the field of VoIP systems, and in particular, to a method and system for automatically changing a MAC address in a media channel, a computer device, and a readable storage medium.
Background
VoIP system technology is a Voice call technology, in which Voice call and multimedia conference are achieved through Internet Protocol (IP), that is, communication is performed through the Internet. Other informal names are IP phone (IP telephony), Internet phone (Internet telephony), broadband phone (broadband telephony) and broadband phone service (broadband telephone service).
VoIP can be used for a plurality of Internet access devices including VoIP phones, smart phones and personal computers, and calls and short messages are sent through cellular networks and Wi-Fi.
VoIP system terminal registers to media gateway through signaling, calling is initiated by terminal, media gateway controls connection of calling. The main control board of the general media gateway is divided into a main single board and a standby single board, and the main board of the main control board is automatically switched to the standby board when the operation of the main board is abnormal. Because the MAC (physical) addresses of the main board and the standby board are not the same, part of the media stream passing through the media gateway after switching is not passed.
The reason is that a DSP (digital signal processing) chip does not support a tcp/ip three-layer protocol, and a GARP (message) updating MAC address message sent by a standby board of an MGC during switching is not processed by a terminal, so that a media stream sent by the terminal is also sent by an MAC of a main board of a front media gateway. So if both MGC and terminal are in the same network, this problem can occur without going through the routing gateway. The most conceivable method to solve this problem is to let the MGC let the host of the terminal learn the MAC address once again according to the media IP through the signaling message, and then send the learned MAC address to the DSP through the communication message of the host and the DSP, so that the media channel sends out the media packet with the new MAC. The number of terminals is very large, and sending out the messages at the same time occupies a large amount of system resources of the MGC, which causes a large load on the system and easily causes message congestion.
Therefore, the prior art is in need of improvement.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a system for automatically changing MAC addresses of a media channel, computer equipment and a readable storage medium.A terminal self-learns a media packet, monitors whether the source MAC of an incoming RTP stream of the media channel is changed or not, learns a new source MAC if the source MAC is changed, and then sets the learned source MAC to a target MAC of a corresponding learning channel, so that the target MAC address of the media channel is changed, and a DSP of the terminal can send the RTP packet by using the new target MAC later.
A method for automatically changing MAC address of a media channel, wherein the method comprises the following steps:
the terminal registers to the media gateway, and the media gateway is connected with the No. 7 signaling gateway through the No. 7 relay;
the terminal initiates a call, and the media gateway controls the connection of the call;
when the main board is switched to the standby board due to abnormal work, the terminal self-learns the media package;
the terminal monitors whether the source MAC of the media stream coming from the media channel is changed;
if there is a change, learning a new source MAC; and setting the learned source MAC to the destination MAC of the corresponding learning channel.
The method for automatically changing the MAC address of the media channel comprises the following steps that when the main board is abnormally switched to the standby board, the terminal self-learns the media packet:
when the work of the main board is abnormally switched to the standby board, the GARP message is sent out in the process of upgrading the standby board to the main board so that the business connected with the GARP message can update the MAC.
The method for automatically changing the MAC address of the media channel, wherein the step of learning the new source MAC if any changes further comprises the following steps:
the terminal monitors that the source MAC of the incoming media stream of the media channel is changed, and the terminal sends RTP packets by using the new MAC as the destination MAC.
The method for automatically changing the MAC address of the media channel, wherein the step that the terminal monitors whether the source MAC of the media stream coming from the media channel is changed further comprises the following steps:
the terminal host monitors whether the source MAC address of the received media stream is changed or not when the media channel is activated.
The media channel automatically changes the MAC address method, wherein if there is a change, a new source MAC is learned; the step of setting the learned source MAC to the destination MAC of the corresponding learning channel includes:
the digital signal processor monitors that an event of changing a source MAC address is reported to the host computer, and the host computer starts event counting;
when the event count of the MAC exceeds 3 times and the source MAC in the packet of 3 times is the same, the source MAC before the event does not send the packet to the media channel any more, the host learns a new MAC according to the event and sets the MAC as the destination MAC of the channel to the media channel.
The media channel automatically changes the MAC address method, wherein if there is a change, a new source MAC is learned; the step of setting the learned source MAC to the destination MAC of the corresponding learning channel further comprises:
the digital signal processor uses the new MAC to package the MGC and the event of the source MAC change disappears.
A media channel auto-change MAC address system, wherein the system comprises:
the registration module is used for controlling the terminal to register in the media gateway, and the media gateway is connected with the No. 7 signaling gateway through the No. 7 relay;
the call control module is used for controlling the terminal to initiate a call and the media gateway to control the connection of the call;
the switching control module is used for self-learning the media package by the terminal when the main board is abnormally switched to the standby board;
the monitoring module is used for controlling the terminal to monitor whether the source MAC of the media stream coming from the media channel is changed;
the MAC address automatic change module is used for learning a new source MAC if the source MAC is changed; and setting the learned source MAC to the destination MAC of the corresponding learning channel.
The media channel automatically changes the MAC address system, wherein, also includes:
and the retransmission packet control module is used for controlling the digital signal processor to use the new MAC to transmit the packet to the MGC, and the event changed by the source MAC disappears.
A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program implements the steps of any of the media channel automatic change MAC address methods.
A computer readable storage medium having a computer program stored thereon, wherein the computer program when executed by a processor implements the steps of any of the media channel automatic change MAC address methods.
Compared with the prior art, the embodiment of the invention has the following advantages:
the embodiment of the invention provides a method for automatically changing an MAC address of a media channel based on a map; the terminal self-learns the media packet, monitors whether the source MAC of the RTP stream coming from the media channel is changed or not, learns a new source MAC if the source MAC is changed, and then sets the learned source MAC to the target MAC corresponding to the learned channel, so that the target MAC address of the media channel is changed, and the DSP can send out the RTP packet by using the new target MAC later. The terminal automatically changes the MAC to reduce the centralized switching of the MGC and sends the message of media connection modification; the load of the system can be effectively reduced, and the condition that the media stream is not communicated can be avoided when the MGC (media gateway) mainboard is switched.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative work.
Fig. 1 is a communication connection diagram of a terminal of a VoIP system.
Fig. 2 is a flowchart illustrating a method for automatically changing a MAC address in a media channel according to an embodiment of the present invention.
FIG. 3 is a functional block diagram of a system for automatically changing MAC addresses in a media channel according to an embodiment of the present invention;
fig. 4 is an internal structural diagram of a computer device in an embodiment of the present invention.
Detailed Description
In order to make the technical solutions of the present invention better understood by those skilled in the art, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The inventor has found, through research, that in the prior art, as shown in fig. 1, a terminal registers to an MGC (media gateway controller) through a registration message of sip (Session Initiation Protocol) signaling, and the MGC (media gateway) may also be connected to a signaling gateway No. 7 through a relay No. 7. The terminal initiates a call, and the MGC (media gateway) controls the call to be connected. If terminal 1 can call the user on signaling gateway 7, MGC will connect the user on signaling gateway 7 to the call of terminal 1. The black lines are the working paths of the media streams. In order to ensure reliable service operation, the main control board on the MGC has a main board and a standby board, the external IP of the main control board is one, the external MAC addresses are one, and when the main board is abnormally switched to the standby board, a GARP (generic attribute registration protocol) message is sent out in the process of upgrading the standby board to the main board to allow the service connected with the GARP to update the MAC. If the terminal and MGC (media gateway) are connected through the IP gateway, the method is effective, the IP gateway can update the MAC, the terminal firstly sends a packet to the gateway, and then the gateway sends the packet to the MGC, if the terminal and the MGC have problems in the same network, the DSP of the terminal receives the media packet, the DSP can be a packet with components removed by the IP address and the MAC address sent by the host of the terminal, and the DSP does not support the tcp/IP protocol, so that GARP information does not play a role on the terminal, and the terminal can still use the MAC of the main control board of the prior MGC to send media streams to the MGC.
The host computer in the terminal controls the DSP, and the host computer establishes and destroys the media channel and configures the parameters of the media channel according to the call signaling sent by the MGC. Therefore, in the prior art, message congestion occurs in MGC (media gateway) motherboard switching. Message congestion can cause an exception in the implementation of the functionality.
In order to solve the above problem, in the embodiment of the present invention, the terminal learns the media packet by itself, and the terminal monitors whether the source MAC of the incoming RTP (media) stream of the media channel has changed, and if so, learns a new source MAC, and then sets the learned source MAC to the destination MAC of the corresponding learned channel, so that the destination MAC address of the media channel is changed, and the DSP sends out the RTP packet with the new destination MAC. The invention uses a packet sending a GARP to inform the external network equipment of changing the MAC address of the IP address.
The garp (generic Attribute Registration protocol) in the present invention is a generic Attribute Registration protocol that provides a mechanism for assisting in distributing, propagating and registering certain information (such as VLAN, multicast address, etc.) among switching members in the same switching network.
GARP itself does not exist as an entity in the switch, and application entities that follow the GARP protocol are called GARP applications, and the major GARP applications are GVRP and GMRP today. When a GARP application entity exists on a port of a switch, the port corresponds to a GARP application entity.
Through the GARP mechanism, configuration information on one GARP member can be quickly propagated to the whole switching network. The GARP members may be end stations or bridges. The GARP member informs other GARP members of registering or canceling the attribute information of the member through declaration or recycling declaration, and declares the attribute information of the registered or canceled counterpart according to the declaration or recycling of other GARP members.
The DSP in the embodiment of the invention is a digital signal processor mainly used for voice coding and decoding.
Various non-limiting embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 shows a method for automatically changing a MAC address of a media channel according to an embodiment of the present invention, where the method includes:
step S1, the terminal registers to the media gateway, and the media gateway is connected with the No. 7 signaling gateway through the No. 7 relay;
as shown in fig. 1, the terminal registers to the MGC through the registration message of sip signaling, and the MGC may also connect to the signaling gateway No. 7 through the relay No. 7. In the embodiment of the invention, the MGC is a media gateway and has basically the same function as the SS7 signaling gateway. The media gateway can also process signaling, otherwise, it can not accept interrupted sip message and signaling No. 7 of signaling gateway, and the media gateway has media board to process RTP media stream.
Step S2, the terminal initiates a call, and the media gateway controls the call to be connected;
the terminal initiates a call, and the MGC controls the connection of the call. If terminal 1 can call the user on signaling gateway No. 7, MGC will connect the user of signaling gateway No. 7 to talk to terminal 1. The black lines are the working paths of the media streams. In order to ensure reliable service operation, the main control board on the MGC has a main board and a standby board, the main board and the standby board have one external IP and one external MAC address, and when the main board is abnormally switched to the standby board, a GARP message is sent out in the process of upgrading the standby board to the main board to allow the service connected with the GARP message to update the MAC.
In the embodiment of the invention, when the standby board is started, a Garp packet is sent to inform the external network equipment of changing the MAC address of the IP address. Specifically, the steps S3-S5.
Step S3, when the main board is switched to the spare board due to abnormal work, the terminal learns the media package by self;
for example, when the main board is abnormally switched to the standby board, the GARP message is sent out in the process of upgrading the standby board to the main board to allow the service connected with the GARP message to update the MAC.
In the embodiment of the invention, the GARP message is sent when a standby board is upgraded to a main board when the main and standby of the MGC are switched, in order to ensure that the received network equipment can be received without packet loss, the GARP message can be sent three times continuously, the GARP message supports the processing of the equipment of a tcp/ip protocol stack, if the host of a terminal receives the message, the message can be processed, only the host does not send an RTP stream, and the DSP does not have the tcp/ip protocol stack, so the message can not be processed, but the DSP can discover that the source MAC of the sent packet is changed according to the received RTP packet, and can enable the host to send a command for updating the MAC to the host again through the event.
Step S4, the terminal monitors whether the source MAC of the media flow coming from the media channel is changed;
the terminal host monitors whether the source MAC address of the received media stream is changed or not when the media channel is activated.
Step S5, if there is a change, learning a new source MAC; and setting the learned source MAC to the destination MAC of the corresponding learning channel.
And the terminal monitors that the source MAC of the media stream coming from the media channel is changed, learns the new source MAC and informs the external network equipment to change the MAC address of the IP address, and sets the learned source MAC to the destination MAC of the corresponding learning channel.
For example, a digital signal processor monitors that an event of changing a source MAC address is reported to a host computer, and the host computer starts event counting;
when the event count of the MAC exceeds 3 times and the source MAC in the packet of 3 times is the same, the source MAC before the event does not send the packet to the media channel any more, the host learns a new MAC according to the event and sets the MAC as the destination MAC of the channel to the media channel.
The media channel automatically changes the MAC address method, wherein if there is a change, a new source MAC is learned; the step of setting the learned source MAC to the destination MAC of the corresponding learning channel further comprises:
the digital signal processor uses the new MAC to package the MGC and the event of the source MAC change disappears.
In one embodiment, when the main board is abnormally switched to the standby board, because the MGC (media gateway) sends a media packet (RTP packet) to the terminal through a new MAC address after the switching, the terminal can receive the packet, and only the terminal sends the MAC packet to the MGC (media gateway) using the MAC (physical) address of the previous main board as a destination MAC, the MGC (media gateway) cannot receive the media packet.
Since the received media packets have the same packet information, such as source IP, source port, destination IP, and destination port, except for the MAC address, the DSP (digital signal processor) can determine from this information that the source MAC for that media channel has changed. In the embodiment of the invention, if the source MAC address is monitored to be changed, the event is reported to the host, and the host sets the source MAC as the destination MAC of the channel media stream, so that the DSP sends the media stream according to the new MAC address.
In the embodiment of the invention, in order to prevent MAC attack, after the event is received, the previous MAC is judged not to be sent, and the learned MAC is set to the DSP (digital signal processor) only according to the packet which is sent from the time point of each packing time length in the continuous 3 packing time lengths of the new MAC standby board. Therefore, in the embodiment of the invention, the MGC (media gateway) is not required to transmit a plurality of messages for modifying the media connection to each terminal in a centralized way, the system resources are not occupied too much, and the terminal updates the MAC (physical address) through self-learning. The general packing time is 20ms, and 3 continuous packets are 60ms, and the MGC (media gateway) that loses the packets also has corresponding packet loss compensation processing, so that people cannot perceive that there is a handover.
In one embodiment, when the main board is switched to the standby board due to abnormal work, the method specifically comprises the following steps:
firstly), the terminal host issues and monitors whether the source MAC (physical) address of the received RTP stream (media stream) is changed when the media channel is activated;
secondly, the DSP (digital signal processor) monitors that the event of the change of the source MAC address is reported to the host, and the host starts event counting;
and thirdly) when the event count of the MAC exceeds 3 times and the source MACs in the packets of 3 times are the same, the source MAC before the event does not send the packets to the media channel any more, host learns a new MAC according to the event, and sets the MAC as the destination MAC of the channel to the media channel.
And fourthly) the DSP uses the new MAC to send a packet to the MGC, and the event of changing the source MAC disappears.
In the method of the embodiment of the invention, the terminal self-learns the media packet, the terminal monitors whether the source MAC of the RTP flow coming from the media channel is changed, if so, the new source MAC is learned, and then the learned source MAC is set to the destination MAC corresponding to the learned channel, so that the destination MAC address of the media channel is changed, and the DSP can send out the RTP packet by using the new destination MAC. For example: before the MGC (media gateway) is switched, the MGC uses 001122334455 as a source MAC to send RTP packets to the terminal, and the terminal sends RTP packets to the MGC by using 001122334455 as a destination address. After the switch, the MGC uses 001122334466 to send the source MAC packet to the terminal, at this time, the terminal detects that the source MAC of the packet has sent the change, the source MAC of the packet is learned and reported to the host of the terminal through the event, the host uses the command of setting the channel MAC to update the learned MAC to the DSP as the destination MAC of the channel, so that the DSP sends the RTP with the new MAC, and the main board upgraded from the standby board of the MGC can receive the RTP packet from the terminal.
The invention does not occupy a large amount of system resources of the MGC and does not cause great load to the system, thereby effectively avoiding the message congestion.
In one embodiment, the present invention provides a system for automatically changing a MAC address of a media channel, as shown in fig. 3, the system comprising:
a registration module 41, configured to control a terminal to register in a media gateway, where the media gateway is connected to a signaling gateway No. 7 through a relay No. 7;
a call control module 42, configured to control the terminal to initiate a call, and the media gateway controls the call to be connected;
the switching control module 43 is used for the terminal to self-learn the media package when the main board is abnormally switched to the standby board;
a monitoring module 44, configured to control the terminal to monitor whether a source MAC of a media stream entering the media channel changes;
an automatic MAC address change module 45 for learning a new source MAC if there is a change; and setting the learned source MAC to the destination MAC of the corresponding learning channel.
Further, the system for automatically changing the MAC address of the media channel further comprises:
the retransmission packet control module is used for controlling the DSP to use the new MAC to transmit packets to the MGC, and the event of source MAC change disappears; as described in detail above.
In one embodiment, the present invention provides a computer device, which may be a terminal, having an internal structure as shown in fig. 4. The computer device includes a processor, a memory, a network interface, a display screen, and an input system connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operating system and the computer program to run in the non-volatile storage medium. The network interface of the computer device is used for connecting and communicating with an external terminal through a network. The computer program is executed by a processor to implement a method of generating a natural language model. The display screen of the computer equipment can be a liquid crystal display screen, and the input system of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch control board arranged on the shell of the computer equipment, an external keyboard, a touch control board or a mouse and the like.
Those skilled in the art will appreciate that the illustration in fig. 4 is merely a block diagram of a portion of the structure associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
The embodiment of the invention provides computer equipment, which comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to realize the following steps:
the terminal registers to the media gateway, and the media gateway is connected with the signaling gateway No. 7 through the relay No. 7;
the terminal initiates a call, and the media gateway controls the connection of the call;
when the main board is switched to the standby board due to abnormal work, the terminal learns the media package by self;
the terminal monitors whether the source MAC of the media stream coming from the media channel is changed;
if there is a change, learning a new source MAC; setting the learned source MAC to a target MAC of a corresponding learning channel; the dsp packages the MGC with the new MAC and the event of the source MAC change disappears, as described above.
In summary, compared with the prior art, the embodiment of the invention has the following advantages:
the embodiment of the invention provides a method and a system for automatically changing MAC addresses of media channels, computer equipment and a medium. The method for automatically changing the MAC address of the map-based media channel comprises the following steps: the terminal self-learns the media packet, monitors whether the source MAC of the RTP stream coming from the media channel is changed or not, learns a new source MAC if the source MAC is changed, and then sets the learned source MAC to the target MAC corresponding to the learned channel, so that the target MAC address of the media channel is changed, and the DSP can send out the RTP packet by using the new target MAC later. The terminal automatically changes the MAC to reduce the concentrated switching of MGC and sends the message of the media connection modification; the load of the system can be effectively reduced, and the condition that the media stream is not communicated can be avoided when the MGC (media gateway) mainboard is switched.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (8)

1. A method for automatically changing MAC address of a media channel is characterized by comprising the following steps:
the terminal registers to the media gateway, and the media gateway is connected with the No. 7 signaling gateway through the No. 7 relay;
a terminal initiates a call, and a media gateway controls the connection of the call;
when the main board of the media gateway works abnormally and is switched to the standby board, the terminal learns the media package by self, and the terminal comprises a digital signal processor and a host;
the terminal monitors whether the source MAC of the media stream coming from the media channel is changed;
if there is a change, learning a new source MAC; setting the learned source MAC to a target MAC of a corresponding learning channel;
the digital signal processor detects a source IP, a source port, a destination IP and a destination port to determine whether a source MAC address of the media IP is changed;
the digital signal processor monitors that an event of changing a source MAC address is reported to the host computer, and the host computer starts event counting;
when the event count of the MAC exceeds 3 times and the source MAC in the packet of 3 times is the same, the source MAC before the event does not send the packet to the media channel any more, the host learns a new MAC according to the event and sets the MAC as the destination MAC of the channel to the media channel.
2. The method for automatically changing the MAC address of a media channel according to claim 1, wherein the step of the terminal self-learning the media packet when the main board is abnormally switched to the standby board further comprises:
when the work of the main board is abnormally switched to the standby board, the GARP message is sent out in the process of upgrading the standby board to the main board so that the business connected with the GARP message can update the MAC.
3. The method of claim 1, wherein the step of learning a new source MAC if there is a change further comprises:
the terminal monitors that the source MAC of the incoming media stream of the media channel is changed, and the terminal sends RTP packets by using the new MAC as the destination MAC.
4. The method of claim 1, wherein the step of the terminal monitoring whether the source MAC of the incoming media stream of the media channel has changed further comprises:
the terminal host monitors whether the source MAC address of the received media stream is changed when the media channel is activated.
5. The method of claim 1, wherein if there is a change, learning a new source MAC; the step of setting the learned source MAC to the destination MAC of the corresponding learning channel further comprises:
the digital signal processor uses the new MAC to package the media gateway and the event of source MAC change disappears.
6. A system for media channel auto-change MAC address, the system comprising:
the registration module is used for controlling the terminal to register in the media gateway, and the media gateway is connected with the No. 7 signaling gateway through the No. 7 relay;
the call control module is used for controlling the terminal to initiate a call and the media gateway to control the connection of the call;
the switching control module is used for self-learning the media packet by the terminal when the main board of the media gateway is abnormally switched to the standby board, and the terminal comprises a digital signal processor and a host;
the monitoring module is used for controlling the terminal to monitor whether the source MAC of the media stream coming from the media channel is changed;
the MAC address automatic change module is used for learning a new source MAC if the source MAC is changed; setting the learned source MAC to a target MAC of a corresponding learning channel;
the digital signal processor detects a source IP, a source port, a destination IP and a destination port to determine whether a source MAC address of the media IP is changed;
the digital signal processor monitors that an event of changing a source MAC address is reported to the host computer, and the host computer starts event counting;
when the event count of the MAC exceeds 3 times and the source MAC in the packet of 3 times is the same, the source MAC before the event does not send the packet to the media channel any more, the host learns a new MAC according to the event and sets the MAC as the destination MAC of the channel to the media channel;
and the retransmission packet control module is used for controlling the digital signal processor to use the new MAC to transmit the packet to the media gateway, and the event changed by the source MAC disappears.
7. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method for media channel auto-change of MAC address as claimed in any one of claims 1 to 5.
8. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for media channel auto-change of MAC address as claimed in any one of claims 1 to 5.
CN201911178848.2A 2019-11-27 2019-11-27 Method and system for automatically changing MAC address, computer equipment and medium Active CN111131532B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911178848.2A CN111131532B (en) 2019-11-27 2019-11-27 Method and system for automatically changing MAC address, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911178848.2A CN111131532B (en) 2019-11-27 2019-11-27 Method and system for automatically changing MAC address, computer equipment and medium

Publications (2)

Publication Number Publication Date
CN111131532A CN111131532A (en) 2020-05-08
CN111131532B true CN111131532B (en) 2022-08-16

Family

ID=70496724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911178848.2A Active CN111131532B (en) 2019-11-27 2019-11-27 Method and system for automatically changing MAC address, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN111131532B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525703A (en) * 2003-02-26 2004-09-01 ��Ϊ�������޹�˾ Backup method for Ethernet port connected to Internet protocol network
CN101448031A (en) * 2008-12-10 2009-06-03 中兴通讯股份有限公司 Method of supporting media tendering address switching in real-time media stream transmission process
CN102111459A (en) * 2009-12-28 2011-06-29 中兴通讯股份有限公司 Call maintenance method and device in active/standby switching of IP voice equipment
CN102223660A (en) * 2011-08-02 2011-10-19 华为技术有限公司 Method and device for controlling switching of active/standby pseudo wires
CN103795878A (en) * 2012-11-05 2014-05-14 华为技术有限公司 Protection method, device and system for voice-over-internet-protocol service

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100512148C (en) * 2006-12-30 2009-07-08 华为技术有限公司 Convergence method and device based on VPLS dual home full connection network
CN101321054B (en) * 2007-06-08 2011-02-09 华为技术有限公司 Method and device for automatically preventing imitation of network side media access control address
CN101340351A (en) * 2008-08-19 2009-01-07 华为技术有限公司 Data transmission method, apparatus and system in VPLS network
CN102611519B (en) * 2010-11-25 2015-03-25 上海贝尔股份有限公司 Method and device for link protection of passive optical network
CN103731288B (en) * 2012-10-16 2017-04-12 杭州华三通信技术有限公司 Message forwarding method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1525703A (en) * 2003-02-26 2004-09-01 ��Ϊ�������޹�˾ Backup method for Ethernet port connected to Internet protocol network
CN101448031A (en) * 2008-12-10 2009-06-03 中兴通讯股份有限公司 Method of supporting media tendering address switching in real-time media stream transmission process
CN102111459A (en) * 2009-12-28 2011-06-29 中兴通讯股份有限公司 Call maintenance method and device in active/standby switching of IP voice equipment
CN102223660A (en) * 2011-08-02 2011-10-19 华为技术有限公司 Method and device for controlling switching of active/standby pseudo wires
CN103795878A (en) * 2012-11-05 2014-05-14 华为技术有限公司 Protection method, device and system for voice-over-internet-protocol service

Also Published As

Publication number Publication date
CN111131532A (en) 2020-05-08

Similar Documents

Publication Publication Date Title
EP1665686A1 (en) System and method for providing transparency in delivering private network features
US20050085181A1 (en) Method and system for connecting calls through virtual media gateways
JP2000236355A (en) Gateway device
US7483369B2 (en) Method and apparatus for migrating to an alternate call controller
JP2006101528A (en) Detection of looping communication channel
CN111131532B (en) Method and system for automatically changing MAC address, computer equipment and medium
CN101047752B (en) Ip telephone system
WO2023061347A1 (en) Call processing method and apparatus, electronic device, and storage medium
JP2015154360A (en) Call incoming control apparatus, call incoming control method, and program
JP4823096B2 (en) Wireless terminal calling method of mobile communication system, gateway device, and mobile communication system
WO2022100523A1 (en) Communication configuration method and apparatus
JP4994317B2 (en) Communication terminal, communication system, communication switching control method, and program
CN110784943B (en) Processing method and device for VoWiFi voice service disconnection and reconnection
CN112653661B (en) Media recovery method and system under VoIP network limitation
CN114124906A (en) Gateway apparatus, method for gateway apparatus, computer-readable medium, and apparatus
CN100456685C (en) A L2 multicast implementation method and access device
JP4932562B2 (en) Communication apparatus, method, and program
CN102332991B (en) Backup method capable of keeping consistent state in soft switch and gateway device
JP2010147730A (en) Network device, ip network system, and call control method
US8630254B2 (en) Telephone line switching apparatus, telephone line switching system, telephone relay system, telephone relay method, telephone relay program
KR20100080281A (en) Billing system and method having bypass function in a communication network
CN107438056A (en) VoIP communication module groups, electronic installation and the VoIP means of communication
US20070223447A1 (en) Gateway device and control method thereof
CN116170419A (en) Method, device, system and storage medium for switching multi-terminal call
US8027350B1 (en) Removal of a packet communication system from a communication path during a communication session

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