CN105897712A - Packet forwarding method and device based on wireless hotspot - Google Patents

Packet forwarding method and device based on wireless hotspot Download PDF

Info

Publication number
CN105897712A
CN105897712A CN201610221774.6A CN201610221774A CN105897712A CN 105897712 A CN105897712 A CN 105897712A CN 201610221774 A CN201610221774 A CN 201610221774A CN 105897712 A CN105897712 A CN 105897712A
Authority
CN
China
Prior art keywords
message
hotspot
address
mac
access control
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.)
Pending
Application number
CN201610221774.6A
Other languages
Chinese (zh)
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.)
Technology Co Ltd Of Xin Ruiwang Section Of Shenzhen
Original Assignee
Technology Co Ltd Of Xin Ruiwang Section Of Shenzhen
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 Technology Co Ltd Of Xin Ruiwang Section Of Shenzhen filed Critical Technology Co Ltd Of Xin Ruiwang Section Of Shenzhen
Priority to CN201610221774.6A priority Critical patent/CN105897712A/en
Publication of CN105897712A publication Critical patent/CN105897712A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0236Filtering by address, protocol, port number or service, e.g. IP-address or URL

Abstract

The invention discloses a packet forwarding method based on a wireless hotspot. The method comprises steps: when a packet issued to a wireless terminal in a wireless local area network is received, the wireless hotspot acquires a source MAC address of the received packet; when the source MAC address is not matched with a pre-stored gateway MAC address, the wireless hotspot intercepts the received packet; and when the source MAC address is matched with the pre-stored gateway MAC address, the hotspot issues the received packet. The invention also discloses a packet forwarding device based on the wireless hotspot. The packet whose source MAC address is the wireless terminal is ensured not to be issued to the wireless terminal, isolation between wireless terminals is realized; as isolation between the wireless terminals is realized through filtering of the MAC address, VLANs between different wireless hotspots can be set to be the same, the IP address does not need to be changed in the case of roaming, and the roaming error rate is reduced.

Description

