Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides a data transmission interaction method and a data transmission interaction system for a port network, and solves the problems that the NAT conversion capability of outlet equipment is insufficient and data transmission interaction is influenced due to the fact that the number of WiFi equipment is continuously increased at the present stage.
The purpose of the invention is realized by the following technical scheme: a data transmission interaction method of a port network comprises the following steps:
the main AP judges the received data to determine the data transmission interaction direction;
and processing the data according to the data transmission interaction direction and then performing data transmission interaction.
The main AP judges the received data to determine the data transmission interaction direction, and the method comprises the following steps:
the master AP judges whether the received data carries a second label;
if so, the received data is auxiliary AP data, and the data transmission interaction direction is data transmission interaction from the auxiliary AP or the terminal equipment to the outlet equipment;
if not, the received data is the data of the exit device, and the data transmission interaction direction is the data transmission interaction from the exit device to the secondary AP or the terminal device.
The data transmission interaction method also comprises the steps of carrying out VLAN division setting on the main AP and the auxiliary AP before carrying out data transmission interaction;
the VLAN division setting of the main AP comprises the step that a virtual port is divided on the main AP and used for forwarding the received outlet equipment data to the auxiliary AP;
the setting of VLAN division for the secondary AP comprises dividing a VLAN ID with a second tag for bringing the second tag to data sent from the secondary AP and receiving only the data with the second tag.
Before the secondary AP sends data to the primary AP, a tag adding step needs to be performed in the secondary AP, which includes the following steps:
adding a first label into the original data when the original data enters the auxiliary AP through a corresponding uplink port in the software Br-lan of the auxiliary AP;
adding a second tag when the data is driven by the auxiliary AP;
the first tag is removed when the data passes through the switch, and the data only carries the second tag.
And the data transmission after the data processing according to the data transmission direction comprises a data processing transmission step when the data received by the main AP is the auxiliary AP data and a data processing transmission step when the data received by the main AP is the outlet equipment data.
The data processing and transmitting steps when the data received by the main AP is the auxiliary AP data are as follows:
the auxiliary AP sends the data with the second label to the main AP through a corresponding uplink port in the software Br-lan of the main AP, and adds a first label;
removing a first label in the data when the data is driven by the main AP, and transferring the data to a virtual port in the Br-lan
After NAT conversion is carried out on the virtual port of the main AP, data are transferred to the uplink port of the main AP, and the second label is modified into the first label;
the master AP hardware switch removes the first tag and sends the untagged data to the egress device and then to the external network.
The data processing and transmitting steps when the data received by the main AP is the data of the outlet device are as follows:
the exit device sends the data without the label to the main AP through the corresponding upper connection port in the software Br-lan of the main AP and adds a first label;
the main AP uplink port carries out NAT conversion and modifies the first label into a second label;
and the data is driven by the main AP to add a first tag, and after the first tag is removed by the hardware switch of the main AP, the data is sent to the corresponding auxiliary AP or the terminal equipment through the virtual port of the main AP.
A data transmission interactive system of a data transmission interactive method based on a port network comprises an exit device used for interacting data of internal and external networks, a switch connected with the exit device, and a main AP and at least one auxiliary AP connected with the switch.
The software of the main AP and the auxiliary AP corresponds to an uplink port and a front panel port; the main AP is also divided into a virtual port through a VLAN.
And the uplink port of the secondary AP is divided into a VALN ID with a second label through a VLAN.
The invention has the beneficial effects that: a data transmission interaction method and system of a port network, through the way of combining main AP and every pair of AP, thus isolate every pair of AP from exit device, make every pair of data on AP send to exit device through a port of the main AP in a set; the exit device only has one main AP for data interaction with the intranet device, and only one NAT conversion is needed between the intranet device and the main AP, so that not only is the NAT conversion burden of the exit device reduced, but also more WiFi devices of secondary APs can be mounted without worrying about the NAT conversion burden of the exit device.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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 some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present invention, presented in the figures, is not intended to limit the scope of the invention, as claimed, but is merely representative of selected embodiments of the invention. 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.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
In the description of the present invention, it should be noted that the terms "upper", "inner", "outer", etc. indicate orientations or positional relationships based on those shown in the drawings or orientations or positional relationships that the products of the present invention conventionally use, which are merely for convenience of description and simplification of description, but do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed in a specific orientation, and be operated, and thus, should not be construed as limiting the present invention.
In the description of the present invention, it should also be noted that, unless otherwise explicitly specified or limited, the terms "disposed," "mounted," and "connected" are to be construed broadly, e.g., as meaning fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
The technical solutions of the present invention are further described in detail below with reference to the accompanying drawings, but the scope of the present invention is not limited to the following.
As shown in fig. 1, a data transmission interaction method of a port network includes the following steps:
the main AP judges the received data to determine the data transmission interaction direction;
and processing the data according to the data transmission interaction direction and then performing data transmission interaction.
Further, since the data of the outlet device does not have the tag, and the slave AP has the tag, the master AP determines the transmission direction of the received data mainly by determining whether the received data has the tag.
Furthermore, what the first label and the second label are can be set by oneself, and only the first label and the second label need not be the same label.
Preferably, the first tag is a tag6 tag and the second tag is a tag9 tag.
The main AP judges the received data to determine the data transmission interaction direction, and the method comprises the following steps:
the master AP judges whether the received data carries tag 9;
if the tag9 is attached, the received data is the sub-AP data, which indicates that the data is the sub-AP data forwarded by the switch, and the data transmission interaction direction is the data transmission interaction from the sub-AP or the terminal device to the egress device;
if the tag9 is not attached, the received data is egress device data, which indicates that the data is egress device data forwarded by the switch, and the data transmission interaction direction is data transmission interaction from the egress device to the secondary AP or the terminal device.
The data transmission interaction method also comprises the steps of carrying out VLAN division setting on the main AP and the auxiliary AP before carrying out data transmission interaction;
the VLAN division setting of the main AP comprises the step that a virtual port is divided on the main AP and used for forwarding the received outlet equipment data to the auxiliary AP;
further, the virtual port is used for forwarding the data of the outlet device after data processing to the auxiliary AP, and for receiving the data of the auxiliary AP to the main AP for data processing;
the main AP also comprises an uplink port which is used for receiving the data of the outlet equipment to the main AP for data processing, and is used for transmitting the auxiliary AP data which is processed by the main AP data to the outlet equipment through the uplink port and then sending the auxiliary AP data to an external network.
The VLAN splitting setup for the secondary AP includes splitting a tag9 tagged VLAN ID for tagging data sent from the secondary AP with a tag9 tag and receiving only tagged data with a tag 9.
Further, the secondary AP also includes an uplink port, which is VLAN-divided with a VLAN ID tagged with tag9, and the secondary AP data is sent out through the uplink port and then forwarded through the switch to the virtual port of the primary AP.
Before the secondary AP sends data to the primary AP, a tag adding step needs to be carried out in the secondary AP, and the content is as follows:
adding tag6 label into the original data when the original data enters the auxiliary AP through the corresponding uplink port in the software Br-lan of the auxiliary AP;
adding tag9 label when data is driven by the auxiliary AP;
when the data passes through the switch, the tag6 is removed, and the data only carries the tag9 tag.
And the data transmission after the data processing according to the data transmission direction comprises a data processing transmission step when the data received by the main AP is the auxiliary AP data and a data processing transmission step when the data received by the main AP is the outlet equipment data.
Embodiment 1, a primary AP forwards secondary AP data to an egress device.
The data processing and transmitting steps when the data received by the main AP is the auxiliary AP data are as follows:
the auxiliary AP sends the data with the second label to the main AP through a corresponding uplink port in the software Br-lan of the main AP, and adds a first label;
removing a first label in the data when the data is driven by the main AP, and transferring the data to a virtual port in the Br-lan
After NAT conversion is carried out on the virtual port of the main AP, data are transferred to the uplink port of the main AP, and the second label is modified into the first label;
the master AP hardware switch removes the first tag and sends the untagged data to the egress device and then to the external network.
Furthermore, the destination IP address in the received data needs to be checked at the same time; if the destination IP address is not the current network segment, judging that the destination end of the data is an external network;
as shown in fig. 2, since the data transmitted from the secondary AP is tagged with a tag9, when the upstream port of the primary AP receives the tagged data, the data frame is allowed to directly enter without being discarded. The master AP adds a Tag6 when receiving the data frame, which contains two tags (Tag6 and Tag 9). When the driver receives the data frame, the first tag label (tag6) is stripped and handed over to Eth1.9 (virtual secondary AP port) in the Br-lan. Eth1.9 carries out route conversion, delivers a data frame to Eth1.6, modifies tag9 into tag6, then Eth1.6 delivers the data frame to a driver, the driver directly delivers the data to a switch, and the hardware switch firstly strips the tag6 of the data before forwarding the data. Leaving the data frame without a tag label. So that the egress device can receive the data.
Embodiment 2, the primary AP forwards the egress device to the secondary AP.
The data processing and transmitting steps when the data received by the main AP is the data of the outlet device are as follows:
the exit device sends the data without the label to the main AP through the corresponding upper connection port in the software Br-lan of the main AP and adds a first label;
the main AP uplink port carries out NAT conversion and modifies the first label into a second label;
and the data is driven by the main AP to add a first tag, and after the first tag is removed by the hardware switch of the main AP, the data is sent to the corresponding auxiliary AP or the terminal equipment through the virtual port of the main AP.
As shown in FIG. 3, since the egress device is non-tag, the master AP hardware switch adds a tag6 directly to the data frame and enters the drive. The driver found only one tag, which was handed directly to eth1.6 in br-lan. eth1.6 NAT-translated tag6 to tag9 and handed over to eth1.9 in br-lan. A tag6 is added when the driver is passed through, and a tag6 is stripped when the hardware switch is passed through. Thus, the egress device data is forwarded to the secondary AP, optionally with a tag 9.
As shown in fig. 4, the data transmission interaction method further includes the secondary AP forwarding data in the wireless network to the primary AP.
Data in the wireless network arrives at the wireless port in the br-lan. The wireless port forwards the received data frame to the eth1.6 port. The data frame is added with a tag6 after passing through the eth1.6 port and a tag9 when passing through the drive layer. This data frame now contains two tag tags at the secondary AP. But a tag6 is stripped by the hardware switch when the data frame finally passes through the secondary AP's uplink port. So that the primary AP hardware switch will still have a tag when it receives the data (this tag will be used to identify the source of the data-from the secondary AP with the tag and to the egress device without the tag).
As shown in fig. 5, the data transmission interaction method further includes the secondary AP forwarding the data of the AP front panel to the primary AP.
When receiving the data of the front panel, the auxiliary AP adds a tag7 and delivers the data to br-lan through the drive, the br-lan forwards the data to eth1.6 and modifies the tag7 into the tag6, a tag9 is added in the drive, and a tag6 is removed from the switch to realize that the data sent by the auxiliary AP is provided with a tag 9.
As shown in fig. 6, the data transmission interaction method further includes the secondary AP forwarding the primary AP data to the wireless end and the front panel end.
The data frame contains a tag9 when the primary AP transmits data to the secondary AP. The secondary AP will add a tag6 in the switch. The data frame is judged to have two tags when the data frame is driven. At this point the tag9 of the data is stripped. The data was then handed to eth1.6 in br-lan. If the destination of the data is front panel port, eth1.6 will convert tag6 into tag7, and give it to eth1.7, and only one tag will be found when driven, and the driver will not do any processing, and remove tag7 when switch is passed. The data frame is forwarded to the front panel. If the data destination is wireless, the data frame is forwarded to the wireless end.
As shown in fig. 7, the data transmission interaction method further includes the main AP forwarding the front panel end and the wireless end data to the egress device.
The master AP takes the data directly from the hardware and adds tag7, hands over to eth1.6 in br-lan, and modifies tag7 to tag 6. Eth1.6 passes the data frame to the driver directly, and the driver passes to the switch again, removing tag6 in the switch. Thereby sending the data to the egress device. If the data is received from the radio, the data is added to the br-lan with a tag6 and handed to the driver. The driver finds only one tag and will hand the data directly to switch. Switch strips off a tag. And realizing that data sent to the outlet equipment has no tag.
A data transmission interactive system of a data transmission interactive method based on a port network comprises an exit device used for interacting data of internal and external networks, a switch connected with the exit device, and a main AP and at least one auxiliary AP connected with the switch.
Further, the exit device only sends and receives data without tag labels, and the exit device comprises all communication devices such as a light cat which can interact with data of the internal network and the external network.
Further, the switch is used to forward the egress device data or the secondary AP data to the primary AP.
The software of the main AP and the secondary AP corresponds to an uplink port (Eth1.6) and a front panel port (Eth1.7); the main AP is also divided into a virtual port (Eth1.9) through a VLAN.
And the uplink port of the secondary AP is divided into a VALN ID with a second label through a VLAN.
Further, the upstream port of the secondary AP will only receive data tagged with the same tag9, and will simply discard if additional data is received.
Further, the secondary AP needs to process the data before forwarding the data to the primary AP through the switch, and the specific content is as follows: when the primary data of the secondary AP passes through the Br-lan of the secondary AP, software adds a tag6 tag in the primary data, and when the data is driven by the secondary AP, a tag9 tag is added, so that the secondary AP has two tag tags before passing through a hardware switch, and a tag (tag9 tag) also exists after passing through the hardware switch. This tag is used to identify the data as being that of the secondary AP.
The main AP receives data with tag9 and then adds a tag6, when the data is driven by the main AP, the tag9 in the auxiliary AP data is removed and handed to Eth1.6 of a corresponding upper connection port in Br-lan, finally a tag6 is removed and NAT conversion is carried out to send out the data, and at the moment, the data without tag can be directly received by the outlet device.
The above description is only an embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes performed by the present specification and drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.