CN103327137A - Router domain name access method - Google Patents

Router domain name access method Download PDF

Info

Publication number
CN103327137A
CN103327137A CN2013102739070A CN201310273907A CN103327137A CN 103327137 A CN103327137 A CN 103327137A CN 2013102739070 A CN2013102739070 A CN 2013102739070A CN 201310273907 A CN201310273907 A CN 201310273907A CN 103327137 A CN103327137 A CN 103327137A
Authority
CN
China
Prior art keywords
domain name
router
address
network
dhcp
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.)
Granted
Application number
CN2013102739070A
Other languages
Chinese (zh)
Other versions
CN103327137B (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.)
Shenzhen Gongjin Electronics Co Ltd
Original Assignee
Shenzhen Gongjin Electronics 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 Shenzhen Gongjin Electronics Co Ltd filed Critical Shenzhen Gongjin Electronics Co Ltd
Priority to CN201310273907.0A priority Critical patent/CN103327137B/en
Publication of CN103327137A publication Critical patent/CN103327137A/en
Application granted granted Critical
Publication of CN103327137B publication Critical patent/CN103327137B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a router domain name access method suitable for being applied to a terminal with a windows operation system. When an upstream DHCP is not started, whether a local hosts file or netbios cache has the corresponding domain name or not is found, if not, a DNS packet is sent to query a network whether the domain name has the corresponding IP, and if not, an NBNS packet protocol package is sent. According to the method, a problem of accessing a router management interface in the condition that a router upstream DHCP is closed and a management IP is forgotten is solved.

Description

