CN114221828A - Double-interface multicast broadcast forwarding method - Google Patents
Double-interface multicast broadcast forwarding method Download PDFInfo
- Publication number
- CN114221828A CN114221828A CN202111636050.5A CN202111636050A CN114221828A CN 114221828 A CN114221828 A CN 114221828A CN 202111636050 A CN202111636050 A CN 202111636050A CN 114221828 A CN114221828 A CN 114221828A
- Authority
- CN
- China
- Prior art keywords
- multicast
- broadcast
- forwarding
- data
- vpn
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000004891 communication Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
- H04L12/185—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast with management of multicast group membership
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a double-interface multicast broadcast forwarding method, which relates to the technical field of communication and comprises the following steps: the Linux layer interface data forwarding driver receives the multicast and broadcast packets and sends the multicast and broadcast packets to the VPN client, so that the VPN client sends the multicast and broadcast packets to the VPN server and issues a command of joining in the multicast or leaving the multicast, and the VPN server completes the addition and removal of group members and the forwarding of data; and receiving the multicast and broadcast packet forwarded by the VPN client, namely, completing forwarding of the data through the virtual network card. The technical scheme of the invention solves the problem that the data can not be forwarded to the other end device in the virtual private network through the virtual network card, provides convenience for forwarding multicast and broadcast data packets between the virtual network card and a physical network interface, and realizes the broadcast and multicast functions in the VPN.
Description
Technical Field
The invention relates to the technical field of communication, in particular to a double-interface multicast broadcast forwarding method.
Background
Most of the existing VPN products generate a virtual network card to help construct a virtual private network, the virtual network card device is generally isolated from a real network card at the system level, when an application program in the system sends or receives multicast and broadcast packets, the virtual network card device is usually carried out on the real network card and cannot be associated with the virtual network card, that is, data cannot be forwarded to another end device in the virtual private network through the virtual network card.
Therefore, how to forward multicast and broadcast data packets between the virtual network card and the physical network interface to implement the broadcast and multicast functions in the VPN is a problem that needs to be solved by those skilled in the art.
Disclosure of Invention
In view of this, the present invention provides a dual-interface multicast broadcast forwarding method, which provides convenience for forwarding multicast and broadcast data packets between a virtual network card and a physical network interface, and implements broadcast and multicast functions in a VPN.
In order to achieve the above purpose, the invention provides the following technical scheme:
a double-interface multicast broadcast forwarding method is applied to Linux layer interface data forwarding drive, and comprises the following steps:
receiving multicast and broadcast packets;
sending multicast and broadcast packets to the VPN client so that the VPN client sends the multicast and broadcast packets to the VPN server and issues a command of joining in the multicast or leaving the multicast, and the VPN server completes the addition and removal of group members and the forwarding of data;
and receiving the multicast and broadcast packet forwarded by the VPN client.
Optionally, the multicast and broadcast packet is sent to the VPN client, so that the VPN client sends the multicast and broadcast packet to the VPN server, specifically:
and sending the multicast and broadcast packet to the VPN client so that the VPN client can identify the data in the multicast and broadcast packet, convert the data into an internal protocol and send the internal protocol to the VPN server.
Optionally, after the VPN server completes addition and removal of group members and forwarding of data, the method further includes:
and recording the group member information and the forwarded data by the VPN server.
A double-interface multicast broadcast forwarding method is applied to a VPN client, and comprises the following steps:
receiving multicast and broadcast packets sent by a Linux layer interface data forwarding driver;
sending multicast and broadcast packets to the VPN server and issuing a command of joining in multicast or leaving multicast for the VPN server to complete the addition and removal of group members and the forwarding of data;
receiving multicast and broadcast packets sent by a VPN server;
and forwarding the multicast and broadcast packet sent by the VPN server to a Linux layer interface data forwarding driver.
Optionally, before sending the multicast and broadcast packet to the VPN server, the method further includes:
data in multicast and broadcast packets is identified and converted to an internal protocol.
Optionally, before receiving the multicast and broadcast packet sent by the VPN server, the method further includes:
and recording the group member information and the forwarded data by the VPN server.
A dual-interface multicast broadcast forwarding method is applied to a VPN server, and comprises the following steps:
receiving multicast and broadcast packets sent by a VPN client and a command issued for joining in multicast or leaving multicast, wherein the multicast and broadcast packets are sent to the VPN client by Linux layer interface data forwarding drive;
according to the multicast and broadcast packet and the command, completing the addition and removal of the group members and the forwarding of data;
and sending the multicast and broadcast packet to the VPN client so that the VPN client forwards the multicast and broadcast packet to a Linux layer interface data forwarding driver.
Optionally, before receiving the multicast and broadcast packet sent by the VPN client, the method further includes:
the data in the multicast and broadcast packets is identified by the VPN client and converted to an internal protocol.
Optionally, after completing addition and removal of group members and forwarding of data according to the multicast and broadcast packet and the command, the method further includes:
and recording the group member information and the forwarded data.
According to the technical scheme, compared with the prior art, the invention discloses and provides the double-interface multicast broadcast forwarding method, which solves the problem that data cannot be forwarded to equipment at the other end in the virtual private network through the virtual network card, provides convenience for forwarding multicast and broadcast data packets between the virtual network card and a physical network interface, and realizes the broadcast and multicast functions in the VPN.
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 embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of a dual-interface multicast broadcast forwarding method according to the present invention;
fig. 2 is a schematic diagram illustrating a forwarding method of multicast and broadcast packets in the prior art;
FIG. 3 is a schematic diagram of multicast and broadcast packet forwarding that may be implemented in accordance with the present invention;
FIG. 4 is a schematic diagram of a multicast and broadcast packet forwarding process;
fig. 5 is a flow chart of multi-interface forwarding.
Detailed Description
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 derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a double-interface multicast broadcast forwarding method, which is a flow schematic diagram of the double-interface multicast broadcast forwarding method as shown in figure 1, and analyzes the forwarding process from the following three angles:
(1) the method is applied to the Linux layer interface data forwarding driver, and comprises the following steps:
receiving multicast and broadcast packets;
sending multicast and broadcast packets to the VPN client so that the VPN client sends the multicast and broadcast packets to the VPN server and issues a command of joining in the multicast or leaving the multicast, and the VPN server completes the addition and removal of group members and the forwarding of data;
and receiving the multicast and broadcast packet forwarded by the VPN client.
Further, sending a multicast and broadcast packet to the VPN client for the VPN client to send the multicast and broadcast packet to the VPN server, specifically:
and sending the multicast and broadcast packet to the VPN client so that the VPN client can identify the data in the multicast and broadcast packet, convert the data into an internal protocol and send the internal protocol to the VPN server.
Further, after the VPN server completes the addition and removal of the group members and the forwarding of the data, the method further includes: and recording the group member information and the forwarded data by the VPN server.
(2) Applied to a VPN client, the method comprises:
receiving multicast and broadcast packets sent by a Linux layer interface data forwarding driver;
sending multicast and broadcast packets to the VPN server and issuing a command of joining in multicast or leaving multicast for the VPN server to complete the addition and removal of group members and the forwarding of data;
receiving multicast and broadcast packets sent by a VPN server;
and forwarding the multicast and broadcast packet sent by the VPN server to a Linux layer interface data forwarding driver.
Further, before sending the multicast and broadcast packet to the VPN server, the method further includes: data in multicast and broadcast packets is identified and converted to an internal protocol.
Further, before receiving the multicast and broadcast packets sent by the VPN server, the method further includes: and recording the group member information and the forwarded data by the VPN server.
(3) Applied to a VPN server, the method comprises the following steps:
receiving multicast and broadcast packets sent by a VPN client and a command issued for joining in multicast or leaving multicast, wherein the multicast and broadcast packets are sent to the VPN client by Linux layer interface data forwarding drive;
according to the multicast and broadcast packet and the command, completing the addition and removal of the group members and the forwarding of data;
and sending the multicast and broadcast packet to the VPN client so that the VPN client forwards the multicast and broadcast packet to a Linux layer interface data forwarding driver.
Further, before receiving the multicast and broadcast packets sent by the VPN client, the method further includes: the data in the multicast and broadcast packets is identified by the VPN client and converted to an internal protocol.
Further, after completing the addition and removal of group members and the forwarding of data according to the multicast and broadcast packets and commands, the method further comprises: and recording the group member information and the forwarded data.
As shown in fig. 2, which is a schematic diagram of a method for forwarding multicast and broadcast packets in the prior art, it can be understood from the diagram that after receiving the multicast and broadcast packets, the device on the a side can only receive and transmit the multicast and broadcast packets in the local area network where the real network card is located, and cannot transmit the multicast and broadcast packets to the device B through the VPN virtual network card.
Based on the technical scheme of the invention, the multicast and broadcast packets at the eth0 side can reach the device B through the VPN virtual network card, as shown in FIG. 3; similarly, the multicast and broadcast packets found from the VPN virtual network card also reach the eth0 side. Further, referring to fig. 4, it can be understood that the specific flow of forwarding the multicast and broadcast packets according to the technical solution of the present invention is as follows: eth0-VPN virtual network card-VPN client-VPN server-VPN client-VPN virtual network card-eth 0.
Next, a multi-interface forwarding technology is studied, where multicast broadcast forwarding depends on a forwarding technology between multiple network interfaces, and the multi-network interface forwarding technology can implement forwarding of any data other than multicast and broadcast. As shown in fig. 5, the multi-interface forwarding uses the characteristic of the netfilter subsystem of the Linux kernel, intercepts the multicast and broadcast packets of the Ipv4 protocol family sent from the designated interface at the HOOK point NF _ INET _ PRE _ ROUTING, copies the transmitted sk buffer packet, and sends the skbuffer data packet to the virtual network card, thereby achieving the purpose of generating multicast and broadcast packets on the virtual network card; meanwhile, the forwarding operation of copying the multicast or broadcast packet and sending the copied multicast or broadcast packet to the virtual network card uses a multi-interface forwarding technology, but the multi-interface forwarding technology is not limited to be used on the virtual network card, and any interface can be used.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims (9)
1. A dual-interface multicast broadcast forwarding method is applied to a Linux layer interface data forwarding driver, and comprises the following steps:
receiving multicast and broadcast packets;
sending multicast and broadcast packets to the VPN client so that the VPN client sends the multicast and broadcast packets to the VPN server and issues a command of joining in the multicast or leaving the multicast, and the VPN server completes the addition and removal of group members and the forwarding of data;
and receiving the multicast and broadcast packet forwarded by the VPN client.
2. The dual-interface multicast broadcast forwarding method according to claim 1, wherein the multicast and broadcast packet is sent to the VPN client, so that the VPN client sends the multicast and broadcast packet to the VPN server, specifically:
and sending the multicast and broadcast packet to the VPN client so that the VPN client can identify the data in the multicast and broadcast packet, convert the data into an internal protocol and send the internal protocol to the VPN server.
3. The method according to claim 1, wherein after the VPN server completes the addition and removal of group members and forwarding of data, the method further comprises:
and recording the group member information and the forwarded data by the VPN server.
4. A dual-interface multicast broadcast forwarding method is applied to a VPN client, and the method comprises the following steps:
receiving multicast and broadcast packets sent by a Linux layer interface data forwarding driver;
sending multicast and broadcast packets to the VPN server and issuing a command of joining in multicast or leaving multicast for the VPN server to complete the addition and removal of group members and the forwarding of data;
receiving multicast and broadcast packets sent by a VPN server;
and forwarding the multicast and broadcast packet sent by the VPN server to a Linux layer interface data forwarding driver.
5. The dual-interface multicast broadcast forwarding method of claim 4, wherein before sending the multicast and broadcast packets to the VPN server, the method further comprises:
data in multicast and broadcast packets is identified and converted to an internal protocol.
6. The dual-interface multicast broadcast forwarding method according to claim 4, wherein before receiving the multicast and broadcast packets sent by the VPN server, the method further comprises:
and recording the group member information and the forwarded data by the VPN server.
7. A dual-interface multicast broadcast forwarding method is applied to a VPN server, and the method comprises the following steps:
receiving multicast and broadcast packets sent by a VPN client and a command issued for joining in multicast or leaving multicast, wherein the multicast and broadcast packets are sent to the VPN client by Linux layer interface data forwarding drive;
according to the multicast and broadcast packet and the command, completing the addition and removal of the group members and the forwarding of data;
and sending the multicast and broadcast packet to the VPN client so that the VPN client forwards the multicast and broadcast packet to a Linux layer interface data forwarding driver.
8. The dual-interface multicast broadcast forwarding method according to claim 7, wherein before receiving the multicast and broadcast packets sent by the VPN client, the method further comprises:
the data in the multicast and broadcast packets is identified by the VPN client and converted to an internal protocol.
9. The dual-interface multicast broadcast forwarding method according to claim 7, wherein after completing the addition and removal of group members and forwarding of data according to multicast and broadcast packets and commands, the method further comprises:
and recording the group member information and the forwarded data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111636050.5A CN114221828B (en) | 2021-12-27 | 2021-12-27 | Double-interface multicast broadcast forwarding method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111636050.5A CN114221828B (en) | 2021-12-27 | 2021-12-27 | Double-interface multicast broadcast forwarding method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114221828A true CN114221828A (en) | 2022-03-22 |
CN114221828B CN114221828B (en) | 2024-07-12 |
Family
ID=80706648
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111636050.5A Active CN114221828B (en) | 2021-12-27 | 2021-12-27 | Double-interface multicast broadcast forwarding method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114221828B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1777142A (en) * | 2005-11-21 | 2006-05-24 | 西安电子科技大学 | Method for realizing data communication utilizing virtual network adapting card in network environment simulating |
CN1866921A (en) * | 2005-12-30 | 2006-11-22 | 华为技术有限公司 | Multicast service realizing method and apparatus based on PPP protocol |
CN1905530A (en) * | 2006-08-08 | 2007-01-31 | 杭州华为三康技术有限公司 | Method and system of multicast and video-on-demand |
US20080034416A1 (en) * | 2006-08-03 | 2008-02-07 | Arkesh Kumar | Methods and systems for routing packets in a vpn-client-to-vpn-client connection via an ssl/vpn network appliance |
CN101222425A (en) * | 2008-01-22 | 2008-07-16 | 华为技术有限公司 | Multicast forwarding method and multicast router |
CN101951396A (en) * | 2010-09-03 | 2011-01-19 | 创想空间软件技术(北京)有限公司 | System and method for realizing real-time communication of IP network by using P2P (Peer-to-Peer) jumping seeds |
CN102281148A (en) * | 2011-08-22 | 2011-12-14 | 福建星网锐捷网络有限公司 | Method for establishing multicast distribution tree in mode of inter-virtual private network (VPN), equipment and system thereof |
WO2014079190A1 (en) * | 2012-11-21 | 2014-05-30 | 华为技术有限公司 | Multicast message forwarding method and device |
CN110493095A (en) * | 2019-07-26 | 2019-11-22 | 广州至真信息科技有限公司 | A kind of processing method of vpn service, device, server and storage medium |
-
2021
- 2021-12-27 CN CN202111636050.5A patent/CN114221828B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1777142A (en) * | 2005-11-21 | 2006-05-24 | 西安电子科技大学 | Method for realizing data communication utilizing virtual network adapting card in network environment simulating |
CN1866921A (en) * | 2005-12-30 | 2006-11-22 | 华为技术有限公司 | Multicast service realizing method and apparatus based on PPP protocol |
US20080034416A1 (en) * | 2006-08-03 | 2008-02-07 | Arkesh Kumar | Methods and systems for routing packets in a vpn-client-to-vpn-client connection via an ssl/vpn network appliance |
CN1905530A (en) * | 2006-08-08 | 2007-01-31 | 杭州华为三康技术有限公司 | Method and system of multicast and video-on-demand |
CN101222425A (en) * | 2008-01-22 | 2008-07-16 | 华为技术有限公司 | Multicast forwarding method and multicast router |
CN101951396A (en) * | 2010-09-03 | 2011-01-19 | 创想空间软件技术(北京)有限公司 | System and method for realizing real-time communication of IP network by using P2P (Peer-to-Peer) jumping seeds |
CN102281148A (en) * | 2011-08-22 | 2011-12-14 | 福建星网锐捷网络有限公司 | Method for establishing multicast distribution tree in mode of inter-virtual private network (VPN), equipment and system thereof |
WO2014079190A1 (en) * | 2012-11-21 | 2014-05-30 | 华为技术有限公司 | Multicast message forwarding method and device |
CN110493095A (en) * | 2019-07-26 | 2019-11-22 | 广州至真信息科技有限公司 | A kind of processing method of vpn service, device, server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114221828B (en) | 2024-07-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107786613B (en) | Broadband remote access server BRAS forwarding implementation method and device | |
US8284783B1 (en) | System and method for avoiding neighbor cache pollution | |
US8072883B2 (en) | Internet small computer systems interface (iSCSI) distance acceleration device | |
CN101834783B (en) | Method and device for forwarding messages and network equipment | |
CN110557354B (en) | Method and device for realizing communication between nodes and electronic equipment | |
WO2018094743A1 (en) | Method for processing packet, and computer device | |
US20180109456A1 (en) | System, method, and device for network load balance processing | |
WO2014082577A1 (en) | Remote debugging method and system | |
CN104601468A (en) | Message forwarding method and device | |
CN104168257A (en) | Data isolation device based on non-network mode, and method and system thereof | |
CN106961487B (en) | Data stream self-adaptive adjusting system and method in virtual machine live migration process | |
CN105162702A (en) | AC current guide method and device | |
EP3313031A1 (en) | Sdn-based arp realization method and apparatus | |
CN102761534A (en) | Method and device for realizing transparent proxy of media access control layer | |
CN106101297B (en) | A kind of message answer method and device | |
CN105264869A (en) | Ip address allocation system and method | |
WO2013120325A1 (en) | Browser-to-browser direct communication method, device and communication system | |
CN108924061B (en) | Application identification and management method, system and related device | |
WO2024037366A1 (en) | Forwarding rule issuing method, and intelligent network interface card and storage medium | |
CN104168302B (en) | Equipment manipulation implementation method, system and proxy gateway | |
CN114221828B (en) | Double-interface multicast broadcast forwarding method | |
WO2011116614A1 (en) | Method, system and device for accessing network equipment | |
KR100773778B1 (en) | Method for controlling server with multicast transmitting and System thereof | |
KR100597405B1 (en) | System and method for relaying data by use of socket applicaton program | |
CN108667735A (en) | A kind of retransmission method and device of multicast packet |
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 |