Disclosure of Invention
The invention mainly aims at the defects of the related prior art and provides a broadcast pruning method, a broadcast pruning system, a broadcast receiving method and a broadcast pruning device for a satellite network, which are used for preventing satellite links from forming rings and improving the reliability and the stability of the satellite network.
In order to achieve the above object, the present invention employs the following techniques:
a broadcast pruning method for a satellite network is characterized by comprising the following steps:
when an end station lan port receives an Ethernet message to be sent, learning a source MAC of the Ethernet message;
sending the Ethernet message to a satellite link, so that a central station receives the Ethernet message and sends the Ethernet message to the satellite link again;
when receiving the Ethernet message of the satellite link, triggering and interrupting the end station data exchange piece, extracting a source MAC of the Ethernet message by an end station CPU, and inquiring whether the source MAC is learned at the lan interface:
if the source MAC is learned at the lan interface, the source MAC is not learned at the sat interface;
if the source MAC is not learned at the lan interface, learning the source MAC at the sat interface;
the lan port and the sat port refer to a lan port and an sat port of the end station data exchange slice;
after the end station data exchange piece is interrupted, the data exchange piece judges whether the source MAC is learned at the sat interface: if yes, receiving the Ethernet message; if not, discarding the Ethernet message.
When learning the source MAC at the lan interface, the lan interface of the endpoint data exchange slice receives the Ethernet message to be sent, and the data exchange slice automatically learns the source MAC of the Ethernet message;
the lan port does not learn the source MAC, which means that the lan port of the end-count data switch slice does not receive the ethernet message to be sent, and the source MAC without the ethernet message is used for the data switch slice to learn.
A broadcast pruning system of a satellite network is characterized by comprising a central station and a plurality of end stations which are accessed into the satellite network;
when a data exchange chip lan port of one end station receives an Ethernet message to be sent, learning a source MAC of the Ethernet message, and then sending the Ethernet message to a satellite link;
the central station receives the Ethernet message from the satellite link, transfers the Ethernet message and sends the Ethernet message to the satellite link again;
when each end station receives the Ethernet message transferred by the central station:
triggering and interrupting a data exchange piece of an end station, extracting a source MAC of an Ethernet message by a CPU of the end station, inquiring whether the source MAC is learned at a lan interface, and if so, not learning the source MAC at a sat interface; if the source MAC is not learned at the lan interface, learning the source MAC at the sat interface; the lan port and the sat port refer to a lan port and an sat port of the end station data exchange slice; after the interruption of the data exchange piece is completed, the data exchange piece judges whether the source MAC is learned at the sat port, if so, the Ethernet message is received; if not, discarding the Ethernet message.
A broadcast receiving method of a satellite network, comprising the steps of:
s100, inquiring whether the source MAC in the received Ethernet message is learned on the lan interface:
if the source MAC is learned at the lan interface, the source MAC is not learned at the sat interface;
if the source MAC is not learned at the lan interface, learning the source MAC at the sat interface;
the lan port and the sat port refer to a lan port and an sat port of the end station data exchange slice;
s200, judging whether the source MAC is learned at sat:
if yes, receiving the Ethernet message;
if not, discarding the Ethernet message.
When receiving the ethernet message, triggering and interrupting the data exchange slice, extracting the source MAC of the ethernet message by the end station CPU, and performing the step S100;
after step S100 is completed, the interruption is completed, and the data exchange slice proceeds to step S200.
The ethernet packet refers to an ethernet packet received from a satellite link, and specifically, an ethernet packet transmitted by an end station accessing a satellite network, received by a central station, and then forwarded to the satellite link.
A broadcast receiving apparatus of a satellite network, comprising:
the query module is used for querying whether the source MAC in the received Ethernet message is learned at the lan interface;
the learning module is used for learning the source MAC at sat when the inquiry module inquires that the source MAC is not learned at lan interface;
the judging module is used for judging whether the source MAC is learned at the sat interface or not, and receiving the Ethernet message when the source MAC is learned at the sat interface; if not, discarding the Ethernet message;
the lan port and the sat port refer to the lan port and the sat port of the end station data exchange slice.
The invention has the beneficial effects that:
by the implementation of the invention, the MAC learning process is handed to the CPU of the end station to be completed by the interrupt mechanism of the data exchange piece. And the data exchange slice only performs MAC exchange on the Sat side and does not perform MAC learning. In the MAC exchange processing, the message of which the source MAC is not learned at the Sat port is discarded. The method can effectively prevent the end station sending the message from receiving the message sent by the end station again, effectively solve the loopback problem caused by the satellite link characteristic, prevent the satellite link from forming a ring and inhibit the broadcast storm on the satellite link.
Detailed Description
The present invention will be described in detail with reference to the accompanying drawings.
The related art means of the present application is applied to a star satellite network topology as shown in fig. 1.
When one end station lan side receives an Ethernet message to be sent, the Ethernet message comprises any one of broadcast, multicast or unknown unicast message, learns the MAC address of a message source, and then is sent to a satellite side. The message sent by the end station is received and transferred by the central station, and then is sent to the satellite again, and all the end stations accessing the satellite network receive the message, but for the end station which starts to send the ethernet message, the part of the message should not be transmitted backwards, so that effective processing is needed.
As shown in fig. 2, a broadcast pruning method for a satellite network is shown for a first embodiment of the present application.
The method of the embodiment comprises the processing flow of the end station/remote station:
(1) when an end station lan interface receives an Ethernet message to be sent, learning a source MAC of the Ethernet message, and finishing learning the source MAC at the lan interface; and for other end stations which do not receive the Ethernet message to be sent, the source MAC is not learned at the lan interface. The lan port is a lan port of the end station data exchange segment.
(2) Sending the Ethernet message to a satellite link, so that a central station receives the Ethernet message and sends the Ethernet message to the satellite link again;
(3) when receiving the Ethernet message of the satellite link, the MAC learning process is handed to the CPU to be completed by means of the interrupt mechanism of the data exchange piece. Triggering and interrupting a data exchange piece of an end station, extracting a source MAC of an Ethernet message by a CPU of the end station, and inquiring whether the source MAC is learned at a lan interface: if the source MAC is learned at the lan interface, the source MAC is not learned at the sat interface; if the source MAC is not learned at the lan interface, learning the source MAC at the sat interface; wherein, the sat port refers to the sat port of the end station data exchange slice.
(4) After the end station data exchange piece is interrupted, the data exchange piece judges whether the source MAC is learned at the sat interface: if yes, receiving the Ethernet message; if not, discarding the Ethernet message.
Therefore, the end station which starts to send the other messages can not receive the Ethernet messages sent by the end station, backward transmission is avoided, and other end stations can normally receive the Ethernet messages.
Fig. 3 is a block diagram illustrating a broadcast pruning system of a satellite network according to a second embodiment of the present application.
The system includes a central station and a plurality of end stations that access a satellite network.
And the central station is used for transferring the message.
The content structure of the end station is shown in fig. 4, and is divided into an intermediate frequency module and a data exchange module. In the data exchange module, the sat port is used as an internal connection with the intermediate frequency module, and the lan port is exposed outwards and used as a local data access port. Based on the data exchange piece, the data exchange module learns the source MAC address of the messages entering from the sat port and the lan port.
When the data exchange piece lan port of one end station receives the Ethernet message to be sent, the data exchange piece lan port learns the source MAC of the Ethernet message, and the Ethernet message is forwarded by the data exchange piece and sent to the satellite side after being processed by the intermediate frequency module.
And the central station receives the Ethernet message from the satellite link, transfers the Ethernet message and sends the Ethernet message to the satellite link again.
At this time, each end station accessing the satellite network receives the ethernet message.
When each end station receives the Ethernet message transferred by the central station: and the MAC learning process is handed to the CPU of the end station to be completed by an interrupt mechanism of the data exchange piece.
Triggering interruption by an end station data exchange piece, extracting a source MAC of an Ethernet message by an end station CPU, traversing an MAC address table, inquiring whether the source MAC is learned at a lan interface, if so, not learning the source MAC at a sat interface, and not processing; and if the source MAC is not learned at the lan interface, learning the source MAC at the sat interface, and adding a new MAC forwarding table item into the MAC forwarding table.
After the interruption of the data exchange piece is completed, the data exchange piece judges whether the source MAC is learned at the sat port, if so, the Ethernet message is received; if not, discarding the Ethernet message.
Therefore, the end station which starts to send the other messages can not receive the Ethernet messages sent by the end station, backward transmission is avoided, and other end stations can normally receive the Ethernet messages.
Further, for example, in the structure corresponding to fig. 3.
The PC1 sends out broadcast messages, the destination MAC being the broadcast MAC and the source MAC being the MAC 1.
After receiving the message, the lan port of the end station 1 automatically performs MAC address learning, and sends the message to the sat port through flooding, and then to the satellite side through the intermediate frequency module. The data switching slice MAC address forwarding table of end station 1 is shown as follows:
| MAC address | Destination port |
| MAC1 | Lan |
After receiving the broadcast message, the central station retransmits the message to the upper star through data center transfer, and after receiving the broadcast message, the end station 1 transmits the broadcast message to the Sat port of the data exchange slice through intermediate frequency.
The data exchange piece triggers interruption, after the CPU extracts the source MAC address and the source port of the message, the CPU inquires an MAC address forwarding table, and finds that MAC1 is learned on a Lan port, so that MAC1- > Sat is not added into the MAC address forwarding table.
After the data exchange sheet finishes the interrupt processing, the source MAC1 of the message is found not to be learned at the Sat port, and the message is discarded.
Fig. 5 is a flowchart of a satellite network broadcast receiving method according to a third embodiment of the present application.
The broadcast receiving method of the satellite network described in this embodiment is mainly for an end station.
The execution steps comprise:
when the Ethernet message is received, the data exchange sheet triggers interruption, and the end station CPU extracts the source MAC of the Ethernet message.
By traversing the MAC address table, whether the source MAC in the received Ethernet message has been learned on the lan interface is inquired:
if the source MAC is learned at the lan interface, the source MAC is not learned at the sat interface;
if not, then learn the source MAC at sat.
The ethernet packet refers to an ethernet packet received from a satellite link, and specifically, an ethernet packet transmitted by an end station accessing a satellite network, received by a central station, and then forwarded to the satellite link.
Specifically, learning the source MAC at the lan interface means: after the lan port of the data exchange piece of the end station accessing the satellite network and transmitting the Ethernet message receives the Ethernet message to be transmitted, the data exchange piece automatically learns the source MAC of the Ethernet message;
specifically, the fact that the source MAC is not learned at the lan port means that: if the lan port of the data exchange slice does not receive the ethernet message to be sent, the source MAC of the ethernet message is not available for the data exchange slice to learn.
S200, judging whether the source MAC is learned at sat:
if yes, receiving the Ethernet message;
if not, discarding the Ethernet message.
By applying the receiving method, the end station which starts to send the message can not receive the message sent by the end station again; and other end stations normally receive the message.
Fig. 6 is a block diagram showing the result of a satellite network broadcast receiving device according to a fourth embodiment of the present invention.
Specifically, the receiving device at least comprises an inquiry module, a learning module and a judgment module.
And the query module is used for querying whether the source MAC in the received Ethernet message is learned at the lan interface.
And the learning module is used for learning the source MAC at sat when the inquiry module inquires that the source MAC does not learn at the lan interface.
The judging module is used for judging whether the source MAC is learned at the sat interface or not, and receiving the Ethernet message when the source MAC is learned at the sat interface; and if not, discarding the Ethernet message.
Specifically, the ethernet packet refers to an ethernet packet received from a satellite link, and specifically, the ethernet packet is transmitted from an end station accessing a satellite network to a satellite, received by a central station, and then forwarded to the satellite link.
Specifically, the lan port and the sat port refer to the lan port and the sat port of the end station data exchange slice.
Specifically, learning the source MAC at the lan interface means: after the lan port of the data exchange piece of the end station accessing the satellite network and transmitting the Ethernet message receives the Ethernet message to be transmitted, the data exchange piece automatically learns the source MAC of the Ethernet message;
specifically, the fact that the source MAC is not learned at the lan port means that: if the lan port of the data exchange slice does not receive the ethernet message to be sent, the source MAC of the ethernet message is not available for the data exchange slice to learn.
Through the application implementation of the receiving device, the loopback problem caused by the characteristics of the satellite link can be effectively solved, the satellite link is prevented from forming a ring, and the broadcast storm on the satellite link is inhibited.
The above examples are only a few of the embodiments listed in the present application, but the technical means related to the present application are not limited to the above examples.