A kind of router domain name access method
Technical field
The present invention relates to computer networking technology, particularly a kind of router domain name access method.
Background technology
Domain name (Domain Name), by a string title with a upper a certain computer of Internet that the name of separating forms or calculating unit, the electronic bearing (sometimes also referring to the geographical position) that is used for sign computer when transfer of data, a domain name, the administrative autonomy power of its definition, the boundary of power or control the Internet.Domain name is on the IP address " mask " to be arranged.The purpose of a domain name is to be convenient to remember and the address (website, Email, FTP etc.) of one group of server of linking up.Domain name is as unforgettable the Internet participant's in power title, such as computer, and network and service.
Router (Router) is the equipment that connects each local area network (LAN), wide area network in the internet, and it can be selected and the setting route automatically according to the situation of channel, with optimal path, by the equipment of front and back order transmitted signal.Router is hinge, " traffic-police " of internet.Router has been widely used in all trades and professions at present, and the product of various different class has become the main force that realizes the inner connection of various backbone networks, key internetworking and backbone network and the Internet business of interconnecting.Router (Router) claims that again gateway device (Gateway) is be used to connecting a plurality of networks that separate in logic, and so-called logical network is to represent an independent network or a subnet.When data are transferred to another subnet from a subnet, can finish by the routing function of router.Therefore, router has the function of judging the network address and selecting the IP path, it can be in many network interconnections environment, set up flexibly and connect, available diverse packet is connected various subnets with media access method, router is only accepted the information of source station or other routers, belongs to a kind of InterWorking Equipment of network layer.
Router divides local router and remote router, and local router is used for the interconnection network transmission medium, such as optical fiber, coaxial cable, twisted-pair feeder; Remote router is to connect remote transmission medium, and requires corresponding equipment, wants the auxiliary tone modulator-demodulator such as telephone wire, wirelessly will pass through wireless receiver, transmitter.
Router is the main nodes equipment of the Internet.Router is by the forwarding of route determination data.Forwarding strategy is called Route Selection.As interconnected hinge between the heterogeneous networks, route system has consisted of the main body train of thought based on the Internet Internet of TCP/IP, also can say, router has consisted of the skeleton of Internet.Its processing speed is one of Main Bottleneck of network service, and its reliability then directly affects the quality of network interconnection.Therefore, in Campus Networks, single site network and even whole Internet research field, router technology is in core status all the time, and its development course and direction become the epitome that whole Internet studies.When the network infrastructure development of current China and information construction are in the ascendant, inquire into effect, status and the developing direction thereof of router in interference networks, for domestic network technology research, networking, and on the definite network market for the various specious concept of router and network interconnection, important meaning is arranged.
Router commonly used in order effectively to satisfy various functions, has adopted the powerful linux of network function to develop for its kernel, and for the demand of various function of surfing the Net, we need to conduct interviews, arrange, manage router feature.In these demands, the access router administration interface is an indispensable demand, and in access interface, the user always wishes simple, easy to remember, and is not easy to make mistakes.
IP address commonly used, uninteresting and be not easy note, the user and might revise after oneself forget, this has the domain name access function with regard to the route that needs us.And have in addition certain situation to be, up DHCP is closed, and at this moment needs one to have the user of certain technological know-how just can have access to route, and this just makes troubles to the user.
DynamicHost arranges agreement (Dynamic Host Configuration Protocol, DHCP) be the procotol of a local area network (LAN), the work of use udp protocol, mainly contain two purposes: to internal network or Internet service provider's automatic IP address allocation, give user or internal network keeper as the means of all computers being made central management.
Same router generally can be by arranging to divide the IP section of static address and dynamic address, such as general family expenses TP-LINK router, commonly from 192.168.1.100 ~ 192.168.1.254, if your computer is automatically to obtain IP like this, generally be exactly 192.168.1.100, next computer will automatically be assigned to by DHCP and be 192.168.1.101.And 192.168.1.2 ~ 192.168.1.99 is manual configuration IP section.
Dhcp client is for the first time after the Dynamic Host Configuration Protocol server end is rented the IP address, and this address of impermanent use, as long as lease expires, client must discharge (release) this IP address, uses to give other work station.Certainly, client can be than other main frame renewal (renew) lease more preferably, or rents other IP address.
At present, the domain name access that we commonly use, also only be in the situation that the DHCP unlatching conducts interviews, this domain name access, utilization be that Open Source Code dns-dproxy processes, obtain judgement with mailing to local DNS data, if local domain name, then resolve, return the managing I P of router, then can conduct interviews.
But there is a leak clearly in top access, in the situation that up DHCP is forgotten managing I P by artificial or close because of carelessness, how to log in administration interface.
Summary of the invention
To the objective of the invention is in order overcoming the above problems, to the invention provides a kind of router domain name access method.
Technical scheme of the present invention is: a kind of router domain name access method, and the method is suitable for using in the terminal of operating system as the windows system, when beginning domain name access, terminal may further comprise the steps,
Whether the DHCP of steps A, the up route of detection opens, and carries out domain name access if DHCP has opened then by normal domain name access mode, if DHCP does not open, then turns to step B;
Whether step B, the local hosts file of detection or netbios buffer memory have corresponding domain name, if having, then return IP address corresponding to this domain name, otherwise turn to step C;
Step C, send DNS bag and to network inquiry whether IP corresponding to domain name is arranged, if having then return this IP address; Otherwise turn to step D;
Whether step D, the same network segment is sent the NBNS protocol package, detecting has IP address corresponding to described territory; If have, then return corresponding routing management IP address, otherwise, can judge that network does not have routing device or be not this scheme routing device.
Further, in the above-mentioned router domain name access method: described method is based on the realteck chip platform, and the managing I P of routing device is 169.254.***.***.。
The invention solves the up DHCP of router and close, forgotten in the situation of managing I P the problem of access router administration interface.
Below in conjunction with specific embodiment the present invention is done comparatively detailed description.
Description of drawings
Fig. 1 is the overall flow figure that uses this method.
Embodiment
Embodiment 1, as shown in Figure 1, the present embodiment is a kind of based on the realteck chip platform, the managing I P of routing device is the flow process of the terminal domain name access of 169.254.***.***, mainly consider the sometimes situation of up CHCP when not opening for some reason, at present, terminal when carrying out unknown access, do not consider all that generally DHCP may not open, as shown in the figure: mainly may further comprise the steps:
1, terminal computer begins to carry out domain name access.
2, check whether up DHCP opens, if open then obtain IP address corresponding to this domain name by normal access module, and utilize IP address access corresponding to this domain name, the domain name access flow process finishes.Otherwise turn to next step continuation.
At present, judge whether DHCP opens, only need PC to take the IP address, can judge that up DHCP opens, otherwise, do not take the address, can think that then DHCP does not open, this time, the local connection icon of computer had an exclamation mark appearance, and these all are the processes of automatic decision, do not need our router to go to judge.
Whether have corresponding domain name, if having, then return IP address corresponding to this domain name if 3, detecting local hosts file or netbios buffer memory, and utilize IP address access corresponding to this domain name, and the domain name access flow process finishes.Otherwise turn to next step continuation.
Whether to network inquiry have IP corresponding to domain name, if having then return this IP address if 4, sending DNS bag; And utilize IP address access corresponding to this domain name, the domain name access flow process finishes.Otherwise turn to next step continuation.
Step 3 and step 4 are carried out the step that domain name mapping also may be passed through when DHCP opens.
5, the same network segment is sent the NBNS protocol package, detect whether IP address corresponding to described territory is arranged, if having, then return corresponding routing management IP address, and utilize IP address access corresponding to this domain name, the domain name access flow process finishes.Otherwise, can judge that network does not have routing device or not be this scheme routing device.
By the 5th step, this domain name access failure scenarios can not appear basically.Because the managing I P here is 169.254.***.***, an interim IP network section of this default allocation when PC distributes less than the address just, PC holds the NBNS bag that sends to be received like this, and we can respond to it by router.Unless the abnormal conditions that occur that route crashes, PC crashes, local connecting interface is unusual etc. and so on are just can return failure.
In the router of RTL scheme, when up distribute the address to PC end after, we adopt opensource Open Source Code dproxy-nexgen commonly used, in application layer, we add the hosts file, and managing I P and domain name are consisted of corresponding relation.This just can realize conventional domain name access function.Here Hosts is a system file that does not have extension name, can be with TOs such as notepads, its effect is exactly that the network address domain name that some are commonly used is set up one related " database " with its corresponding IP address, when the user inputs the network address of a needs login in browser, system can seek corresponding IP address at first automatically from the Hosts file, in case find, system can open corresponding webpage immediately, if do not find, then system can submit network address to the DNS name resolution server to carry out the parsing of IP address again.The meaning of dns-dproxy is the domain name agency; Dproxy-nexgen is a kind of domain name agency's Open Source Code.
In the situation that up DHCP closes, actual the giving of windows distributed acquiescence network segment 169.254.***.***, the IP of this network segment and our router is the same network segment, at this time, actual DNS request does not respond, the processing mode to domain name according to windows: at first can search local Hosts file and netbios cache, secondly can go to contact dns server and resolve.If these several modes all can't be finished parsing, then computer can send the NBNS packet.The NBNS bag is that all IP main frames of its same network segment are all sent out packet.But, because the NBNS bag can not be forwarded to the dproxy-nexgen module, so can't carry out domain name access.NBNS: network basic input/output (NetBIOS) name server (NBNS) agreement is the part of NetBIOS (NetBT) protocol suite on the TCP/IP, and it provides host name and address mapping method at the network based on the access of NetBIOS title.
This just need program again subprocess of pull-up process the nbns module, in the present embodiment, have specially a nbns subprocess to come data fetch packet.But, these not enough, consider that upstream router can connect outer net, NBNS packet rs destination address is not to be router, like this, it is up that the NBNS module can be forwarded to router at the bridge entrance, cause and can't access, therefore, we need to come read data packet with raw socket, raw socket can be got the data of data link layer, but at link layer, if find that destination address is not this router, can revise purpose MAC, cause packet to be correctly received, in order to accomplish normal reception, the present embodiment determines the protocol header port numbers and is 137 bag in the rtl8192cd_tx_clientMode of 8192cd_tx.c function, do not revise the mac address, 137 namely is the NBNS port numbers.
if(is_vlan_tag)
iph?=?((struct?iphdr?*)(skb->data+MACADDRLEN*2+4+2));
else
iph?=?((struct?iphdr?*)(skb->data+MACADDRLEN*2+2));
if(iph->protocol==0x11)//UDP
{
tcph=?(struct?tcphdr*)((__u32?*)iph?+?iph->ihl);
//if((tcph->dest==137)&&(tcph->source==137))
if((tcph->dest==137))
{
}
else
memcpy(skb->data+MACADDRLEN,?GET_MY_HWADDR,?MACADDRLEN);
}
else
memcpy(skb->data+MACADDRLEN,?GET_MY_HWADDR,?MACADDRLEN);
After receiving packet, process packet, first parsing, rear response.
When the agreement of the nbns that receives packet, resolve Name, need to carry out coding and decoding.This has the related data can be for reference.
When handle packet, separate one by one parsing MAC layer, IP layer, UDP layer, application layer.Then according to the UDP message bag, one by one to MAC IP UDP application layer group bag, hold response to PC, the PC end is deposited the result of name resolution in the buffer memory of netbios, access in 10 minutes, speed, but after a period of time, buffer memory is updated, and needs the long period again to obtain to respond.

