CN105323177A - Router and routing method - Google Patents

Router and routing method Download PDF

Info

Publication number
CN105323177A
CN105323177A CN201410359708.6A CN201410359708A CN105323177A CN 105323177 A CN105323177 A CN 105323177A CN 201410359708 A CN201410359708 A CN 201410359708A CN 105323177 A CN105323177 A CN 105323177A
Authority
CN
China
Prior art keywords
address
private
router
electronic equipment
domain name
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
CN201410359708.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.)
Ambit Microsystems Shanghai Ltd
Original Assignee
Ambit Microsystems Shanghai 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 Ambit Microsystems Shanghai Ltd filed Critical Ambit Microsystems Shanghai Ltd
Priority to CN201410359708.6A priority Critical patent/CN105323177A/en
Publication of CN105323177A publication Critical patent/CN105323177A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a routing method. The routing method is applied to a router which communicates with the other router and at least one electronic device respectively. The method comprises the following steps that: the router acquires a first private IP address allocated by the other router; a second private IP address is allocated to the electronic devices; whether the second private IP address is identical with any one address selected from the first private IP address, the gateway address of the router and the address of a domain name server is judged; and if the second private IP address is identical with any one address selected from the first private IP address, the gateway address of the router and the address of the domain name server, a third private IP address is allocated for the electronic devices according to allocation principles, wherein the third private IP address is different from any one address selected from the first private IP address, the gateway address of the router and the address of the domain name server. With the routing method of the invention adopted, the third private IP address can be re-allocated when a domain conflict occurs, and therefore, the domain conflict can be avoided, and the Internet surfing quality of users can be ensured.

Description