Message forwarding method based on hotspot and device
Technical field
The present invention relates to communication technical field, particularly relate to a kind of message forwarding method based on hotspot And device.
Background technology
Along with the development of mobile Internet, wireless network has become as the network access of main flow.More and more Such as supermarket, market, public place, scenic spot, school, hospital, park etc. all provides the covering of wireless network, The user connecting wireless network also gets more and more, and wireless network secure and radio transmission efficiency enjoy the most day by day Pay close attention to, connect between wireless user's (i.e. accessing the wireless terminal of WLAN) of public place the most mutual The necessity accessed mutually, if the mutual access can forbidden between wireless user, is possible to prevent wireless user to reveal hidden It is private and prevent from cheated by ARP (Address Resolution Protocol, address resolution protocol), it is ensured that The network security of wireless user, can also reduce broadcasting packet unnecessary under wireless environment and user simultaneously Between message, improve in WLAN without line use ratio and wireless transmission quality.
The realization of traditional wireless user's isolation, for the user isolation between multiple focuses, can only be differently configured VLAN (Virtual Local Area Network, VLAN) realize.Such as such as Fig. 1 institute Show and need sta1 and sta2 is isolated, AP1 can only be configured wlan1, VLAN10, User IP Address field 192.168.1.X, AP2 configure wlan1, VLAN20, IP address section 192.168.2.X, The program owing to, in wireless terminal is in different VLAN, the IP address field of different VLAN is different, IP address may be caused the most right when roaming, user will be unable to online, i.e. wireless terminal in WLAN Conduct interviews isolation time, be roamed out error rate high.
Summary of the invention
Present invention is primarily targeted at a kind of message forwarding method based on hotspot of proposition and device, Aim to solve the problem that in WLAN wireless terminal conduct interviews isolation time, be roamed out the technical problem that error rate is high.
For achieving the above object, the present invention provides a kind of message forwarding method based on hotspot, described Message forwarding method based on hotspot comprises the following steps:
When receiving the message of the wireless terminal being issued in WLAN, hotspot obtains and connects The source MAC of the described message received;
When described source MAC does not mates with the gateway MAC address prestored, described hotspot blocks The described message that interposition receives;
When described source MAC mates with the gateway MAC address prestored, described hotspot issues The described message received.
Preferably, described hotspot obtain the source MAC of described message received step it Before, described message forwarding method based on hotspot includes:
When receiving the message of the wireless terminal being issued in WLAN, described hotspot obtains Take the type of message of described message;
When the described type of message obtained is not to preset type of message, performs the acquisition of described hotspot and connect The step of the source MAC of the described message received, described default type of message include ARP and/or DHCP;
After the step of the type of message of the described message of described acquisition, described message based on hotspot turns Forwarding method further comprises the steps of:
When the described type of message obtained is for presetting type of message, described hotspot issues and receives Described message.
Preferably, before described hotspot issues the step of the described message received, described based on nothing The step of the message forwarding method of line focus includes:
When the described type of message obtained is for presetting type of message, described hotspot is by DHCP ACK The router field of message is extracted gateway IP;
Described hotspot is preserved by extraction gateway MAC address in ARP message according to described gateway IP.
Preferably, described message forwarding method based on hotspot also includes:
When the message that the wireless terminal received in WLAN is uploaded, described hotspot obtains And record the target MAC (Media Access Control) address of the described message received;
Described hotspot obtains and records number of times in each described target MAC (Media Access Control) address recorded more than presetting The target MAC (Media Access Control) address of threshold value, stores record number of times more than the described target MAC (Media Access Control) address of predetermined threshold value For gateway MAC address.
Preferably, during described hotspot obtains each described target MAC (Media Access Control) address recorded, record number of times is big In the target MAC (Media Access Control) address of predetermined threshold value, the described target MAC (Media Access Control) address obtained is stored as gateway MAC The step of address includes:
Described hotspot obtains and records number of times in each described target MAC (Media Access Control) address recorded more than presetting The target MAC (Media Access Control) address of threshold value;
When the described target MAC (Media Access Control) address obtained is multiple, described hotspot determines the described mesh of acquisition MAC Address in record the most described target MAC (Media Access Control) address of number of times;
Described hotspot is stored as gateway MAC ground by recording the most described target MAC (Media Access Control) address of number of times Location.
Additionally, for achieving the above object, the present invention also proposes a kind of message based on hotspot and forwards dress Putting, described apparatus for forwarding message based on hotspot includes:
Acquisition module, is used for when receiving the message of the wireless terminal being issued in WLAN, Obtain the source MAC of the described message received;
Blocking module, is used for when described source MAC does not mates with the gateway MAC address prestored, Intercept the described message received;
Sending module, is used for when described source MAC mates with the gateway MAC address prestored, under Send out the described message received.
Preferably, described acquisition module, it is additionally operable to receiving be issued in WLAN wireless During the message of terminal, obtain the type of message of described message, and be not pre-at the described type of message obtained If during type of message, obtain the source MAC of the described message received, described default type of message bag Include ARP and/or DHCP;
Described sending module, is additionally operable to, when the described type of message obtained is for presetting type of message, issue The described message received.
Preferably, described apparatus for forwarding message based on hotspot also includes:
Extraction module, for when the described type of message obtained is for presetting type of message, by DHCP ACK The router field of message is extracted gateway IP, and according to described gateway IP by ARP message extracts gateway MAC Address also preserves.
Preferably, described apparatus for forwarding message based on hotspot also includes:
Logging modle, for when the message that the wireless terminal received in WLAN is uploaded, obtains Take and record the target MAC (Media Access Control) address of the described message received;
Described acquisition module, is additionally operable to obtain record number of times in each described target MAC (Media Access Control) address recorded big Target MAC (Media Access Control) address in predetermined threshold value;
Memory module, for being stored as net by record number of times more than the described target MAC (Media Access Control) address of predetermined threshold value Close MAC Address.
Preferably, described memory module includes:
Determine unit, be used for when the described target MAC (Media Access Control) address that described acquisition module obtains is multiple, really The fixed described target MAC (Media Access Control) address obtained records the described target MAC (Media Access Control) address that number of times is most;
Memory element, for being stored as gateway MAC by the described target MAC (Media Access Control) address recording number of times most Address.
The message forwarding method based on hotspot of present invention proposition and device, be issued to nothing receiving During the message of the wireless terminal in line LAN, hotspot obtains the source of the described message received MAC Address, and when described source MAC does not mates with the gateway MAC address prestored, described Hotspot intercepts the described message received, on described source MAC and the gateway MAC ground prestored During the coupling of location, described hotspot issues the described message received, it is ensured that source MAC is wireless end The message of end will not be issued to wireless terminal, to realize the isolation between wireless terminal, simultaneously because wireless The isolation of terminal is realized by the filtration of MAC Address, and the VLAN between different radio focus can be set to phase With, then it is not required to when roaming change IP address, reduces the error rate of roaming.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of present invention message forwarding method based on hotspot first embodiment;
Fig. 2 is the schematic flow sheet of present invention message forwarding method based on hotspot the second embodiment
Fig. 3 is the functional module signal of present invention apparatus for forwarding message based on hotspot first embodiment Figure;
Fig. 4 is the functional module signal of present invention apparatus for forwarding message based on hotspot the 3rd embodiment Figure.
The realization of the object of the invention, functional characteristics and advantage will in conjunction with the embodiments, do referring to the drawings further Explanation.
Detailed description of the invention
Should be appreciated that specific embodiment described herein, only in order to explain the present invention, is not used to limit Determine the present invention.
The present invention provides a kind of message forwarding method based on hotspot.
With reference to the flow process that Fig. 1, Fig. 1 are present invention message forwarding method based on hotspot preferred embodiment Schematic diagram.
The present embodiment proposes a kind of message forwarding method based on hotspot, described based on hotspot Message forwarding method includes:
Step S10, when receiving the message of the wireless terminal being issued in WLAN, wireless heat Point obtains the source MAC of the described message received;
In the present embodiment, can extract to determine reply message by the reply in message is identified, And message will be replied as the message being issued to wireless terminal.Can resolve to obtain to the message received Taking the source MAC comprised in message, source address and destination address in this message all use MAC Address It is identified, type of message can be determined according to the type identification in message before analytic message, and according to really Message is resolved by fixed type of message.
Step S20, when described source MAC does not mates with the gateway MAC address prestored, described Hotspot intercepts the described message received;
Step S30, when described source MAC mates with the gateway MAC address prestored, described nothing Line focus issues the described message received.
The MAC Address of each gateway communicated with, this gateway MAC ground can be stored in hotspot Location manually can be arranged by user, it is possible to is automatically updated by hotspot and stores, and such as hotspot can lead to Cross the modes such as communication frequency determine gateway MAC address and store, it is possible to otherwise as some only with The certain types of message that gateway communicates extracts gateway address.
When the gateway MAC address prestored has multiple, according to number of communications, the gateway address prestored can be entered Row sequence, and according to number of communications order from high to low successively by each gateway MAC address of prestoring with Source MAC is compared, to determine the gateway MAC address mated with source MAC, to carry High comparison efficiency, it is to be appreciated that this number of communications also can be replaced the communication frequency in prefixed time interval Rate, is set as required by user.
Directly carry out forwarding according to destination address when issuing the message received in the present embodiment, block The message that interposition receives can directly abandon.It is understood that can be to this message after packet loss Wireless terminal corresponding to source MAC push information, with point out this hotspot is forbidden wireless Communicate between terminal.
It is understood that whether wireless terminal can be allowed by the LAN of this hotspot of user setup Carry out communication, it is possible to forbid in being arranged on some special time period between the wireless terminal in LAN before Communicate, so that the program is more flexible.
The message forwarding method based on hotspot that the present embodiment proposes, is issued to wireless office receiving During the message of the wireless terminal in the network of territory, hotspot obtains the source MAC ground of the described message received Location, and when described source MAC does not mates with the gateway MAC address prestored, described hotspot Intercept the described message received, when described source MAC mates with the gateway MAC address prestored, Described hotspot issues the described message received, it is ensured that source MAC be the message of wireless terminal not Wireless terminal can be issued to, to realize the isolation between wireless terminal, simultaneously because the isolation of wireless terminal Being realized by the filtration of MAC Address, the VLAN between different radio focus can be set to identical, then entering It is not required to change IP address during row roaming, reduces the error rate of roaming.
Further, with reference to Fig. 2, propose present invention message based on hotspot based on first embodiment and turn Forwarding method the second embodiment, in the present embodiment, before described step S10, described based on hotspot Message forwarding method further comprise the steps of:
Step S40, when receiving the message of the wireless terminal being issued in WLAN, described nothing Line focus obtains the type of message of described message;
When the described type of message obtained is not to preset type of message, perform described step S10, described pre- If type of message includes ARP and/or DHCP;
After step S40, described message forwarding method based on hotspot also includes:
When the described type of message obtained is for presetting type of message, perform described step S30, described wireless Focus issues the described message received.
Due to ARP message and DHCP, (Dynamic Host Configuration Protocol, dynamically leads Machine configuration protocol) message is the message communicated with gateway after wireless terminal accesses hotspot, therefore class Type message can directly regard as the communication message between wireless terminal and webmaster, directly issues to improve efficiency, Identify that type of message can be realized by the type id field in message, the type identification of dissimilar message Field is different, is just identified by source MAC when not being ARP and/or DHCP message.Can To be understood by, this default type of message can be also three-tier message, and three-tier message can be by hotspot In message outlet identify.
Owing to ARP message and DHCP message are the message communicated between wireless terminal with gateway, then may be used The MAC Address of gateway can be extracted, i.e. at the described report obtained by ARP message and DHCP message When literary composition type is for presetting type of message, further comprise the steps of: before step S30
When the described type of message obtained is for presetting type of message, described hotspot is by DHCP ACK The router field of message is extracted gateway IP;
Described hotspot and is preserved by extraction gateway MAC address in ARP message according to described gateway IP.
Dynamic Host Configuration Protocol server comprises in the confirmation message that the DHCP ACK message of wireless terminal feedback feeds back The IP address of gateway, then can be extracted IP address by this DHCP ACK message, and comprise in ARP message IP address and the MAC Address of correspondence, then can the IP ground of IP address in ARP message and extraction During the coupling of location, the MAC Address in ARP message as gateway MAC address and is preserved.
By type of message, scheme disclosed in the present embodiment can determine whether message intercepts, it is to avoid to specific Message carry out resolving to obtain source MAC and be identified, improve the treatment effeciency to message.
Further, propose present invention message based on hotspot based on first or second embodiments to forward Method the 3rd embodiment, in the present embodiment, described message forwarding method based on hotspot also includes Step:
When the message that the wireless terminal received in WLAN is uploaded, described hotspot obtains And record the target MAC (Media Access Control) address of the described message received;
Described hotspot obtains and records number of times in each described target MAC (Media Access Control) address recorded more than presetting The target MAC (Media Access Control) address of threshold value, stores record number of times more than the described target MAC (Media Access Control) address of predetermined threshold value For gateway MAC address.
In the present embodiment, the message great majority that wireless terminal is uploaded are to send to gateway, then can pass through Target MAC (Media Access Control) address in the message that extraction wireless terminal is uploaded is to obtain gateway MAC address, due to nothing May communicate between line terminal, the most recordable target MAC (Media Access Control) address also updates each purpose MAC ground The number of communications of location, to determine that the more target MAC (Media Access Control) address of number of communications is as gateway MAC address. It is understood that also can extract the source MAC being issued in message, and acquisition records each source MAC Address, deposits recording number of times in each source MAC more than the source MAC of predetermined threshold value Storage is gateway address.
For saving the memory capacity of hotspot, the MAC Address of record can be protected within a preset time interval Hold constant and record number of times to delete less than the MAC Address of predetermined threshold value.
Owing to record number of times may have multiple more than the target MAC (Media Access Control) address of predetermined threshold value, then can be by record Number is more than the target MAC (Media Access Control) address of predetermined threshold value all as gateway MAC address, it is possible to will record number of times big The maximum MAC Address of number of times is recorded as gateway MAC ground in the target MAC (Media Access Control) address of predetermined threshold value Record number of times " is stored as gateway MAC more than the described target MAC (Media Access Control) address of predetermined threshold value by location, i.e. step Address " including:
Described hotspot obtains and records number of times in each described target MAC (Media Access Control) address recorded more than presetting The target MAC (Media Access Control) address of threshold value;
When the described target MAC (Media Access Control) address obtained is multiple, described hotspot determines the described mesh of acquisition MAC Address in record the most described target MAC (Media Access Control) address of number of times;
Described hotspot is stored as gateway MAC ground by recording the most described target MAC (Media Access Control) address of number of times Location.
The present invention further provides a kind of apparatus for forwarding message based on hotspot.
With reference to the function that Fig. 3, Fig. 3 are present invention apparatus for forwarding message based on hotspot preferred embodiment Module diagram.
It is emphasized that it will be apparent to those skilled in the art that functional block diagram shown in Fig. 3 is only The exemplary plot of one preferred embodiment, those skilled in the art around shown in Fig. 3 based on hotspot The functional module of apparatus for forwarding message, supplementing of new functional module can be carried out easily;Each functional module Title be self-defined title, be only used for auxiliary understand apparatus for forwarding message based on hotspot each Program function block, is not used in restriction technical scheme, and the core of technical solution of the present invention is, respectively The function that the functional module of self-defined title is to be reached.
The present embodiment proposes a kind of apparatus for forwarding message based on hotspot, described based on hotspot Apparatus for forwarding message includes:
Acquisition module 10, is used for when receiving the message of the wireless terminal being issued in WLAN, Obtain the source MAC of the described message received;
In the present embodiment, can extract to determine reply message by the reply in message is identified, And message will be replied as the message being issued to wireless terminal.Can resolve to obtain to the message received Taking the source MAC comprised in message, source address and destination address in this message all use MAC Address It is identified, type of message can be determined according to the type identification in message before analytic message, and according to really Message is resolved by fixed type of message.
Blocking module 20, is used for when described source MAC does not mates with the gateway MAC address prestored, Intercept the described message received;
Sending module 30, is used for when described source MAC mates with the gateway MAC address prestored, Issue the described message received.
The MAC Address of each gateway communicated with, this gateway MAC ground can be stored in hotspot Location manually can be arranged by user, it is possible to is automatically updated by hotspot and stores, and such as hotspot can lead to Cross the modes such as communication frequency determine gateway MAC address and store, it is possible to otherwise as some only with The certain types of message that gateway communicates extracts gateway address.
When the gateway MAC address prestored has multiple, according to number of communications, the gateway address prestored can be entered Row sequence, and according to number of communications order from high to low successively by each gateway MAC address of prestoring with Source MAC is compared, to determine the gateway MAC address mated with source MAC, to carry High comparison efficiency, it is to be appreciated that this number of communications also can be replaced the communication frequency in prefixed time interval Rate, is set as required by user.
Directly carry out forwarding according to destination address when issuing the message received in the present embodiment, block The message that interposition receives can directly abandon.It is understood that can be to this message after packet loss Wireless terminal corresponding to source MAC push information, with point out this hotspot is forbidden wireless Communicate between terminal.
It is understood that whether wireless terminal can be allowed by the LAN of this hotspot of user setup Carry out communication, it is possible to forbid in being arranged on some special time period between the wireless terminal in LAN before Communicate, so that the program is more flexible.
The apparatus for forwarding message based on hotspot that the present embodiment proposes, is issued to wireless office receiving During the message of the wireless terminal in the network of territory, hotspot obtains the source MAC ground of the described message received Location, and when described source MAC does not mates with the gateway MAC address prestored, described hotspot Intercept the described message received, when described source MAC mates with the gateway MAC address prestored, Described hotspot issues the described message received, it is ensured that source MAC be the message of wireless terminal not Wireless terminal can be issued to, to realize the isolation between wireless terminal, simultaneously because the isolation of wireless terminal Being realized by the filtration of MAC Address, the VLAN between different radio focus can be set to identical, then entering It is not required to change IP address during row roaming, reduces the error rate of roaming.
Further, based on first embodiment, present invention message forwarding method based on hotspot the is proposed Two embodiments, in the present embodiment,
Described acquisition module 10, is additionally operable to receiving the wireless terminal that is issued in WLAN During message, obtain the type of message of described message, and be not to preset message at the described type of message obtained During type, obtaining the source MAC of the described message received, described default type of message includes ARP And/or DHCP;
Described sending module 30, is additionally operable to when the described type of message obtained is for presetting type of message, under Send out the described message received.
Due to ARP message and DHCP, (Dynamic Host Configuration Protocol, dynamically leads Machine configuration protocol) message is the message communicated with gateway after wireless terminal accesses hotspot, therefore class Type message can directly regard as the communication message between wireless terminal and webmaster, directly issues to improve efficiency, Identify that type of message can be realized by the type id field in message, the type identification of dissimilar message Field is different, is just identified by source MAC when not being ARP and/or DHCP message.Can To be understood by, this default type of message can be also three-tier message, and three-tier message can be by hotspot In message outlet identify.
Owing to ARP message and DHCP message are the message communicated between wireless terminal with gateway, then may be used The MAC Address of gateway can be extracted, i.e. at the described report obtained by ARP message and DHCP message When literary composition type is for presetting type of message, described apparatus for forwarding message based on hotspot also includes:
Extraction module, for when the described type of message obtained is for presetting type of message, by DHCP ACK The router field of message is extracted gateway IP, and according to described gateway IP by ARP message extracts gateway MAC Address also preserves.
Dynamic Host Configuration Protocol server comprises in the confirmation message that the DHCP ACK message of wireless terminal feedback feeds back The IP address of gateway, then can be extracted IP address by this DHCP ACK message, and comprise in ARP message IP address and the MAC Address of correspondence, then can the IP ground of IP address in ARP message and extraction During the coupling of location, using the MAC Address in ARP message as gateway MAC address.
By type of message, scheme disclosed in the present embodiment can determine whether message intercepts, it is to avoid to specific Message carry out resolving to obtain source MAC and be identified, improve the treatment effeciency to message.
Further, with reference to Fig. 4, based on first or second embodiments, the present invention is proposed based on hotspot Apparatus for forwarding message the 3rd embodiment, in the present embodiment, described message based on hotspot forwards dress Put and also include:
Logging modle 40, is used for when the message that the wireless terminal received in WLAN is uploaded, Obtain and record the target MAC (Media Access Control) address of the described message received;
Described acquisition module 10, is additionally operable to obtain record in each described target MAC (Media Access Control) address recorded Number is more than the target MAC (Media Access Control) address of predetermined threshold value;
Memory module 50, for storing record number of times more than the described target MAC (Media Access Control) address of predetermined threshold value For gateway MAC address.
In the present embodiment, the message great majority that wireless terminal is uploaded are to send to gateway, then can pass through Target MAC (Media Access Control) address in the message that extraction wireless terminal is uploaded is to obtain gateway MAC address, due to nothing May communicate between line terminal, the most recordable target MAC (Media Access Control) address also updates each purpose MAC ground The number of communications of location, to determine that the more target MAC (Media Access Control) address of number of communications is as gateway MAC address. It is understood that also can extract the source MAC being issued in message, and acquisition records each source MAC Address, deposits recording number of times in each source MAC more than the source MAC of predetermined threshold value Storage is gateway address.
For saving the memory capacity of hotspot, the MAC Address of record can be protected within a preset time interval Hold constant and record number of times to delete less than the MAC Address of predetermined threshold value.
Owing to record number of times may have multiple more than the target MAC (Media Access Control) address of predetermined threshold value, then can be by record Number is more than the target MAC (Media Access Control) address of predetermined threshold value all as gateway MAC address, it is possible to will record number of times big The maximum MAC Address of number of times is recorded as gateway MAC ground in the target MAC (Media Access Control) address of predetermined threshold value Location, described memory module 50 includes:
Determine unit, for when the described target MAC (Media Access Control) address obtained is multiple, determining the described of acquisition Target MAC (Media Access Control) address records the described target MAC (Media Access Control) address that number of times is most;
Memory element, for being stored as gateway MAC by the described target MAC (Media Access Control) address recording number of times most Address.
It should be noted that in this article, term " include ", " comprising " or its any other variant Be intended to contain comprising of this nonexcludability so that include the process of a series of key element, method, article or Person's device not only includes those key elements, but also includes other key elements being not expressly set out, or also Including the key element intrinsic for this process, method, article or device.In the feelings not having more restriction Under condition, statement " including ... " key element limited, it is not excluded that include this key element process, Method, article or device there is also other identical element.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive above-mentioned Embodiment method can add the mode of required general hardware platform by software and realize, naturally it is also possible to logical Cross hardware, but a lot of in the case of the former is more preferably embodiment.Based on such understanding, the present invention's The part that prior art is contributed by technical scheme the most in other words can be with the form body of software product Revealing to come, this computer software product is stored in a storage medium (such as ROM/RAM, magnetic disc, light Dish) in, including some instructions with so that a station terminal equipment (can be mobile phone, computer, high in the clouds Server, air-conditioner, or the network equipment etc.) perform the method described in each embodiment of the present invention.
These are only the preferred embodiments of the present invention, not thereby limit the scope of the claims of the present invention, every Utilize equivalent structure or equivalence flow process conversion that description of the invention and accompanying drawing content made, or directly or Connect and be used in other relevant technical fields, be the most in like manner included in the scope of patent protection of the present invention.