Claims (2)

1. router domain name access method, the method is suitable for using in the terminal of operating system as the windows system, it is characterized in that: when beginning domain name access, terminal may further comprise the steps,
Whether the DHCP of steps A, the up route of detection opens, and carries out domain name access if DHCP has opened then by normal domain name access mode, if DHCP does not open, then turns to step B;
Whether step B, the local hosts file of detection or netbios buffer memory have corresponding domain name, if having, then return IP address corresponding to this domain name, otherwise turn to step C;
Step C, send DNS bag and to network inquiry whether IP corresponding to domain name is arranged, if having then return this IP address; Otherwise turn to step D;
Whether step D, the same network segment is sent the NBNS protocol package, detecting has IP address corresponding to described territory; If have, then return corresponding routing management IP address, otherwise, can judge that network does not have routing device or be not this scheme routing device.
2. router domain name access method according to claim 1, it is characterized in that: described method is based on the realteck chip platform, and the managing I P of routing device is 169.254.***.***.
CN201310273907.0A 2013-07-02 2013-07-02 Router domain name access method Active CN103327137B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310273907.0A CN103327137B (en) 2013-07-02 2013-07-02 Router domain name access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310273907.0A CN103327137B (en) 2013-07-02 2013-07-02 Router domain name access method

Publications (2)