Router and method for routing
Technical field
The present invention relates to a kind of router and method for routing.
Background technology
At wide area network (WideAreaNetwork, WAN) in, router is by DHCP (DynamicHostConfigurationProtocol, DHCP) regulation obtains IP(InternetProtocol, IP) address, router again automatic IP address allocation to the electronic equipment in local area network (LAN) (LocalAreaNetwork, LAN).But, router distribute to electronic equipment IP address may to distribute to the IP address of router identical and produce and net territory conflict with WAN.When there is the conflict of net territory, user cannot surf the Net and also be difficult to find failure cause.
Summary of the invention
In view of this, a kind of router and the method for routing of avoiding netting territory conflict need be provided.
Router provided by the invention, for electronic equipment and another router communication, another router is for obtaining the public ip address that distributes in wide area network and distributing the first private IP address to router.Router comprises acquisition module, the first distribution module, judge module, the second distribution module and notification module.The first private IP address that acquisition module distributes for obtaining another router, first distribution module is used for distributing the second private IP address to the electronic equipment in local area network (LAN), judge module is for judging the second private IP address and the first private IP address, the gateway address of router, in domain name server address three, whether any one is identical, when the second private IP address and the first private IP address, the gateway address of router, when in domain name server address three, any one is identical, the 3rd private IP address is distributed to electronic equipment according to distribution principle, 3rd private IP address and the first private IP address, gateway address, domain name server address three is all not identical.
Preferably, router also comprises notification module, when in the gateway address of the second private IP address and the first private IP address, router, domain name server address three, any one is identical, notification module is used for sending notice, to notify that user uses the 3rd private IP address to electronic equipment.
Preferably, when the gateway address of the second private IP address and the first private IP address, router, domain name server address three are all not identical, electronic equipment uses the second private IP address.
Method for routing provided by the invention, is applied in router, router respectively with another router and at least one electronic equipment communication; Another router is for obtaining public IP(InternetProtocol, IP) address distribute the first private IP address to router, the method comprising the steps of: router obtains the first private IP address that another router distributes; The second private IP address is distributed to electronic equipment; Judge that in the gateway address of the second private IP address and the first private IP address, router, domain name server address three, whether any one is identical; If when in the gateway address of the second private IP address and the first private IP address, router, domain name server address three, any one is identical, distribute the 3rd private IP address according to distribution principle to electronic equipment, the 3rd private IP address is all not identical with the first private IP address, gateway address, domain name server address three.
Preferably, when in the gateway address, domain name server address three of the second private IP address and the first private IP address, router, any one is identical, router sends notice, to notify that user uses the 3rd private IP address to electronic equipment.
Preferably, if the second private IP address is all not identical with the first private IP address, gateway address, domain name server address three, then electronic equipment uses the second private IP address.
Above-mentioned router and the method avoiding the conflict of net territory, when producing the conflict of net territory, router distributes the 3rd private IP address according to distribution principle to electronic equipment, and the 3rd private IP address is not identical with the address of public ip address or gateway address or name server, effectively avoids net territory conflict and be convenient to user's online.
Accompanying drawing explanation
Figure 1 shows that the present invention avoids netting the applied environment schematic diagram of territory conflict router one execution mode.
Figure 2 shows that the present invention avoids netting the functional block diagram of territory conflict router one execution mode.
Figure 3 shows that the present invention avoids netting the flow chart of territory conflict router one execution mode.
Main element symbol description
Wide area network 10
Another router 20
Router 30
Acquisition module 301
First distribution module 302
Judge module 303
Second distribution module 304
Notification module 305
Electronic equipment 40
Following embodiment will further illustrate the present invention in conjunction with above-mentioned accompanying drawing.
Embodiment
Fig. 1 is the applied environment figure that the present invention avoids netting the preferred embodiment of territory conflict router.Router three 0 and electronic equipment 40 and another router two 0 communication.Another router two 0 runs on wide area network 10(WideAreaNetwork, WAN) in, for obtaining public IP(InternetProtocol, IP that this wide area network 10 distributes) address distribute the first private IP address to router three 0.
Please refer to Fig. 2, router three 0 comprises acquisition module 301, first distribution module 302, judge module 303, second distribution module 304 and notification module 305.
The first private IP address that acquisition module 301 distributes for obtaining another router two 0.
First distribution module 302 is for distributing the second private IP address to the electronic equipment 40 in local area network (LAN) (LocalAreaNetwork, LAN).
Whether judge module 303 is identical for the gateway address or name server (DomainNameServer, DNS) address judging the second private IP address and the first private IP address or router three 0.In the present embodiment, if the second private IP address is identical with any one in the first private IP address or gateway address or dns address, then produces net territory conflict and cause user could not get on to the Net.If the second private IP address and the first private IP address or gateway address or dns address not identical, then electronic equipment 40 uses the second private IP address.
Second distribution module 304, for when netting territory conflict, distributes the 3rd private IP address to electronic equipment 40 again according to distribution principle, and the 3rd private IP address and the first private IP address or gateway address or dns address not identical.In the present embodiment, when producing the conflict of net territory, the second distribution module 304 can distribute following 3rd private IP address: 192.168.X.Y or 10.0.X.Y or 172.16.X.Y to electronic equipment 40 at random.Wherein, 192.168.X.Y scope is 192.168.0.0≤192.168.X.Y≤192.168.255.255,10.0.X.Y scope is the scope of 10.0.0.0≤10.0.X.Y≤10.255.255.255,172.16.X.Y is 172.16.0.0≤172.16.X.Y≤172.31.255.255.
Notification module 305, for when producing the conflict of net territory, sending notice to electronic equipment 40, using the 3rd private IP address with the user of electronic device 40.
Fig. 3 is the flow chart that the present invention avoids netting territory collision method preferred embodiment.This is avoided the method for netting territory conflict to run in wide area network 10, and another router two 0 obtains the public ip address of wide area network 10 distribution and distributes the first private IP address to router three 0.This is avoided the method for netting territory conflict to comprise the steps.
Step S310, acquisition module 301 obtains the first private IP address that another router two 0 distributes.
Step S320, the first distribution module 302 distributes the second private IP address to the electronic equipment 40 in LAN.
Step S330, judge module 303 judge the gateway address of the second private IP address and the first private IP address or router three 0 or dns address whether identical.When the gateway address of the second private IP address and the first private IP address or router three 0 or dns address identical time, then enter step S304.When the gateway address of the second private IP address and the first private IP address or router three 0 or dns address not identical time, then enter step 306.
Step S340, the second distribution module 304 distributes the 3rd private IP address to electronic equipment 40 again.In the present embodiment, the second distribution module 304 can distribute following 3rd private IP address: 192.168.X.Y or 10.0.X.Y or 172.16.X.Y to electronic equipment 40 at random.Wherein, 192.168.X.Y scope is 192.168.0.0≤192.168.X.Y≤192.168.255.255,10.0.X.Y scope is the scope of 10.0.0.0≤10.0.X.Y≤10.255.255.255,172.16.X.Y is 172.16.0.0≤172.16.X.Y≤172.31.255.255.
Step S350, notification module 305 sends notice to electronic equipment 40, uses the 3rd private IP address with the user of electronic device 40.
Step S360, electronic equipment 40 uses the second private IP address.
In sum, router and the method avoiding the conflict of net territory provided by the invention, when producing the conflict of net territory, router three 0 distributes the 3rd private IP address according to distribution principle to electronic equipment 40, and the 3rd private IP address is not identical with the address of public ip address or gateway address or DNS, effectively avoids net territory conflict and be convenient to user's online.
To those skilled in the art, the actual needs that can generate according to scheme of the invention of the present invention and inventive concept combination is made other and is changed accordingly or adjustment, and these changes and adjustment all should belong to the protection range of the claims in the present invention.

