CN115190087B - Data transmission method, device, equipment and medium based on two-layer intermediate equipment - Google Patents

Data transmission method, device, equipment and medium based on two-layer intermediate equipment Download PDF

Info

Publication number
CN115190087B
CN115190087B CN202210796351.2A CN202210796351A CN115190087B CN 115190087 B CN115190087 B CN 115190087B CN 202210796351 A CN202210796351 A CN 202210796351A CN 115190087 B CN115190087 B CN 115190087B
Authority
CN
China
Prior art keywords
target
layer
layer intermediate
intermediate device
equipment
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
CN202210796351.2A
Other languages
Chinese (zh)
Other versions
CN115190087A (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.)
Beijing Armyfly Technology Co Ltd
Original Assignee
Beijing Armyfly 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 Beijing Armyfly Technology Co Ltd filed Critical Beijing Armyfly Technology Co Ltd
Priority to CN202210796351.2A priority Critical patent/CN115190087B/en
Publication of CN115190087A publication Critical patent/CN115190087A/en
Application granted granted Critical
Publication of CN115190087B publication Critical patent/CN115190087B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/60Software-defined switches
    • H04L49/602Multilayer or multiprotocol switching, e.g. IP switching
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/354Switches specially adapted for specific applications for supporting virtual local area networks [VLAN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a data transmission method, a device, equipment and a medium based on two-layer intermediate equipment. The method is executed by a two-layer intermediate device, and at least one terminal device in different local area networks is hung under a two-layer switch connected with the two-layer intermediate device, and the method comprises the following steps: receiving a data transmission request sent by a two-layer switch connected with the two-layer intermediate device, wherein the data transmission request comprises: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data; and sending the target data to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address. By the technical scheme of the invention, data transmission can be realized from terminal equipment to terminal equipment in different local area networks through two layers of intermediate equipment.

Description

Data transmission method, device, equipment and medium based on two-layer intermediate equipment
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a data transmission method, device, equipment and medium based on two-layer intermediate equipment.
Background
At present, with the continuous development of vehicle technology, data interaction between terminal devices is particularly important. In the prior art, each terminal device is connected with a two-layer switch, when different terminal devices are under the same local area network, data transmission can be carried out between the terminal devices through the two-layer switch, but when different terminal devices are under different local area networks, data transmission cannot be carried out between the terminal devices through the two-layer switch, at the moment, data transmission between the terminal devices can only be realized through hardware devices such as a switch, and the like, but the cost of the method is high, and the feasibility is poor.
Disclosure of Invention
The embodiment of the invention provides a data transmission method, a device, equipment and a medium based on two-layer intermediate equipment, so that the data transmission from terminal equipment to terminal equipment under different local area networks can be realized through the two-layer intermediate equipment.
According to an aspect of the present invention, there is provided a data transmission method based on a two-layer intermediate device, which is executed by the two-layer intermediate device, and hangs at least one terminal device in a different local area network under a two-layer switch connected to the two-layer intermediate device, the method including:
Receiving a data transmission request sent by a two-layer switch connected with the two-layer intermediate device, wherein the data transmission request comprises: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data;
and sending the target data to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address.
According to another aspect of the present invention, there is provided a data transmission apparatus based on a two-layer intermediate device, the apparatus comprising:
the first receiving module is configured to receive a data transmission request sent by a two-layer switch connected to the two-layer intermediate device, where the data transmission request includes: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data;
and the sending module is used for sending the target data to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address.
According to another aspect of the present invention, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the two-tier intermediate-based data transmission method of any of the embodiments of the present invention.
According to another aspect of the present invention, there is provided a computer readable storage medium storing computer instructions for causing a processor to implement a data transmission method based on a two-layer intermediate device according to any one of the embodiments of the present invention when executed.
According to the embodiment of the invention, the two-layer intermediate equipment is connected with the two-layer switch by arranging the two-layer intermediate equipment, a data transmission request sent by the two-layer switch is received, and the target data is sent to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment, so that the target two-layer intermediate equipment forwards the target data to the target terminal equipment through the target two-layer switch according to the target MAC address. By the technical scheme of the invention, data transmission can be realized from terminal equipment to terminal equipment in different local area networks through two layers of intermediate equipment.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the invention or to delineate the scope of the invention. Other features of the present invention will become apparent from the description that follows.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a data transmission method based on a two-layer intermediate device in an embodiment of the invention;
FIG. 2 is a schematic diagram of a data transmission method based on a two-layer intermediate device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data transmission device based on a two-layer intermediate device in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device implementing a data transmission method based on a two-layer intermediate device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the present invention, a technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in which it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
Fig. 1 is a flowchart of a data transmission method based on a two-layer intermediate device in an embodiment of the present invention, where the embodiment is applicable to a case of data transmission based on a two-layer intermediate device, the method may be performed by a two-layer intermediate device, and at least one terminal device located in different local area networks is suspended under a two-layer switch connected to the two-layer intermediate device.
The two-layer intermediate equipment can automatically create a wireless broadband intelligent tunnel, so that end-to-end two-layer connection between the vehicle-mounted central station and the vehicle-mounted terminal and between the vehicle-mounted terminal and the vehicle-mounted terminal is established. Alternatively, the two-layer intermediary device may be a tunnel module. Specifically, the tunnel module may be embedded in a vehicle-mounted central station or a vehicle-mounted terminal, and provides two interfaces, namely a UNI interface (User Network Interface ) and an NNI interface (Network-to-Network Interface, interface between networks), where the inside is connected to the two-layer switch through the UNI interface, and the outside is connected to other tunnel modules through the NNI interface. It should be noted that the tunnel module may be a board card, and be combined with other board cards to obtain a combined board card.
The two-layer switch may be a network hardware, and receives and forwards data to the terminal device through the message exchange, and simply speaking, the two-layer switch is a machine for performing the message exchange. In general, the two-layer switch mainly works in the second layer of the seven-layer OSI (Open System Interconnection ) model, namely, the data link layer, and can perform address learning, and uses a store-and-forward mode to exchange messages. Specifically, at least one terminal device can be hung under one two-layer switch, and at least one terminal device hung under the two-layer switch can be in different local area networks. Preferably, the interface of the two-layer switch is in trunk mode (i.e. trunk mode, the trunk type port can allow multiple vlan to pass through, and can receive and send multiple vlan messages, which is generally used for the switch-related interface).
Each terminal device has a respective IP address and a respective corresponding MAC address (Media Access Control address, MAC address, i.e. address of local area network, ethernet address, physical address, respectively) for identifying the location of the network device.
As shown in fig. 1, the method specifically includes the following steps:
s101, receiving a data transmission request sent by a two-layer switch connected with two-layer intermediate equipment.
It should be explained that the data transmission request may be a request sent to the connected two-layer intermediate device by the two-layer switch connected to the two-layer intermediate device for data transmission between the terminal devices. Specifically, the data transmission request may include a data transmission request and a data reception request, where the data transmission request may be a data transmission request, that is, a terminal suspended under the two-layer switch is to transmit data to other terminals.
Wherein the data transmission request includes: the method comprises the steps of target MAC address, identification information of target two-layer intermediate equipment and target data.
It should be noted that, the target MAC address may be a MAC address corresponding to a terminal device that performs data transmission with a terminal device suspended under a two-layer switch connected to a two-layer intermediate device. The target two-layer intermediate device may be a two-layer intermediate device corresponding to a terminal device for data transmission of a terminal device hung under a two-layer switch connected to the two-layer intermediate device, and specifically, the target two-layer intermediate device may be a tunnel module corresponding to a vehicle-mounted central station or a tunnel module corresponding to a vehicle-mounted terminal. Accordingly, the identification information of the target two-layer intermediate device may be an IP address of the target two-layer intermediate device. The target data may be data to be transmitted by a terminal device suspended under a two-layer switch connected to a two-layer intermediate device.
Specifically, the UNI interface of the two-layer intermediate device receives a data transmission request sent by a connected two-layer switch, where the data transmission request includes a target MAC address corresponding to a terminal device to be data-transmitted with a terminal device hung under the two-layer switch, identification information of a target two-layer intermediate device corresponding to the terminal device to be data-transmitted with the terminal device hung under the two-layer switch, and target data to be transmitted.
S102, sending the target data to the target two-layer intermediate device according to the identification information of the target two-layer intermediate device, so that the target two-layer intermediate device forwards the target data to the target terminal device through the target two-layer switch according to the target MAC address.
The target two-layer switch can be a two-layer switch connected with terminal equipment which is connected with two-layer intermediate equipment and is hung below the two-layer switch for data transmission. The target terminal device may be a terminal device for data transmission with a terminal device hung under a two-layer switch connected to the two-layer intermediate device.
Specifically, the two-layer intermediate device establishes connection with the target two-layer intermediate device through the NNI interface according to the identification information of the target two-layer intermediate device and sends target data to the target two-layer intermediate device, so that the target two-layer intermediate device forwards the target data to the target terminal device corresponding to the target MAC address through the target two-layer switch according to the target MAC address, and data transmission between the terminal device hung under the two-layer switch connected with the two-layer intermediate device and the target terminal device is completed.
According to the embodiment of the invention, the two-layer intermediate equipment is connected with the two-layer switch by arranging the two-layer intermediate equipment, a data transmission request sent by the two-layer switch is received, and the target data is sent to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment, so that the target two-layer intermediate equipment forwards the target data to the target terminal equipment through the target two-layer switch according to the target MAC address. By the technical scheme of the invention, data transmission can be realized from terminal equipment to terminal equipment in different local area networks through two layers of intermediate equipment.
Optionally, before receiving the data transmission request sent by the two-layer switch connected to the two-layer intermediate device, the method further includes:
and receiving a connection request sent by a two-layer switch connected with the two-layer intermediate device.
The connection request may be a request sent by a two-layer switch connected to the two-layer intermediate device to establish a connection with the two-layer intermediate device.
Wherein the connection request includes: a destination MAC address and a destination local area network identity.
It should be explained that the target lan identifier may be an identifier of a lan where a terminal device hanging under a two-layer switch connected to a two-layer intermediate device performs data transmission, for example, vlan tag=vlan 30, where vlan tag is a virtual lan tag, and the identifier of the target lan where the target terminal device is located is vlan 30.
Specifically, before the second-layer intermediate device receives a data transmission request sent by the second-layer switch connected with the second-layer intermediate device, a connection request sent by the second-layer switch is received through a UNI interface, where the connection request includes a target MAC address and a target lan identifier of the target terminal device. In the actual operation process, the UNI interface of the two-layer intermediate device is added with a function of judging whether the data received from the trunk type port of the two-layer switch is provided with a vlan tag, if so, the data is forwarded, and if not, the data is discarded.
And determining the identification information of the target two-layer intermediate equipment according to the target MAC address and the target local area network identification.
Specifically, after receiving a target MAC address and a target lan identifier sent by a two-layer switch connected to the two-layer intermediate device through a UNI interface, the two-layer intermediate device determines identification information of the target two-layer intermediate device according to the target MAC address and the target lan identifier.
And establishing connection with the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment.
Specifically, after the identification information of the target two-layer intermediate device is determined, the two-layer intermediate device establishes connection with the target two-layer intermediate device through the NNI interface so as to perform data transmission between the terminal devices.
Optionally, before receiving the data transmission request sent by the two-layer switch connected to the two-layer intermediate device, the method further includes:
and receiving a connection request sent by a two-layer switch connected with the two-layer intermediate device.
Specifically, before the second-layer intermediate device receives a data transmission request sent by the second-layer switch connected with the second-layer intermediate device, the connection request sent by the second-layer switch is received through a UNI interface.
If the connection request carries the target local area network identifier, determining the identifier information of the target two-layer intermediate device according to the target MAC address carried by the connection request and the target local area network identifier.
Specifically, the UNI interface of the two-layer intermediate device is added to determine whether the connection request received from the trunk type port of the two-layer switch carries a target lan identifier, where the target lan identifier may be expressed as vlan tag. If the two-layer intermediate device judges that the connection request carries the target local area network identifier, determining the identifier information of the target two-layer intermediate device according to the target MAC address carried by the connection request and the target local area network identifier.
If the connection request does not carry the target LAN identification, discarding the connection request.
Specifically, if the two-layer intermediate device determines that the connection request does not carry the target lan identifier, the connection request is directly discarded.
Optionally, the method further comprises:
and acquiring a first MAC address and a first local area network identifier of at least one terminal device hung under a two-layer switch connected with the two-layer intermediate device.
The first MAC address may be a MAC address of at least one terminal device suspended under a two-layer switch connected to the two-layer intermediate device. Specifically, each terminal device has a respective MAC address, and the respective MAC addresses are different. The first lan identifier may be an identifier of a lan where at least one terminal device connected to the two-layer switch under the two-layer switch is located, for example, the lan identifier of the terminal device 1 may be vlan 10, the lan identifier of the terminal device 2 may be vlan 20, and so on.
Specifically, the second-layer intermediate device acquires a first MAC address and a first lan identifier of each terminal device under the second-layer switch connected to the second-layer intermediate device through a UNI interface.
The method comprises the steps of sending a first MAC address, a first local area network identifier and identification information of a two-layer intermediate device to other two-layer intermediate devices connected with the two-layer intermediate device, receiving the second MAC address, the second local area network identifier and the identification information of the other two-layer intermediate device sent by the other two-layer intermediate device, and correspondingly storing the identification information of the two-layer intermediate device, the first MAC address, the first local area network identifier, the second MAC address, the second local area network identifier and the identification information of the other two-layer intermediate device to a target database.
It should be noted that the other two-layer intermediate device may be a two-layer intermediate device connected to the two-layer intermediate device. The other two-layer intermediate device may be, for example, a tunnel module corresponding to a vehicle-mounted central station connected to the two-layer intermediate device, or may be a tunnel module corresponding to a vehicle-mounted terminal.
The second MAC address may be a MAC address of at least one terminal device suspended under a two-layer switch connected to the other two-layer intermediate device. The second lan identifier may be a lan identifier of at least one terminal device suspended under a two-layer switch connected to the other two-layer intermediate device. The identification information of the other two-layer intermediate device may be an IP address of the other two-layer intermediate device connected to the two-layer intermediate device.
It should be noted that the target database may be understood as a database storing the MAC addresses and IP addresses of all the terminal devices and the identification information of the two-layer intermediate devices corresponding to all the terminals, and the target database may be, for example, data stored in a table form. For example, the identification information of the two-layer intermediate device 1 is ip=xxx.xx.x.xx 1, and is connected to the two-layer switch 1, where the two-layer switch 1 hangs down two terminal devices, namely, terminal 1 and terminal 2, and the local area network of the terminal 1 is vlan 10, ip=xx.xx.xx.xx1, and mac=xx: xx: xx: xx: x1; the local area network of terminal 2 is identified as vlan 20, ip=xx.x.xxx.xx2, mac=xx: xx: xx: xx: x2. Specifically, in the actual operation process, the target terminal device corresponding to the target MAC address can be found by searching in the target database according to the target MAC address in the data transmission request.
Specifically, the two-layer intermediate device acquires a first MAC address and a first lan identifier of each terminal device hung under the connected two-layer switch through a UNI interface, and sends the first MAC address, the first lan identifier, and identification information of the two-layer intermediate device to other two-layer intermediate devices connected to the two-layer intermediate device through an NNI interface. Similarly, the other two-layer intermediate devices acquire the second MAC address and the second local area network identifier of each terminal device hung under the other two-layer switch connected through the UNI interface, and send the second MAC address, the second local area network identifier and the identifier information of the other two-layer intermediate devices to the two-layer intermediate devices connected with the other two-layer intermediate devices through the NNI interface. The second-layer intermediate device receives the second MAC address, the second local area network identifier and the identifier information of the other second-layer intermediate devices sent by the other second-layer intermediate devices through the NNI interface, and correspondingly stores the identifier information of the second-layer intermediate device, the first MAC address, the first local area network identifier, the second MAC address, the second local area network identifier and the identifier information of the other second-layer intermediate devices to the target database. Similarly, the other two-layer intermediate device receives the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device sent by the two-layer intermediate device through the NNI interface, and correspondingly stores the identifier information of the other two-layer intermediate device, the second MAC address, the second local area network identifier, the first MAC address, the first local area network identifier and the identifier information of the other two-layer intermediate device to the target database.
Optionally, determining the identification information of the target two-layer intermediate device according to the target MAC address and the target lan identification includes:
inquiring a target database according to the target local area network identifier and the target MAC address to obtain the identifier information of the target tunnel module corresponding to the target local area network identifier and the target MAC address.
The target tunnel module may be a two-layer intermediate device that is to receive the transmission data, and preferably, the identification information of the target tunnel module may be an IP address of the target tunnel module.
Specifically, the two-layer intermediate device queries a target database according to the target local area network identifier and the target MAC address to obtain the identifier information of the target tunnel module corresponding to the target local area network identifier and the target MAC address. For example, the target lan is identified as vlan 10, and the target MAC address is xx: and (2) obtaining the identification information of the corresponding target tunnel module as xxx.xx.xxx 1 after inquiring the target database, and determining that the target tunnel module is the two-layer intermediate device 1.
Optionally, sending the first MAC address, the first local area network identifier, and the identifier information of the two-layer intermediate device to other two-layer intermediate devices connected to the two-layer intermediate device includes:
And acquiring the IP addresses of other two-layer intermediate devices connected with the two-layer intermediate device.
Specifically, the two-layer intermediate device acquires the IP addresses of other two-layer intermediate devices connected to the two-layer intermediate device through an ACTP protocol (Auto Create Tunnel Protocol, automatically establishing a tunneling protocol).
It may be known that the ACTP protocol is a tunnel creation protocol for shielding a wireless broadband network, and may establish an end-to-end two-layer connection between a vehicle-mounted central station to a vehicle-mounted central station, a vehicle-mounted central station to a vehicle-mounted terminal, and a vehicle-mounted terminal to a vehicle-mounted terminal. The ACTP protocol employs a C/S (client/server) mode of operation: the client side mainly completes the functions of collecting the IP address of the tunnel module, the MAC of the terminal equipment and the like, registering the information to the server, sending heartbeat to the server, processing the data synchronization sent by the server, processing the online and offline events of other virtual link gateway software (ARM version), carrying out data forwarding according to a forwarding table acquired from the server and the like, and the vlan information of the terminal equipment is also added by the client side protocol of ACTP. The server has two working states: the main server mainly completes the functions of processing the registration of the client, collecting and maintaining the online state of the client, sending a data synchronization message to the client and the standby server, uploading and downloading events of the client and the like; the standby server mainly completes the functions of keeping data synchronization with the main server, monitoring the online state of the main server, upgrading the main server to the main server after the main server is disconnected, ensuring normal service and the like.
And determining the network environment type between the two-layer intermediate device and the other two-layer intermediate device according to the IP addresses of the other two-layer intermediate devices.
It is known that the network environment types can be classified into a class a network, a class B network and a class C network, wherein the private address range of the class a network is 10.0.0.0 to 10.255.255.255, the private address range of the class B network is 172.16.0.0 to 172.131.255.255, and the private address range of the class C network is 192.168.0.0 to 192.168.255.255. In this embodiment, the network environment types may be classified into a two-layer network environment and a three-layer network environment. Wherein, the two-layer network environment can be a B-type network, and the three-layer network environment can be a C-type network.
Specifically, according to the IP addresses of other two-layer intermediate devices, whether the network environment types between the two-layer intermediate devices and the other two-layer intermediate devices belong to a two-layer network environment or a three-layer network environment is determined, and different network environment types correspond to different data transmission processes.
And sending the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device to other two-layer intermediate devices connected with the two-layer intermediate device according to the network environment type between the two-layer intermediate device and the other two-layer intermediate devices.
Specifically, if the network environment type between the two-layer intermediate device and the other two-layer intermediate device is a two-layer network environment, the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device are directly sent to the other two-layer intermediate device through the NNI interface; if the network environment type between the two-layer intermediate device and other two-layer intermediate devices is a three-layer network environment, the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device are packaged and then sent to the other two-layer intermediate devices through the NNI interface.
Optionally, the sending the first MAC address, the first local area network identifier, and the identifier information of the two-layer intermediate device to the other two-layer intermediate device connected to the two-layer intermediate device according to the network environment type between the two-layer intermediate device and the other two-layer intermediate device includes:
and if the network environment type between the two-layer intermediate device and other two-layer intermediate devices is the two-layer network environment, the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device are sent to the other two-layer intermediate devices.
For example, if the IP address of the two-layer intermediate device is 172.Xx.x.xx1 and the IP addresses of the other two-layer intermediate devices are 172.Xx.x.xx2, that is, the network environment type between the two-layer intermediate device and the other two-layer intermediate device is a two-layer network environment, the first MAC address, the first local area network identifier, and the identifier information of the two-layer intermediate device are directly sent to the other two-layer intermediate device through the NNI interface.
If the network environment type between the two-layer intermediate device and the other two-layer intermediate device is a three-layer network environment, the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device are packaged to obtain a first target message, and the first target message is sent to the other two-layer intermediate device.
It should be noted that, the first target message may be a message obtained by packaging and encapsulating the first MAC address, the lan identifier, and the identifier information of the two-layer intermediate device.
For example, if the IP address of the two-layer intermediate device is 172.Xx.x.xx1 and the IP addresses of the other two-layer intermediate devices are 192.Xx.x.xx3, that is, the network environment type between the two-layer intermediate device and the other two-layer intermediate device is a three-layer network environment, the first MAC address, the first local area network identifier, and the identifier information of the two-layer intermediate device are encapsulated, so as to obtain a first target packet, and then the first target packet is sent to the other two-layer intermediate device through the NNI interface.
Optionally, encapsulating the first MAC address, the lan identifier, and the identifier information of the two-layer intermediate device to obtain a first target packet, where the method includes:
and encapsulating the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device according to the IP addresses of other tunnel modules to obtain a first target message.
The other tunnel modules may be other two-layer intermediate devices for transmitting data, and the IP addresses of the other tunnel modules may be xxx.
Specifically, the first MAC address, the lan identifier, and the identifier information of the two-layer intermediate device are encapsulated according to the IP addresses of the other tunnel modules, so as to obtain a first target packet.
In the actual operation process, after receiving the message, if the message is the first target message, the NNI interface of the tunnel module takes out the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device encapsulated in the first target message and sends the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device out of the UNI interface; if the message is not the first target message, the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device are directly sent out from the UNI interface.
As an exemplary description of the present embodiment, fig. 2 is a schematic diagram of a data transmission method based on a two-layer intermediate device in an embodiment of the present invention.
As shown in fig. 2, the IP address of the vehicle-mounted central station 1 is 172.Xx.x.x/xx, a two-layer intermediate device 1 is disposed under the vehicle-mounted central station 1, the IP address of the two-layer intermediate device 1 is 172.Xx.x.xx1, the two-layer intermediate device 1 provides a UNI interface and an NNI interface, and is connected with the two-layer switch 1 through the UNI interface, a terminal device 1 and a terminal device 2 are hung under the two-layer switch 1, the local area network of the terminal device 1 is identified as vlan 10, the IP address is 192.Xxx.x.1, and the mac address is xx: xx: xx: xx1, the local area network of the terminal device 2 is identified as vlan 20, the IP address is 192.Xxx.x.2, the MAC address is xx: xx: xx: xx: x2; the IP address of the vehicle-mounted central station 2 is 172.Xx.x.x/xx, a two-layer intermediate device 2 is arranged under the vehicle-mounted central station 2, the IP address of the two-layer intermediate device 2 is 172.Xx.x.xx2, the two-layer intermediate device 2 provides a UNI interface and an NNI interface, the two-layer intermediate device is connected with the two-layer switch 2 through the UNI interface, a terminal device 3 and a terminal device 4 are hung under the two-layer switch 2, the local area network of the terminal device 3 is marked as vlan 30, the IP address is 192.Xxx.x.3, and the MAC address is xx: xx: xx: xx3, the local area network of the terminal device 4 is identified as vlan 40, the IP address is 192.Xxx.x.4, the MAC address is xx: xx: xx: xx: x4; the IP address of the vehicle-mounted terminal 1 is 192.Xx.x.x/xx, a two-layer intermediate device 3 is arranged under the vehicle-mounted terminal 1, the IP address of the two-layer intermediate device 3 is 192.Xx.x.xx3, the two-layer intermediate device 3 provides a UNI interface and an NNI interface, the two-layer intermediate device is connected with the two-layer switch 3 through the UNI interface, a terminal device 5 and a terminal device 6 are hung under the two-layer switch 3, the local area network of the terminal device 5 is marked as vlan 50, the IP address is 192.Xxx.x.5, and the MAC address is xx: xx: xx: xx: x5, the local area network of the terminal device 6 is identified as vlan 60, the IP address is 192.Xxx.x.6, and the mac address is xx: xx: xx: xx: x6.
If the terminal device 1 and the terminal device 3 perform data transmission, the following operation procedure is as follows:
the two-layer intermediate device 1 acquires the MAC addresses and the local area network identifications of the terminal device 1 and the terminal device 2 hung under the two-layer switch 1 through a UNI interface, the two-layer intermediate device 2 acquires the MAC addresses and the local area network identifications of the terminal device 3 and the terminal device 4 hung under the two-layer switch 2 through a UNI interface, the two-layer intermediate device 3 acquires the MAC addresses and the local area network identifications of the terminal device 5 and the terminal device 6 hung under the two-layer switch 3 through a UNI interface, and the two-layer intermediate device 1, the two-layer intermediate device 2 and the two-layer intermediate device 3 share information through NNI interfaces and store the information to a target database. The two-layer intermediate device 1 receives a data transmission request sent by the two-layer switch 1 through a UNI interface, wherein the data transmission request includes: MAC address xx: xx: xx: xx 3, IP address 172. Xx.xx.xx2 of the two-layer intermediate device 2, and target data. The two-layer intermediate device 1 sends target data to the two-layer intermediate device 2 through an NNI interface according to the IP address 172. Xx.xx.xx2 of the two-layer intermediate device 2, the two-layer intermediate device 2 sends the target data to the two-layer switch 2 through a UNI interface, and the two-layer switch 2 forwards the target data to the terminal device 3 according to the MAC address xx: xx: xx: xx: x3 and the local area network identifier vlan 30. In this process, since the network environment between the two-layer intermediate device 1 and the two-layer intermediate device 2 is a two-layer network environment, the MAC address xx: xx: xx: xx 3 of the terminal device 3, the lan 30 of the local area network identifier of the terminal device 3, and the IP address 172.Xx. X. Xx1 of the two-layer intermediate device 1 can be directly transmitted to the two-layer intermediate device 2.
If the terminal device 1 and the terminal device 5 perform data transmission, the following operation procedure is as follows:
the two-layer intermediate device 1 acquires the MAC addresses and the local area network identifications of the terminal device 1 and the terminal device 2 hung under the two-layer switch 1 through a UNI interface, the two-layer intermediate device 2 acquires the MAC addresses and the local area network identifications of the terminal device 3 and the terminal device 4 hung under the two-layer switch 2 through a UNI interface, the two-layer intermediate device 3 acquires the MAC addresses and the local area network identifications of the terminal device 5 and the terminal device 6 hung under the two-layer switch 3 through a UNI interface, and the two-layer intermediate device 1, the two-layer intermediate device 2 and the two-layer intermediate device 3 share information through NNI interfaces and store the information to a target database. The two-layer intermediate device 1 receives a data transmission request sent by the two-layer switch 1 through a UNI interface, wherein the data transmission request includes: MAC address xx: xx: xx: xx 5, IP address 192. Xx.xx.xx3 of the two-layer intermediate device 3, and target data. Because the network environment between the two-layer intermediate device 1 and the two-layer intermediate device 3 is a three-layer network environment, the two-layer intermediate device 1 needs to encapsulate the MAC address xx: xx: xx 5, the local area network identifier vlan 50 and the IP address 172. Xx.x2 of the two-layer intermediate device 1 to obtain a first target message, send the first target message to the two-layer intermediate device 3 through the NNI interface according to the IP address 192. Xx.xx.xx 3 of the two-layer intermediate device 3, and the two-layer intermediate device 3 takes out the MAC address xx: xx: xx: xx 5, the local area network identifier vlan 50 and the IP address 172. Xx.xx2 of the two-layer intermediate device 1 and sends the target data to the two-layer switch 3 through the two-layer switch 3 according to the MAC address xx: xx: xx: xx: xx 5 and the local area network identifier vlan 50.
Example two
Fig. 3 is a schematic structural diagram of a data transmission device based on a two-layer intermediate device in an embodiment of the present invention. The embodiment may be applied to the case of data transmission based on a two-layer intermediate device, where the apparatus may be implemented in a software and/or hardware manner, and the apparatus may be integrated in any device that provides a function of data transmission based on a two-layer intermediate device, as shown in fig. 3, where the data transmission apparatus based on a two-layer intermediate device specifically includes: a first receiving module 201 and a transmitting module 202.
The first receiving module 201 is configured to receive a data transmission request sent by a layer two switch connected to the layer two intermediate device, where the data transmission request includes: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data;
and the sending module 202 is configured to send the target data to the target two-layer intermediate device according to the identification information of the target two-layer intermediate device, so that the target two-layer intermediate device forwards the target data to a target terminal device through a target two-layer switch according to the target MAC address.
Optionally, the apparatus further includes:
The second receiving module is configured to receive a connection request sent by a two-layer switch connected to the two-layer intermediate device before receiving a data transmission request sent by the two-layer switch connected to the two-layer intermediate device, where the connection request includes: a target MAC address and a target LAN identification;
the first determining module is used for determining the identification information of the target two-layer intermediate equipment according to the target MAC address and the target local area network identification before receiving the data transmission request sent by the two-layer switch connected with the two-layer intermediate equipment;
the establishing module is used for establishing connection with the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment before receiving the data transmission request sent by the two-layer switch connected with the two-layer intermediate equipment.
Optionally, the apparatus further includes:
the third receiving module is used for receiving a connection request sent by the two-layer switch connected with the two-layer intermediate device before receiving the data transmission request sent by the two-layer switch connected with the two-layer intermediate device;
the second determining module is used for determining the identification information of the target two-layer intermediate equipment according to the target MAC address carried by the connection request and the target local area network identification if the connection request carries the target local area network identification before receiving the data transmission request sent by the two-layer switch connected with the two-layer intermediate equipment;
And the discarding module is used for discarding the connection request if the connection request does not carry the target local area network identifier before receiving the data transmission request sent by the two-layer switch connected with the two-layer intermediate device.
Optionally, the apparatus further includes:
the acquisition module is used for acquiring a first MAC address and a first local area network identifier of at least one terminal device hung under a two-layer switch connected with the two-layer intermediate device;
the processing module is used for sending the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device to other two-layer intermediate devices connected with the two-layer intermediate device, receiving the second MAC address, the second local area network identifier and the identifier information of the other two-layer intermediate device sent by the other two-layer intermediate device, and correspondingly storing the identifier information of the two-layer intermediate device, the first MAC address, the first local area network identifier, the second MAC address, the second local area network identifier and the identifier information of the other two-layer intermediate device to a target database.
Optionally, the determining module is specifically configured to:
inquiring the target database according to the target local area network identifier and the target MAC address to obtain the identifier information of the target tunnel module corresponding to the target local area network identifier and the target MAC address.
Optionally, the processing module includes:
the acquisition unit is used for acquiring the IP addresses of other two-layer intermediate devices connected with the two-layer intermediate device;
the determining unit is used for determining the network environment type between the two-layer intermediate equipment and the other two-layer intermediate equipment according to the IP addresses of the other two-layer intermediate equipment;
and the sending unit is used for sending the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device to other two-layer intermediate devices connected with the two-layer intermediate device according to the network environment type between the two-layer intermediate device and other two-layer intermediate devices.
Optionally, the transmitting unit includes:
a sending subunit, configured to send the first MAC address, the first local area network identifier, and identification information of the two-layer intermediate device to other two-layer intermediate devices if the network environment type between the two-layer intermediate device and other two-layer intermediate devices is a two-layer network environment;
and the processing subunit is used for packaging the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device if the network environment type between the two-layer intermediate device and the other two-layer intermediate device is a three-layer network environment, so as to obtain a first target message, and sending the first target message to the other two-layer intermediate device.
Optionally, the processing subunit is specifically configured to:
and encapsulating the first MAC address, the local area network identifier and the identifier information of the two-layer intermediate device according to the IP addresses of other tunnel modules to obtain a first target message.
The product can execute the data transmission method based on the two-layer intermediate device provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
Example III
Fig. 4 shows a schematic diagram of an electronic device 30 that may be used to implement an embodiment of the invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 4, the electronic device 30 includes at least one processor 31, and a memory, such as a Read Only Memory (ROM) 32, a Random Access Memory (RAM) 33, etc., communicatively connected to the at least one processor 31, wherein the memory stores a computer program executable by the at least one processor, and the processor 31 can perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 32 or the computer program loaded from the storage unit 38 into the Random Access Memory (RAM) 33. In the RAM 33, various programs and data required for the operation of the electronic device 30 may also be stored. The processor 31, the ROM 32 and the RAM 33 are connected to each other via a bus 34. An input/output (I/O) interface 35 is also connected to bus 34.
Various components in electronic device 30 are connected to I/O interface 35, including: an input unit 36 such as a keyboard, a mouse, etc.; an output unit 37 such as various types of displays, speakers, and the like; a storage unit 38 such as a magnetic disk, an optical disk, or the like; and a communication unit 39 such as a network card, modem, wireless communication transceiver, etc. The communication unit 39 allows the electronic device 30 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 31 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 31 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 31 performs the various methods and processes described above, such as the two-layer intermediate device-based data transfer method:
receiving a data transmission request sent by a two-layer switch connected with the two-layer intermediate device, wherein the data transmission request comprises: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data;
and sending the target data to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address.
In some embodiments, the two-tier intermediary based data transmission method may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as storage unit 38. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 30 via the ROM 32 and/or the communication unit 39. When the computer program is loaded into RAM 33 and executed by processor 31, one or more steps of the two-layer intermediate device-based data transfer method described above may be performed. Alternatively, in other embodiments, the processor 31 may be configured to perform the two-tier intermediary based data transmission method in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (8)

1. A data transmission method based on a two-layer intermediate device, wherein the method is performed by the two-layer intermediate device, and at least one terminal device in different local area networks is hung under a two-layer switch connected with the two-layer intermediate device, the method comprising:
receiving a data transmission request sent by a two-layer switch connected with the two-layer intermediate device, wherein the data transmission request comprises: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data; the target MAC address is the MAC address corresponding to the terminal equipment for data transmission of the terminal equipment hung under the two-layer switch connected with the two-layer intermediate equipment; the identification information of the target two-layer intermediate device is the IP address of the target two-layer intermediate device;
The target data is sent to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment, so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address; the target two-layer switch is a two-layer switch connected with terminal equipment for data transmission, wherein the terminal equipment is hung below the two-layer switch and is connected with two-layer intermediate equipment; the target terminal equipment is terminal equipment for data transmission of terminal equipment hung under a two-layer switch connected with the two-layer intermediate equipment;
determining the type of network environment between the two-layer intermediate device and the target two-layer intermediate device according to the IP address of the target two-layer intermediate device; the network environment types are divided into a two-layer network environment and a three-layer network environment, wherein the two-layer network environment is a B-type network, the private address range of the B-type network is 172.16.0.0-172.131.255.255, the three-layer network environment is a C-type network, and the private address range of the C-type network is 192.168.0.0-192.168.255.255; the sending the target data to the target two-layer intermediate device according to the identification information of the target two-layer intermediate device includes:
If the network environment type between the two-layer intermediate device and the target two-layer intermediate device is a two-layer network environment, directly transmitting the target MAC address, the target local area network identifier and the IP address of the two-layer intermediate device to the target two-layer intermediate device; the target local area network identifier is an identifier of a local area network where the target terminal equipment performs data transmission with the terminal equipment hung under the two-layer switch connected with the two-layer intermediate equipment;
and if the network environment type between the two-layer intermediate equipment and the target two-layer intermediate equipment is a three-layer network environment, packaging the target MAC address, the target local area network identifier and the IP address of the two-layer intermediate equipment to obtain a first target message, and sending the first target message to the target two-layer intermediate equipment according to the IP address of the target two-layer intermediate equipment.
2. The method of claim 1, further comprising, prior to receiving the data transmission request sent by the two-tier switch connected to the two-tier intermediate:
receiving a connection request sent by a two-layer switch connected with the two-layer intermediate device, wherein the connection request comprises: a target MAC address and a target LAN identification; determining the identification information of the target two-layer intermediate equipment according to the target MAC address and the target local area network identification;
And establishing connection with the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment.
3. The method of claim 1, further comprising, prior to receiving the data transmission request sent by the two-tier switch connected to the two-tier intermediate:
receiving a connection request sent by a two-layer switch connected with the two-layer intermediate equipment;
if the connection request carries a target MAC address and a target local area network identifier, determining the identifier information of a target two-layer intermediate device according to the target MAC address carried by the connection request and the target local area network identifier;
and if the connection request does not carry the target local area network identifier, discarding the connection request.
4. The method of claim 1, further comprising, prior to receiving the data transmission request sent by the two-tier switch connected to the two-tier intermediate:
acquiring a first MAC address and a first local area network identifier of at least one terminal device hung under a two-layer switch connected with the two-layer intermediate device;
and transmitting the first MAC address, the first local area network identifier and the identifier information of the two-layer intermediate device to other two-layer intermediate devices connected with the two-layer intermediate device, receiving the second MAC address, the second local area network identifier and the identifier information of the other two-layer intermediate device transmitted by the other two-layer intermediate device, and correspondingly storing the identifier information of the two-layer intermediate device, the first MAC address, the first local area network identifier, the second MAC address, the second local area network identifier and the identifier information of the other two-layer intermediate device into a target database.
5. The method of claim 4, wherein determining the identification information of the target two-layer intermediary device based on the target MAC address and the target local area network identification comprises:
inquiring the target database according to the target local area network identifier and the target MAC address to obtain the identifier information of the target two-layer intermediate device corresponding to the target local area network identifier and the target MAC address.
6. A data transmission device based on a two-layer intermediate device, comprising:
the first receiving module is configured to receive a data transmission request sent by a two-layer switch connected to the two-layer intermediate device, where the data transmission request includes: the method comprises the steps of a target MAC address, identification information of target two-layer intermediate equipment and target data; the target MAC address is the MAC address corresponding to the terminal equipment for data transmission of the terminal equipment hung under the two-layer switch connected with the two-layer intermediate equipment; the identification information of the target two-layer intermediate device is the IP address of the target two-layer intermediate device;
the sending module is used for sending the target data to the target two-layer intermediate equipment according to the identification information of the target two-layer intermediate equipment so that the target two-layer intermediate equipment forwards the target data to target terminal equipment through a target two-layer switch according to the target MAC address; the target two-layer switch is a two-layer switch connected with terminal equipment for data transmission, wherein the terminal equipment is hung below the two-layer switch and is connected with two-layer intermediate equipment; the target terminal equipment is terminal equipment for data transmission of terminal equipment hung under a two-layer switch connected with the two-layer intermediate equipment;
The determining unit is used for determining the network environment type between the two-layer intermediate equipment and the target two-layer intermediate equipment according to the IP address of the target two-layer intermediate equipment; the network environment types are divided into a two-layer network environment and a three-layer network environment, wherein the two-layer network environment is a B-type network, the private address range of the B-type network is 172.16.0.0-172.131.255.255, the three-layer network environment is a C-type network, and the private address range of the C-type network is 192.168.0.0-192.168.255.255;
the transmitting unit includes:
a sending subunit, configured to directly send the target MAC address, the target lan identifier, and the IP address of the two-layer intermediate device to the target two-layer intermediate device if the network environment type between the two-layer intermediate device and the target two-layer intermediate device is a two-layer network environment; the target local area network identifier is an identifier of a local area network where the target terminal equipment performs data transmission with the terminal equipment hung under the two-layer switch connected with the two-layer intermediate equipment;
and the processing subunit is used for packaging the target MAC address, the target local area network identifier and the IP address of the two-layer intermediate device if the network environment type between the two-layer intermediate device and the target two-layer intermediate device is a three-layer network environment, obtaining a first target message, and sending the first target message to the target two-layer intermediate device according to the IP address of the target two-layer intermediate device.
7. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the two-tier intermediary based data transmission method of any one of claims 1-5.
8. A computer readable storage medium storing computer instructions for causing a processor to implement the two-tier intermediary based data transmission method of any one of claims 1-5 when executed.
CN202210796351.2A 2022-07-06 2022-07-06 Data transmission method, device, equipment and medium based on two-layer intermediate equipment Active CN115190087B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210796351.2A CN115190087B (en) 2022-07-06 2022-07-06 Data transmission method, device, equipment and medium based on two-layer intermediate equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210796351.2A CN115190087B (en) 2022-07-06 2022-07-06 Data transmission method, device, equipment and medium based on two-layer intermediate equipment

Publications (2)

Publication Number Publication Date
CN115190087A CN115190087A (en) 2022-10-14
CN115190087B true CN115190087B (en) 2024-03-26

Family

ID=83516760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210796351.2A Active CN115190087B (en) 2022-07-06 2022-07-06 Data transmission method, device, equipment and medium based on two-layer intermediate equipment

Country Status (1)

Country Link
CN (1) CN115190087B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115883256B (en) * 2023-02-03 2023-05-16 南京易科腾信息技术有限公司 Data transmission method, device and storage medium based on encryption tunnel

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763407A (en) * 2014-01-28 2014-04-30 上海斐讯数据通信技术有限公司 Method for achieving address resolution protocol proxy through two-layer virtual local area network and local area network system
CN110896378A (en) * 2019-11-14 2020-03-20 杭州迪普科技股份有限公司 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
JP2022024630A (en) * 2020-07-28 2022-02-09 矢崎総業株式会社 On-vehicle hub and on-vehicle system
CN114124618A (en) * 2021-12-06 2022-03-01 新华三技术有限公司成都分公司 Message transmission method and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103763407A (en) * 2014-01-28 2014-04-30 上海斐讯数据通信技术有限公司 Method for achieving address resolution protocol proxy through two-layer virtual local area network and local area network system
CN110896378A (en) * 2019-11-14 2020-03-20 杭州迪普科技股份有限公司 Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
JP2022024630A (en) * 2020-07-28 2022-02-09 矢崎総業株式会社 On-vehicle hub and on-vehicle system
CN114124618A (en) * 2021-12-06 2022-03-01 新华三技术有限公司成都分公司 Message transmission method and electronic equipment

Also Published As

Publication number Publication date
CN115190087A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
US7961737B2 (en) Ethernet/TMPLS hybrid network operation administration and maintenance frame creation method
CN108768817A (en) A kind of virtualization network constructing system, data packet sending method
CN113595908A (en) Message transmission method and device
CN110999265A (en) Managing network connectivity between cloud computing service endpoints and virtual machines
CN111901387B (en) Connection method and device of cloud special line
CN113746717B (en) Network equipment communication method and network equipment communication device
CN103139075B (en) A kind of message transmitting method and equipment
JP2006262193A (en) Controller, packet transferring method, and packet processor
CN115190087B (en) Data transmission method, device, equipment and medium based on two-layer intermediate equipment
CN111130982B (en) Message forwarding method and device, gateway equipment and readable storage medium
CN114629816B (en) Public network IP network state detection method and system
CN112543142B (en) Method and device for realizing RSTP ring network protocol based on FPGA
CN114650290A (en) Network connection method, processing device, terminal and storage medium
CN116418863B (en) Communication method and device based on socks5 transparent proxy
CN114928581B (en) CAN message forwarding method, device, equipment and storage medium based on AUTOSAR architecture
CN115086251B (en) Stacked data processing method and device, electronic equipment and storage medium
CN112462647B (en) Radio station network control system and method
CN115134194A (en) Method, system, device and program product for implementing network virtualization
CN114938331B (en) Single-physical-port multi-network access method and device under container scene, storage medium and electronic equipment
CN116303171A (en) Data interaction method and device between servers, electronic equipment and medium
WO2023093795A1 (en) Network node, user equipment, and methods therein for communication in edgeapp
CN115189987A (en) Method, system, device and program product for implementing network virtualization
CN116132509A (en) Railway safety computer platform communication method, device, equipment and medium
CN107547395B (en) Message transmission method and device and machine-readable storage medium
CN116896583A (en) Remote control method, device, electronic equipment and storage medium

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