Publication Number Publication Date
CN103327137A true CN103327137A (en) 2013-09-25
CN103327137B CN103327137B (en) 2017-02-08

Family

ID=49195658

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310273907.0A Active CN103327137B (en) 2013-07-02 2013-07-02 Router domain name access method

Country Status (1)

Country Link
CN (1) CN103327137B (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301452A (en) * 2014-10-21 2015-01-21 中国联合网络通信集团有限公司 Method and system for distinguishing host access position and inner gateway device
CN104394036A (en) * 2014-12-05 2015-03-04 北京极科极客科技有限公司 Method for detecting network status
CN104700512A (en) * 2013-12-06 2015-06-10 航天信息股份有限公司 Method of adopting DHCP and DNS protocol fast configuration server and network tax controller cluster
CN105743684A (en) * 2014-12-12 2016-07-06 海信集团有限公司 Router configuration method in AP mode and router
CN106357837A (en) * 2016-09-08 2017-01-25 上海斐讯数据通信技术有限公司 Method and device for distributing domain name system
CN108769287A (en) * 2018-05-31 2018-11-06 四川斐讯全智信息技术有限公司 A kind of router domain name access method, system, computer equipment and storage medium
CN108881515A (en) * 2018-07-09 2018-11-23 迈普通信技术股份有限公司 Domain name analytic method, device and the network equipment
CN109040345A (en) * 2018-09-30 2018-12-18 郑州冰川网络技术有限公司 The parsing accelerated method and parsing accelerator of DNS cache
CN112202675A (en) * 2020-10-10 2021-01-08 四川天邑康和通信股份有限公司 Method for realizing access to router by using domain name based on Linux kernel DNS
CN113518134A (en) * 2021-07-09 2021-10-19 烽火通信科技股份有限公司 Method and device for accessing main router through domain name under MESH networking

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469166A (en) * 2010-10-29 2012-05-23 国际商业机器公司 Method for providing virtual domain name system (DNS) in local area network, terminal equipment and system
CN102651707A (en) * 2012-04-16 2012-08-29 深圳市共进电子股份有限公司 Automatic configuration method of wireless bridge

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102469166A (en) * 2010-10-29 2012-05-23 国际商业机器公司 Method for providing virtual domain name system (DNS) in local area network, terminal equipment and system
CN102651707A (en) * 2012-04-16 2012-08-29 深圳市共进电子股份有限公司 Automatic configuration method of wireless bridge

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
冯俊: ""Windows环境中动态域名服务器的实现"", 《江苏广播电视大学学报》 *
李文卿: ""利用WINS服务器实现跨网关"网络邻居"访问"", 《OA’2001办公自动化国际学术研讨会论文集》 *
王波: ""NT网络中动态DNS的实现"", 《电子与电脑》 *

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104700512A (en) * 2013-12-06 2015-06-10 航天信息股份有限公司 Method of adopting DHCP and DNS protocol fast configuration server and network tax controller cluster
CN104301452B (en) * 2014-10-21 2018-01-30 中国联合网络通信集团有限公司 A kind of method, system and internal layer gateway device distinguished main frame and access position
CN104301452A (en) * 2014-10-21 2015-01-21 中国联合网络通信集团有限公司 Method and system for distinguishing host access position and inner gateway device
CN104394036A (en) * 2014-12-05 2015-03-04 北京极科极客科技有限公司 Method for detecting network status
CN105743684B (en) * 2014-12-12 2019-03-19 海信集团有限公司 The configuration method and router of router under a kind of ap mode
CN105743684A (en) * 2014-12-12 2016-07-06 海信集团有限公司 Router configuration method in AP mode and router
CN106357837A (en) * 2016-09-08 2017-01-25 上海斐讯数据通信技术有限公司 Method and device for distributing domain name system
CN108769287A (en) * 2018-05-31 2018-11-06 四川斐讯全智信息技术有限公司 A kind of router domain name access method, system, computer equipment and storage medium
CN108881515A (en) * 2018-07-09 2018-11-23 迈普通信技术股份有限公司 Domain name analytic method, device and the network equipment
CN109040345A (en) * 2018-09-30 2018-12-18 郑州冰川网络技术有限公司 The parsing accelerated method and parsing accelerator of DNS cache
CN109040345B (en) * 2018-09-30 2023-08-22 郑州冰川网络技术有限公司 Analysis accelerating method and analysis accelerating device for DNS (Domain name System) cache
CN112202675A (en) * 2020-10-10 2021-01-08 四川天邑康和通信股份有限公司 Method for realizing access to router by using domain name based on Linux kernel DNS
CN112202675B (en) * 2020-10-10 2022-04-15 四川天邑康和通信股份有限公司 Method for realizing access to router by using domain name based on Linux kernel DNS
CN113518134A (en) * 2021-07-09 2021-10-19 烽火通信科技股份有限公司 Method and device for accessing main router through domain name under MESH networking
CN113518134B (en) * 2021-07-09 2022-06-17 烽火通信科技股份有限公司 Method and device for accessing main router through domain name under MESH networking

Also Published As

Publication number Publication date
CN103327137B (en) 2017-02-08

Similar Documents

Publication Publication Date Title
CN103327137A (en) Router domain name access method
CN104243210B (en) The method and system of remote access router administration page
JP5852116B2 (en) New network communication method and system
US7855955B2 (en) Method for managing frames in a global-area communications network, corresponding computer-readable storage medium and tunnel endpoint
CN101401357B (en) Managing traffic within and between virtual private networks when using a session border controller
US7385973B1 (en) Method and apparatus for VLAN ID discovery
CN100534034C (en) Access control method and apparatus
WO2017186069A1 (en) Data transmission method and network device
US20080056222A1 (en) Wireless router connection indicator
US20120087255A1 (en) Relay apparatus and method therefor
JP2006503513A (en) Common protocol hierarchy and method and common protocol packet for mutual data transmission between heterogeneous protocols.
US9197442B2 (en) Relay apparatus and relay method
CN102484604A (en) Techniques for routing data between network areas
JPH0281539A (en) Digital communication network and its operation method and router
JPH10285204A (en) Interconnected ethernet and 1394-network
CN202094935U (en) Dynamic IP network based remote switch signal control system
CN201657204U (en) System for realizing network video monitoring off internet platform
US8576746B2 (en) Sensor node identification method for hierarchical sensor network, and component therefor
CN115834291A (en) Distributed intranet service data acquisition method, device, equipment and storage medium
JP6052876B2 (en) Relay device, control method thereof, and control program thereof
CN104054303B (en) Gateway suitable for VOD
JP4223365B2 (en) Data relay apparatus and data relay method
JP5519807B2 (en) Setting terminal used in distributed computer system
TWI603599B (en) Data sharing method and electronic device using same
KR100788138B1 (en) System and method for providing communication service using network-based service platform

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