Claims (6)

1. a router, for at least one electronic equipment and another router communication, another router described is for obtaining the public ip address that distributes in wide area network and distributing the first private IP address to described router, and it is characterized in that, described router comprises:
Acquisition module, for obtaining described first private IP address that another router described distributes;
First distribution module, for distributing the second private IP address to the described electronic equipment in local area network (LAN);
Judge module, for judging that in the gateway address of described second private IP address and described first private IP address, described router, domain name server address three, whether any one is identical;
Second distribution module, for when described second private IP address is with when in described first private IP address, described gateway address, domain name server address three, any one is identical, distribute the 3rd private IP address according to distribution principle to described electronic equipment, described 3rd private IP address is all not identical with described first private IP address, described gateway address, domain name server address three.
2. router as claimed in claim 1, it is characterized in that, described router also comprises notification module, described second private IP address is with when in described first private IP address, described gateway address, domain name server address three, any one is identical, described notification module is used for sending notice, to notify that user uses described 3rd private IP address to described electronic equipment.
3. router as claimed in claim 2, it is characterized in that, when described second private IP address is all not identical with described first private IP address, described gateway address, domain name server address three, described electronic equipment uses described second private IP address.
4. a method for routing, is applied in router, and described router communicates with another router and at least one electronic equipment respectively; Another router described, for obtaining public ip address and distributing the first private IP address to described router, is characterized in that, described method comprises step:
Described router obtains described first private IP address that another router described distributes;
The second private IP address is distributed to described electronic equipment;
Judge that in the gateway address of described second private IP address and described first private IP address, described router, domain name server address three, whether any one is identical;
If when in the gateway address of described second private IP address and described first private IP address, described router, domain name server address three, any one is identical, distribute the 3rd private IP address according to distribution principle to described electronic equipment, gateway address, the domain name server address three of described 3rd private IP address and described first private IP address, described router are all not identical.
5. method for routing as claimed in claim 4, it is characterized in that, when in the gateway address, domain name server address three of described second private IP address and described first private IP address, described router, any one is identical, described router sends notice, to notify that user uses described 3rd private IP address to described electronic equipment.
6. method for routing as claimed in claim 5, it is characterized in that, if the gateway address of described second private IP address and described first private IP address, described router, domain name server address three are all not identical, then described electronic equipment uses described second private IP address.
CN201410359708.6A 2014-07-28 2014-07-28 Router and routing method Pending CN105323177A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410359708.6A CN105323177A (en) 2014-07-28 2014-07-28 Router and routing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410359708.6A CN105323177A (en) 2014-07-28 2014-07-28 Router and routing method

Publications (1)

Publication Number Publication Date
CN105323177A true CN105323177A (en) 2016-02-10

Family

