Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of control method of guest network, control device and router, for solving the problem to visitor's open network inconvenience in prior art.
For achieving the above object and other relevant objects, the invention provides a kind of control method of guest network, the control method of described guest network comprises the following steps: the guest network interface opened on router also starts timing; Described guest network interface sends service set to set up the connection of visitor's terminal and network terminal; Judge whether timing time reaches Preset Time; If timing time reaches Preset Time, control described guest network interface and stop sending service set.
In one embodiment of the invention, by guest network interface described in the visitor's switch open on router.
In one embodiment of the invention, open described guest network interface by the software switch on router.
In one embodiment of the invention, the control method of described guest network also comprises: after unlatching guest network interface, send the notice of guest network interface unlatching to kernel; The flow of network inner protocol stack to guest network interface is monitored, and abandons described guest network interface to the data traffic between primary wireless network interface and Ethernet interface.
In one embodiment of the invention, sent the notice of guest network interface unlatching to kernel by NETLINK; Described network inner protocol stack is monitored at the flow of data link layer to guest network interface.
The invention provides a kind of control device of guest network, the control device of described guest network comprises: opening module, for opening the guest network interface on router; Time block, for carrying out timing after opening the guest network interface on router; Guest network interface module, for sending service set to set up the connection of visitor's terminal and network terminal; Judge module, for judging whether timing time reaches Preset Time; Control module, for when timing time reaches Preset Time, controls described guest network interface and stops sending service set.
In one embodiment of the invention, described opening module comprises visitor's switch, by guest network interface described in described visitor's switch open.
In one embodiment of the invention, described opening module is realized by software switch, opens described guest network interface by described software switch.
In one embodiment of the invention, the control device of described guest network also comprises: notification module, for after unlatching guest network interface, sends the notice of guest network interface unlatching to kernel; Network inner protocol stack module, for monitoring the flow of guest network interface, and abandons described guest network interface to the data traffic between primary wireless network interface and Ethernet interface.
The present invention also provides a kind of router, and described router comprises: the control device of the guest network as described in aforementioned any one.
As mentioned above, the control method of guest network of the present invention, control device and router, have following beneficial effect:
Control method timing simultaneously when opening the guest network interface on router of guest network of the present invention, when arriving Preset Time, namely control guest network interface to stop sending service set, thus make the only opening at short notice of guest network interface, so both meet the online demand of visitor, effectively prevent again that other users' rub net behavior.By such mode, substantially increase the unlatching efficiency of guest network, be very easy to the networking requirements of visitor, thus improve the experience of user.
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this specification can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this specification also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.It should be noted that, when not conflicting, the feature in following examples and embodiment can combine mutually.
It should be noted that, the diagram provided in following examples only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
As described in the background art, in prior art, when there being visitor to come to visit, how for visitor provides network service to be easily a difficult problem of the prior art.And the present invention is head it off just, and propose a kind of guest network control method based on timer, by the method, guest network interface is carried out to the opening of short time, thus make visitor can be connected to network easily, and arrive after Preset Time in the time and automatically close network, thus effectively avoid other users rub net.
Refer to Fig. 1, the invention provides a kind of control method of guest network, the control method of described guest network comprises the following steps:
S11, opens the guest network interface on router and starts timing;
In the present embodiment, by guest network interface described in the visitor's switch open on router.That is, in the present embodiment, a physical button is set on the router, guest network interface can be opened fast by this physical button.Meanwhile, the clocking capability in the present embodiment is realized by software timer.
Certainly, those skilled in the art are just when understanding, and in other embodiments, can also open described guest network interface by software switch, this should not limit the scope of the invention.
S12, described guest network interface sends service set to set up the connection of visitor's terminal and network terminal;
After unlatching guest network interface, send service set (ServiceSetIdentifier, SSID) with interconnection network by guest network interface.
S13, judges whether timing time reaches Preset Time;
S14, if timing time reaches Preset Time, controls described guest network interface and stops sending service set.
In actual applications, during router startup, guest network is closed condition, when clicking the physical button (i.e. visitor's switch) be arranged on router, guest network is opened, start to send broadcast packet, start a software timer, such as simultaneously, by set timer at 1-2 minute, in interval during this period of time, guest can search wireless network and connects online, and after this time interval terminates, guest network starts to stop outside Broadcast SSIDs title.Because guest connects to network, even if so cannot be searched out the SSID of this guest network by other network terminals, guest remains and can surf the Net; And this guest network is not just present in for other strangers beyond guest.
By the method for the present embodiment, the function of surfing the Net of visitor can be realized fast, thus substantially increase the efficiency of visitor's interconnection network.
In actual applications, usual guest network interface, primary network interface and the Ethernet interface of Intranet are all connected together by the mode of bridge joint, regardless of the IP that the IP address got by which kind of interface is all the same network segment that same DHCPSERVER distributes, and each equipment room all can be accessed mutually.
If owner has set up a station server in Intranet, risky so beyond doubt.So in order to avoid other Network Interface Units of client-access of guest network, the control method of described guest network can also comprise the following steps (with reference to figure 2):
After unlatching guest network interface, perform step S15, send the notice of guest network interface unlatching to kernel; In the present embodiment, sent the notice of guest network interface unlatching to kernel by NETLINK.
Then perform step S16, the flow of network inner protocol stack to guest network interface is monitored, and abandons described guest network interface to the data traffic between primary wireless network interface and Ethernet interface.Described network inner protocol stack is monitored at the flow of data link layer to guest network interface.
In the present embodiment, after guest network interface is opened, application layer sends message by NETLINK to kernel, inform that kernel guest network is opened, network inner protocol stack is monitored at the flow of data link layer to guest network interface, the data traffic that guest network interface leads between primary wireless network interface and Ethernet interface is abandoned, thus the potential safety hazard of equipment under avoiding primary wireless network interface and Ethernet interface, substantially increase the fail safe of network.
With reference to figure 3, the invention provides a kind of control device of guest network, the control device of described guest network comprises: opening module 21, time block 22, judge module 23, guest network interface module 24, and control module 25.
Described opening module 21 is for opening the guest network interface on router;
Those skilled in the art should be understood that: described opening module comprises visitor's switch, by guest network interface described in described visitor's switch open.Or described opening module is realized by software switch, open described guest network interface by described software switch.
Described time block 22 for carrying out timing after opening the guest network interface on router;
Described judge module 23 is for judging whether timing time reaches Preset Time;
Described guest network interface module 24 is for sending service set to set up the connection of visitor's terminal and network terminal;
Described control module 25, for when timing time reaches Preset Time, controls described guest network interface and stops sending service set.
The control device of the guest network of the present embodiment can realize the function of surfing the Net of visitor efficiently, thus improves the efficiency of visitor's online.
With reference to figure 4, the control device of described guest network also comprises: notification module 26 and network inner protocol stack module 27.
Described module 26, for after unlatching guest network interface, sends the notice of guest network interface unlatching to kernel;
Described network inner protocol stack module 27 for monitoring the flow of guest network interface, and abandons described guest network interface to the data traffic between primary wireless network interface and Ethernet interface.
The control device of the guest network of the present embodiment cuts off the access between Guest Interface and primary wireless network interface, Ethernet interface, thus substantially increases the fail safe of network.
Correspondingly, the present invention also provides a kind of router, and described router comprises the control device of the guest network as described in aforementioned any one.The specific implementation of router of the present invention and workflow with reference to aforementioned about the control device of guest network and the detailed description of control method, can not repeat them here.
In sum, the control method of guest network of the present invention, control device and router, not only increase the online efficiency of visitor, but also improve the fail safe of network.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.