Claims (10)

1. a message forwarding method based on hotspot, it is characterised in that described message forwarding method based on hotspot comprises the following steps:
When receiving the message of the wireless terminal being issued in WLAN, hotspot obtains the source MAC of the described message received;
When described source MAC does not mates with the gateway MAC address prestored, described hotspot intercepts the described message received;
When described source MAC mates with the gateway MAC address prestored, described hotspot issues the described message received.
2. message forwarding method based on hotspot as claimed in claim 1, it is characterised in that before the step of the source MAC that described hotspot obtains the described message received, described message forwarding method based on hotspot includes:
When receiving the message of the wireless terminal being issued in WLAN, described hotspot obtains the type of message of described message;
When the described type of message obtained is not to preset type of message, performing the step that described hotspot obtains the source MAC of the described message received, described default type of message includes ARP and/or DHCP;
After the step of the type of message of the described message of described acquisition, described message forwarding method based on hotspot further comprises the steps of:
When the described type of message obtained is for presetting type of message, described hotspot issues the described message received.
3. message forwarding method based on hotspot as claimed in claim 2, it is characterised in that before described hotspot issues the step of the described message received, the step of described message forwarding method based on hotspot includes:
When the described type of message obtained is for presetting type of message, described hotspot is by extracting gateway IP in the router field of DHCP ACK message;
Described hotspot and is preserved by extraction gateway MAC address in ARP message according to described gateway IP.
4. message forwarding method based on hotspot as claimed in claim 1 or 2, it is characterised in that described message forwarding method based on hotspot also includes:
When the message that the wireless terminal received in WLAN is uploaded, described hotspot obtains and records the target MAC (Media Access Control) address of the described message received;
Described hotspot obtains and records the number of times target MAC (Media Access Control) address more than predetermined threshold value in each described target MAC (Media Access Control) address recorded, and more than the described target MAC (Media Access Control) address of predetermined threshold value, record number of times is stored as gateway MAC address.
5. message forwarding method based on hotspot as claimed in claim 4, it is characterized in that, described hotspot obtains and records the number of times target MAC (Media Access Control) address more than predetermined threshold value in each described target MAC (Media Access Control) address recorded, and the step that the described target MAC (Media Access Control) address obtained is stored as gateway MAC address is included:
Described hotspot obtains and records the number of times target MAC (Media Access Control) address more than predetermined threshold value in each described target MAC (Media Access Control) address recorded;
When the described target MAC (Media Access Control) address obtained is multiple, described hotspot determines and records the described target MAC (Media Access Control) address that number of times is most in the described target MAC (Media Access Control) address of acquisition;
The described target MAC (Media Access Control) address recording number of times most is stored as gateway MAC address by described hotspot.
6. an apparatus for forwarding message based on hotspot, it is characterised in that described apparatus for forwarding message based on hotspot includes:
Acquisition module, for when receiving the message of the wireless terminal being issued in WLAN, obtains the source MAC of the described message received;
Blocking module, for when described source MAC does not mates with the gateway MAC address prestored, intercepts the described message received;
Sending module, for when described source MAC mates with the gateway MAC address prestored, issues the described message received.
7. apparatus for forwarding message based on hotspot as claimed in claim 6, it is characterised in that
Described acquisition module, it is additionally operable to when receiving the message of the wireless terminal being issued in WLAN, obtain the type of message of described message, and when the described type of message obtained is not to preset type of message, obtaining the source MAC of the described message received, described default type of message includes ARP and/or DHCP;
Described sending module, is additionally operable to, when the described type of message obtained is for presetting type of message, issue the described message received.
8. apparatus for forwarding message based on hotspot as claimed in claim 7, it is characterised in that described apparatus for forwarding message based on hotspot also includes:
Extraction module, for when the described type of message obtained is for presetting type of message, by extracting gateway IP in the router field of DHCPACK message, and according to described gateway IP by extracting gateway MAC address in ARP message and preserving.
Apparatus for forwarding message based on hotspot the most as claimed in claims 6 or 7, it is characterised in that described apparatus for forwarding message based on hotspot also includes:
Logging modle, for when the message that the wireless terminal received in WLAN is uploaded, obtains and records the target MAC (Media Access Control) address of the described message received;
Described acquisition module, is additionally operable to obtain record number of times in each described target MAC (Media Access Control) address recorded and is more than the target MAC (Media Access Control) address of predetermined threshold value;
Memory module, for being stored as gateway MAC address by record number of times more than the described target MAC (Media Access Control) address of predetermined threshold value.
10. apparatus for forwarding message based on hotspot as claimed in claim 9, it is characterised in that described memory module includes:
Determine unit, for when the described target MAC (Media Access Control) address that described acquisition module obtains is multiple, determines and the described target MAC (Media Access Control) address of acquisition records the described target MAC (Media Access Control) address that number of times is most;
Memory element, for being stored as gateway MAC address by the described target MAC (Media Access Control) address recording number of times most.
CN201610221774.6A 2016-04-11 2016-04-11 Packet forwarding method and device based on wireless hotspot Pending CN105897712A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610221774.6A CN105897712A (en) 2016-04-11 2016-04-11 Packet forwarding method and device based on wireless hotspot

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610221774.6A CN105897712A (en) 2016-04-11 2016-04-11 Packet forwarding method and device based on wireless hotspot