ID=55249792

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410359708.6A Pending CN105323177A (en) 2014-07-28 2014-07-28 Router and routing method

Country Status (1)

Country Link
CN (1) CN105323177A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110391933A (en) * 2019-06-17 2019-10-29 浙江工商大学 A kind of embedded type equipment parameter configuration recovery method and embedded device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014044A (en) * 2009-09-04 2011-04-13 技嘉科技股份有限公司 Domain collision avoidance method and router using same
CN102025792A (en) * 2009-09-22 2011-04-20 国基电子(上海)有限公司 Router and IP address setting method thereof
CN102571996A (en) * 2010-12-13 2012-07-11 联想(北京)有限公司 IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102594939A (en) * 2012-02-16 2012-07-18 杭州华三通信技术有限公司 Secondary address allocation method and device
EP2741460A1 (en) * 2012-12-05 2014-06-11 Alcatel Lucent A method and a user agent for load balancing within several proxies in a SIP network comprising a router applying network address translation

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102014044A (en) * 2009-09-04 2011-04-13 技嘉科技股份有限公司 Domain collision avoidance method and router using same
CN102025792A (en) * 2009-09-22 2011-04-20 国基电子(上海)有限公司 Router and IP address setting method thereof
CN102571996A (en) * 2010-12-13 2012-07-11 联想(北京)有限公司 IP (Internet Protocol) address assignment method, IP address assignment device and network system
CN102594939A (en) * 2012-02-16 2012-07-18 杭州华三通信技术有限公司 Secondary address allocation method and device
EP2741460A1 (en) * 2012-12-05 2014-06-11 Alcatel Lucent A method and a user agent for load balancing within several proxies in a SIP network comprising a router applying network address translation

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110391933A (en) * 2019-06-17 2019-10-29 浙江工商大学 A kind of embedded type equipment parameter configuration recovery method and embedded device

Similar Documents

Publication Publication Date Title
CN106878193B (en) Load sharing method and device
US9515874B2 (en) Efficient use of dynamic host configuration protocol in low power and lossy networks
EP2422489A4 (en) Method and apparatus for accommodating duplicate mac addresses
US20140108673A1 (en) Adaptive prefix delegation
CN103888551A (en) Internet protocol address obtaining method in network, relay device and system
EP2779589A3 (en) Changing dynamic group VPN member reachability information
MY160082A (en) Method and apparatus for providing host node awareness for multiples nat64 environments
MX2009008085A (en) Method and system of providing ip-based packet communications in a utility network.
US20120324063A1 (en) Method, network device, and system for automatically configuring network device in ipv6 network
NZ759178A (en) Method for configuring transmission direction of time-frequency resource, and apparatus
RU2016116762A (en) METHOD FOR PROVIDING A NAME SERVICE INSIDE THE INDUSTRIAL AUTOMATION SYSTEM AND COMMUNICATION DEVICE
CA2666486A1 (en) Network device location and configuration
RU2015116271A (en) METHOD FOR PROVIDING THE NAME SERVICE INSIDE THE INDUSTRIAL COMMUNICATION SYSTEM AND ROUTER
EP4274368A3 (en) Method and system for communicating between private mesh network and public network
WO2008072220A3 (en) Method and system for restricting a node from communicating with other nodes in a broadcast domain of an ip (internet protocol) network
CN101335744A (en) Ciphered generation address configuring method, system and apparatus
CN103873497A (en) Method, device and system for scheduling information
WO2011100907A3 (en) Parameter configuration method and network element device
CN102231765A (en) Method and device for realizing load balance and set-top box
CN103167048A (en) Method and device and system used for two-layer intercommunication and based on Internet Protocol version 6 (IPv6)
EP2416572A1 (en) Method and apparatus for obtaining address of video transmission management server
CN105323177A (en) Router and routing method
CN102420748A (en) Method and router for avoiding attack of ARP (address resolution protocol) report
CN103167058A (en) Method for acquiring Internet protocol version 6 (IPv6) prefix by adopting internet control message protocol version 6 (ICMPv6) to generate client address
WO2016106082A3 (en) Dynamic server/client transition for networked devices

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20160210