CN101478543B - Network access method and apparatus - Google Patents

Network access method and apparatus Download PDF

Info

Publication number
CN101478543B
CN101478543B CN 200910004825 CN200910004825A CN101478543B CN 101478543 B CN101478543 B CN 101478543B CN 200910004825 CN200910004825 CN 200910004825 CN 200910004825 A CN200910004825 A CN 200910004825A CN 101478543 B CN101478543 B CN 101478543B
Authority
CN
China
Prior art keywords
routing table
application process
stack
network
link
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.)
Expired - Fee Related
Application number
CN 200910004825
Other languages
Chinese (zh)
Other versions
CN101478543A (en
Inventor
王永宏
陈峥
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Device Co Ltd
Original Assignee
Huawei Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Device Co Ltd filed Critical Huawei Device Co Ltd
Priority to CN 200910004825 priority Critical patent/CN101478543B/en
Publication of CN101478543A publication Critical patent/CN101478543A/en
Application granted granted Critical
Publication of CN101478543B publication Critical patent/CN101478543B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a network accessing method and a device. The method comprises: receiving a request of a plurality of application process accessing different networks; searching a corresponding link to the request from each corresponding routing table to the application processes and transmitting data to the link. The invention provides the network accessing method and the device, which enables the application programs to simultaneously access a plurality of networks and provides convenience for users.

Description

A kind of Network Access Method and device
Technical field
The present invention is a kind of Network Access Method and device about field of network communication specifically.
Background technology
In the prior art; At existing network terminal product; In products such as PC, various host, mobile phone, when facing the situation that multiple network uses simultaneously, as: maybe be in visit Internet internet through VPN VPN visit intranet intranet.The IP stack at existing terminal is divided into two kinds, and a kind of is the IPv4 protocol stack, and another kind is the protocol stack of IPv4 and IPv6, and corresponding is the routing table of an IPv4 routing table or an IPv4 and an IPv6.The method of supporting many networks in the prior art simultaneously is to form different list item in the routing table through address planning, and the packet of upper layer application sends to according to different list items that various network realizes.
In realizing process of the present invention, the inventor finds to have following problem in the prior art at least: when landing a plurality of network simultaneously, the IP address of each network needs to coordinate each other; And could communicate by letter according to network segment configuration route, but when reality was used, these IP addresses can't be coordinated each other; And each network configuration all is default route; These routes are conflicted each other, cause supporting multiple network simultaneously, promptly when using a kind of application, can't use other a kind of application simultaneously.
Summary of the invention
The embodiment of the invention provides a kind of Network Access Method and device, can solve the problem that can't land a plurality of networks in the prior art simultaneously.
To achieve these goals, the embodiment of the invention provides a kind of Network Access Method, and this method comprises: receive the request of a plurality of application process visit heterogeneous networks; From each self-corresponding routing table of described application process, search described request link corresponding and send data to this link.
To achieve these goals, the embodiment of the invention also provides a kind of network access device, and this device comprises: the request receiving element receives the request of a plurality of application process visit heterogeneous networks; Link is searched the unit, is used for searching described request link corresponding and sending data to this link from each self-corresponding routing table of described application process.
The beneficial effect of technique scheme is, a kind of Network Access Method and device are provided, and makes application program can visit a plurality of networks simultaneously, and is user-friendly.
Description of drawings
Accompanying drawing described herein is used to provide further understanding of the present invention, constitutes the application's a part, does not constitute qualification of the present invention.In the accompanying drawings:
Fig. 1 visits the principle schematic of a plurality of networks simultaneously for the realization of the embodiment of the invention;
Fig. 2 visits the principle schematic of a plurality of networks simultaneously for the realization of another embodiment of the present invention;
Fig. 3 is the flow chart of a kind of Network Access Method provided by the invention;
Fig. 4 is the structure chart of a kind of network access device provided by the invention.
Embodiment
For making the object of the invention, technical scheme and advantage clearer,, the present invention is explained further details below in conjunction with execution mode and accompanying drawing.At this, exemplary embodiment of the present invention and explanation thereof are used to explain the present invention, but not as to qualification of the present invention.
Embodiment one
In the present embodiment, a plurality of processes that are used for visiting respectively a plurality of networks are bound an IP stack separately, the corresponding routing table of each protocol stack.As two application processes and two IP stacks have been shown among Fig. 1, for example the IPv4 protocol stack of an internet network and an intranet network IPv4 protocol stack; Or the IPv6 protocol stack of an internet network and an intranet network IPv6 protocol stack; Also can be IPv4 protocol stack and the IPv6 protocol stack of an internet network, intranet network IPv4 protocol stack and IPv6 protocol stack.Each corresponding routing table of each IP stack, described two IP stacks can be identical IP agreements, also can be different IP agreements.Wherein, application process bundlees with IP stack, after application layer IP data arrive the IP layer through transport layer; Bind the definite corresponding routing table of the network information at place according to process and carry out route querying; For example application process is a visit internet network, and the routing table in the IPv4 protocol stack that then definite corresponding routing table is the internet network finds a route in this network through routing table then; According to finding corresponding link, carry out data and send.
After adopting the scheme in the above embodiment of the present invention; Can make the user use multiple network (for example Internet and Intranet) simultaneously and do not produce conflict; Because the present invention has corresponding independent IPv4 protocol stack routing table or IPv6 protocol stack routing table to each network; Each routing table can have the default route of oneself, and the process of each application program can correspond to different IP stacks, visits various network respectively.
Embodiment two
In the present embodiment, a plurality of processes that are used for visiting respectively a plurality of networks are bound a routing table separately, the corresponding a plurality of routing tables of IP stack.Bind a routing table separately as two application processes have been shown among Fig. 2, two corresponding same IP stacks of routing table for example comprise internet network routing table and intranet network routing table in an IPv4 protocol stack; Or comprise internet network routing table and intranet network routing table in an IPv6 protocol stack.The application process of visit internet network is bound the application process of internet network routing table, visit intranet network and is bound the intranet network routing table; After application layer IP data arrive the IP layer through transport layer; Routing table according to process is bound is carried out route querying; Thereby find a route, to corresponding link, carry out data and send according to route querying.
After adopting the scheme in the above embodiment of the present invention; Can make the user use multiple network (for example Internet and Intranet) simultaneously and do not produce conflict; Because the present invention has corresponding independent IPv4 protocol stack routing table or IPv6 protocol stack routing table to each network; Each routing table can have the default route of oneself, and the process of each application program can correspond to different routing tables, visits various network respectively.
Embodiment three
As shown in Figure 3, be the flow chart of a kind of Network Access Method provided by the invention, this method comprises:
Step 301 receives the request of a plurality of application process visit heterogeneous networks, like application process 1 request visit internet network, application process 2 request visit intranet networks.
Step 302; From each self-corresponding routing table of described application process, search described request link corresponding and send data to this link; As searching the link of internet network and send data, search the link of intranet network and send data from application process 2 corresponding routing tables 2 from application process 1 corresponding routing table 1.
Because each process can be obtained link in this method from the routing table of correspondence, so can solve the defective that to visit heterogeneous networks in the prior art simultaneously.
Wherein, in other embodiment of the present invention, described method also comprises: set up the corresponding relation of application process and routing table, wherein each application process is bound an IP stack, the corresponding routing table of each IP stack.
Wherein, in other embodiment of the present invention, described method also comprises: set up the corresponding relation of application process and routing table, wherein said application process is bound with the different routing tables in the same IP stack.
The beneficial effect of the above embodiment of the present invention is: a kind of Network Access Method is provided, made application program can visit a plurality of networks (for example Internet and Intranet) simultaneously, and user-friendly.
Wherein, above-mentioned IP stack is IPv4 protocol stack or IPv6 protocol stack, and above-mentioned routing table is internet routing table or intranet routing table.
Embodiment four
As shown in Figure 4, be the structure chart of a kind of network access device provided by the invention, this device comprises:
Request receiving element 401 receives the request of a plurality of application process visit heterogeneous networks;
Routing table acquiring unit 402 is used for searching described request link corresponding and sending data to this link from each self-corresponding routing table of described application process.
Because each process can be obtained link in this device from the routing table of correspondence, so can solve the defective that to visit heterogeneous networks in the prior art simultaneously.
Wherein, in other embodiment of the present invention, described device also comprises: corresponding relation is set up the unit, is used to set up the corresponding relation of application process and routing table, and wherein each application process is bound an IP stack, the corresponding routing table of each IP stack.
Wherein, in other embodiment of the present invention, described device also comprises: corresponding relation is set up the unit, is used to set up the corresponding relation of application process and routing table, and wherein said application process is bound with the different routing tables in the same IP stack.
Wherein, above-mentioned IP stack is IPv4 protocol stack or IPv6 protocol stack, and above-mentioned routing table is internet routing table or intranet routing table.
The beneficial effect of the above embodiment of the present invention is: a kind of network access device is provided, made application program can visit a plurality of networks (for example Internet and Intranet) simultaneously, and user-friendly.
Above-described embodiment; The object of the invention, technical scheme and beneficial effect have been carried out further explain, and institute it should be understood that the above is merely embodiment of the present invention; And be not used in qualification protection scope of the present invention; All within spirit of the present invention and principle, any modification of being made, be equal to replacement, improvement etc., all should be included within protection scope of the present invention.

Claims (6)

1. a Network Access Method is characterized in that, this method comprises:
Set up the corresponding relation of application process and routing table, wherein each application process is bound an IP stack, the corresponding routing table of each IP stack; Perhaps, set up the corresponding relation of application process and routing table, wherein said application process is bound with the different routing tables in the same IP stack;
Receive the request of a plurality of application process visit heterogeneous networks;
From each self-corresponding routing table of said application process, search the described request link corresponding, and send data to this link.
2. method according to claim 1 is characterized in that, described IP stack is IPv4 protocol stack or IPv6 protocol stack.
3. method according to claim 1 is characterized in that, described routing table is internet routing table or intranet routing table.
4. a network access device is characterized in that, this device comprises:
First relation is set up the unit, is used to set up the corresponding relation of application process and routing table, and wherein each application process is bound an IP stack, the corresponding routing table of each IP stack; Perhaps, second relation is set up the unit, is used to set up the corresponding relation of application process and routing table, and wherein said application process is bound with the different routing tables in the same IP stack;
The request receiving element receives the request of a plurality of application process visit heterogeneous networks;
Link is searched the unit, is used for searching the described request link corresponding from each self-corresponding routing table of said application process, and sends data to this link.
5. device according to claim 4 is characterized in that, described IP stack is IPv4 protocol stack or IPv6 protocol stack.
6. device according to claim 4 is characterized in that, described routing table is internet routing table or intranet routing table.
CN 200910004825 2009-01-19 2009-01-19 Network access method and apparatus Expired - Fee Related CN101478543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200910004825 CN101478543B (en) 2009-01-19 2009-01-19 Network access method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200910004825 CN101478543B (en) 2009-01-19 2009-01-19 Network access method and apparatus

Publications (2)

Publication Number Publication Date
CN101478543A CN101478543A (en) 2009-07-08
CN101478543B true CN101478543B (en) 2012-12-12

Family

ID=40839175

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200910004825 Expired - Fee Related CN101478543B (en) 2009-01-19 2009-01-19 Network access method and apparatus

Country Status (1)

Country Link
CN (1) CN101478543B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106464705B (en) * 2014-05-21 2019-11-01 华为技术有限公司 A kind of data processing method and device of network protocol stack
CN109743376B (en) * 2018-12-27 2021-09-28 山东信通电子股份有限公司 Message pushing method and device based on single server

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738308A (en) * 2004-08-18 2006-02-22 华为技术有限公司 Method and system for multi-protocol network interconnection and intercommunication
CN101090377A (en) * 2007-07-31 2007-12-19 中兴通讯股份有限公司 Implementing method for multi-service data flow selecting on gateway

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100471180C (en) * 2006-02-09 2009-03-18 华为技术有限公司 Method, device and system for transfer news
US20070255781A1 (en) * 2006-04-26 2007-11-01 Bayhub, Inc. Content driven process routing for integrated enterprise applications

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1738308A (en) * 2004-08-18 2006-02-22 华为技术有限公司 Method and system for multi-protocol network interconnection and intercommunication
CN101090377A (en) * 2007-07-31 2007-12-19 中兴通讯股份有限公司 Implementing method for multi-service data flow selecting on gateway

Also Published As

Publication number Publication date
CN101478543A (en) 2009-07-08

Similar Documents

Publication Publication Date Title
CN104054302B (en) The network equipment, address resolution method, network and cache table minishing method
CN105323173B (en) The setting method and device of networking rule entry
US10887394B2 (en) Mechanism and service for device naming
CN105376114B (en) The identifying system and method for wireless terminal type under router bridge mode
CN107332775B (en) Cross-host machine inter-visit system based on docker container and control method thereof
CN102710509B (en) Automatic data center configuration method and method
CN102907072A (en) Enabling ipv6 mobility with nat64
CN103701950B (en) The distribution method and device of a kind of IP address
CN102209121A (en) Method and device for intercommunication between Internet protocol version 6 (IPv6) network and Internet protocol version 4 (IPv4) network
CN102859973A (en) Method, apparatus and system for address resolution
CN102484639A (en) A method and host node for multiple nat64 environments
CN104618243B (en) Method for routing, apparatus and system, Scheduling of Gateway method and device
CN103763407A (en) Method for achieving address resolution protocol proxy through two-layer virtual local area network and local area network system
CN102325197A (en) Method for communication between intranet equipment and internet equipment and network address transformation equipment
CN103036788A (en) Implementation method of multi-interface gateway equipment data transmitting
CN102215273A (en) Method and device for providing external network access for internal network user
CN108063839A (en) A kind of method for accessing network and the device for accessing network
CN106713524A (en) AP device, network address conversion method and communication system
CN104253878A (en) VLAN (Virtual Local Area Network) information management system and method of DHCP (Dynamic Host Configuration Protocol) RELAY termination sub-interface
CN104283783A (en) Gateway equipment message transmitting method and device in plug and play network
CN106534278A (en) Message forwarding method and switching equipment
CN102970387A (en) Domain name resolution method, device and system
CN104717640B (en) A kind of implementation method of the wireless communication based on positioning
CN101478543B (en) Network access method and apparatus
CN107547339A (en) A kind of gateway media access control MAC address feedback method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20121212

Termination date: 20190119