Publications (1)

Publication Number Publication Date
CN105897712A true CN105897712A (en) 2016-08-24

Family

ID=57012349

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610221774.6A Pending CN105897712A (en) 2016-04-11 2016-04-11 Packet forwarding method and device based on wireless hotspot

Country Status (1)

Country Link
CN (1) CN105897712A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366169A (en) * 2018-09-13 2019-10-22 新华三技术有限公司 Loaming method and device
CN113612697A (en) * 2021-08-19 2021-11-05 迈普通信技术股份有限公司 Message forwarding control method and device, network equipment and wireless network system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1414742A (en) * 2002-12-03 2003-04-30 北京朗通环球科技有限公司 Method of isolating user in radio local network
WO2008130785A1 (en) * 2007-04-23 2008-10-30 At & T Mobility Ii Llc Dual mode device with mac address capture and pairing
CN101827366A (en) * 2010-03-24 2010-09-08 北京星网锐捷网络技术有限公司 Method, unit and device for isolating wireless network user

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1414742A (en) * 2002-12-03 2003-04-30 北京朗通环球科技有限公司 Method of isolating user in radio local network
WO2008130785A1 (en) * 2007-04-23 2008-10-30 At & T Mobility Ii Llc Dual mode device with mac address capture and pairing
CN101827366A (en) * 2010-03-24 2010-09-08 北京星网锐捷网络技术有限公司 Method, unit and device for isolating wireless network user

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CHEN LIQUAN: "MAC isolation to realize effective management", 《JOURNAL OF SOUTHEAST UNIVERSI TY (ENGLISH EDITION)》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110366169A (en) * 2018-09-13 2019-10-22 新华三技术有限公司 Loaming method and device
CN110366169B (en) * 2018-09-13 2021-02-26 新华三技术有限公司 Roaming method and device
US11665266B2 (en) 2018-09-13 2023-05-30 New H3C Technologies Co., Ltd. Roaming by binding a host with a device identifier
CN113612697A (en) * 2021-08-19 2021-11-05 迈普通信技术股份有限公司 Message forwarding control method and device, network equipment and wireless network system

