The internet access method of card of surfing Internet and card of surfing Internet
Technical field
The present invention relates to communication technical field, particularly relate to a kind of internet access method and card of surfing Internet of card of surfing Internet.
Background technology
At present, LTE card of surfing Internet is by point-to-point protocol (the Point-to-Point Protocolover Ethernet on Ethernet; PPPoE) mode dialled is surfed the Net, and it is by point-to-point protocol (point-to-point protocol that PPPoE dials up on the telephone; PPP) be encapsulated in a kind of network tunnel protocol in Ethernet (Ethernet) framework, the user of Ethernet can be made to be linked on the access device of a far-end by a simple bridging device.By PPPoE agreement, remote access device can realize control to each access user and charging.
The workflow of ppp protocol comprises discovery and two stages of session, and discovery phase is stateless, and object is medium access control (the Media Access Control of the Ethernet obtaining PPPoE terminal; MAC) address, and set up a unique PPPoE Session-ID.At discovery phase, network topology, main frame can find multiple access concentrator, then allows user to select one.When discovery phase completes, the ethernet address of PPPoE Session-ID and opposite end is all known at the two ends of communication, can unique definition pppoe session.
That current Windows XP system default is installed is Internet protocol the 4th edition (InternetProtocol version4; IPv4).IPv4 adopts 32 bit address length, only has about 4,300,000,000 addresses, and limited address space is by depleted, and the deficiency of address space will affect further developing of the Internet.Internet protocol sixth version (Internet Protocol version6; IPv6) be the Internet protocol of next version of Ipv4, its proposition is to expand address space at first, adopts 128 bit address length, almost can provide address without restriction.
In prior art, use the user of Windows XP system to access IPv6 network, need, under the prerequisite of installing IPv6 agreement, to carry out tunnel link with IP v6 network; Specifically, a router or personal computer (Personal Computer is needed; PC) as the message of gateway forwards to IPv6 network; And in the process that PPPoE dials up on the telephone, owing to being point to point connect, so there is no corresponding gateway E-Packet, when user is under Windows XP system, use PPPoE to dial up on the telephone and cannot access IPv6 network, therefore the use scenes that dials up on the telephone of the PPPoE of prior art is limited, and network access is dumb.
Summary of the invention
Technical problem to be solved by this invention is to provide a kind of internet access method of card of surfing Internet, can support various use scenes, and network access is comparatively flexible, such as, can make user under Windows XP system environments, and card of surfing Internet can be used to access IPv6 network.
Present invention also offers a kind of card of surfing Internet, in order to ensure said method application in practice and realization.
In order to solve the problem, the invention discloses a kind of internet access method of card of surfing Internet, comprising:
After card of surfing Internet and client's side link, described card of surfing Internet obtains the IP address of base station assigns;
Described card of surfing Internet is according to described IP address acquisition IP mask and gateway address;
Described card of surfing Internet, after the IP address assignment request receiving the transmission of described client, sends described IP address, described IP mask and described gateway address to described client;
Described card of surfing Internet is after the physical address receiving the transmission of described client obtains request, return physical address to described client, surfed the Net by described card of surfing Internet according to described IP address, described IP mask, described gateway address and described physical address for described client.
Present invention also provides a kind of card of surfing Internet, comprising:
IP address acquisition module, for client's side link after, obtain the IP address of base station assigns;
IP mask and gateway address acquisition module, for according to described IP address acquisition IP mask and gateway address;
Sending module, for after the request receiving the distributing IP address that described client sends, sends described IP address, described IP mask and described gateway address to described client;
Described sending module, also for after the physical address acquisition request receiving the transmission of described client, return physical address to described client, surfed the Net by described card of surfing Internet according to described IP address, described IP mask, described gateway address and described physical address for described client.
Compared with prior art, the present invention has the following advantages:
The internet access method of card of surfing Internet of the present invention and card of surfing Internet, after card of surfing Internet and client's side link, the IP address of base station assigns can be got, and according to this IP address acquisition to IP mask and gateway address, and after the request receiving client distributing IP address, IP address is sent to client, IP mask and gateway address, and after the request receiving client acquisition physical address, return physical address, for client according to IP address, IP mask and gateway address and physical address realize online, due to technical scheme of the present invention, for the IP address return request of client, return gateway address, therefore, user is under Windows XP system, card of surfing Internet not only can be used to access IPv4 network, also card of surfing Internet can be used to access IPv6 network, network access is comparatively flexible.
Be different from PPPoE to dial up on the telephone mode, technical scheme of the present invention, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone; By card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, can simplify the operation that user is surfed the Net by card of surfing Internet, saves the time of user, realize simple, easy to operate.
Accompanying drawing explanation
Fig. 1 is the flow chart of the internet access method of the card of surfing Internet that one embodiment of the invention provides;
The flow chart of the internet access method of the card of surfing Internet that Fig. 2 provides for another embodiment of the present invention;
The structured flowchart of the card of surfing Internet that Fig. 3 provides for the embodiment of the present invention.
Embodiment
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
In prior art, LTE card of surfing Internet is that the mode dialled by PPPoE is surfed the Net, and the process that PPPoE dials up on the telephone is point to point connect, does not have corresponding gateway to E-Packet.During owing to using the user of Windows XP system to access IPv6 network, need a router or PC as the message of gateway forwards to IPv6 network, therefore, user, under Windows XP system, uses PPPoE to dial up on the telephone and cannot access IPv6 network.
One of core idea of the present invention is, by simulation RAWIP(initial IP) mode surfs the Net, because RAWIP mode needs could normally to work to parameters such as network card configuration IP address, IP mask and gateways, general user does not also know how to configure these parameters, so need card of surfing Internet automatically to configure these parameters, such end user just does not need to pay close attention to these ins and outs, just can directly use card of surfing Internet to surf the Net.
The flow chart of the internet access method of the card of surfing Internet that Fig. 1 provides for one embodiment of the invention, as shown in Figure 1, the internet access method of the card of surfing Internet of the present embodiment, specifically can comprise the following steps:
101, after card of surfing Internet and client's side link, card of surfing Internet obtains the IP address of base station assigns.
Such as, in the present embodiment, can realize in the following way: the interface (such as USB interface or U-shaped interface) of card of surfing Internet is inserted into the connection that client both can realize card of surfing Internet and client, after card of surfing Internet and client's side link, base station can be card of surfing Internet Random assignment IP address, and sends to card of surfing Internet.This IP address in the present embodiment for for client online IP address, therefore, this IP address can be understood as the IP address of client using this card of surfing Internet.In the process of netting on the client, IP address is absolutely necessary, and such as, during client-access some websites, data need to carry source IP address and target ip address when client sends, and source IP address that is to say the IP address of client; When data are sent to client from outside, target ip address that is to say the IP address of client.In embodiments of the present invention, client can be user computer.
102, card of surfing Internet is according to IP address acquisition IP mask and gateway address.
Wherein IP mask also can be called subnet mask.This IP mask and gateway address are also requisite parameters in network process in client.IP mask and gateway address can be determined in client in network process, the correct transmission path of communication data.
103, card of surfing Internet is after the IP address assignment request receiving client transmission, sends IP address, IP mask and gateway address to client.
Such as, client with card of surfing Internet successful connection after, client can send the distribution request of IP address to card of surfing Internet, after now card of surfing Internet receives this request, send to client by through above-mentioned steps 101 with the 102 IP addresses obtained, IP mask together with gateway address.
Function performed by step 102 and 103 can be understood as traditionally in net mode DynamicHost agreement (Dynamic Host Configuration Protocol is set, DHCP) function, client can install corresponding DHCP agreement, to send the request of DHCP to card of surfing Internet, this DHCP request can for being interpreted as IP address assignment request.Like this, existing DHCP mechanism can be effectively utilized and realize technical scheme of the present invention.
104, after card of surfing Internet receives the physical address acquisition request of client transmission, return physical address to client, surfed the Net by card of surfing Internet according to IP address, IP mask, gateway address and physical address for client.
When client has installed Windows operating system, client has been carried out in the process of transfer of data with extraneous, in transmission data except needs carry source IP address and target ip address, also needs to carry source physical address and target physical address.Such as physical address is specifically as follows medium access control (Medium/MediaAccess Control; MAC) address.
The step returning physical address can be understood as address resolution (AddressResolution Protocol in net mode traditionally, ARP) function of agreement, client can install corresponding ARP agreement, with to card of surfing Internet send ARP(return MAC Address) request.After the information receiving IP address, IP mask and gateway address, client can send request inquiry physical address again, concrete, can inquire MAC Address.Like this, existing ARP mechanism can be effectively utilized and realize technical scheme of the present invention.
Wherein, the physical address that in the present embodiment, card of surfing Internet returns to client can be a physical address of card of surfing Internet random arrangement.The physical address such as returned can be the physical address that gateway address is corresponding, or the physical address corresponding with other addresses of the same subnet of gateway address, or returns a default fixing physical address.Such as physical address is here specifically as follows MAC Address.And card of surfing Internet can be understood as the IP address of webmaster in above-mentioned steps 102 according to the gateway address of IP address acquisition.
Client receives the IP address that card of surfing Internet returns, IP mask, after gateway address and physical address, can be surfed the Net according to these information by card of surfing Internet.
Such as, when client communicates with the server of certain network, when client sends data, IP mask that can be corresponding according to client ip address, judges whether the IP address of client and the IP address of the webserver belong to same subnet; If so, then client is when sending data to the webserver, and data directly can be sent to the webserver by card of surfing Internet by client.If not at same subnet, then client directly by first data being sent on gateway corresponding to gateway address, then can be forwarded the data in the corresponding webserver according to the object IP address of carrying in data by gateway again.The process that client receives data is similar with the process sending data, does not repeat them here.It should be noted that, the information such as source IP address (the IP address of client), object IP address (the IP address of the server of network) is carried in the data wherein mutually transmitted between client and the server of network, IP mask, corresponding gateway address etc. information can also be carried, do not repeat them here.
The internet access method of the card of surfing Internet of the present embodiment, after card of surfing Internet and client's side link, the IP address of base station assigns can be got, and according to this IP address acquisition to IP mask and gateway address, and after the request receiving client distributing IP address, IP address is sent to client, IP mask and gateway address, and after the request receiving client acquisition physical address, return physical address, for client according to IP address, IP mask and gateway address and physical address realize online, because the present embodiment is for the IP address return request of client, return gateway address, therefore user is under the environment of Windows XP system, card of surfing Internet not only can be used to access IPv4 network, also card of surfing Internet can be used to access IPv6 network, network access is comparatively flexible.
Simultaneously, be different from PPPoE to dial up on the telephone the technical scheme of mode, the present embodiment, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, the operation that user is surfed the Net by card of surfing Internet can be simplified, save the time of user, realize simple, easy to operate.
Alternatively, on the basis of the technical scheme of above-described embodiment, wherein in step 101 after card of surfing Internet and client's side link, before card of surfing Internet obtains the IP address of base station assigns, can also comprise: after card of surfing Internet and client's side link, card of surfing Internet sends and the successful information of client's side link to base station.Like this, base station receive card of surfing Internet send with the successful message of client's side link after, be this card of surfing Internet Random assignment IP address, and send this IP address to card of surfing Internet, obtain this IP address for card of surfing Internet.
Further alternatively, on the basis of the technical scheme in above-described embodiment, wherein 102 " card of surfing Internet is according to IP address acquisition IP mask and gateway address ".Specifically can realize in the following way: card of surfing Internet first resolves the IP address of acquisition, obtains IP mask, with reference to related art, can not repeat them here in detail.And using with IP address at any IP address of same subnet as gateway address.
Wherein, gateway address can arbitrarily be specified, as long as with IP at same subnet; IP mask can be the maximum subnet mask of IP address; According to the regulation of ICP/IP protocol, the host number of gateway address is not 0 entirely, or is not 1 entirely.
Physical address can be the physical address that gateway address is corresponding, or the physical address corresponding with other addresses of the same subnet of gateway address, or returns default physical address.
It should be noted that, in concrete realization, if client has installed ARP agreement, then client is before transmission physical address obtains request, as traditional network access, the ARP request of the IP address of inquiry first can be sent to card of surfing Internet, whether inquiry has had the same IP address of other client configuration, in process due to card of surfing Internet online in above-described embodiment, base station assigns is unique to the IP address of card of surfing Internet, therefore, the same IP address of other client configuration can not be there is, do not need the operation carrying out this step judgement, therefore, corresponding can also the comprising of method of the card of surfing Internet online now in above-described embodiment: when card of surfing Internet receives the IP address query request of client transmission, and abandon this IP address query request.
Can be understood as the function adopting existing ARP agreement to perform herein, existing ARP consultation sends ARP request, and this request can be understood as the request of IP address query.And in the technical scheme of the invention described above embodiment, because IP address is base station Random assignment, the IP address that another client duplicates can not be had, therefore, this ARP request directly should be abandoned, and respond.
By adopting the internet access method of the card of surfing Internet of above-described embodiment, after the request receiving client distributing IP address, by resolving the IP address of base station assigns, using with IP address at any IP address of same subnet as gateway address, and IP address, IP mask is together sent to client, and after the request receiving client acquisition physical address, return physical address, for client according to IP address, IP mask, gateway address and physical address are surfed the Net by card of surfing Internet.Due to the IP address return request for client in the present embodiment, return gateway address, therefore, user is under Windows XP system, card of surfing Internet not only can be used to access IPv4 network, and card of surfing Internet also can be used to access IPv6 network, and network access is comparatively flexible.And the card of surfing Internet of above-described embodiment can be mutually compatible with existing login technique, realize simple, easy to operate.
Be different from PPPoE to dial up on the telephone mode, in the technical scheme of the present embodiment, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, can simplify the operation that user is surfed the Net by card of surfing Internet, save the time of user, realize simple, easy to operate.
Card of surfing Internet in above-described embodiment is specifically as follows LTE card of surfing Internet or other various types of cards of surfing Internet.
The flow chart of the internet access method of the card of surfing Internet that Fig. 2 provides for another embodiment of the present invention.As shown in Figure 2, the internet access method of the card of surfing Internet of the present embodiment, on the basis of above-described embodiment, introduces technical scheme of the present invention to detailed system more.As shown in Figure 2, the internet access method of the card of surfing Internet of the present embodiment, specifically can comprise the steps:
201, card of surfing Internet is by its card of surfing Internet interface and client's side link, and after successful connection, sends and the successful message of client's side link to base station;
202, base station receives with client's side link after successful message, is distributing IP address, and this IP address is sent to card of surfing Internet;
203, after card of surfing Internet receives IP address, this IP address is resolved, obtain corresponding IP mask, and get with this any IP address of IP address in same subnet as gateway address according to this IP mask;
204, card of surfing Internet is after the IP address assignment request receiving client transmission, sends IP address, IP mask and gateway address to client;
Wherein client can after step 201, and any time before step 203 sends this IP address assignment request.And the realization of this step can be mutually compatible with the mechanism of existing DHCP agreement, such as, by this request, IP address assignment request can be interpreted as when the DHCP request receiving client transmission.With reference to the record of above-mentioned related embodiment, can not repeat them here in detail.
205, after card of surfing Internet receives the physical address acquisition request of client transmission, physical address is returned to client;
206, client receives IP address, IP mask, gateway address and physical address, and is surfed the Net by card of surfing Internet according to IP address, IP mask, gateway address and physical address.
The internet access method of the card of surfing Internet of the present embodiment, by adopting technique scheme, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, and send to client, for client according to IP address, IP mask, gateway address and physical address are surfed the Net by card of surfing Internet.Therefore, user, under Windows XP system, not only can use card of surfing Internet to access IPv4 network, and card of surfing Internet also can be used to access IPv6 network, and network access is comparatively flexible.And the card of surfing Internet of above-described embodiment can be mutually compatible with existing login technique, realize simple, easy to operate.
Be different from PPPoE to dial up on the telephone mode, in the technical scheme of the present embodiment, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, simplify the operation that user is surfed the Net by card of surfing Internet, saves the time of user.
For embodiment of the method, in order to simple description, therefore it is all expressed as a series of combination of actions, but those skilled in the art should know, the present invention is not by the restriction of described sequence of movement, because according to the present invention, some step can adopt other orders or carry out simultaneously.Secondly, those skilled in the art also should know, the embodiment described in specification all belongs to preferred embodiment, and involved action and module might not be that the present invention is necessary.
The structured flowchart of the card of surfing Internet that Fig. 3 provides for the embodiment of the present invention, as shown in Figure 3, the card of surfing Internet of the present embodiment, specifically can comprise with lower module:
IP address acquisition module 301, for client's side link after, obtain the IP address of base station assigns; IP mask is connected with IP address acquisition module 301 with gateway address acquisition module 302, and IP mask and gateway address acquisition module 302 are for the IP address acquisition IP mask that obtains according to IP address acquisition module 301 and gateway address.Sending module 303 is connected with IP address acquisition module 301 and IP mask and gateway address acquisition module 302 respectively, sending module 303 is for after the request receiving the distributing IP address that client sends, the IP address of IP address acquisition module 301 acquisition is sent, the IP mask that IP mask and gateway address acquisition module 302 obtain and gateway address to client; Sending module 303 also for after the physical address acquisition request receiving client transmission, is returned physical address to client, is surfed the Net for client according to IP address, IP mask, gateway address and physical address by card of surfing Internet.
The card of surfing Internet of the present embodiment, what realize mechanism and the above-mentioned related method embodiment of online by adopting above-mentioned module realizes identical, with reference to the record of above-mentioned related method embodiment, can not repeat them here in detail.
The card of surfing Internet of the present embodiment, realize after card of surfing Internet and client's side link by adopting above-mentioned module, the IP address of base station assigns can be got, and according to this IP address acquisition to IP mask and gateway address, and after the request receiving client distributing IP address, IP address is sent to client, IP mask and gateway address, and after the request receiving client acquisition physical address, return physical address, for client according to IP address, IP mask and gateway address and physical address realize online, because the present embodiment is for the IP address return request of client, return gateway address, therefore user is under the environment of Windows XP system, card of surfing Internet not only can be used to access IPv4 network, also card of surfing Internet can be used to access IPv6 network, network access is comparatively flexible.
Simultaneously, be different from PPPoE to dial up on the telephone the technical scheme of mode, the present embodiment, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, the operation that user is surfed the Net by card of surfing Internet can be simplified, save the time of user, realize simple, easy to operate.
In one preferred embodiment of the invention, the sending module 303 in above-mentioned card of surfing Internet embodiment illustrated in fig. 3 can also be used for client's side link after, send the information of successful connection to base station.
Alternatively, in concrete realization, IP mask and gateway address acquisition module 302 specifically may be used for resolving IP address, obtain IP mask, and using with IP address at any IP address of same subnet as gateway address; Wherein, IP mask can be the maximum subnet mask of IP address, and the host number of gateway address is not 0 entirely, or is not 1 entirely.
Alternatively, sending module 303 is after the physical address receiving client transmission obtains request, the physical address returned to client can be the physical address that gateway address is corresponding, or the physical address corresponding with other addresses of the same subnet of gateway address, or returns default physical address.
Further alternatively, card of surfing Internet can also comprise processing module.This processing module is used for the IP address query request when receiving client transmission, and abandons this IP address query request.
Above-mentioned technical scheme alternatively, can adopt any combinative mode to be bonded optional embodiment of the present invention, illustrate no longer one by one at this.
By adopting in the process of card of surfing Internet online of above-described embodiment, card of surfing Internet can automatic acquisition IP address, IP mask, gateway address and physical address, and sends to client, for client according to IP address, IP mask, gateway address and physical address are surfed the Net by card of surfing Internet.Therefore, user, under WindowsXP system, not only can use card of surfing Internet to access IPv4 network, and card of surfing Internet also can be used to access IPv6 network, and network access is comparatively flexible.And the card of surfing Internet of above-described embodiment can be mutually compatible with existing login technique, realize simple, easy to operate.
Be different from PPPoE to dial up on the telephone mode, in the technical scheme of the present embodiment, do not need to set up point-to-point between communication, therefore, do not need, in client, dialer software is installed, eliminate the step dialled up on the telephone, by card of surfing Internet automatic acquisition IP address, IP mask, gateway address and physical address, can simplify the operation that user is surfed the Net by card of surfing Internet, saves the time of user.
Because described device embodiment is substantially corresponding to the embodiment of the method shown in earlier figures 1-Fig. 2, therefore not detailed part in the description of the present embodiment, see the related description in previous embodiment, just can not repeat at this.
The present invention can be used in numerous general or special purpose computing system environment or configuration.Such as: personal computer, server computer, handheld device or portable set, laptop device, multicomputer system, system, set top box, programmable consumer-elcetronics devices, network PC, minicom, mainframe computer, the distributed computing environment (DCE) comprising above any system or equipment etc. based on microprocessor.
The present invention can describe in the general context of computer executable instructions, such as program module.Usually, program module comprises the routine, program, object, assembly, data structure etc. that perform particular task or realize particular abstract data type.Also can put into practice the present invention in a distributed computing environment, in these distributed computing environment (DCE), be executed the task by the remote processing devices be connected by communication network.In a distributed computing environment, program module can be arranged in the local and remote computer-readable storage medium comprising memory device.
In this article, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Above to the internet access method of a kind of card of surfing Internet provided by the present invention, and, a kind of card of surfing Internet is described in detail, apply specific case herein to set forth principle of the present invention and execution mode, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications, in sum, this description should not be construed as limitation of the present invention.