Similar Documents

Publication Publication Date Title
CN104521287B (en) Method for switching network, device, equipment and system
CN1689369B (en) Method and system for establishing a connection via an access network
CN100474839C (en) Network service selection and authentication in IPv6 access network, and automatic configuration without status
KR100764010B1 (en) A method and apparatuses for selecting connection settings by using historydata
CN101668325B (en) Admission control method, admission control device and admission control system
JP6919018B2 (en) Server device
EP2466801A1 (en) Communication method, method for forwarding data message during the communication process and communication node thereof
US20060212700A1 (en) Method for processing network selection information for a user terminal in a wireless local area network
CN103313344B (en) The core net and its cut-in method of fusion
CN102388639B (en) Method and device for accessing mobile network and user device
CN103458370B (en) Receive transmission method, the apparatus and system of mobile network's multicast packet
CN102217243A (en) Remote access to local network
CN102217244A (en) Remote access to local network via security gateway
CN107710798A (en) Terminal installation, the device for possessing ProSe functions, terminal installation communication means and possess ProSe functions device communication means
CN107205259A (en) The scan method and WAP of a kind of WLAN
CN103095654B (en) Virtual local area network (VLAN) configuration method, wireless access point and network control point
WO2012024204A2 (en) A system and method for maintaining a communication session
CN106302839A (en) The distribution method of internet protocol address and device
CN104540185A (en) Network access method, access gateway and access control device
CN105142189B (en) The roam control method and device of website
CN101990274A (en) Method and system for realizing accessing through wireless local area network access network
EP2858395A1 (en) Method, apparatus, and system for accessing mobile network
CN102273279A (en) network selection method, device and system
CN107736043A (en) Terminal installation, the device for possessing ProSe functions, terminal installation communication means and possess ProSe functions device communication means
CN107257561A (en) The collocation method and device of a kind of trunking traffic

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20160824

RJ01 Rejection of invention patent application after publication