CN1961542A - Communication device, communication setting method, communication setting program, and recording medium for recording the communication setting program - Google Patents

Communication device, communication setting method, communication setting program, and recording medium for recording the communication setting program Download PDF

Info

Publication number
CN1961542A
CN1961542A CNA200580017406XA CN200580017406A CN1961542A CN 1961542 A CN1961542 A CN 1961542A CN A200580017406X A CNA200580017406X A CN A200580017406XA CN 200580017406 A CN200580017406 A CN 200580017406A CN 1961542 A CN1961542 A CN 1961542A
Authority
CN
China
Prior art keywords
router
address
mentioned
bag
communicator
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
CNA200580017406XA
Other languages
Chinese (zh)
Other versions
CN100591038C (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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Publication of CN1961542A publication Critical patent/CN1961542A/en
Application granted granted Critical
Publication of CN100591038C publication Critical patent/CN100591038C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

There is provided a communication device capable of performing router setting even in a home network formed by multi-stage routers. The communication device includes inner address acquisition means for acquiring an inner address of each router and external address acquisition means for acquiring an external address of each router. The external address acquisition means repeatedly accesses a router according to the inner address acquired by the inner address acquisition means and acquires the external address of the router. The inner address acquisition means repeatedly acquires the inner address of the router positioned at the wide-range network side as compared to the router having the external address, according to the external address acquired by the external address acquisition means.

Description

The recording medium of communicator, communication setting method, communication setting program and record communication setting program
Technical field
The present invention in the local area network (LAN) that relates within the family a kind of or the company etc. (below be called home network), carries out the recording medium of communicator, communication setting method, communication setting program and record communication setting program that the route of each machine sets.
Background technology
In recent years, informationized society develops rapidly, in the formation of the LAN in the family or in the company (Local AreaNetwork), also has a plurality of networks that comprise wired lan, WLAN sometimes.In order to connect so a plurality of networks, need many to be connected the router that carries out the circuit selection between two networks sometimes.
In such home network, in the situation of wireless connections communicating machine or make it possible under the situation of internet access, need the setting of communicating machine or constitute (being also referred to as network settings) such as settings of the router of home network.The problem that exists is, in order to carry out this router setting, needs professional knowledge, and the general user is difficult to carry out.
As the method that solves such problem, the known method that the IGD such as broadband router (Internet Gateway Device) that utilize corresponding UPnP (Universal Plugand Play) are arranged.
In addition, as the method that obtains the router address on the circuit in the network that a plurality of router constituted, known have a patent documentation 1 (spy opens 2002-111665).
The technology of the address of obtaining the communicating machine that is connected to the router communication on the network that can be constituted with a plurality of router is disclosed in the patent documentation 2 in addition.Here, each router on the network has line information.Through the communicator that router is connected with communicating machine, obtain this line information from router, by like this, can obtain not address with the direct-connected communicating machine of self terminal.
Patent documentation 1: the spy opens the 2002-111665 communique
Patent documentation 2: the spy opens the 2002-111668 communique
But the aforesaid method of utilizing UPnP is to be prerequisite to connect communicating machine through 1 level router in home network.Therefore, utilize the method for UPnP, can't be applicable to the setting of the home network that multistage router constitutes.
In addition, in the patent documentation 1 disclosed method, though can learn the IP address of router, can't learn the information of the setting request address to router (for example port, URL etc.) that is used for carrying out router setting, thereby can't be applicable to the setting of home network.
As mentioned above, the setting of the multistage home network that router constituted is comparatively difficult.Even disclosed method in the patent documentation 2, at communicator and communicating machine under the situation of the home network that multistage router is connected, between employed here home-use router, the exchange of the line information of RIP (RoutingInformation Protocol) and so on also can't effective action basically.Therefore, the very difficult router in home network of communicator is obtained the line information of communicating machine.
Summary of the invention
Therefore, the present invention is in view of above problem, purpose is: providing a kind of can make communicator can carry out the recording medium of communicator, communication setting method, communication setting program and the record communication setting program of router setting in the home network that multistage router constituted.
In addition, the objective of the invention is to: provide a kind of in the home network that multistage router constituted, can grasp the recording medium of communicator, communication setting method, communication setting program and the record communication setting program of the formation of the communicating machine that is connected with each router.
For addressing the above problem, the application's the 1st invention provides a kind of and is connected with wide area network, includes the interior communicator of home network of a plurality of routers of multistage connection.This communicator is characterised in that and comprises following inscape.
◎ obtains the inboard address of the home network side address (below be called inboard address) of each router and obtains mechanism
◎ obtains the address, the outside of the wide area network side address (below be called the outside address) of each router and obtains mechanism
Here, mechanism is obtained in address, the above-mentioned outside, repeats according to above-mentioned inboard address and obtains the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router;
Mechanism is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of mechanism, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
By above-mentioned formation, according to the address, the outside of router, obtain inboard address than the router of the more close wide area network side of this router, constitute by grasping router like this.Therefore, the router that does not need to change the router number of pass times of permission is found the transmission in home network with generation of wrapping and the bag that generated, just can obtain the structure of router.
In addition, owing to transmit the processing of the router discovery of the router number of pass times that changes permission with bag, even therefore contain under the situation of the router that when forwarding router is found with bag, does not reduce the processing that allows the router number of pass times, also can grasp the router topology in the home network at home network.And then, owing to have to receive router is not found processing with the router response packet of bag, even therefore under the situation that includes the router that the router response packet is filtered, also can grasp the interior router topology of home network.
Specifically, to direct-connected the 1st router of communicator, send and to be made as the router that allows router number of pass times=1 and to find with bag.Relative therewith, send the router response packet of the inboard address include the 1st router from the 1st router.Communicator is obtained the inboard address of the 1st router from the router response packet.And then communicator is obtained the address, the outside of the 1st router by the 1st router is carried out Get ExternalIPAddress.Next, communicator is according to the address, the outside of the 1st router, obtains the inboard address that is positioned at more by the 2nd router of wide area network side.Afterwards, visit the 2nd router, obtain address, the outside,, can grasp the router topology in the home network by repeating aforesaid operations by obtained inboard address.
The application's the 2nd invention provides a kind of communicator, is characterised in that in the 1st invention, also comprises: router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable; Router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network; Router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, includes a plurality of router response packets of each router address; And router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet.
Router is found with bag from above-mentioned communicator receiving router.Here, router finds that the router number of pass times of permission is used as specification of variables with in the bag.Receive router and find, find with wrapping by the router transmission router of wide area network side to being positioned at more with the router that wraps.At this moment, after the permission router number of pass times that router will set subtracts 1, send to the next router that connects.In case allow the router number of pass times to become " 0 ", router just stops the router discovery transmission of bag toward wide area network side, the router response packet is sent to the communicator of finding to use the transmission source of wrapping as router.By the reception of this router response packet, communicator can easily be grasped the router topology in the home network.Like this, communicator except obtaining mechanism and mechanism is obtained in address, the outside in inboard address, can also be that the router of variable is found easily to grasp the structure of router with bag by sending to allow the router number of pass times.
Grasp the method for the structure of router as variable if use such router number of pass times that will allow, then under the situation of router that includes the processing of not carrying out reducing the router number of pass times or router that the router response packet is filtered, might accurately grasp router topology.But, by and use the router number of pass times grasped the method for the structure of router as variable, obtain the method that mechanism grasps the structure of router with obtain mechanism and address, the outside by inboard address, just can address this problem.For example, can address the above problem by following method.
The 1st, preferably allow above-mentioned router response packet receiving mechanism, also judging whether to have received above-mentioned router finds to generate the pairing router response packet of permission router number of pass times that mechanism sets with bag, above-mentioned router address obtain mechanism also have the outside address obtain mechanism, judging that above-mentioned router response packet receiving mechanism can't receive under the situation of router response packet, from the router response packet that can receive in the maximum pairing router response packet of permission router number of pass times, extract the inboard address of this router out, according to the inboard address access router of being extracted out, obtain the address, the outside of this router, above-mentioned router address is obtained mechanism, repetition obtains the obtained address, the outside of mechanism according to address, the above-mentioned outside, obtain than be positioned at have address, the above-mentioned outside router more by the action of the inboard address of the router of wide area network side, and obtained inboard address exported to above-mentioned trunk information set mechanism.
Communicator is made as variable by allowing the router number of pass times, sends router in succession and finds can receive the router response packet in succession from router with bag, obtains router address at a high speed.On the other hand, communicator as mentioned above, is extracted inboard address out from the router response packet that can receive under the situation that can't receive the router response packet.Afterwards, according to the inboard address of being extracted out, obtain the address, the outside of this router.And then, according to obtained address, the outside, obtain the inboard address of the router of more close wide area network side, repeat above-mentioned action.By like this, even do not reduce to allow the router number of pass times but it ignored including, router is found to be transmitted to next router with bag, or in the home network of the router that the router response packet from router is filtered, also can grasp the router topology in the home network, carry out the setting of trunk information.
The 2nd, the comparison mechanism that preferably also includes the comparison of carrying out above-mentioned inboard address and address, the above-mentioned outside, above-mentioned router is found to generate mechanism with bag, generation is replied in order to allow the 1st router send, and above-mentioned permission router number of pass times is made as the 1st router discovery of the 1st value with wrapping, and reply in order to make way for more to send by the 2nd router of above-mentioned wide area network side than above-mentioned the 1st router, and being made as the 2nd router that above-mentioned the 1st value is added 1 the 2nd value that obtains, above-mentioned permission router number of pass times finds with bag, above-mentioned router response packet receiving mechanism, receiving corresponding above-mentioned the 1st router finds with the 1st router response packet that wraps, find with the 2nd router response packet that wraps with corresponding above-mentioned the 2nd router, above-mentioned router address is obtained mechanism, extract the 1st inboard address out from above-mentioned the 1st router response packet, extract the 2nd inboard address out from above-mentioned the 2nd router response packet, mechanism is obtained in address, the above-mentioned outside, according to the above-mentioned the 1st inboard address access router, obtain the address, the 1st outside of this router, above-mentioned relatively mechanism, the above-mentioned the 2nd inboard address and address, above-mentioned the 1st outside are compared, judge under the contradictory situation of both address space in above-mentioned relatively mechanism, above-mentioned router address is obtained mechanism, the address, above-mentioned the 1st outside that obtains according to corresponding the 1st value of above-mentioned permission router number of pass times, obtain and be positioned at the 3rd inboard address of more leaning on the router of wide area network side than router with address, the above-mentioned outside, mechanism is obtained in address, the above-mentioned outside, according to the above-mentioned the 3rd inboard address access router, obtain the address, the 3rd outside of this router, above-mentioned relatively mechanism, the more above-mentioned the 2nd inboard address and address, above-mentioned the 3rd outside, whether contradictoryly judge in both address space, by repeating above action, obtain the inboard address that is present in the router between above-mentioned the 1st router and the 2nd router, above-mentioned processing request destination is exported in each obtained inboard address obtain mechanism.
As mentioned above, by judging from the inboard address that the router response packet is extracted out, consistent inconsistent with according to obtained address, the outside, the inboard address of preceding level router can be judged from the legitimacy of the inboard address that the router response packet is extracted out.Under corresponding to situation, can confirm the inboard address of being extracted out from the router response packet, be to be used for correct address from the communicator access router.Therefore, allow the router number of pass times just to be transmitted under the situation of router of next router even include not reduce in home network, communicator also can be grasped the router topology in the home network, carries out the setting of trunk information.
The application's the 3rd invention, a kind of communicator is provided, be characterised in that in the 1st invention, also comprise: the trunk information set mechanism, it is according to obtained inboard address access router, sets being used for the trunk information of the communication between relaying and other communicators that are connected via the above-mentioned multistage router that is connected.
Communicator is obtained the inboard address of router from the router response packet, according to this address, inboard access router, carries out the setting of trunk information, obtains address, the outside simultaneously.By like this, can carry out the setting of trunk information to each router in the home network.
The application's the 4th invention provides a kind of communicator, is characterised in that in the 1st invention, also has the 2nd decision mechanism, whether it judges that address, the above-mentioned outside obtains the address, the outside that mechanism newly obtains, be that the address, the outside that connects the gateway of home network and wide area network is a global address
In address, the above-mentioned outside is under the situation of global address, ends to be obtained by above-mentioned inboard address the obtaining of the new address, the outside of obtaining and obtained by address, the above-mentioned outside mechanism for implementing of the new inboard address of mechanism for implementing.
In this case, can only be present in the setting of the router in oneself home network.
The application's the 5th invention, a kind of communicator is provided, and be characterised in that in the 1st invention: mechanism is obtained in above-mentioned inboard address, generates the part variation that makes address, the above-mentioned outside obtain the obtained address, the outside of mechanism and the test address that obtains, inboard address as router
Mechanism is obtained in address, the above-mentioned outside, and according to above-mentioned test address, visit is positioned at than the router with address, the above-mentioned outside more leans on the router of wide area network side, and obtains the address, the outside of this router.
Communicator is by changing the address, the outside of obtained router, can efficiently obtain the inboard address that is positioned at more by the router of wide area network side.
In addition, mechanism is obtained in above-mentioned inboard address, preferably changes specific value into by minimum 8 positions of address, the above-mentioned outside being obtained the obtained address, the outside of mechanism, generates above-mentioned test address.
In general, minimum 8 of the inboard address of commercially available router are made as " 1 " or " 254 " usually under the situation of default setting.In addition, under the situation of user's change setting, usually also be made as specific values such as 64 or 128,, can obtain the address of router at a high speed therefore by attempting visit according to the test address of such particular value.
The application's the 6th invention, a kind of communicator is provided, is characterised in that in the 1st invention, also comprise: machine discovery generates mechanism with bag, it is according to obtained address, the outside, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping; Machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag; Machine response packet receiving mechanism, it receives above-mentioned machine discovery is replied with bag from least 1 communicating machine, includes the machine response packet of the machine address of this communicating machine; And machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
In addition, communicator does not need to change the router that allows the router number of pass times and finds just can easily grasp the structure of the interior router of home network with the generation of bag and to the transmission of home network.And then communicator can be obtained the address of the communicating machine that is connected with router.Therefore, even communicator in the home network that multistage router constituted, also can be grasped the formation of the communicating machine that is connected with router.
The application's the 7th invention, a kind of communicator is provided, be characterised in that in the 6th invention, also comprise: communication setting mechanism, it is according to the machine address accessing communication machine of being extracted out, to one of above-mentioned communicating machine and the communicator of self, be used for the setting of communicating by letter with above-mentioned communicating machine.
Even communicator in the home network that multistage router constituted, also can be visited this communicating machine, be used for the various settings of communication of trunking traffic machine.
The application's the 8th invention provides a kind of communicator, is characterised in that in the 6th invention, and also have machine grasp portion, it grasps the address and the attribute information of above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out
In this case, can be according to the address or the attribute of communicating machine, which type of communicating machine identifies this communicating machine is, or is in which type of state.
The application's the 9th invention provides a kind of communicator, is characterised in that in the 8th invention, and also have display part, it demonstrates address and attribute information by the obtained communicating machine of above-mentioned machine grasp portion.
In this case, be presented in the display part, make user's affirmation become easy by information with obtained router and communicating machine.
The application's the 10th invention, a kind of communicator is provided, be characterised in that in the 1st invention: above-mentioned communicator, it is the interior communicator of the 1st home network that includes a plurality of routers of multistage connection, also have: router topology information sending part, it is with the part of a plurality of routers of above-mentioned multistage connection, the router topology information that promptly comprises a part of router of the router that communicator self connected, send to other communicators in above-mentioned the 1st home network, or by other communicators in wide area network and the 2nd home network that above-mentioned the 1st home network is connected; And, the communication judging part, it is from above-mentioned other communicators, receive the router topology information of another part router in above-mentioned a plurality of router, according to router topology information of communicator of self and received router topology information, judgement could communicate with above-mentioned other communicators, and above-mentioned router topology information is according to the inboard address of each communicator obtaining the obtained inboard address of mechanism and/or the obtained address, the outside of mechanism is obtained in address, the outside.
In this communicator,, can carry out communication lines such as NAT setting and fire compartment wall setting and set by in the network that multistage router constituted, also grasping router topology.By setting communication line like this, though a side or both sides' communicator in home network under the situation that multistage router is connected, also can communicate P2P communication between device (below,, keep) as means in claim 23,24.
In addition, preferably also have router and find to generate mechanism with bag, its generation includes permission router number of pass times and finds with bag as the router of variable; Router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag; Router response packet receiving mechanism, it receives from above-mentioned a plurality of routers above-mentioned router is found to reply with bag, includes a plurality of router response packets of each router address; And router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; Above-mentioned router topology information obtaining section according to the router address of above-mentioned a plurality of routers, obtains the router topology information of above-mentioned a part of router.
Receive allowing the router number of pass times to find with the router that wraps from above-mentioned communicator, send router to wide area network side and find with bag as the router of variable.At this moment, the router permission router number of pass times that will set subtracts and sends to the next router that connects after 1.In case allow the router number of pass times to become " 0 ", router just stops router and finds with the transmission of bag to wide area network side the router response packet to be sent to as the communicator of router discovery with the transmission source of bag.By like this, communicator can easily be grasped the router topology in the home network.Therefore, communicator can be visited the router of being grasped, and sets router, make can with the other side's who is connected via the multistage router that is connected communicator between communicate.
And then mechanism is obtained in the inboard address that preferably also has the home network side address of obtaining each router (below be called inboard address); Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain mechanism; And the trunk information set mechanism, it is according to obtained inboard address access router, sets being used for the trunk information of the communication between relaying and other communicators that are connected via the above-mentioned multistage router that is connected; Mechanism is obtained in address, the above-mentioned outside, repeats according to above-mentioned inboard address and obtains the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router; Mechanism is obtained in above-mentioned inboard address, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside, above-mentioned router topology information obtaining section, according to obtained inboard address and/or address, the outside, obtain the router topology information of above-mentioned a part of router.
By above-mentioned formation, according to the address, the outside of the router of communicator side, obtain inboard address by the router in the home network outside, constitute by grasping router like this.Therefore, not needing to change the router that allows the router number of pass times finds just can obtain the structure of router with the generation of bag and the transmission of bag in home network that is generated.
In addition, owing to transmit the processing of the router discovery of variation permission router number of pass times with bag, even therefore contain under the situation of the router that when forwarding router is found with bag, does not reduce the processing that allows the router number of pass times, also can grasp the router topology in the home network at home network.And then, owing to have to receive router is not found processing with the router response packet of bag, even therefore under the situation that includes the router that the router response packet is filtered, also can grasp the interior router topology of home network.
The application's the 11st invention provides a kind of communicator, is characterised in that in the 10th invention, also has the trunk information set mechanism, it is according to above-mentioned router topology information, to each router, sets with the trunk information of communicating by letter between other communicators being used for relaying.
The trunk information set mechanism, the router grasped of visit carries out the setting of trunk information, and by like this, communicator can communicate with the other side's who is connected via the multistage router that is connected communicator.
The application's the 12nd invention, a kind of communicator is provided, be characterised in that in the 11st invention: above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, inboard address and/or address, the outside interior to family's network and be connected each router of the internetwork border router of both sides with the boundary of wide area network, above-mentioned communication judging part, has the branch address drawing mechanism, router address from wide area network side, judge the router address that comprises in the router topology information of communicator of self in turn, consistent or inconsistent with the router address that comprises in the router topology information of other communicators, extract the address of the breakout that is judged as inconsistent communication line at first out, use the branch address extracted out, judgement could with above-mentioned other communication.
By judging whether that the router below the branch has been carried out the communication line setting, can judge and to communicate.Therefore, can communicate with the other side's who is connected via the multistage router that is connected communicator.
The application's the 13rd invention, a kind of communicator is provided, be characterised in that in the 11st invention: above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, inboard address and/or address, the outside interior to family's network and be connected each router of the internetwork border router of both sides with the boundary of wide area network, above-mentioned communication judging part, have: the branch address drawing mechanism, router address from wide area network side, judge the router address that comprises in the router topology information of communicator of self in turn, consistent or inconsistent with the router address that comprises in the router topology information of other communicators, the address of extracting the breakout that is judged as inconsistent communication line at first out; And, the branch address transmitting mechanism, the branch address of being extracted out is sent to above-mentioned trunk information set mechanism, above-mentioned trunk information set mechanism, according to the router topology information of communicator of self, visit the router of corresponding above-mentioned branch address and be positioned at this router and the communicator of self between router, set trunk information, above-mentioned branch address transmitting mechanism, the trunk information and the above-mentioned branch address of the router of the above-mentioned branch address of correspondence are associated, send to other communicators that communicate.
In addition, preferably allow above-mentioned trunk information set mechanism, obtain the obtained router topology information of mechanism according to above-mentioned router topology information, each router is used for the setting of the trunk information of communicating by letter between relaying and other communicators, above-mentioned router topology information, by from above-mentioned communicator, in family's network and is connected the router address of each router of two internetwork border routers and the port numbering formation that is made as trunk information with the boundary of wide area network.Here, above-mentioned communication judging part, has the branch address drawing mechanism, it is from the router address of wide area network side, judge the consistent or inconsistent of the router address that contains in the router topology information of the router address that contains in the router topology information of communicator of self and other communicators in turn, extract the address of the breakout that is judged as inconsistent communication line at first that is contained in the router topology information of other communicators out, and to the port numbering of the trunk information that sets in should the router of address, use the address and the port numbering of the above-mentioned breakout that above-mentioned branch address drawing mechanism extracted out, carry out and the communicating by letter of above-mentioned other communication terminals.
By above-mentioned formation, after carrying out router setting, can explore breakout.Therefore, can communicate with the other side's communicator that is connected via the multistage router that is connected.
The application's the 14th invention provides a kind of and is connected with wide area network, includes the interior communicator of home network of a plurality of routers of multistage connection.Communicator has following inscape.
The ◎ router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
The ◎ router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
◎ router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, includes a plurality of router response packets of each router address;
The ◎ router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; And,
◎ handles the request destination and obtains mechanism, and it is obtained trunk information and set the request destination information of handling according to the router address access router of being extracted out.
Router, from above-mentioned communicator, the router that reception will allow the router number of pass times to be made as variable is found with bag.Receive router and find, find with wrapping by the router transmission router of wide area network side to being positioned at more with the router that wraps.At this moment, after the permission router number of pass times that router will set subtracts 1, send to the next router that connects.In case allow the router number of pass times to become " 0 ", router just stops router and finds with the transmission of bag to wide area network side the router response packet to be sent to as the communicator of router discovery with the transmission source of bag.By the reception of this router response packet, communicator can easily be grasped the router topology in the home network.And the router that can visit the address of being grasped is obtained the request destination information (port numbering, URL etc.) of the trunk information that is used for setting router.Afterwards,, set router, it can be communicated with other communicators that are connected via the multistage router that is connected for example according to obtained request destination information access router.
Specifically, for example allow the situation of router number of pass times=1,2 to describe to being made as.Communicator will be made as the router that allows router number of pass times=1 find with wrap send to router after, from direct-connected the 1st router of communicator, the router response packet that includes the inboard address of the 1st router is sent to communicator.Here, inboard address is meant the home network side address of router, and communicator can be visited each router according to inboard address.Here, communicator can be extracted the inboard address of the 1st router from this router response packet out, visits the 1st router according to this address, inboard, carries out NAT and sets.For example, the port numbering of the communicator self when specifying visit, the IP address of communicator, the port numbering of the 1st router carry out NAT and set.
And then communicator is made as the router discovery bag that allows router number of pass times=2 by sending to router, obtains through the inboard address of the 1st router from the 2nd router of the 2nd grade of connection of communicator.Like this, communicator also can be visited the 2nd router, carries out NAT and sets.For example, specify the address, the outside of the 1st router, the port numbering of the 1st router, the port numbering of the 2nd router etc., carry out NAT and set.Here, the address, the outside of the 1st router can be obtained by the 1st router being carried out Get External IPAddress.By above processing, can grasp the interior router topology of home network that multistage router constitutes.In addition, according to this router topology of grasping, can also establish communication with the other side's who is connected via multistage router communicator.
The application's the 15th invention, be characterised in that in the 14th invention, also has the trunk information set mechanism, it is obtained the obtained request destination information of mechanism according to above-mentioned processing request destination and conducts interviews, and sets being used for the trunk information of the communication between relaying and other communicators that are connected via the above-mentioned multistage router that is connected.
Communicator can carry out the setting of trunk information according to request destination information access router to each router in the home network.
The application's the 16th invention provides a kind of communicator, is characterised in that in the 15th invention: above-mentioned router address is home network side address (below be called inboard address),
Also have address, the outside and obtain mechanism,, obtain the wide area network side address (below be called the outside address) of this router according to above-mentioned processing request destination information access router,
Above-mentioned router address is obtained mechanism, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router, and above-mentioned processing request destination is exported in obtained inboard address obtain mechanism more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside.
Communicator can use router to find to obtain with bag the inboard address of router, or obtain the address, the outside of this router from the inboard address of the router that is positioned at the home network side, and then obtain the inboard address that is positioned at more by the router of wide area network side according to this address, outside.By like this, can grasp the router topology in the home network, carry out the setting of trunk information simultaneously.
In addition, under the situation that obtains address, the outside and inboard address in turn, even do not reduce to allow the router number of pass times but it ignored including, router is found to be transmitted to next router with bag, or in the home network of the router that the router response packet from router is filtered, also can grasp the router topology in the home network, carry out the setting of trunk information.For example also can address the above problem by the following method.
The 1st, communicator is preferably extracted inboard address out from the router response packet that can receive under the situation that can't receive the router response packet.Afterwards, according to the inboard address of being extracted out, obtain the address, the outside of this router.And then, according to obtained address, the outside, obtain the inboard address of the router of more close wide area network side, repeat above-mentioned action.By like this, even do not reduce to allow the router number of pass times but it ignored including, router is found to be transmitted to next router with bag, or in the home network of the router that the router response packet from router is filtered, also can grasp the router topology in the home network, carry out the setting of trunk information.
The 2nd, preferably judge the inboard address of being extracted out, consistent inconsistent with according to obtained address, the outside, the inboard address of preceding level router from the router response packet.By like this, can judge from the legitimacy of the inboard address that the router response packet is extracted out.Under corresponding to situation, can confirm the inboard address of being extracted out from the router response packet, be to be used for correct address from the communicator access router.Therefore, even be included under the situation in the home network not reducing the router that allows the router number of pass times just to be transmitted to next router, communicator also can be grasped the router topology in the home network, carries out the setting of trunk information.
The application's the 17th invention provides a kind of communicator, and be characterised in that in the 14th invention: above-mentioned router address is inboard address,
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is employed global address in the wide area network,
In above-mentioned inboard address is under the situation of global address, and above-mentioned trunk information set mechanism is ended the setting to the trunk information of above-mentioned router.
In obtained inboard address is under the situation of global address, finishes the detection of the router in the home network.Therefore, can only carry out the setting of trunk information to the router in the home network.
The application's the 18th invention provides a kind of communicator, and be characterised in that in the 14th invention: above-mentioned router address is inboard address;
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is employed global address in the wide area network,
Above-mentioned router is found to generate mechanism with bag, in above-mentioned inboard address is under the situation of global address, have the bigger permission router number of pass times of permission router number of pass times that the router of global address sets for comparison, end router and find generation with bag.
In obtained inboard address is under the situation of global address, finishes the detection of the router in the home network.By like this, can avoid the router outside home network, ineffectually send the bag that change allows the router number of pass times.
In addition, preferably also has storing mechanism, the correspondence table that its storage associates above-mentioned permission router number of pass times and the number of pass times identifier that is used for discerning above-mentioned permission router number of pass times, above-mentioned router is found to generate mechanism with bag, generation includes the router of the number of pass times identifier of corresponding above-mentioned permission router number of pass times and finds with bag, above-mentioned router response packet receiving mechanism, reception is found to reply with bag to above-mentioned a plurality of routers, comprise each router address of above-mentioned a plurality of routers and a plurality of router response packets of above-mentioned number of pass times identifier, above-mentioned router address is obtained mechanism, according to the number of pass times identifier of received router response packet, from above-mentioned correspondence table, determine to allow the router number of pass times.
In the router response packet in the past, not about allowing the information of router number of pass times.Therefore, be router response packet in order to grasp from which router, need postback router is found router response packet with bag, or wait acknowledge was arrived up to the time of detecting.Therefore, want to grasp the address of the router on the circuit, expend time in very much.But by above-mentioned formation, communicator can be by the number of pass times identifier in the router response packet, and grasping is router response packet from which router.Therefore, even under the situation that receives a plurality of router response packets, also can clearly be replying from which router.Therefore, communicator can send in succession and change the router discovery bag that allows the router number of pass times, and obtains the address or the router topology of the router in the home network at a high speed.
In addition, in the setting of the trunk information of each router under the situation of utilizing UPnP IGD specification, stage that must corresponding specific application program starting in communicator be carried out the dynamic setting of the setting of trunk information etc.As previously mentioned, communicator is by obtaining at a high speed the address or the router topology of the router in the home network, can be to the setting of the dynamic trunk information of tackling each router.
And then, preferably allow above-mentioned router find to generate mechanism with bag, use TTL (Time To Live) as above-mentioned permission router number of pass times, and then generation comprises corresponding above-mentioned TTL and transmission source port numbering that changes or the UDP bag that sends the destination port numbering, find with bag as above-mentioned router, above-mentioned router is found with the bag transmitting mechanism, repeatedly send a plurality of above-mentioned UDP bags, above-mentioned router response packet receiving mechanism, reception is replied above-mentioned UDP bag, comprise each router address of above-mentioned a plurality of routers and the ICMP Time Exceeded Message bag of one of above-mentioned transmission source port numbering or transmission destination port numbering, as above-mentioned router response packet, above-mentioned router address is obtained mechanism, according to the above-mentioned transmission source port numbering or the transmission destination port numbering of received ICMP Time Exceeded Message bag, determine TTL.
Communicator can or send the destination port numbering according to the transmission source port in ICMP Time Exceeded Message numbering, and grasping is router response packet from which router.Therefore, under the situation that receives a plurality of ICMP Time Exceeded Message, also can clearly be replying from which router.Therefore, communicator sends the UDP bag that changes TTL in succession, thereby can obtain the address or the router topology of the router in the home network at a high speed.In addition, communicator is by obtaining at a high speed router topology etc., can also be to the setting of the dynamic trunking information of tackling each router.
In addition, preferably allow above-mentioned router find to generate mechanism with bag, use TTL (Time To Live) as above-mentioned permission router number of pass times, and then generation comprises the identifier information of corresponding above-mentioned TTL variation or the ICMP echo request bag of serial number, find with bag as router, above-mentioned router is found with the bag transmitting mechanism, repeatedly send a plurality of above-mentioned ICMP echo request bags, above-mentioned router response packet receiving mechanism, reception is replied above-mentioned ICMP echo request bag, comprise each router address of above-mentioned a plurality of routers and the ICMP TimeExceeded Message bag of one of identifier information or serial number, as above-mentioned router response packet, above-mentioned router address is obtained mechanism, according to the above-mentioned identifier information or the serial number of received ICMP Time Exceeded Message bag, determine TTL.
Communicator can be according to identifier information or the serial number in the ICMP Time Exceeded Message, and grasping is router response packet from which router.Therefore, under the situation that receives a plurality of ICMP Time Exceeded Message, also can understand replying from which router.Therefore, communicator sends the ICMP echo request bag that changes TTL in succession, thereby can obtain the address or the router topology of the router in the home network at a high speed.
In addition, above-mentioned trunk information set mechanism preferably carries out address mapping to be set, make router wide area network side port numbering and be positioned at more can conversion by the IP address and/or the port numbering of the router of home network side or the communicator of self than this router.
In this case,, also can carry out the address mapping of each router and set, be used for from the setting of the communicator of wide area network side visit home network side by communicator even in the premises home network that multistage router constituted.
In addition, above-mentioned trunk information set mechanism preferably carries out the setting of IP filter to above-mentioned router, and its decision reaches discarded from the reception of the bag of above-mentioned wide area network side.
In this case,, also can carry out IP filter and set, can be used for from the setting of wide area network side accessing communication terminal by communicator to each router even in the home network that a plurality of router constituted.Therefore the fail safe that can improve communicator.
The application's the 19th invention provides a kind of communicator, is characterised in that in the 14th invention: above-mentioned communicator is the interior communicator of the 1st home network that includes a plurality of routers of multistage connection,
Have: router topology information sending part, it will be as the part of a plurality of routers of above-mentioned multistage connection, and the router topology information that comprises a part of router of the router that communicator self connected, send to other communicators in above-mentioned the 1st home network, or by other communicators in wide area network and the 2nd home network that above-mentioned the 1st home network is connected; And,
The communication judging part, it receives the router topology information of another part router above-mentioned a plurality of router from above-mentioned other communicators, and according to router topology information of communicator of self and received router topology information, judgement could with above-mentioned other communication
Above-mentioned router topology information obtains the obtained router address of mechanism according to above-mentioned router address.
In this communicator,, can carry out communication lines such as NAT setting and fire compartment wall setting and set by in the network that multistage router constituted, also grasping router topology.By setting communication line like this, though a side or both sides' communicator in home network under the situation that multistage router is connected, also can communicate the P2P communication between device.
In addition, preferably also have: router is found to generate mechanism with bag, and its generation comprises permission router number of pass times and finds with bag as the router of variable; Router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag; Router response packet receiving mechanism, it receives from above-mentioned a plurality of routers above-mentioned router is found to reply with bag, comprises a plurality of router response packets of each router address; And router address obtains mechanism, and it extracts each router address out from above-mentioned router response packet, and above-mentioned router topology information obtaining section according to the router address of above-mentioned a plurality of routers, obtains the router topology information of above-mentioned a part of router.
Receive allowing the router number of pass times to find with the router that wraps from above-mentioned communicator, send router to wide area network side and find with bag as the router of variable.At this moment, the router permission router number of pass times that will set subtracts and sends to the next router that connects after 1.In case allow the router number of pass times to become " 0 ", router just stops router and finds with the transmission of bag to wide area network side the router response packet to be sent to as the communicator of router discovery with the transmission source of bag.By like this, communicator can easily be grasped the router topology in the home network.Therefore, communicator can be visited the router of being grasped, and sets router, makes and can communicate with the other side's who is connected via the multistage router that is connected communicator.
And then preferably also have: mechanism is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain mechanism; And, the trunk information set mechanism, it is according to obtained inboard address access router, set with the trunk information of the communication of other communicators that are connected via the above-mentioned multistage router that is connected being used for relaying, mechanism is obtained in address, the above-mentioned outside, repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router, mechanism is obtained in above-mentioned inboard address, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside, above-mentioned router topology information obtaining section, according to obtained inboard address and/or address, the outside, obtain the router topology information of above-mentioned a part of router.
By above-mentioned formation, according to the address, the outside of the router of communicator side, obtain more inboard address by the router in the home network outside, constitute by grasping router like this.Therefore, not needing to change the router that allows the router number of pass times finds just can obtain the structure of router with the transmission to home network of the generation of wrapping and the bag that generated.
In addition, owing to transmit the processing of the router discovery of variation permission router number of pass times with bag, even therefore in home network, include under the situation of the router that when forwarding router is found with bag, does not reduce the processing that allows the router number of pass times, also can grasp the router topology in the home network.And then, owing to have to receive router is not found processing with the router response packet of bag, even therefore under the situation that includes the router that the router response packet is filtered, also can grasp the interior router topology of home network.
The application's the 20th invention, a kind of communicator is provided, and be characterised in that in the 19th invention: also have the trunk information set mechanism, it is according to above-mentioned router topology information, to each router, set with the trunk information of communicating by letter between other communicators being used for relaying.
The trunk information set mechanism, the router grasped of visit carries out the setting of trunk information, and by like this, communicator can communicate with the other side's who is connected via the multistage router that is connected communicator.
The application's the 21st invention, a kind of communicator is provided, be characterised in that in the 20th invention: above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, inboard address and/or address, the outside interior to family's network and be connected each router of the internetwork border router of both sides with the boundary of wide area network
Above-mentioned communication judging part,
Has the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, extract the address of the breakout that is judged as inconsistent communication line at first out
Use the branch address extracted out, judgement could with above-mentioned other communication.
The application's the 22nd invention, a kind of communicator is provided, be characterised in that in the 20th invention: above-mentioned router topology information, by from above-mentioned communicator, the router address formation that in family's network and with the boundary of wide area network, is connected each router till the internetwork border router of both sides
Above-mentioned communication judging part,
Have: the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, the address of extracting the breakout that is judged as inconsistent communication line at first out; And,
The branch address transmitting mechanism sends to above-mentioned trunk information set mechanism with the branch address of being extracted out,
Above-mentioned trunk information set mechanism, according to the router topology information of communicator of self, visit the router of corresponding above-mentioned branch address and be positioned at this router and the communicator of self between router, set trunk information,
Above-mentioned branch address transmitting mechanism associates the trunk information and the above-mentioned branch address of the router of the above-mentioned branch address of correspondence, sends to other communicators that communicate.
In addition, preferably allow above-mentioned trunk information set mechanism, obtain the obtained router topology information of mechanism according to above-mentioned router topology information, each router is used for the setting of the trunk information of communicating by letter between relaying and other communicators, above-mentioned router topology information, by from above-mentioned communicator, in family's network and with boundary between the wide area, is connected the router address of each router of the internetwork border router of both sides, and the port numbering formation that is made as trunk information.Here, above-mentioned communication judging part has: from the router address of wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, extract the address of the breakout that is judged as inconsistent communication line at first that is contained in the router topology information of other communicators out, and to the port numbering of the trunk information that sets in should the router of address; Use the address and the port numbering of the above-mentioned breakout that above-mentioned branch address drawing mechanism extracted out, communicate with other communication terminals.
By above-mentioned formation, carry out to explore breakout after the router setting.Therefore, can communicate with the other side's communicator that is connected via the multistage router that is connected.
The application's the 23rd invention provides a kind of and is connected with wide area network, includes the interior communicator of home network of a plurality of routers of multistage connection.Here, communicator comprises following inscape.
The ◎ router is found to generate mechanism with bag, and its generation comprises permission router number of pass times and finds with bag as the router of variable;
The ◎ router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag;
◎ router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address;
The ◎ router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet;
The ◎ machine discovery generates mechanism with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
The ◎ machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
◎ machine response packet receiving mechanism, it receives from least 1 communicating machine above-mentioned machine discovery is replied with bag, comprises the machine response packet of the machine address of this communicating machine; And
The ◎ machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
Communicator does not need to send the router that changes permission router number of pass times and finds just can obtain the router address of the router in the home network with bag.And then communicator is by finding just can to obtain the address of the communicating machine that is connected with router with bag according to this router address distribution of machine.Therefore, for example communicator even in the home network that multistage router constituted, also can be visited this communicating machine, is used for the various settings of communication of trunking traffic machine.
The application's the 24th invention, a kind of communicator is provided, be characterised in that in the 23rd invention: also have communication setting mechanism, it is according to the machine address accessing communication machine of being extracted out, to one of above-mentioned communicating machine and the communicator of self, be used for the setting of communicating by letter with above-mentioned communicating machine.
By like this,, be used for the various settings of communication of trunking traffic machine even communicator in the home network that multistage router constituted, also can be visited this communicating machine.
The application's the 25th invention provides a kind of communicator, and be characterised in that in the 23rd invention: above-mentioned router address is inboard address;
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is global address,
In above-mentioned inboard address is under the situation of global address, the machine discovery of ending to generate mechanism for implementing with bag by above-mentioned machine discovery obtain with the generation of wrapping, by the reception of the machine response packet of above-mentioned machine response packet receiving mechanism enforcement, by above-mentioned machine address mechanism for implementing machine address extraction and by the setting of communicating by letter with above-mentioned communicating machine of being used for of above-mentioned communication setting mechanism for implementing.
By like this, only visit the communicating machine in the home network, thereby can carry out the setting of stable trunk information.
The application's the 26th invention, a kind of communicator is provided, be characterised in that in the 23rd invention: above-mentioned machine discovery generates mechanism with bag, generate comprise that a part that makes the router address of being extracted out changes and the test address that obtains as a plurality of machine discoveries of machine address with bag;
Above-mentioned machine address obtains mechanism, from a plurality of machine discoveries that generate according to the above-mentioned test address pairing a plurality of machine response packets of bag, extracts above-mentioned machine address out.
By decide the machine address of the communicating machine that is connected with router according to router address, compare as ground decision machine address with nothing, more can easily carry out the supposition of machine address.
In addition, above-mentioned communication setting mechanism preferably to above-mentioned communicating machine, comprises the setting of at least 1 radio communication in employed wireless channel, enciphered message and the authentication information in the communication.
In this case, even in the premises home network that a plurality of router constituted, also can be used for the setting of accessing wirelessly.
In addition, above-mentioned communication setting mechanism, extract the information that is used for carrying out radio communication that comprises at least 1 in employed wireless channel, enciphered message and the authentication information the communication out from above-mentioned communicating machine, carry out the setting of radio communication function of the communicator of self.
In this case, even in the premises home network that a plurality of router constituted, also can be used for the setting of accessing wirelessly.
The application's the 27th invention provides a kind of communicator, and be characterised in that in the 23rd invention: also have machine grasp portion, it grasps the attribute information of above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out.
In this case, which type of machine can go out this communicating machine according to the address of communicating machine or Attribute Recognition is, or is in which type of state.
The application's the 28th invention, a kind of communicator is provided, be characterised in that in the 27th invention: also have display part, demonstrate by above-mentioned machine address and obtain the address of the communicating machine that mechanism obtains and the attribute information of the communicating machine that above-mentioned machine grasp portion obtains.
In this case, be presented in the display part, make user's affirmation become easy by information with obtained router and communicating machine.
The application's the 29th invention, a kind of communication means is provided, be a kind ofly to be connected with wide area network, include the communication means in the communicator in the home network of a plurality of routers of multistage connection, wherein, comprising: step is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And,
Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain step,
Step is obtained in address, the above-mentioned outside, and repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of step, and obtain the action of the address, the outside of this router,
Step is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of step, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
The application's invention can be played the identical action effect of the 1st invention with the application.
The application's the 30th invention provides a kind of signal procedure, is a kind ofly to be connected with wide area network, includes the interior performed signal procedure of communicator of home network of a plurality of routers of multistage connection, wherein:
This signal procedure by communicator as following mechanism performance function: mechanism is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And, obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain mechanism, mechanism is obtained in address, the above-mentioned outside, repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router, mechanism is obtained in above-mentioned inboard address, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside.
The application's invention can be played the identical action effect of the 1st invention with the application.
The application's the 31st invention, a kind of computer readable recording medium storing program for performing is provided, record with wide area network and be connected, comprise the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, implement: step is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And, obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain step, mechanism is obtained in address, the above-mentioned outside, repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router, mechanism is obtained in above-mentioned inboard address, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside.
The application's invention can be played the identical action effect of the 1st invention with the application.
The application's the 32nd invention, a kind of communication means is provided, be a kind ofly to be connected with wide area network, include the communication means in the communicator in the home network of a plurality of routers of multistage connection, comprise: router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable; Router finds to use the bag forwarding step, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network; Router response packet receiving step, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address; Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; And, to handle the request destination and obtain step, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
The application's invention can be played the identical action effect of the 14th invention with the application.
The application's the 33rd invention, a kind of signal procedure is provided, be a kind ofly to be connected with wide area network, the interior performed signal procedure of communicator of home network that includes a plurality of routers of multistage connection, this signal procedure is brought into play function by communicator as following mechanism: the router discovery generates mechanism with bag, and its generation comprises the router discovery bag of the router number of pass times of permission as variable; Router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network; Router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address; Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; And, to handle the request destination and obtain mechanism, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
The application's invention can be played the identical action effect of the 14th invention with the application.
The application's the 34th invention, a kind of computer readable recording medium storing program for performing is provided, record with wide area network and be connected, the interior performed signal procedure of communicator of home network that comprises a plurality of routers of multistage connection, this signal procedure comprises: router is found to generate step with bag, and its generation includes permission router number of pass times and finds with bag as the router of variable; Router finds to use the bag forwarding step, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network; Router response packet receiving step, it receives from above-mentioned a plurality of routers above-mentioned router is found to reply with bag, includes a plurality of router response packets of each router address; Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; And, to handle the request destination and obtain step, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
The application's invention can be played the identical action effect of the 14th invention with the application.
The application's the 35th invention, a kind of communication means is provided, be a kind ofly to be connected with wide area network, the interior communication means of home network that includes a plurality of routers of multistage connection, comprise: router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable; Router finds that with the bag forwarding step it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag; Router response packet receiving step, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address; Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; Machine discovery generates step with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping; Machine discovery is with wrapping forwarding step, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag; Machine response packet receiving step, it receives from least 1 communicating machine above-mentioned machine discovery is replied with bag, comprises the machine response packet of the machine address of this communicating machine; And machine address obtains step, and it extracts machine address out from above-mentioned machine response packet.
The application's invention can be played the identical action effect of the 23rd invention with the application.
The application's the 36th invention, a kind of signal procedure is provided, be a kind ofly to be connected with wide area network, the interior performed signal procedure of communicator of home network that includes a plurality of routers of multistage connection, this signal procedure is brought into play function by communicator as following mechanism: the router discovery generates mechanism with bag, and its generation comprises the router discovery bag of the router number of pass times of permission as variable; Router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag; Router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address; Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; Machine discovery generates mechanism with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping; Machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag; Machine response packet receiving mechanism, it receives from least 1 communicating machine above-mentioned machine discovery is replied with bag, comprises the machine response packet of the machine address of this communicating machine; And machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
The application's invention can be played the identical action effect of the 23rd invention with the application.
The application's the 37th invention, a kind of computer readable recording medium storing program for performing is provided, record with wide area network and be connected, the interior performed signal procedure of communicator of home network that comprises a plurality of routers of multistage connection, this signal procedure is used for implementing: router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable; Router finds that with the bag forwarding step it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag; Router response packet receiving step, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address; Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; Machine discovery generates step with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping; Machine discovery is with wrapping forwarding step, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag; Machine response packet receiving step, it receives from least 1 communicating machine above-mentioned machine discovery is replied with bag, comprises the machine response packet of the machine address of this communicating machine; And machine address obtains step, and it extracts machine address out from above-mentioned machine response packet.
The application's invention can be played the identical action effect of the 23rd invention with the application.
The application of the invention, even in the home network that multistage router constituted, communicator also can carry out router setting.
Description of drawings
Fig. 1 is the home network architecture figure in the 1st execution mode of the present invention.
Fig. 2 is the structure chart of the communicator in the 1st execution mode of the present invention.
Fig. 3 is the key diagram of the discovery packet format of use UDP.
Fig. 4 is the key diagram of the relation of the discovery bag of expression use TTL and UDP.
Fig. 5 sends the flow chart of processing sequence for the discovery bag in expression the 1st execution mode of the present invention.
The key diagram of the flow process that Fig. 6 obtains and sets for the router address of expression in the 1st execution mode of the present invention.
Fig. 7 surpasses the key diagram of the packet format of bag for the expression ICMP time.
Fig. 8 is the flow chart of replying the reception order of the discovery bag in expression the 1st execution mode of the present invention.
Fig. 9 is the key diagram of the discovery packet format of use ICMP echo request.
Figure 10 is the key diagram of the relation of the discovery bag of expression use TTL and ICMP loopback.
Figure 11 is the home network architecture figure in the 2nd execution mode of the present invention.
Figure 12 is the structure chart of the communicator in the 2nd execution mode of the present invention.
Figure 13 is the grasp and the wireless setting of the wireless aps address in the 2nd execution mode of the present invention.
Figure 14 sends the flow chart of processing sequence for the discovery bag in expression the 2nd execution mode of the present invention.
Figure 15 finds to use the flow chart of the transmission processing sequence of wrapping for the wireless aps in expression the 2nd execution mode of the present invention.
Figure 16 uses the key diagram of the relation of the transmission destination-address that wraps for expression router address and wireless aps discovery.
Figure 17 finds with the flow chart of replying the reception order that wraps for the router in expression the 2nd execution mode of the present invention.
Figure 18 finds the router address of bag for the use in expression the 3rd execution mode of the present invention and grasps and the key diagram of setting.
Figure 19 is the structure chart of the communicator in the 3rd execution mode of the present invention.
Figure 20 finds with the flow chart of replying the reception order that wraps for the router in expression the 3rd execution mode of the present invention.
Figure 21 finds to use the flow chart of the transmission processing sequence of wrapping for the router in expression the 3rd execution mode of the present invention.
The key diagram that Figure 22 uses the relation of the transmission destination-address that wraps for the WAN side address and the discovery of upper strata router of expression router.
Figure 23 is the grasp of the wireless aps address in expression the 4th execution mode of the present invention and the key diagram of wireless setting.
Figure 24 is the structure chart of the communicator in the 4th execution mode of the present invention.
Figure 25 finds with the flow chart of replying the reception order that wraps for the router in expression the 4th execution mode of the present invention.
Figure 26 finds to use the flow chart of the transmission processing sequence of wrapping for the router in expression the 4th execution mode of the present invention.
Figure 27 finds to use the flow chart of the transmission processing sequence of wrapping for the wireless aps in expression the 4th execution mode of the present invention.
Figure 28 is the key diagram that comprises the home network of the router that ICMP is filtered.
Figure 29 is the structure chart of the communicator in the 5th execution mode of the present invention.
Figure 30 finds the flow chart of the transmission processing sequence of bag for the 1st in expression the 5th execution mode of the present invention.
Figure 31 is the flow chart of the processing sequence of the time of expression in the 5th execution mode of the present invention when detecting.
Figure 32 finds to use the flow chart of the transmission processing sequence of wrapping for the router in expression the 5th execution mode of the present invention.
Figure 33 is the flow chart of replying the reception order of the discovery bag in expression the 5th execution mode of the present invention.
Figure 34 is the grasp of the router address in expression the 5th execution mode of the present invention and the key diagram of router setting.
Figure 35 is the key diagram that expression includes the home network of the router that does not carry out the TTL processing.
Figure 36 is the structure chart of the communicator in the 6th execution mode of the present invention.
Figure 37 finds the flow chart of the transmission processing sequence of bag for the 1st in expression the 6th execution mode of the present invention.
Figure 38 finds to use the flow chart of the transmission processing sequence of wrapping for the router in expression the 6th execution mode of the present invention.
Figure 39 is the flow chart of replying the reception order of the discovery bag in expression the 6th execution mode of the present invention.
Figure 40 is the grasp of the router address in expression the 6th execution mode of the present invention and the key diagram of router setting.
The key diagram that Figure 41 constitutes for the network in expression the 7th execution mode of the present invention.
Figure 42 is the structure chart of the user terminal in the 7th execution mode of the present invention.
Figure 43 is the key diagram that the message of the P2P connection in the 7th execution mode of the present invention sends processing sequence.
Figure 44 is the key diagram of the processing sequence of the configuration information of obtaining home network in expression the 7th execution mode of the present invention.
Figure 45 is the key diagram of the address information message of passing through the transmission of address information clearing house in the 7th execution mode of the present invention.
Figure 46 is the key diagram that the communication line in the 7th execution mode of the present invention is set (setting of NAT) order.
Figure 47 is the key diagram that the performed communication line of the user terminal in the 7th execution mode of the present invention is set.
Figure 48 is the connection of the P2P communication line in the 7th execution mode of the present invention key diagram of confirming processing sequence (situation that can connect from two user terminals).
Figure 49 is the connection of the P2P communication line in the 7th execution mode of the present invention key diagram of confirming processing sequence (situation that can only connect from user terminal 1).
Figure 50 is the connection of the P2P communication line in the 7th execution mode of the present invention key diagram of confirming processing sequence (situation that can only connect from user terminal 2).
Figure 51 is the flow chart of the judgment processing order of the communication line in expression the 7th execution mode of the present invention.
Figure 52 is the key diagram of the network configuration example 1 under the situation that the Internet P2P connects in expression the 7th execution mode of the present invention.
Figure 53 is the key diagram of the network configuration example 2 under the situation that the Internet P2P connects in expression the 7th execution mode of the present invention.
Figure 54 is the key diagram of the network configuration example 1 under the situation that P2P under the same router connects in expression the 7th execution mode of the present invention.
Figure 55 is the key diagram of the network configuration example 2 under the situation that P2P under the same router connects in expression the 7th execution mode of the present invention.
Figure 56 is the key diagram of the network configuration example 3 under the situation that P2P under the same router connects in expression the 7th execution mode of the present invention.
Figure 57 is the key diagram of the network configuration example 4 under the situation that P2P under the same router connects in expression the 7th execution mode of the present invention.
Figure 58 is the key diagram of the network configuration example 5 under the situation that P2P under the same router connects in expression the 7th execution mode of the present invention.
The key diagram of the expansion that Figure 59 exchanges messages for the address in the 7th execution mode of the present invention.
Figure 60 is the structure chart of the home network of the 8th execution mode of the present invention.
Figure 61 is the functional-block diagram of the formation of expression communicator.
Figure 62 is one of the flow chart example of the action of expression communicator.
Figure 63 is the key diagram that is used for illustrating the detection method of router.
Figure 64 is the key diagram that is used for illustrating the detection method of the communicating machine that is connected with router.
Figure 65 is the key diagram of the concrete configuration example of expression home network.
Figure 66 is one of the shown network formation of the display part that passes through communicator example.
Figure 67 is all structure charts of device in the 9th execution mode of the present invention.
Figure 68 is the functional-block diagram of the formation of expression communicator.
Figure 69 is one of the flow chart example of the action of expression communicator.
Figure 70 is the key diagram that is used for illustrating the detection method of router.
Figure 71 is the key diagram of the concrete configuration example of expression home network.
Figure 72 is one of the shown network formation of the display part that passes through communicator example.
Figure 73 is the structure chart of the home network of the 10th execution mode of the present invention.
Figure 74 is the functional-block diagram of the formation of expression communicator.
Figure 75 is one of the flow chart example of the action of expression communicator.
Figure 76 is the network structure that includes the router that carries out packet filtering.
Figure 77 is the network structure that includes the router of not handling TTL.
Embodiment
The summary of<invention 〉
Communicator of the present invention, in home network, communicator is connected under the situation under the multistage router, can find each router.Communicator sends router at first for each router and finds with bag.At this moment, router is found with bag, includes whenever wrapping by the variable that just reduces when router is transmitted to router.Like this, find with the router that wraps that when receiving router after variable became 0, the communicator to the source of transmission postbacked the router response packet.By like this, even in home network under the situation of the multistage connection of router, communicator also can be grasped router and constitute (address of router and the order of connection).And, can visit router according to the address of the resulting router of communicator, obtain the request address information of router setting.
In addition, by visiting above-mentioned request address information, can also carry out the indication of router setting to each router of the multistage connection in the home network.Therefore, communicator can be through carrying out the router of router setting, communicates with other communicators in the home network, or communicate with other communicators in the Wide Area Network that is connected in home network.
In addition, the additive method of grasping the router of multistage connection in the home network is at first to find to obtain the home network side address of the router that directly is connected with communicator with bag by send router from communicator.Afterwards, according to home network side address access router, obtain the wide area network side address of this router.Here, home network side address is to be used for router address from the communicator access router.In addition, the wide area network side address, be by router to wide area network side when relaying is carried out in the communication of communicator, the address of the router of seeing from wide area network side.Like this, according to as preceding obtained wide area network side address, infer new home network side address.And then according to the home network side address of being inferred, access router obtains the wide area network side address of this router, by repeating above-mentioned action, can grasp router topology.In the following execution mode, as an example, the wide area network that will be connected with home network is made as the Internet, and home network side address is made as LAN (LocalArea Network) side address, the wide area network side address is made as WAN (Wide Area Network) side address describes.
(the 1st execution mode: the situation of using traceroute)
The contrast accompanying drawing describes the 1st execution mode of the present invention below.
(all structures)
The formation of the home network in the 1st execution mode of the present invention has been shown among Fig. 1.Among Fig. 1, the Internet 1 is connected with home network 2.Be provided with router one 0D in the Internet 1.Home network 2 is made of the multistage router that includes router two 0C, router three 0B and router four 0A.Router two 0C is arranged on the boundary with the Internet, and then router three 0B and router four 0A are set in turn.Among the router four 0A, the communicator 50 that is constituted with PC of user-operable etc. is connected.Communicator 150 has communication I/F501.
Router two 0C has the LAN side communication I/F202 I/F201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router three 0B has the LAN side communication I/F302 I/F301 that communicates by letter with the WAN side, and router four 0A has the LAN side I/F402 I/F401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 2 and the Internet 1 by using by router two 0C between the interior router one 0D in global address and the Internet that communicates 1.
(formation of communicator)
The formation of the communicator 50 of the router setting of execution home network has been shown among Fig. 2 in the embodiments of the present invention.
This communicator 50 has: control part 51, discovery are wrapped analysis unit 53, are wrapped acceptance division 54, Department of Communication Force 55 and the router setting portion 56 of sending with bag generating unit 52, reception.The indication that control part 51 deals with for each function portion.Find to generate the bag that is used for finding router (below be called router find) and make transmission and indicate with bag with bag generating unit 52.Receive bag analysis unit 53, router is found to resolve by the bag that router sent with bag, obtain the address of each router, grasp router topology.Bag sends the transmission of 54 pairs of Department of Communication Forces of acceptance division, 55 indication bags and handles, and resolves by the received bag of Department of Communication Force 55, and hands to the corresponding function portion that receives bag.Department of Communication Force 55 is built-in with communication I/F function, makes it possible to realize that the bag to network sends reception.Router setting portion 56 carries out the setting of the router of home network.In addition, router setting portion 56 has according to obtained address, visits this router, and obtains the processing request destination obtaining section 56a of the request destination that the NAT of router is set etc.
Router is found for example to generate following bag with bag generating unit 52.Fig. 3 finds with bag for the router under the situation of using UDP (UserDatagram Protocol).Find the TTL among Fig. 3 (Time To Live) filter to be changed in turn from 1, meanwhile, the destination port numbering of UDP head is increased progressively equally from 10001 with TTL, generate bag simultaneously with bag generating unit 52.By generating such bag, as long as can confirm the destination port numbering, specified TTL in the time of just can determining to send.
Router has been shown among Fig. 4 to be found with one of TTL that wraps and destination port numbering example.The destination port numbering of this figure only is an example, and the destination port numbering is not limited in this value.Can only determine TTL according to the destination port numbering.In addition, find that with bag generating unit 52, the storage part (not shown) with storage correspondence table as shown in Figure 4 carries out determining of TTL according to this storage part.
(action of router setting)
To being connected with the home network 2 that is as above constituted, the action of carrying out the communicator 50 of router setting describes below.
(1) router is found to handle with the transmission of bag
At first, router is found to describe with the transmission processing of bag.Communicator 50 performed routers have been shown among Fig. 5 to be found with the transmission processing sequence of wrapping.Router is found to handle as the execution of getting off with the transmission of bag.
Having under the situation of discovery with the indication of bag generation of being made by control part 51, communicator 50 begins the transmission processing sequence that this router finds to use bag.
Step S101: the discovery of communicator 50 is with bag generating unit 52, judges that indicating whether that bag from control part 51 generates continues.
Discovery being judged as under the situation of not indicating from the bag generation of control part 51, finishes this order with bag generating unit 52.Here, when satisfying certain conditions in the bag reception from router that next will illustrate is handled, control part 51 stops to indicate after bag generates indication.
Step S102: find to use bag generating unit 52,, generate TTL is found to use bag from 1 router that increases progressively in turn being judged as under the lasting situation of bag generation indication.
Step S103: find with bag generating unit 52, generate router and find that with after the bag, the indication bag sends acceptance division 54 and sends bag.Bag sends acceptance division 54, by Department of Communication Force 55, sends router and finds with bag.
Here, find to constitute, do not wait for from the router to being sent of router and finding, send different routers and find with bag with replying of wrapping with bag generating unit 52.Router is found with not containing the information that is used for discerning TTL in the response packet that wraps in the past.Therefore, be router response packet in order to grasp from which router, need find whether return to router with the router response packet of bag, arrive (time out) wait acknowledge before in the time that detects.Therefore, expend time in the address of grasping the router on the circuit very much.But by above-mentioned formation, communicator can be according to the information such as destination port numbering in the router response packet, and grasping is router response packet from which router.Thereby,, also can learn it is replying from which router even under the situation that receives a plurality of router response packets.Therefore, communicator can send the router that has changed TTL one by one and find that high speed obtains the address and the router topology of the router in the home network with bag.In addition, utilize in the router setting under the situation of UPnP IGD specification, need correspondingly carry out router setting etc. by communicator in the stage of specific application program starting and dynamically set each router.As previously mentioned, communicator can be set the dynamic router of tackling each router by obtaining the address or the router topology of the router in the home network at a high speed.
In addition, router finds that with bag, the specific global address destination that can constitute on the Internet sends.
More than, be that communicator 50 performed routers are found the transmission processing sequence with bag.
(2) reception of overtime (Time Exceeded) bag of ICMP is handled
Next explanation is, router is found to handle from the reception of overtime of the ICMP that router sent (Time Exceeded) bag with bag.
(2-1) summary is handled in the reception of overtime bag of ICMP
Illustrated among Fig. 6 router find with bag, with corresponding itself and from the relation of overtime the bag of ICMP of router transmission.Each router, will be from communicator 50 sides (below be called the LAN side) received router when finding to send to the network of home network lateral direction (below be called the WAN side) with bag, the value of TTL is subtracted 1 transmission.Each router is by carrying out the subtraction of this TTL, will wrap discardedly after TTL becomes 0, no longer send to the WAN side, and be communicator with overtime of ICMP as the transmission source that response packet sends to bag.
Overtime bag of ICMP has been shown among Fig. 7.In the data in overtime bag of ICMP, be added with the IP head of discarded bag and 64 the data of joining with it.Therefore, the router that is made as TTL=1 is found after sending to the address on the Internet, will be TTL=0 when the WAN side sends with bag in router four 0A.Therefore, this router discovery sends overtime bag of ICMP from router four 0A to communicator 50 after going out of use with bag.The transmission source address of overtime bag of this ICMP is the LAN side address of router four 0A.Therefore, communicator 50 can be obtained the LAN side address of router four 0A by confirming the transmission source address of overtime bag of this ICMP.
Equally, communicator 50 transmissions are made as the router discovery of TTL=2 with after wrapping, and can obtain the LAN side address of router three 0B.That is, communicator 50 is found can obtain the LAN side address of router two 0C, router one 0D respectively with bag by the router that sends TTL=3, TTL=4.
(2-2) overtime bag of ICMP receives the detailed description of handling
The reception that overtime bag of ICMP has been shown among Fig. 8 is handled.
Step S104: Department of Communication Force 55 receives corresponding router and finds with after overtime the bag of ICMP that wraps, and bag transmission Return Reception Dept. 54 sends to overtime bag of received ICMP and receives bag analysis unit 53.
Receive bag analysis unit 53 and take out the transmission source port numbering that is contained in the data portion of overtime bag of ICMP, specified TTL when determining that according to this information router is found with the bag transmission.Simultaneously, receive bag analysis unit 53, obtain the LAN side address of the router that sends overtime bag of ICMP by transmission source address with reference to received overtime bag of ICMP.
For example, establish discovery and find to use bag and transmission with wrapping generating unit 53 generations router as shown in Figure 3 according to UDP.At this moment, because the transmission destination port numbering that is contained in the data portion of overtime bag of ICMP is 10001 o'clock, can learn according to Fig. 4, be that the router of TTL=1 is found with the ICMP that wraps, and therefore can identify and receive the LAN side address that bag analysis unit 53 has obtained router four 0A.Equally, be 10002 if send the destination port numbering, can judge it is that the router of TTL=2 is found therefore can identify the LAN side address of having obtained router three 0B with the ICMP that wraps owing to receiving bag analysis unit 53.
Step S105: next, the control part 51 of communicator 50 judges whether obtained address is local address.
Step S106: the control part 51 of communicator 50, the transmission source address that contains in judging received overtime bag of ICMP is under the situation of local address, to router setting portion 56 indication router settings.Receive the processing request destination obtaining section 56a of the router setting portion 56 of indication, according to obtained address, visit this router, utilize as described later shown in the NAT of UPnP IGD specification sets, at first, the NAT that obtains router sets destination such as the request of grade.Afterwards, the above-mentioned request destination (the transmission destination URL of action request) of router setting portion 56 these routers of visit is carried out NAT and is set and the fire compartment wall setting.
Step S107: the control part 51 of communicator 50, the transmission source address that contains in judging received overtime bag of ICMP is under the situation of global address, to finding to indicate the termination of finding with the bag generation, end process with wrapping generating unit 52.Like this, be under the situation of global address at transmission source address, finish the detection of the router in the home network.By like this, can avoid the router of communicator 50 outside home network, invalidly send the bag that has changed TTL.In addition, can also only carry out NAT setting or fire compartment wall setting to the router in the home network.
As previously mentioned, it is described that router setting portion 56 carries out the reasons are as follows of router settings such as NAT setting and fire compartment wall setting.
Use the global address executive communication on the Internet, and pass through the local address executive communication in the home network.Therefore, the communicator 50 in the home network 2, can't be directly and the communicator on the Internet 1 communicate.What address this problem is that NAT sets.It is the setting of address mapping that NAT sets, and for example, the setting of all routers by carrying out router two 0C, router three 0B, router four 0A can be from the communicator on the Internet 1 of home network 2 outsides, the communicator 50 in the visit home network 2.But, sometimes be set with fire compartment wall in each router, even correctly carry out the setting of address mapping, also, discarded on this fire compartment wall sometimes because of causing bag midway.
The exemplary that fire compartment wall is set is the setting of IP filter, and is the same with the setting of address mapping, and setting arrives the router of the home network till the communicator 50, also promptly by allowing the connection from the WAN side, can prevent that bag is discarded.
Usually, router has the user interface of Web page or leaf, by sending suitable http message to the LAN of router side address, can carry out NAT setting or IP filter and set.In addition, NAT sets and can also use UPnP IGD specification to carry out.
(utilizing the NAT of UPnP IGD specification to set)
As an example, the processing that utilizes UPnP IGD specification to carry out under the situation of NAT setting is described below.In addition, about UPnP IGD specification, UPnP FORUM data InternetGateway Device (IGD) V1.0 (obtain the address: http://www.upnp.org/standardizeddcps/igd.asp) and UPnP (TM) DeviceArchitecture (obtain the address: be documented http://www.upnp.org/download/UPnPDA10_20000613.htm).
The router that is made as TTL=1 in correspondence is found the transmission with bag, receives under the situation of LAN side address that bag analysis unit 53 obtains router four 0A, and the LAN side address that this is obtained is sent to router setting portion 56 through control part 51.
Afterwards, the processing request destination obtaining section 56a of the router setting portion 56 of communicator 50, the LAN side address to the router four 0A that directly is connected with communicator 50 sends the M-Search request by clean culture.In the response packet to the M-Search that sent request, expression has the URL that obtains the place of the details (device description) of indication equipment.The Department of Communication Force 55 of communicator 50 and the processing request destination obtaining section 56a that receives response packet through bag transmission acceptance division 54, from obtaining of this device description, the state of obtaining starting method, the equipment of the kind that includes equipment, service function that equipment provided is obtained the device description of information etc., obtains the information of the transmission destination URL of action request according to it.
Router setting portion 56 by send the AddPortMapping action to the transmission destination of obtained action request URL, carries out NAT and sets in router four 0A.Specified parameter when carrying out as this action, the port numbering (Px) of employed communicator 50 self, the IP address of communicator, the port numbering of router four 0A when specifying the visit from the communicator on the Internet.
Under the situation that the NAT that carries out the port numbering (Px) of communicator 50 self sets, typical example is for the port numbering Px of Designated Router 40A and carry out NAT and set.
Next, when receiving bag analysis unit 53 and obtain the LAN side address of router three 0B of corresponding TTL=2, the port numbering Px of WAN side address, port numbering Px and the router three 0B of the 56 Designated Router 40A of router setting portion, carry out AddPortMapping, by carrying out NAT setting like this to router 30B.Here, the WAN side address of router four 0A can be obtained by router 40A transmission GetExternalIPAddress is moved.
Equally, when receiving bag analysis unit 53 and obtained the LAN side address of router two 0C of corresponding TTL=3, the port numbering Px of WAN side address, port numbering Px and the router two 0C of the 56 Designated Router 30B of router setting portion, carry out AddPortMapping, by carrying out NAT setting like this to router 20C.
In addition, before the response packet of corresponding TTL=1, received earlier under the situation of response packet of router of corresponding TTL=2 or 3, do not obtained as yet and be used for carrying out the conversion destination-address that NAT sets.Therefore, router setting portion 56 during the address of the router that is connected in the LAN side of the router of obtaining corresponding received TTL, carries out NAT and sets.For example, be located at before the response packet of router four 0A of corresponding TTL=1, received the response packet of the router three 0B of corresponding TTL=2 earlier.At this moment, receiving from the response packet of the router four 0A of corresponding TTL=1 and after having obtained the WAN side address of router four 0A, the NAT that carries out router three 0B sets.
(action effect)
As mentioned above, in the communicator of the present invention, receiving with TTL from above-mentioned communicator is the router of the router discovery of variable with bag, also is the communicator side from the LAN side, also is that communicator sends router discovery bag to the outside of home network to the WAN side.At this moment, router sends to the router that the next one is connected after the relay router number that sets is subtracted 1.When router becomes " 0 " at the relay router number, stop to find with the transmission of wrapping, the router response packet is sent to as the communicator of router discovery with the transmission source of bag to the router of WAN side.By like this, communicator can easily be grasped the structure of the router in the home network.Like this, the router that the communicator visit is grasped carries out router setting, and it can be communicated with other communicators that connect through the multistage router that is connected.
In addition, though in the 1st execution mode, when having obtained global address as the LAN side address of router, finishing router finds with the transmission of wrapping, but also can find with the TTL capping value of wrapping, when having reached higher limit, finish the transmission of router discovery with bag to router.
In addition, though in the 1st execution mode, be that example is illustrated with the home network that is connected with 3 routers, this only is an example, and the present invention can be suitable for equally for 1 router to the home network that N platform router is constituted.
In addition, though in the 1st execution mode, change TTL and destination port numbering in router is found with bag change TTL and IP address, destination or send the source port numbering, also can handle equally.And then router is found can also to generate by ICMP echo request as shown in Figure 9 with bag.Too, by same change TTL, communicator can be obtained overtime bag of ICMP shown in Figure 7 as described above from each router under the situation of using the ICMP echo request.Under the situation of using the ICMP echo request,, can carry out finding with wrapping the same control with the router that uses UDP by serial number or IP address, destination or identifier are changed with TTL.Illustrated among Figure 10 and allowed router find with one of TTL that wraps and the corresponding situation of serial number example.Here, the value of serial number only is an example, is not limited in this value, can only determine TTL according to serial number.
In addition, illustrated in the 1st execution mode is that the processing request destination obtaining section 56a of router setting portion 56 sends the M-Search request by clean culture.Afterwards, reply the URL that obtains of the details (device description) that obtain indication equipment, obtain information the setting request destination of the trunk information of router according to this URL from it.But using the example of UPnP is one embodiment of the present invention, handles request destination obtaining section 56a and can also pass through additive method, knows the information of handling the request destination according to router LAN side address.For example, handle request destination obtaining section 56a, the existing information (for example, well-know port numbering or well-know URL information) and the LAN side address combination of router can be got up, generate the information of handling the request destination.
(the 2nd execution mode: the situation of carrying out the setting of wireless network)
The contrast accompanying drawing describes the 2nd execution mode of the present invention below.
(all structures)
The formation of the home network in the 2nd execution mode of the present invention has been shown among Figure 11.Among Figure 11, the Internet 1001 is connected with home network 1002.Be provided with router one 10D in the Internet 1001.Home network 1002 is made of the multistage router that includes router one 20C, router one 30B and router one 40A.Router one 20C is arranged on the boundary with the Internet, and then router one 30B and router one 40A are set in turn.Here, router one 20C is the wireless router with wireless aps (access point) function.In addition, router one 30B is connected with wireless aps 160, and among the router one 40A, the communicator 150 that is constituted with PC of user-operable etc. is connected.Communicator 150 has wire communication I/F1501 and radio communication I/F1502, carries out as described later from the setting of the radio communication function that installs and the setting of wireless aps 160.
Router one 20C has the LAN side communication I/F1202 I/F1201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router one 30B has the LAN side communication I/F1302 I/F1301 that communicates by letter with the WAN side, and router one 40A has the LAN side I/F1402 I/F1401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 1002 and the Internet 1001 by using by router one 20C between the interior router one 10D in global address and the Internet that communicates 1001.In addition, wireless aps 160 has communication I/F1601.
(formation of communicator)
Figure 12 is the functional-block diagram of the formation of expression communicator 150.This communicator 150 has: control part 151, discovery bag generating unit 152, reception are wrapped analysis unit 153, are wrapped transmission acceptance division 154, Department of Communication Force 155, wireless aps configuration part 156, radio communication configuration part 157 and wireless communication part 158.Control part 151, the indication that each function portion of giving deals with.Find with bag generating unit 152, generate the bag that is used for finding router (below be called router find) and make sending and indicate with bag.In addition, find, generate the bag that is used for finding the communicating machine that is connected with router (below, be called machine discovery with bag) and make sending and indicate with bag generating unit 152.Receive bag analysis unit 153, router is found to resolve the bag that is sent by router with bag, obtain the address of each router, grasp router topology.Bag sends acceptance division 154, and the transmission of Department of Communication Force 155 indication bags is handled, and resolves by the received bag of Department of Communication Force 155, and hands to the corresponding function portion that receives bag.Department of Communication Force 155 is built-in with communication I/F function, can realize the bag of network is sent reception.Identifying information, wireless channel and authentication informations etc. such as encryption key, SSID are set to wireless aps 160 in wireless aps configuration part 156.Radio communication configuration part 157 is given from the wireless communication part 158 of device and is set identifying information, wireless channel and authentication informations etc. such as encryption key, SSID.Wireless communication part 158 can carry out radio communication.
(action of setting wireless network)
To being connected with the home network 1002 that is as above constituted, the action of carrying out the communicator 150 of setting wireless network describes below.
(1) summary of Chu Liing
At first,, use the router address of being found, find that the summary of the process of wireless aps 160 describes finding the router address of each router.
Figure 13 shows the router address of finding router, uses this address of finding, finds the process of wireless aps 160.At first, communicator 150 sends TTL is found with bag from 1 router that changes.Communicator 150, overtime the bag of ICMP that receives corresponding TTL=1 found replying with bag as router.In addition, communicator can receive overtime bag of ICMP from router one 30B, finds replying with bag as the router of TTL=2.Communicator 150 can be learnt the LAN side address of router one 30B according to the transmission source address of overtime bag of received ICMP.Communicator 150 according to the LAN side address of the router one 30B that is obtained, detects the machine address that belongs to the wireless aps 160 in the consolidated network group.And then communicator 150 is carried out the communication setting of this wireless aps 160 and/or is obtained the set information of wireless aps 160 and communicate the setting of device 150 self radio functions.
(2) router is found the transmission processing sequence with bag
At first, router is found to describe with the transmission processing sequence of bag.Figure 14 is performed by finding with bag generating unit 152, and the router that has changed TTL finds to use the transmission processing sequence of bag.
Having under the situation of discovery with the indication of bag generation of being made by control part 151, communicator 150 begins the transmission processing sequence that this router finds to use bag.
Step S201: the discovery of communicator 150 is with bag generating unit 152, judges that indicating whether that bag from control part 151 generates continues.
Find that bag generates under the situation of indication being judged as not, finishes this order with bag generating unit 152.Here, when satisfying certain conditions in the bag reception from router that next will illustrate is handled, control part 151 is made after bag generates indication and is stopped to indicate.
Step S202: find to use bag generating unit 152,, generate TTL is found to use bag from 1 router that increases progressively in turn being judged as under the lasting situation of bag generation indication.
Step S203: find with bag generating unit 152, generate router and find that with behind the bag, the indication bag sends acceptance division 154 and sends bag.Bag sends acceptance division 154, by Department of Communication Force 155, sends router and finds with bag.
In addition, this router is found the transmission processing sequence with bag, and is identical with the order shown in Fig. 5 of the 1st execution mode.
(3) wireless aps is found to handle with the transmission of bag
Figure 15 is performed for finding with bag generating unit 152, uses corresponding to the router that is sent and finds IP address with the resulting router of bag, sends the wireless aps that is used for detecting wireless aps and finds order with bag.Below this action is described.
Step S204: at first, the discovery of communicator 150 judges with bag generating unit 152 whether control part 151 has indicated wireless aps to find with the generation of wrapping.
Find with bag generating unit 152,, end wireless aps and find with the generation of wrapping, end process being judged as under the situation that wireless aps finds that the generation indication with bag not have to continue.
Step S205: indicated wireless aps to find under the situation with the generation of bag being judged as control part 151, the discovery of communicator 150 is with wrapping generating unit 152, according to the IP address of the indicated router of control part 151, infer the address of wireless aps, generate wireless aps and find with bag.
In addition, make expression about control part 151 and end wireless aps and find sequential, will in router described later and wireless aps are found with the reception processing sequence of wrapping, illustrate with the indication of the generation of bag.
Step S206: next, find to infer with bag generating unit 152 address of wireless aps 160, after the wireless aps discovery was finished with the generation of bag, bag sent acceptance division 154 and wire communication portion 155, and wireless aps is found to send in the home network 1002 with wrapping.
Among the above-mentioned steps S205, by the supposition of the wireless aps discovery of finding to implement with the transmission destination-address of bag with bag generating unit 152, for example carry out by the following method, at first judge the kind (kind A, kind B, kind C) of address, position in the address that is conceived to afterwards to change in same network changes this value in turn.Figure 16 is that wireless aps finds the destination-address with bag, and communicator is by making the generation indication to the bag of this address, can find the wireless aps that the router subordinate of the address of kind C is connected.
Here, consider the situation that the wireless aps function is installed in the router of having distinguished LAN side address, communicator at first sends wireless aps to the address of this router and finds with bag.
Because wireless aps is equipped with the user interface of Web page or leaf usually, therefore, send suitable http message and find to use the content of bag, and receive its response packet as wireless aps by to the IP address of wireless aps 160, just can detect the existence of wireless aps 160.
In addition, (the detailed documentation address acquisition: specification http://upnp.org/standardizeddcps/wlanap.asp) detects wireless aps 160 can also to use UPnP WLAN Access Point Device V1.0.
Specifically, to the address of the wireless aps 160 inferred, send the M-Search request by clean culture, find that WLAN Access Point Device is (though among the UPnP, sending the M-Search request by multicast is formal specification, but most of machine also receives the M-Search of clean culture).
More than, be discovery bag generating unit 152 performed, the transmission wireless aps discovery orders of wrapping.Here, find with bag generating unit 152, can not wait for from wireless aps wireless aps is found just to send next wireless aps and find with bag with the replying of bag, can also be by sending a plurality of discoveries simultaneously with wrapping, high speed detection goes out wireless aps.
In addition, sending AP finds with in the order of wrapping, communicator can also use the IP address (for example router one 40A, router one 30B, router one 20C) of a plurality of routers, and the column-generation wireless aps is found to detect multistage router subordinate's wireless aps simultaneously with bag.
(4) reception of the response packet of each bag is handled
Next explanation is, router is found to find to handle with the reception of replying of bag with bag and wireless aps.
Illustrated among Figure 17 router is found to find with the reception processing sequence of replying of wrapping with bag and wireless aps.Contrast Figure 17 below, this reception processing sequence is described.
Step S207: at first, wire communication portion 155 receives corresponding router from home network 1002 and finds with bag or wireless aps discovery received response packet to be handed to bag send acceptance division 154 behind the response packet with bag.Bag sends acceptance division 154, judges the content of response packet, and the router discovery is found with the response packet that wraps with bag or wireless aps if the judgment is Yes, just the package informatin of response packet is handed to and is received bag analysis unit 153.
Receive bag analysis unit 153 and receive after the package informatin of response packet, judge that this response packet is that router is found still wireless aps to be found replying with bag with replying of wrapping.
Next, communicator 150 is that router is found with replying of wrapping according to response packet, still wireless aps is found to handle with replying of wrapping.
(4-1) router is found to handle with the reception of the response packet that wraps
At first, the reception processing of router being found to use the response packet that wraps is described.Communicator 150, to receive bag be under the situation about router being found with the response packet of bag being judged as, carry out with the 1st execution mode in the identical processing (S208, S209, S211) of S104~S107 of illustrated Fig. 8.In addition, after communicator 150 detects the LAN side address of router, just find to use the generation of bag to handle (S210) to discovery with bag generating unit 152 request wireless aps by control part 151.Specific as follows described.
Step S208: receive bag analysis unit 153 and take out the transmission source port numbering that is contained in the data portion of overtime bag of ICMP, specified TTL when determining that according to this information router is found with the bag transmission.Receive bag analysis unit 53 by obtaining transmission source address, obtain the LAN side address of router from overtime bag of ICMP.
Step S209: next, the control part 151 of communicator 150 judges whether the LAN side address of obtained router is local address.
Step S210: the control part 151 of communicator 150 is under the situation of local address in the LAN side address that is judged as obtained router, and indication finds that generating wireless aps with bag generating unit 152 finds with bag.At this moment, control part 151 sends to discovery with wrapping generating unit 152 with the IP address of the LAN side of router.
Step S211: the control part 151 of communicator 150 is under the situation of global address in the LAN side address that is judged as obtained router, to the termination of finding to generate with bag with the 152 indication routers discoveries of bag generating unit, end process.In LAN side address is under the situation of global address, finishes the detection of the router in the home network.Therefore, by whether being that global address is controlled, can only detect the address of the router in the home network corresponding to obtained LAN side address.
(4-2) wireless aps is found to handle with the reception of the response packet that wraps
Next, be that wireless aps is found to describe with the processing under the situation of replying of bag to received response packet.
Step S212: at first, the reception bag analysis unit 153 of communicator 150 is resolved the content of wireless aps being found to use the response packet that wraps.Here, receive bag analysis unit 153, the various information that from wireless aps is found response packet, obtain the machine address of wireless aps 160 and be used for establishing radio communication with bag.Receive bag analysis unit 153,, export to wireless aps configuration part 156 and radio communication configuration part 157 through the machine address and the various information of control part 151 with wireless aps 160.Then, use from the resulting information of response packet wireless aps configuration part 156, carries out the setting of wireless aps 160.Also be, wireless aps configuration part 156, according to machine address visit wireless aps 160, encryption key when wireless aps 160 setting wireless are communicated by letter, communication channel, SSID (Service Set ID), MAC filter radio communication information such as (adding the permission to the MAC of self radio Department of Communication Force 158), are made as the state that can carry out radio communication by wireless aps.
Step S213: next, radio communication configuration part 157 obtains radio communication information from wireless aps 160 as required, to the wireless communication part 158 of oneself, and the setting that radio communications such as the encryption key when carrying out radio communication, communication channel, SSID are used.
Step S214: set after the end, control part 151 is to finding to use the 152 indication wireless aps discoveries of bag generating unit to find to end with the generation of wrapping with generation termination of wrapping and router.
Here, though be the method for setting wireless AP and the method that obtains information from wireless aps, but wireless aps also has the wire communication function usually, in addition, the user interface of Web page or leaf is installed, therefore the IP address that can also be had by the wire communication portion to wireless aps sends suitable http message, the radio communication information of setting wireless AP, or obtain predefined information.
In addition, can also use UPnP WLAN Access Point Device V1.0 (detailed document address acquisition: specification http://upnp.org/standardizeddcps/wlanap.asp), setting wireless AP160.Specifically, send the M-Search request, find with bag as wireless aps by clean culture.Afterwards, find WLAN Access Point Device, obtain device description, service describing from response packet.By obtained information, the transmission destination of identification maneuver request sends action request to wireless aps.By like this, radio communication information that can setting wireless AP, or obtain predefined information.
(action effect)
As mentioned above, communicator is the router discovery bag of variable by sending with TTL, can obtain the router address of the router in the home network.And then communicator passes through according to this router address, and distribution of machine is found can obtain the address of the communicating machine that is connected with router with bag.Therefore, even communicator in the home network that multistage router constituted, also can be used the various settings that visit this communicating machine and establish the communication of communicating machine.
In addition, though in the 2nd execution mode, found after the wireless aps, carry out the setting of wireless aps 160 and the setting of wireless communication part 158, but also can only carry out by wireless communication part 158 read be set in advance in the wireless aps 160 about wireless information (encryption key, channel information, SSID etc., and, carry out the processing of the setting of wireless communication part 158 according to the information of being read.In addition, the setting of wireless aps also can only be carried out in wireless aps configuration part 156.
In addition, though in the 2nd execution mode, about the initial wireless aps of finding in the home network, the example that is treated to of finishing constipation Shu Quanti with setting is illustrated, but also the wireless aps 160 that is connected in the home network all can be found, the wireless aps of being set by user's selection is carried out setting to wireless aps 160 afterwards.Perhaps, can also obtain set information, carry out the setting of wireless communication part 158 from selected wireless aps.Perhaps can also carry out above both sides.
In addition, though in the 2nd execution mode, about the initial wireless aps of finding in the home network, the example that is treated to of finishing constipation Shu Quanti with setting is illustrated, but also can be after the setting of having finished initial wireless aps end process not, sending wireless aps to the address of all wireless aps that can consider finds to carry out the setting of all wireless aps in the home network with bag.
(the 3rd execution mode: the situation of using UPnP)
Below the 3rd execution mode of the present invention is described.In above-mentioned the 1st execution mode, show the variation router and find to obtain the LAN side address of router, router is carried out the execution mode that NAT sets and fire compartment wall is set according to this address with the TTL that wraps.And in this 3rd execution mode, at first use UPnP (Universal Plug and Play) IGD (Internet Gateway Device) specification etc., obtain the LAN side address of router.Afterwards,, obtain WAN side address,, obtain the more address of the router on upper strata according to obtained WAN side address according to the LAN side address of this router.Among the 3rd embodiment, carry out router setting while carry out above operation.Here, http://www.upnp.org/resources/doucuments.asp) and Internet Gateway Device (IGD) V1.0 (document position: be documented http://www.upnp.org/standardizeddcps/igd.asp) about UPnP IGD specification, in the known document Universal Plug and PlayDevice Architecture Version 1.0.1 of UPnP FORUM (document position:.
Figure 18 is the structure chart of the home network in the 3rd execution mode of the present invention.The Internet 2001 is connected with home network 2002.Be provided with router two 10D in the Internet 2001.Home network 2002 is made of the multistage router that includes router two 20C, router two 30B and router two 40A.Router two 20C is arranged on the boundary with the Internet 2001, and then router two 30B and router two 40A are set in turn.On the router two 40A, the communicator 250 that PC that is connected with user-operable etc. is constituted.Communicator 250 has communication I/F2501.
Router two 20C has the LAN side communication I/F2202 I/F2201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router two 30B has the LAN side communication I/F2302 I/F2301 that communicates by letter with the WAN side, and router two 40A has the LAN side I/F2402 I/F2401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 2002 and the Internet 2001 by using by router two 20C between the interior router two 10D in global address and the Internet that communicates 2001.
(formation of communicator)
Figure 19 is the structure chart of the communicator 250 of the 3rd execution mode.This communicator 250 has: control part 251, discovery bag generating unit 252, reception are wrapped analysis unit 253, are wrapped transmission acceptance division 254, Department of Communication Force 255, router setting portion 256 and WAN side address obtaining section 259.The indication that control part 251 deals with for each function portion.Find to generate the bag that is used for finding router (below be called router find) and make transmission and indicate with bag with bag generating unit 252.Receive bag analysis unit 253, router is found to resolve the bag that sends from router with bag, obtain the address of each router, grasp router topology.Bag sends acceptance division 254, and the transmission of Department of Communication Force 255 indication bags is handled, and resolves by the received bag of Department of Communication Force 255, and hands to the corresponding function portion that receives bag.Department of Communication Force 255 is built-in with communication I/F function, can realize the bag of network is sent reception.Router setting portion 256 carries out the setting of the router of home network.In addition, router setting portion 256 has according to obtained address, visits this router, obtains the processing request destination obtaining section 256a of the request destination that the NAT of router is set etc.WAN side address obtaining section 259 is used the UPnPIGD specification, obtains the WAN side address of router.
(router setting action)
Below to being connected with the home network 2002 that is as above constituted, the action of carrying out the communicator 50 of router setting describes.
(1) router is found to handle with the reception of the response packet that wraps
Figure 20 is for receiving the processing sequence of router discovery with the response packet of the router of bag.Below, use Figure 20, the reception processing sequence of router being found to use the response packet that wraps is described.
Step S301: at first, the control part 251 of communicator 250, indication is found to detect the interior router of network that communicator 250 connects with bag generating unit 252.The discovery that receives indication is with wrapping generating unit 252, and multicast sends the discovery message M-Search of UPnP.
Step S302: next, the control part 251 of communicator 250 judges whether to have received Department of Communication Force 255 and bag are sent the router that acceptance division 254 sent find to carry out standby up to receiving response packet with the response packet of bag from router.
Step S303:, obtain the LAN side address of this router in case the response packet that the reception bag analysis unit 253 of communicator 250 receives from router is just resolved and received bag.Under the situation of using UPnP, the processing request destination obtaining section 256a of router setting portion 256 utilizes the information that contains in the response packet, obtains device description, service describing, also obtains in the lump to be used to move the information that sends.Being used to move the information that sends, for example is the transmission destination etc. of action.
Step S304: next, the control part 251 of communicator 250, at this received response packet, be to find to use under the situation of the response packet that wraps with the router that bag generating unit 252 is generated and sent to finding, indication is found to find with bag with wrapping generating unit 252 termination routers.
Step S305: afterwards, the router setting portion 256 of communicator 250, according to LAN side address or the obtained information of processing request destination obtaining section 256a from the obtained router of response packet, visit this router, the same with the 1st execution mode, carry out the setting of NAT or the setting of fire compartment wall, or its both sides.
Step S306: the control part 251 of communicator 205, send to WAN side address obtaining section 259 with receiving bag analysis unit 253 obtained LAN side addresses, indication obtains the WAN side address of detected router.WAN side address obtaining section 259 obtains the WAN side address of router.
As one of the method for the WAN side address of obtaining router example, the situation of using UPnP IGD specification is described.Under the situation of using UPnP IGD specification,, send the GetExternalIPAddress action to the transmission destination of action obtained among the step S303.By from router to its reply, can access the WAN side address of router.
In addition, the user interface of Web page or leaf is installed in the common router, can also uses this user interface to confirm the WAN side address of router.In addition, suitable http message can also be sent to router, and receive its response packet, by obtaining the WAN side address of router like this.
Step S307: next, the control part 251 of communicator 250 confirms whether the WAN side address of obtained router is local address.The control part 251 of communicator 250 is under the situation of global address in the WAN side address of judging obtained router, and the upper strata router of determining this router is the router on the Internet, end process.Also promptly, be speculated as the all-routers in the home network 2002 have been finished router setting after, end process.
Step S308: the control part 251 of communicator 250 is under the situation of local address in the WAN side address that is judged as router, and the upper strata of identifying the router of being found belongs to the router of home network in addition.Then, control part 251 is handed to the WAN side address of the router found and is found that indication generates router and finds with bag with bag generating unit 252.Afterwards, the control part 251 of communicator 250 is waited for once more and is found to use the reception of the response packet that wraps to sending router.
Here, though as an example, the multicast of the discovery message M-Search by UPnP and clean culture send, and detect router, also can be the same with the 2nd execution mode, reply by sending suitable http message and receiving it, and be confirmed to be router.In addition, the address of the router that communicator 250 connects, consistent with the acquiescence GW address of communicator 250 usually, the address of the upper strata router that router connects, acquiescence GW (Gateway) address of the WAN side I/F of common and router is consistent.Therefore, send suitable http message can also for detected router, obtain the acquiescence GW address of the WAN side I/F of router,, carry out processing from S305 with the address (omitting the step of step S301~S304) of obtained acquiescence GW address as the upper strata router.
More than be that router is found to reply the reception processing sequence with what wrap.
(2) router is found to handle with the transmission of bag
Next, use Figure 21, discovery is handled describing with the 252 performed routers discoveries of bag generating unit with the transmission of bag.
Step S310: at first, communicator 250 judges whether that continuing to make router by control part 251 finds to indicate with the generation of bag.Communicator 250, by carrying out this judgment processing, can handle under the situation of independently moving with router being found the reception of replying with the generation of bag in the router discovery with bag, detect router, when not needing to send the router discovery, stop this processing with bag.
Find under the situation with the generation indication of bag that the control part 251 of communicator 250 will become the address of generation foundation of the LAN side address of router making router, promptly the WAN side address of router sends to and finds with bag generating unit 252.Find to obtain the WAN side address of router from control part 251 with bag generating unit 252.
Step S311: next, the discovery of communicator 250 according to from the received WAN side address of control part 251, is inferred the LAN side address of upper strata router with bag generating unit 252, according to the LAN side address of being inferred, generates router and finds with bag.
Step S312: afterwards, the router of communicator 250 is found with bag generating unit 252 router that is generated to be found to send acceptance division 254 and Department of Communication Force 255 with bag by bag, sends in the home network.
Find to send under the situation about handling at the router that uses UPnP with bag, constituting can be to the address of being inferred, send M-Search request (though M-Search has only multicast in the specification of UPnP FORUM, nearly all router also can receive the M-Search of clean culture) by clean culture.
In addition, in the common router, the user interface of Web page or leaf is installed, therefore the same with the 2nd execution mode, by suitable http message is sent to the address of being inferred, and receive its response packet, can detect router.
The address of finding with wrapping the upper strata router that generating unit 252 inferred has been shown among Figure 22.The LAN side address of router if use under the state when dispatching from the factory, use the local address of kind C, and its least-significant byte is 1 or 254.Therefore, find that under the situation of the address of inferring the upper strata router, priority treatment will replace to 1 or 254 resulting addresses from the least-significant byte of the WAN side address of control part 251 resulting routers with bag generating unit 252.Then, find that generation is found with bag to the router of this address of replacing and sent with bag generating unit 252.By carrying out this processing, communicator 250 is compared and is not had as the ground presumptive address, can detect the upper strata router more at high speed.In addition, changed the user under the situation of LAN side address of router, also mostly usually is the situations that are made as specific values such as 64,128, therefore, least-significant byte with the address is set at the address that the higher particular address of frequency that the user sets obtains, also preferentially sends router and find with bag.
In addition, router is found can handle self contained function with the reception of bag with discovery with wrapping generating unit 252, does not wait for the router discovery that the is sent judgement of the response result of bag, just sends next router and finds with wrapping.Handle by carrying out such transmission, can find the upper strata router at a high speed.
(action effect)
In the 3rd execution mode,,, obtain the LAN side address of the router of the Internet side by this router, grasp router topology by WAN side address according to router by above-mentioned formation.Therefore, the router that does not change TTL is found just can obtain the formation of router with the generation of bag or the interior transmission of the past home network of bag that is generated.
In addition, because not transmitting the router that has changed TTL finds with the processing of wrapping, therefore even in home network, include under the situation of router of the processing that when forwarding router is found with bag, does not reduce TTL, also can grasp the formation of the interior router of home network.In addition, router is not found processing with the router response packet of bag,, can grasp the structure of the interior router of home network yet even therefore under the situation that includes the router that the router response packet is filtered owing to have to receive.
In addition, in the present embodiment, with under receiving to the situation of replying of router discovery with bag, making router finds to be illustrated with the example that is designated as that the generation of bag is ended, but router is found to end with the generation of bag, also can send router in all-router address that can consider for institute and find to carry out when wrapping.By like this,, can carry out correctly also that NAT sets, FW (fire compartment wall) sets even under certain router and situations such as multistage router is connected (multihoming (multi homing) etc.).
(the 4th execution mode: the situation of using the wireless setting of UPnP)
The contrast accompanying drawing describes the 4th execution mode of the present invention.In above-mentioned the 2nd execution mode, the change router is found the TTL with bag, obtains the LAN side address of router, goes out wireless aps according to this address detected, and communicator 350 carries out the setting of self radio communication function and the setting of wireless aps.And in this 4th execution mode, obtain the WAN side address of each router of home network by the method identical with the 3rd execution mode, according to this address discovery wireless aps, communicator 350 carries out the setting of self radio communication function and the setting of wireless aps.
(all structures)
Figure 23 is the structure chart of the home network in the embodiments of the present invention.Among Figure 23, the Internet 3001 is connected with home network 3002.Be provided with router three 10D in the Internet 3001.Home network 3002 is made of the multistage router that includes router one 20C, router three 30B and router three 40A.Router three 20C is arranged on the boundary with the Internet, and then router three 30B and router three 40A are set in turn.Here, router three 20C is the wireless router with wireless aps (access point) function.In addition, router three 30B is connected with wireless aps 360, router three 40A, and the communicator 350 that is constituted with PC of user-operable etc. is connected.Communicator 350 has wire communication I/F3501 and radio communication I/F3502, carries out as described later from the setting of the radio communication function that installs and the setting of wireless aps 360.
Router three 20C has the LAN side communication I/F3202 I/F3201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router three 30B has the LAN side communication I/F3302 I/F3301 that communicates by letter with the WAN side, and router three 40A has the LAN side I/F3402 I/F3401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 3002 and the Internet 3001 by using by router three 20C between the interior router three 10D in global address and the Internet that communicates 3001.In addition, wireless aps 360 has communication I/F3601.
(formation of communicator)
Figure 24 is the structure chart of the communicator 350 of the 4th execution mode.This communicator 350 has: control part 351, discovery bag generating unit 352, reception are wrapped analysis unit 353, are wrapped transmission acceptance division 354, Department of Communication Force 355, wireless aps configuration part 356, radio communication configuration part 357, wireless communication part 358 and WAN side address obtaining section 359.
Control part 351 reaches the indication of processing to each function subordinate.Find to generate the bag that is used for finding router (below be called router find) and make transmission and indicate with bag with bag generating unit 352.In addition, find, generate the bag that is used for finding the communicating machine that is connected with router (below be called machine discovery with bag) and make sending and indicate with bag generating unit 352.Receive bag analysis unit 353, router is found to resolve the bag that sends from router with bag, obtain the address of each router, grasp router topology.Bag sends acceptance division 354, and the transmission of Department of Communication Force 355 indication bags is handled, and resolves by the received bag of Department of Communication Force 355, and hands to the corresponding function portion that receives bag.Department of Communication Force 355 is built-in with communication I/F function, can realize the bag of network is sent reception.Identifying information, wireless channel and authentication informations etc. such as encryption key, SSID are set to wireless aps 360 in wireless aps configuration part 356.Radio communication configuration part 357 is given from the wireless communication part 358 of device and is set identifying information, wireless channel and authentication informations etc. such as encryption key, SSID.Wireless communication part 358 can carry out radio communication.WAN side address obtaining section 359 is used UPnP IGD specification, obtains the WAN side address of router.
(action of router setting and setting wireless network)
Action to the communicator 350 that as above constituted describes.Figure 25 for router/wireless aps is found with bag reply reception the time processing sequence.Among the figure,, identical with the 3rd execution mode about the router detection of S401~S408 and processing to the setting of the NAT of router and fire compartment wall.
(1) reception of response packet is handled
Step S401: at first, the control part 351 of communicator 350, indication is found to detect router and the wireless aps that communicator 350 connects with bag generating unit 352.The discovery that receives indication is with bag generating unit 352, and multicast sends the discovery message M-Search that is used for detecting router (IGD:Internet Gateway Device) and the UPnP of wireless aps (WLAN Access Point Device).
Here, show communicator 350 detects router by the discovery message M-Search of multicast transmission UPnP example.But, also can be the same with the 3rd execution mode etc., at first infer the address of routers and wireless aps by communicator 350.Afterwards, communicator 350 sends suitable http message by clean culture.The response packet that communicator 350 receives this http message detects router and wireless aps.
Step S402: the control part 351 of communicator 350 judges whether that having received router/wireless aps that discovery is generated with bag generating unit 352 by Department of Communication Force 355 and bag transmission acceptance division 354 finds with the response packet that wraps.Here, under the situation that has received response packet, control part 351 judges that it is that router is found with the response packet of bag or to the response packet of wireless aps discovery with bag.
Next, communicator 150 is that router is found replying or wireless aps is found to handle with replying of wrapping with bag according to response packet.
(1-1) router is found to handle with the reception of the response packet that wraps.
At first, the reception processing of router being found to use the reception bag that wraps is described.Communicator 350 under the situation with the response packet of bag that router is found that receives from router, is carried out the processing identical with the 3rd execution mode shown below (S403~S408).
Step S403: the reception bag analysis unit 353 of communicator 350 is resolved and is received bag, obtains the address information of router.Using under the situation of UPnP, utilize the information of putting down in writing in the response packet, obtain device description, service describing, also obtain in the lump and be used to move the information that sends.Being used to move the information that sends, for example is the transmission destination-address etc. of action.
Step S404: next, the control part 351 of communicator 350, being judged as this received bag is to find to use under the situation of the response packet that wraps with the router that bag generating unit 352 is generated and sent to finding, indication is found to stop the generation that bag is used in the router discovery with bag generating unit 352.
Step S405: afterwards, this router according to the LAN side address of obtained router, is visited in the wireless aps configuration part 356 of communicator 350, and is the same with the 1st execution mode, carries out the setting of NAT setting or fire compartment wall, or its both sides.
Step S406: the control part 351 of communicator 350, indication WAN side address obtaining section 359 obtains the WAN side address of detected router.WAN side address obtaining section 359, carry out router WAN side address obtain processing.
As one of the method for the WAN side address of obtaining router example, the situation of using UPnP IGD specification is described.Under the situation of using UPnP IGD specification,, send the GetExternalIPAddress action to the transmission destination of action obtained among the step S403.By from router to its reply, can access the WAN side address of router.
In addition, the user interface of Web page or leaf is installed in the common router, can also uses this user interface to confirm the WAN side address of router.Therefore, suitable http message can also be sent to router, and receive its response message, by obtaining the WAN side address of router like this.
Step S407: next, the control part 351 of communicator 350 confirms that the WAN side address of obtained router is local address or global address.The control part 351 of communicator 350 is under the situation of global address in the WAN side address that is judged as obtained router, and the upper strata router of inferring this router is the router on the Internet, finishes this processing.Also promptly, be speculated as the all-routers in the home network 3002 are finished router setting after, end process.
Step S408: the control part 351 of communicator 350 is under the situation of local address in the WAN side address that is judged as obtained router, and the upper strata of identifying the router that is detected belongs to the router of home network in addition.Like this, control part 351 is handed to discovery with wrapping generating unit 352 with the WAN side address of detected router, and indication generates the router discovery and finds to use bag with wrapping with wireless aps.Afterwards, the control part 351 of communicator 350 is waited for the reception of router being found to use with bag or wireless aps discovery the response packet of bag once more.
(1-2) wireless aps is found to handle with the reception of the response packet that wraps
Next, reception is described from the processing under the situation of the response packet of wireless aps.Communicator 350, receive response packet from wireless aps after, carry out the processing (S409~S411) of the S212~S214 be equivalent to the 2nd execution mode.
Step S409: at first, the reception bag analysis unit 353 of communicator 350 is resolved the content of received response packet.Here, receive bag analysis unit 353, the various information that from wireless aps is found response packet, obtain the machine address of wireless aps 360 and be used for establishing radio communication with bag.Receive bag analysis unit 353,, export to wireless aps configuration part 356 and radio communication configuration part 357 through the machine address and the various information of control part 351 with wireless aps 360.Then, use from the resulting information of response packet wireless aps configuration part 356, carries out the setting of wireless aps 360.Also be, wireless aps configuration part 356, according to machine address visit wireless aps 360, encryption key when wireless aps 360 setting wireless are communicated by letter, communication channel, SSID, MAC filter radio communication information such as (adding the permission to the MAC of self radio Department of Communication Force 358), are made as the state that can carry out radio communication by wireless aps.
Step S410: next, the radio communication configuration part 357 of communicator 350 obtains the information that radio communication is used from wireless aps 360 as required.Then, radio communication configuration part 357, to the wireless communication part 358 of communicator 350 oneself, the setting that radio communications such as the encryption key when carrying out radio communication, communication channel, SSID are used.
Step S411: set after the end, the control part 351 of communicator 350 is to finding to use the 352 indication wireless aps discoveries of bag generating unit to find to end with the generation of wrapping with generation termination of wrapping and router.
Here, though be the method for setting wireless AP and the method that obtains information from wireless aps, but common wireless aps also has the wire communication function, in addition, the user interface of Web page or leaf is installed, therefore the IP address that can also be had by the wire communication portion to wireless aps sends suitable http message, comes the radio communication information of setting wireless AP, or obtains predefined information.
In addition, can also use UPnP WLAN Access Point Device V1.0 (detailed document address acquisition: specification http://upnp.org/standardizeddcps/wlanap.asp), setting wireless AP360.Specifically, send the M-Search request from communicator 350 by clean culture and find to detect WLAN Access Point Device, obtain device description, service describing with bag as wireless aps.Communicator 350 can be by obtained information, and the transmission destination of identification maneuver request sends action request to wireless aps, by like this, and radio communication information that can setting wireless AP, or obtain predefined information.
(2) router is found to find to handle with the transmission of bag with bag and wireless aps
Next, the router discovery is found to describe with the transmission processing of bag with bag and wireless aps.
(2-1) router is found to handle with the transmission of bag
At first, find to describe with bag and wireless aps with the 352 performed routers discoveries of bag generating unit to finding with the transmission processing of bag.Figure 26 uses one of the transmission processing of bag example for the router discovery.Router shown in Figure 26 is found to handle with the transmission of bag, and identical with the 3rd execution mode, its processing sequence is identical with the processing of S310~S312 of Figure 21.
Step S420: at first, communicator 350 judges whether that continuing to make router by control part 351 finds to indicate with the generation of bag.Communicator 350 is by carrying out this judgment processing, can handle under the situation of independently moving with router being found the reception of replying with the generation of bag in the router discovery with bag, detect router, when not needing to send the router discovery, stop this processing with bag.
Making under the situation of router discovery with the generation indication of bag, the control part 351 of communicator 350, router is found with the transmission destination-address that wraps, address as the generation foundation of the LAN side address that becomes router, also be the WAN side address of router, send to and find with bag generating unit 352.Find to obtain from control part 351 the WAN side address of router with bag generating unit 352.
Step S421: next, the discovery of communicator 350 according to from the received address of control part 351, is inferred the LAN side address of upper strata router with bag generating unit 352, according to this LAN side address, generates router and finds with bag.
Step S422: afterwards, router finds to use bag generating unit 352, and the router that is generated is found to send by bag transmission acceptance division 354 and Department of Communication Force 355 with bag.
(2-2) wireless aps is found to handle with the transmission of bag
Next, find to describe with bag generating unit 352 performed wireless aps to finding with the transmission processing of bag.Figure 27 uses one of the transmission processing of bag example for the wireless aps discovery.Wireless aps is found to handle with the transmission of bag, and identical with the 2nd execution mode, its processing sequence is identical with the processing of S204~S206 of Figure 15.
Step S434: at first, communicator 350 judges whether control part 351 has indicated wireless aps to find with the generation of wrapping.
Communicator 350 being judged as under the situation that wireless aps finds that the generation indication with bag do not continue to make, is ended wireless aps and is found with the generation of wrapping, end process.
Step S435: indicated wireless aps to find under the situation with the generation of bag being judged as control part 351, the discovery of communicator 350 is with wrapping generating unit 352, according to the IP address of the indicated router of control part 351, infer the address of wireless aps, generate wireless aps and find with bag.
In addition, make expression about control part 351 and end wireless aps and find sequential, in above-mentioned router and wireless aps are found with the reception processing sequence of wrapping, illustrate with the indication of the generation of bag.
Step S436: next, find to infer with bag generating unit 352 address of wireless aps 360, in case wireless aps is found to finish with the generation of bag, bag sends acceptance division 354 and wire communication portion 355, just wireless aps is found to send to home network 3002 with bag.
Among the above-mentioned steps S435, by finding to find estimation method with the transmission destination-address of bag with the wireless aps that bag generating unit 352 is implemented, for example can use afterwards in the kind of at first having judged the address (kind A, kind B, kind C), position in the address that is conceived on same network, to change, and change the method for this value in turn.
(action effect)
The communicator of the 4th execution mode has been obtained after the LAN side address of router, carries out the obtaining of WAN side address of router.Then, communicator is according to obtained WAN side address, and the address of obtaining wireless aps reaches the more address of the router on upper strata.Have, communicator is according to the address of obtained wireless aps and the address of router again, carries out about wireless network settings and the network settings that comprises router setting.Therefore, the router that does not need to have changed TTL is found the interior transmission of past home network with the generation of bag or the bag that generated, just can obtain the formation of router.
In addition, because not transmitting the router that has changed TTL finds with the processing of wrapping, therefore even in home network, include under the situation of router of the processing that when forwarding router is found with bag, does not reduce TTL, also can grasp the formation of the interior router of home network.Have again, router is not found processing with the router response packet of bag,, also can grasp the structure of the interior router of home network even therefore under the situation that includes the router that the router response packet is filtered owing to have to receive.
In addition, in the 4th execution mode, about initial detected wireless aps 360 in the home network, finishing all examples that is treated to after finishing with setting is illustrated, but also the wireless aps that is connected in the home network all can be detected, the wireless aps of being set by user's selection is carried out the setting to wireless aps 360 afterwards.In addition, can also obtain information, according to the setting of the wireless communication part 358 of obtained information and executing communicator 350 from selected wireless aps 360.Have again, can also carry out setting both sides the wireless communication part 358 of the setting of wireless aps 360 and communicator 350.
In addition, in the 4th execution mode, disclose and detected after the wireless aps 360, carried out the setting of the wireless communication part 358 of the setting of wireless aps 360 and communicator 350.But, can be at first by radio communication configuration part 357 read be set in advance in the wireless aps 360 about wireless information (encryption key, channel information, SSID etc.).Afterwards, according to the information that radio communication configuration part 357 is read, only carry out the processing of setting wireless Department of Communication Force 358.In addition, the setting of wireless aps also can only be carried out in wireless aps configuration part 356.
In addition, in the 4th execution mode, when detecting wireless aps 360 in the home network, the wireless setting that carries out each wireless aps is that example is illustrated at every turn.But, also the wireless aps that home network connected all can detecting, the wireless aps of being set by user's selection is carried out the setting to selected wireless aps 360 afterwards.Perhaps, can also obtain information, the setting of the wireless communication part 358 of executive communication device 350 from selected wireless aps.Perhaps can also carry out setting both sides to the wireless communication part 358 of the setting of wireless aps 360 and communicator 350.
In addition, in the 4th execution mode, with to after the initial wireless aps of being found is finished setting in the home network, the discovery that finishes wireless aps is treated to example and is illustrated, but also can be after the setting of finishing initial wireless aps also end process not, sending wireless aps to the address of all wireless aps that can consider finds to carry out the setting of all wireless aps in the home network with bag.
In addition, in the 4th execution mode, with under receiving to the situation of replying of router discovery with bag, making router finds to be illustrated with the example that is designated as that the generation of bag is ended, but router is found to end with the generation of bag, also can send router in all-router address that can consider for institute and find to carry out when wrapping.By like this,, can carry out correctly also that NAT sets, FW sets even under certain router and situations such as multistage router is connected (multihoming etc.).
(the 5th execution mode: the router detection of using ICMP and UPnP)
With reference to the accompanying drawings the 5th execution mode of the present invention is described below.The formation of the home network of the summary that is used for illustrating the 5th execution mode has been shown among Figure 28.
In the 1st execution mode, the change router is found to obtain with the TTL that wraps the LAN side address of router, and the method that router carries out router setting is illustrated.In such mode, changed the router of TTL and found not need wait acknowledge just to carry out with the transmission of bag.Therefore, can learn the address of the router on the home network that is connected with communicator 50 very efficiently, and carry out router setting.
But in the actual commercially available router, some filters overtime bag of ICMP.Therefore, use under the situation of aforesaid way in the home network that includes such router, overtime bag of the ICMP of upper strata router discarded by router midway sometimes.Therefore, the situation of the router in the home network has taken place correctly to detect.Consequently, produced and to have carried out the problem of router setting completely.
For example, the example of router that router four 30B is the type of discarded ICMP overtime bag has been shown among Figure 28.In this case, router four 20C, 410D receive the router that is set as TTL=3 and TTL=4 and find that overtime bag of ICMP that will be corresponding with it sends to communicator 450 with bag.But it is discarded to be routed device 430B from overtime bag of ICMP of this router two 0C, router one 0D.Therefore, communicator 450 can't detect the router four 20C as the router in the home network.
And in the 3rd execution mode, to obtaining the WAN side address of router, go out the more router on upper strata according to this address detected, and the method for carrying out router setting is illustrated.In this mode, owing to do not use ICMP, therefore in the home network that includes to ICMP the router that overtime bag filter, also can use.But when the transmission of bag was used in the router discovery, the address that needs to infer router sent bag, was not so good as the method for the 1st execution mode aspect treatment effeciency.
In the 5th execution mode, to using in the home network that includes to ICMP the router that overtime bag filter, the home router establishing method that has also improved treatment effeciency simultaneously describes.In the 5th execution mode, in order to realize above-mentioned effect, the router that uses use illustrated in the 1st execution mode to change TTL is found the method with bag, with the WAN side address of obtaining router illustrated in the 3rd execution mode, and according to this address discovery these both sides of method of the router on upper strata more.
(all formations)
Contrast Figure 28 once more, the formation of the home network in the 5th execution mode of the present invention is described.
Among Figure 28, the Internet 4001 is connected with home network 4002.Be provided with router four 10D in the Internet 4001.Home network 4002 is made of the multistage router that includes router four 20C, router four 30B and router four 40A.Router four 20C is arranged on the boundary with the Internet, and then router four 30B and router four 40A are set in turn.Router four 40A, the communicator 450 that is constituted with PC of user-operable etc. is connected.Communicator 450 has communication I/F4501.
Router four 20C has the LAN side communication I/F4202 I/F4201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router four 30B has the LAN side communication I/F4302 I/F4301 that communicates by letter with the WAN side, and router four 40A has the LAN side I/F4402 I/F4401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 4002 and the Internet 4001 by using by router four 20C between the interior router four 10D in global address and the Internet that communicates 4001.
(formation of communicator)
Figure 29 represents the structure of the communicator 450 of the 5th execution mode.This communicator 450 has: control part 451, discovery bag generating unit 452, reception are wrapped analysis unit 453, are wrapped transmission acceptance division 454, Department of Communication Force 455, router setting portion 456, WAN side address obtaining section 459 and time to test section 460.Control part 451 reaches the indication of processing to each function subordinate.Find with bag generating unit 452, generate the bag that is used for finding router (below be called router find) and make sending and indicate with bag.Receive bag analysis unit 453, router is found to resolve the bag that sends from router with bag, obtain the address of each router, grasp router topology.Bag sends acceptance division 454, and the transmission of Department of Communication Force 455 indication bags is handled, and resolves by the received bag of Department of Communication Force 455, and hands to the corresponding function portion that receives bag.Department of Communication Force 455 is built-in with communication I/F function, can realize the bag of network is sent reception.Router setting portion 456 carries out the setting of the router of home network.In addition, router setting portion 456 has according to obtained address, visits this router, obtains the processing request destination obtaining section 456a of the request destination that the NAT of router is set etc.WAN side address obtaining section 459 is used UPnP IGD specification, obtains the WAN side address of router.Time, the router that detects the value that has changed TTL was found to arrive with the pairing time of reception of the response packet that wraps to test section 460.
(action of router setting)
Below, to being connected with the home network 4002 that is as above constituted, the action of carrying out the communicator 450 of router setting describes.
(1) router is found to handle with the transmission of bag
At first, common router is found to describe with the transmission processing of bag.Figure 30 shows the transmission processing sequence of finding to use with the 452 performed routers discoveries of bag generating unit bag.
The control part 451 of communicator 450 is under the situation of execution router setting, and at first indication begins to change the transmission processing of the router discovery of TTL with bag.
Step S501, the discovery of communicator 450 is with bag generating unit 452, judges that indicating whether that bag from control part 451 generates continues to make.
Find in being judged as control part 451, not make bag and generate under the situation of indication, finish this order with bag generating unit 452.Here, when satisfying certain conditions in the bag reception from router that next will illustrate is handled, control part 451 is made after bag generates indication and is stopped to indicate.
Step S502: find with bag generating unit 452, generate under the situation that indication continues to make being judged as bag, TTL is increased progressively the router that obtains successively from 1 find with wrapping by finding to generate with bag generating unit 452.
Step S503: the time is to test section 460, and when sending router and find with bag, login finds that to this router time with the reception of the response packet of bag is to constantly.For example, the time is found to arrive constantly with the related ground of the TTL login time of bag with this router to test section 460.Then, the time is to test section 460, finds delivery time gate time with bag to the moment from router, the time to situation send a notice to control part 451.Like this, by by time to 460 administrative times of test section to constantly, can judge whether to have received response packet.
Step S504: find with bag generating unit 452, generate router and find that with after the bag, the indication bag sends acceptance division 454 and sends bag.Bag sends acceptance division 454, by Department of Communication Force 455, sends router and finds with bag.
Here, find to constitute, do not wait for from the router to being sent of router and finding, just send different routers and find with bag with replying of wrapping with bag generating unit 452.Like this, find to find router at a high speed by sending a plurality of routers simultaneously with bag.For example, include in response packet with router and find under the situation with the TTL information corresponding in the bag, it is response packet from which router that communicator can be grasped according to this information.Therefore, communicator can send the router that has changed TTL one by one and find that high speed obtains the address or the router topology of the router in the home network with bag.In addition, utilize in the router setting under the situation of UPnP IGD specification, need the corresponding dynamic setting of carrying out router setting etc. by communicator in the stage of specific application program starting each router.As previously mentioned, communicator can be set the dynamic router of tackling each router by obtaining the address or the router topology of the router in the home network at a high speed.
In addition, router is found with bag, can send the specific global address destination on the Internet.
(2) processing under the time of the detecting situation about arriving
Next, contrast Figure 31, to the time to test section 460 detect to router find with time of the response packet reception of wrapping to situation under processing describe.
Step S505: at first, the time of communicator 450 after the time of detecting arrives, is notified to control part 451 with this to test section 460.Whether the control part 451 of the notice that the time of receiving arrives, the judgement time router when handling is found to send with bag and is handled in starting.The control part 451 of communicator 450, the router in the time of being judged as when handling are found to send with bag under the situation that processing starts, and finish this processing.
Next, communicator 450, the router in the time of being judged as when handling are found to send with bag under the situation in starting of handling not, carry out following processing (S506~S508).
Step S506: the reception bag analysis unit 453 of communicator 450 sends acceptance division 454 reception response packets through Department of Communication Force 455 and bag.Afterwards, receive bag analysis unit 453, use ttl value the maximum in the current received response packet, take out the LAN side address of obtained router.
Here, find transmission, increase progressively successively and send simultaneously from TTL=1 with bag owing to change the router of TTL, thus the time to generation take place in turn from the TTL smaller.For example in the example of Figure 28, router four 30B is the router that ICMP is filtered.Therefore, to finding that from the router that is made as TTL=3, TTL=4 the time of being arrives with the response packet of bag as router four 20C, the 410D of the upper strata router of router four 30B.Here, at first the time to be that the router that is made as TTL=3 is found with replying of wrapping.Therefore can think that detected router is the router that ICMP is filtered corresponding to the ttl value of the ttl value little 1 of the response packet that arrives than time at first.In this case, can learn that detected router three 0B implements to filter corresponding to the TTL=2 of the TTL=3 little 1 of the response packet that arrives than time at first.
But, under the situation of the ttl value that is difficult to the bag that the time of obtaining arrives, can use have the bag of maximum ttl value in the received response packet this moment, detected router is regarded as the router that ICMP is filtered.
By more than, receive bag analysis unit 453, according to response packet, obtain the LAN side address of router three 0B from the router three 0B that filters.
Step S507: then, control part 451 sends to WAN side address obtaining section 459 with the LAN side address that receives the obtained router of bag analysis unit 453, and indication obtains the WAN side address of router.WAN side address obtaining section 459, the same UPnP IGD specification etc. of using with the 3rd execution mode obtains the request destination information that UPnP moves.Afterwards, send the UPnP action, receive its response packet, obtain the WAN side address of router to the action request destination of router.Then, WAN side address obtaining section 459 is handed to control part 451 with obtained WAN side address.
Step S508: afterwards, control part 451 is to finding that with bag generating unit 452 indication has stopped changing the router of TTL and found to handle (processing of Figure 30) with the transmission of bag.And then, control part 451 is handed to discovery with bag generating unit 452 with obtained WAN side address, indicates according to this WAN side address, infer the address of upper strata router, begin to send router and find with the processing (processing identical) of wrapping with Figure 21 of the 3rd execution mode.
Time detects processing under the situation that router finds to arrive with the time of replying reception of wrapping to test section 460, as mentioned above.
(3) router of inferring the address of upper strata router is found to handle with the transmission of bag
Next, use Figure 32, discovery is handled describing with the 452 performed suppositions of bag generating unit to the router discovery of the address of upper strata router with the transmission of bag.
Step S530: find with bag generating unit 452,, and obtained under the situation of WAN side address, continue the generation that router finds to use bag in the generation of Be Controlled portion 451 indication routers discoveries with bag.
Step S531: next, the discovery of communicator 450 is with bag generating unit 452, according to the LAN side address from the received WAN side address prediction upper strata router of control part 451.Afterwards, generating router according to this LAN side address finds with bag.
For example, LAN side address if use under the state when dispatching from the factory, use the local address of kind C, and its least-significant byte is 1 or 254.Therefore, find that under the situation of the address of inferring the upper strata router, priority treatment will replace to 1 or 254 addresses that obtain from the least-significant byte of the WAN side address of control part 451 resulting routers, infer LAN side address with bag generating unit 452.By carrying out this processing, communicator 450 is compared as the ground presumptive address with nothing, can detect the upper strata router more at high speed.
Step S532: afterwards, find to send the router that is generated by bag transmission acceptance division 454 and Department of Communication Force 455 and find with bag with bag generating unit 452.
(4) reception of response packet is handled
Next, contrast Figure 33 finds to describe with the reception processing of the response packet that wraps to router.
Step S510: control part 451 indications find that sending router with bag generating unit 452 finds that with after the bag, indication receives bag analysis unit 453 and receives its response packet.Afterwards, by the reception of the reception bag analysis unit 453 wait acknowledge bags of communicator 450.
Step S511: control part 451 is under the situation that has received response packet, judge that this response packet is that the router that has changed TTL is found replying with bag, still to according to WAN side address, infer the address of upper strata router and router discovery the replying of transmission with bag.
(4-1) router is found to handle with the reception of the response packet that wraps
Communicator 450 is under the situation of the router that has changed TTL being found with bag of replying being judged as received response packet, and the processing below carrying out (S518~S521).
Step S518: the processing of the S518~S521 among this Figure 33, handle (S104~S107) identical with the reception of Fig. 4 of the 1st execution mode.Also promptly, Department of Communication Force 455 receives as after overtime bag of the ICMP that replys of router being found with bag, and bag transmission Return Reception Dept. 454 is handed to received bag and received bag analysis unit 453.
Receive bag analysis unit 453, take out the transmission destination port numbering that is contained in the data portion of overtime bag of ICMP, specified TTL when determining that according to this information router is found with the bag transmission.Simultaneously, receive bag analysis unit 453,, obtain the LAN side address of router by taking out transmission source address.
Step S519: next, the control part 451 of communicator 450 judges that the LAN side address of obtained router is global address or local address.
Step S520: communicator 450 is under the situation of local address in the LAN side address that is judged as obtained router, sets router by 451 pairs of router configuration parts of control part 456.Received the router setting portion 456 of indication, carried out NAT and set and the fire compartment wall setting.
Step S521: communicator 450 is under the situation of global address in the LAN side address that is judged as obtained router, to finding to indicate discovery with the termination that bag generates with bag generating unit 452, finishes this processing by control part 451.By controlling like this, can only carry out NAT setting or fire compartment wall setting to the router in the home network.
More than, be that received replying is that the router that has changed TTL is found with the processing under the situation of replying of bag.
(4-2) address of inferring the upper strata router and the router discovery that sends are handled with the reception of the response packet of bag
Next explanation is, receives according to WAN side address, infers that the address of upper strata router and the router that sends find with (the S512~S517) of the processing under the situation of replying of wrapping.The processing of this S512~S517, identical with the processing of S303~S308 of Figure 20 of the 3rd execution mode.
Step S512: the reception bag analysis unit 453 of communicator 450, receive to resolve behind the response packet and receive bag, obtain the address of router.Under the situation of using UPnP, the information of record obtained device description, service describing during utilization was replied, and also obtained in the lump to be used to move the information that sends.
Step S513: next, the control part 451 of communicator 450, judging that this received response packet is that indication is found to find to handle with the transmission of bag with bag generating unit 452 termination routers under finding to find with the situation of replying of wrapping with the router that bag generating unit 452 is generated and sent.
Step S514: the router setting portion 456 of communicator 450, this router is visited in the LAN side address of using obtained router.Afterwards, router setting portion 456 is the same with the 1st execution mode, carries out the setting of NAT or the setting of fire compartment wall, or its both sides.
Step S515: and then control part 451 sends to WAN side address obtaining section 459 with receiving bag analysis unit 453 obtained LAN side addresses, indication obtains the WAN side address of detected router.WAN side address obtaining section 459 is for example used UPnP IGD specification, obtains WAN side address according to the LAN side address of router.
Step S516: next, the control part 451 of communicator 450 judges that the WAN side address of obtained router is global address or local address.The control part 451 of communicator 450 is under the situation of global address in the WAN side address that is judged as obtained router, because the upper strata router that can infer this router is the router on the Internet, therefore detects and finishes this processing.Also promptly,, finished router setting owing to can be estimated as to the all-router in the home network, so end process.
Step S517: the control part 451 of communicator 450 is under the situation of local address in the WAN side address that is judged as router, and the upper strata of inferring detected router belongs to the router of home network in addition.Therefore, control part 451 is handed to the WAN side address of detected router and is found that indication generates router and finds with bag with bag generating unit 452.
Afterwards, the control part 451 of communicator 450 is got back to step S510 once more, waits for receiving router is found with the response packet that wraps.
(processing example)
Figure 34 sets one of the action under the situation of home network example for the mode of putting down in writing by the 5th execution mode.
The discovery of communicator 450 sends TTL is found with bag from 1 router of setting in turn with bag generating unit 452.The reception bag analysis unit 453 of communicator 450 receives overtime bag of ICMP from router four 40A, router four 30B, finds replying with bag as the router that is sent.Afterwards, receive bag analysis unit 453, find with the LAN side address of obtaining router four 40A the response packet that wraps, from the response packet of router discovery that is made as TTL=2, obtain the LAN side address of router four 30B with bag from the router that is made as TTL=1.Router setting portion 456, according to obtained LAN side address, access router 440A and router four 30B carry out NAT setting and fire compartment wall and set.
But, because ICMP is filtered among the router four 30B, so the Department of Communication Force 455 of communicator 450, can't receive response packet from the router four 20C that is positioned at router four 30B upper strata, router four 10D.Therefore, the time arrives test section 460, and the router that detects TTL=3 is found to arrive with the time of bag (being used for detecting the router discovery of router four 20C with wrapping).Simultaneously, the discovery of communicator 450 has changed the router of TTL and has found to handle with the transmission of bag with bag generating unit 452, termination.Afterwards, finding with bag generating unit 452, serves as according to the address of inferring the upper strata router with the WAN side address of router, and starting sends router and finds processing with bag.At this moment, find to begin from WAN side address to handle with the resulting router of TTL=2 (corresponding router 430B) with bag generating unit 452.
Next, the reception bag analysis unit 453 of communicator 450 is found with the LAN side address of obtaining router four 20C the response packet that wraps from the router that correspondence sent.Afterwards, router setting portion 456 according to obtained LAN side address access router 420C, carries out NAT and sets and the fire compartment wall setting.And then the WAN side address obtaining section 459 of communicator 450 obtains the WAN side address of router four 20C.Afterwards, be under the situation of global address detecting obtained WAN side address, end process.
(action effect)
The communicator of the 5th execution mode is receiving under the situation of response packet, sends the router that changes TTL and set and finds with bag.By like this, communicator can be obtained router address according to the response packet from router, carries out router setting at a high speed.In addition, communicator as mentioned above, according to from the obtained LAN side address of the response packet that can receive, is obtained WAN side address under the situation that can't receive response packet.Afterwards, communicator repeats to obtain the LAN side address of more leaning on the router of WAN side according to obtained WAN side address.By like this, even in the home network that comprises the router that response packet is filtered, also can grasp the structure of the router in the home network, carry out router setting.
In addition, though in the 5th execution mode, NAT to router sets, fire compartment wall is set and is illustrated, but by in the 2nd execution mode and the 4th execution mode, using this method, even be present under the environment such in the home network that ICMP is filtered, also can be at a high speed and carry out the setting of wireless aps 60 exactly, or the setting of the wireless communication part 58 of communicator 450, or its both sides.
(the 6th execution mode: the router detection of using ICMP and UPnP)
In above-mentioned the 5th execution mode, even described under the situation that in home network, contains the router that ICMP is filtered, the router setting method efficiently that also can use.Relative therewith, what put down in writing in the 6th execution mode is to contain under the situation of not handling TTL the router setting method efficiently that also can use in home network.
Below with reference to the accompanying drawings, the 6th execution mode of the present invention is described.Figure 35 is one of the formation of the home network in the 6th an execution mode of the present invention example.In addition, below the router five 30B of hypothesis Figure 35 is a router of not handling TTL.
Among Figure 35, as described in the 1st execution mode etc., the router that will change TTL from communicator 550 is found to set in turn and send from TTL=1 with wrapping.At this moment, the router of TTL=2 is found with bag, originally should become TTL=0 at router five 30B, send overtime bag of ICMP from router five 30B, but, because not carrying out TTL, do not handle router five 30B, the router that therefore is made as TTL=2 is found with bag, in router five 40A, successively decrease, send to router five 20C under the state of TTL=1 becoming.Afterwards, in router five 20C,, therefore, the router of being appointed as TTL=2 is found with replying of wrapping, sent as overtime bag of ICMP from router five 20C because this router is found to become TTL=0 with bag.
Consequently,, in the communicator 550, can't identify between router five 40A and the router five 20C and have router five 30B, can finish router setting if in such home network, use the router setting of the 1st execution mode.
In addition, in the 3rd execution mode, to obtaining the WAN side address of router, according to this address discovery router on upper strata more, and the method for carrying out router setting is illustrated.In this mode,, therefore can in the home network that includes the router of not carrying out the TTL processing, use owing to not using the router that has changed TTL to find with bag.But when sending the router discovery with bag, transmission etc. is wrapped in the address that needs to infer router, is not so good as the method for the 1st execution mode aspect treatment effeciency.
In the 6th execution mode, to also using in the home network that includes the router of not carrying out the TTL processing, the home router establishing method that has improved treatment effeciency simultaneously describes.
In the 6th execution mode to achieve these goals, use the router of use change TTL illustrated in the 1st execution mode to find with the method for wrapping, and the 3rd illustrated WAN side address of obtaining router in the execution mode, and according to this address discovery method both sides of the router on upper strata more.
(all formations)
Contrast Figure 35 once more, the formation of the home network in the 6th execution mode of the present invention is described.
Among Figure 35, the Internet 5001 is connected with home network 5002.Be provided with router five 10D in the Internet 5001.Home network 5002 is made of the multistage router that comprises router five 20C, router five 30B and router five 40A.Router five 20C is arranged on the boundary with the Internet, and then router five 30B and router five 40A are set in turn.Among the router five 40A, the communicator 550 that is constituted with PC of user-operable etc. is connected.Communicator 550 has communication I/F5501.
Router five 20C has the LAN side communication I/F5202 I/F5201 that communicates by letter with the WAN side, and LAN side communication I/F is assigned with local address, and the WAN side I/F that communicates by letter is assigned with global address.Router five 30B has the LAN side communication I/F5302 I/F5301 that communicates by letter with the WAN side, and router five 40A has the LAN side I/F5402 I/F5401 that communicates by letter with the WAN side that communicates by letter.Here, be connected, establish being connected between home network 5002 and the Internet 5001 by using by router five 20C between the interior router five 10D in global address and the Internet that communicates 5001.
(formation of communicator)
Figure 36 shows the formation of the communicator 550 in the 6th execution mode.This communicator 550 has: control part 551, discovery bag generating unit 552, reception are wrapped analysis unit 553, are wrapped transmission acceptance division 554, Department of Communication Force 555, router setting portion 556, WAN side address obtaining section 559 and router address proof department 570.Control part 551 reaches the indication of processing for each function subordinate.Find with bag generating unit 552, generate the bag that is used for finding router (below be called router find) and assign to send and indicate with bag.Receive bag analysis unit 553, router is found to resolve from the bag that router sent with bag, obtain the address of each router, grasp router topology.Bag sends acceptance division 554, and the transmission of Department of Communication Force 555 indication bags is handled, and resolves by the received bag of Department of Communication Force 555, and hands to the corresponding function portion that receives bag.Department of Communication Force 555 is built-in with communication I/F function, can realize the bag of network is sent reception.Router setting portion 556 carries out the setting of the router of home network.In addition, router setting portion 56 has according to obtained address, visits this router, obtains the processing request destination obtaining section 556a that the NAT of router is set destination such as the request of grade.WAN side address obtaining section 559 is used UPnP IGD specification, obtains the WAN side address of router.Router address proof department 570, checking is found legitimacy with the obtained router address of the response packet of bag from the router that changes TTL.Also promptly, whether checking exists the router that can't obtain the address.
(router setting action)
Below to being connected with the home network 5002 that is as above constituted, and the action of carrying out the communicator 550 of router setting describes.
(1) sends processing
(1-1) router is found to handle with the transmission of bag
At first, common router is found to describe with the transmission processing of bag.Figure 37 show find with bag generating unit 552 performed, the value of change TTL and the router that generates is found the transmission processing sequence with bag.This is the processing identical with Fig. 5 of the 1st execution mode in proper order.
Under the situation of the discovery that has control part 551 to make with the indication of bag generating unit, communicator 550 begins the transmission processing sequence that this router finds to use bag.
Step S601: the discovery of communicator 550 judges that with bag generating unit 552 the bag generation from control part 551 indicates whether to continue.
Find with bag generating unit 552, do not make bag and generate under the situation of indication being judged as control part 551, finish this order.Here, when satisfying certain conditions in the bag reception from router that next will illustrate is handled, control part 551 is made after bag generates indication and is stopped to indicate.
Step S602: find to use bag generating unit 552,, generate TTL is found to use bag from 1 router that increases progressively in turn being judged as under the lasting situation of bag generation indication.
Step S603: find with bag generating unit 552, generated router and found that with after the bag, the indication bag sends acceptance division 554 and sends bag.Bag sends acceptance division 554, by Department of Communication Force 555, sends router and finds with bag.
Here, find not wait for from the router to being sent of router and finding, send different routers and find with bag with replying of wrapping with bag generating unit 552.Like this, find to find router at a high speed by sending a plurality of routers simultaneously with bag.For example, include in response packet with router and find under the situation with the TTL information corresponding in the bag, it is response packet from which router that communicator can be grasped according to this information.Therefore, communicator can send the router that has changed TTL one by one and find that high speed obtains the address or the router topology of the router in the home network with bag.In addition, utilize in the router setting under the situation of UPnP IGD specification, need dynamically set carrying out router setting etc. by the stage correspondence of the specific application program starting of communicator each router.As previously mentioned, communicator can be set corresponding with the dynamic router to each router by obtaining the address or the router topology of the router in the home network at a high speed.
In addition, router finds that with bag, the specific global address that can constitute on the Internet sends.
(1-2) router of inferring the address of upper strata router is found to handle with the transmission of bag
Next, use Figure 38, the router that the address of finding with the performed supposition upper strata router of bag generating unit 552 obtains is found to describe with the transmission processing of wrapping.
Step S630: find that with bag generating unit 552 551 indication generation routers are found with bag in Be Controlled portion, and have obtained under the situation of WAN side address, continue the generation of router discovery with bag.
Step S631: next, the discovery of communicator 550 is with bag generating unit 552, according to the LAN side address from the received WAN side address prediction upper strata router of control part 551.Afterwards, generating router according to this LAN side address finds with bag.
For example, LAN side address if use under the state when dispatching from the factory, use the local address of kind C, and its least-significant byte is 1 or 254.Therefore, find that under the situation of the address of inferring the upper strata router, preferential use will replace to 1 or 254 addresses that obtain from the least-significant byte of the WAN side address of control part 551 resulting routers, infer LAN side address with bag generating unit 552.
Step S632: afterwards, find to send the router that is generated by bag transmission acceptance division 554 and Department of Communication Force 555 and find with bag with bag generating unit 552.
(2) reception of response packet is handled
Next, contrast Figure 39 explanation is found to handle with the reception of replying of bag to router.
Step S605: control part 551, to finding that sending router with 552 indications of bag generating unit finds that with after the bag, indication receives bag analysis unit 553 and receives its response packet.Afterwards, the reception of the reception bag analysis unit 553 wait acknowledge bags of communicator 550.
Step S606: control part 551, receiving under the situation of response packet, judge that this response packet is that the router that changes TTL is found with the replying of bag, still to according to WAN side address, infer that the address of upper strata router and the router that sends find with replying of wrapping.
(2-1) router that changes TTL is found to handle with the reception of the response packet that wraps
Communicator 550 is under the situation of the router that changes TTL being found with bag of replying being judged as received response packet, and the processing below carrying out (S612~S617).
Step S612: at first, Department of Communication Force 555 receives overtime bag of ICMP of finding to use the response packet that wraps as corresponding router.Afterwards, receive bag analysis unit 553, send acceptance division 554, receive overtime bag of ICMP through Department of Communication Force 555 and bag.
Receive bag analysis unit 553, take out the transmission destination port numbering that contains in the data portion of overtime bag of ICMP, the value of the TTL that sets when determining that according to this information sending router finds with bag.Here, the value of establishing determined TTL is that N describes.Simultaneously, receive bag analysis unit 553,, obtain the LAN side address of router by taking out transmission source address.
Step S613: next, the control part 551 of communicator 550, indication WAN side address obtaining section 559 obtains WAN side address to being found by the router that is made as TTL=N-1 with the detected router of bag.Here, control part 551 will receive the LAN side address of the obtained router of bag analysis unit 553, send to WAN side address obtaining section 559.WAN side address obtaining section 559 obtains WAN side address according to LAN side address.
And then the control part 551 of communicator 550 sends to router address proof department 570 with the WAN side address of obtained router, the address of indication router address proof department 570 these WAN sides of checking.
Router address proof department 570, to find by the router that is made as TTL=N with the obtained router of bag LAN side address, with by the router discovery that is made as TTL=N-1 with the address space of the WAN side address of wrapping detected router consistent testing whether.Also promptly, the LAN side address of more adjacent router and WAN side address check whether obtained WAN side address is proper address.Here, router address proof department 570, be judged as by the LAN side address of the router that is made as TTL=N being found with the obtained router of overtime bag of ICMP of bag, under the inconsistent situation of finding by the router that is made as TTL=N-1 with the WAN side address of wrapping detected router of address space, identify the router of having replied, and replied between the router corresponding to overtime bag of the ICMP of TTL=N-1, have other routers corresponding to overtime bag of the ICMP of TTL=N.
Step S614: router address proof department 570 detect address space inconsistent after, control part 551 is analogized the address according to the WAN side address of router, indication finds that carrying out the 2nd router with bag generating unit 552 finds transmission processing with bag.At this moment, control part 551 will be found with the WAN side address of wrapping detected router with the router of TTL=N-1 appointment, send to and find with bag generating unit 552.
In addition, under the situation of N=1, router address proof department 570 is to the address space of the address of resulting router and the address of communicator 550 consistent testing whether.Under inconsistent situation, control part 551 is according to the address of communicator 550, and indication is found to carry out the transmission that the 2nd router finds to use bag with bag generating unit 552.
The control part 551 of communicator 550, be judged as the LAN side address of finding to use the obtained router of bag by the router that is made as TTL=N, under the corresponding to situation of finding by the router that is made as TTL=N-1 with the WAN side address of wrapping detected router of address space, the processing of the S615 below carrying out.
Step S615: the control part 551 of communicator 550, judge that obtained LAN side address is global address or local address.
Step S616: the control part 551 of communicator 550 is under the situation of local address being judged as obtained LAN side address, and indication router setting portion 556 implements router setting.Received the router setting portion 556 of indication, visited obtained LAN side address, this router has been carried out NAT set and the fire compartment wall setting.
Step S617: the control part 551 of communicator 550 is under the situation of global address in the LAN side address that is judged as obtained router, and the indication discovery changes the generation of the router discovery of TTL with the bag generation with 552 termination of bag generating unit.
Step S618: afterwards, the control part 551 of communicator 550, judge whether that the WAN side address that needs to receive with router serves as to find replying with bag according to analogizing concurrent the 2nd router that send in address, or the router of the value TTL littler than this received TTL is found with replying of wrapping etc., other routers are found to reply end process under unwanted situation with what wrap.
On the other hand, at the control part 551 of communicator 550, being judged as needs to receive under other situations of replying, and gets back to step S605 once more, the reception of wait acknowledge bag.
By controlling like this, can only carry out NAT setting or fire compartment wall setting to the router in the home network.
More than, be that received replying is that the router that changes TTL is found with the processing under the situation of replying of bag.
(2-2) address of inferring the upper strata router and the router discovery that sends are handled with the reception of the response packet of bag
Next, received bag being described, is to finding according to the address of WAN side address prediction upper strata router and the router that sends with (the S607~S611) of the processing under the situation of replying of wrapping.
Step S607: at first, the reception bag analysis unit 553 of communicator 550 receives to resolve behind the response packet and receives bag, obtains the LAN side address of router.Under the situation of using UPnP, the information that utilization contains in replying obtains device description, service describing, also obtains in the lump to be used to move the information that sends.
Step S608: the control part 551 of communicator 550, be judged as this received bag, be that indication is found to use bag generating unit 552 to end the 2nd router and found to handle with the transmission of wrapping under the situation of router discovery with the response packet of bag of finding to be generated and sent with bag generating unit 552.
Step S609: afterwards, the control part 551 of communicator 550, indication router address proof department 570, the LAN side address of more obtained router and the value of finding by the router of TTL=N with the LAN side address of the resulting router of bag.Judge the LAN side address of obtained router and find to use under the corresponding to situation in LAN side address of the resulting router of bag the end judgment processing of control part 551 execution S618 at router address proof department 570 by the router of TTL=N.
At router address proof department 570, be judged as obtained router address and find to carry out following handle (S610, S611) by the router of TTL=N with under the inconsistent situation of the resulting router address of bag.
Step S610: because obtained router address is inconsistent with the resulting router address of bag with the router discovery by TTL=N, therefore detected router is not carry out the router that NAT sets and fire compartment wall is set.Therefore, the control part 551 of communicator 550 sends to router setting portion 556 with the LAN side address of resulting router.Router setting portion 556 visits this router according to this LAN side address, and is the same with the 1st execution mode, and carry out NAT setting or fire compartment wall and set, or its both sides.
Step S611: because obtained router address is inconsistent with the resulting router address of bag with the router discovery by TTL=N, therefore before finding the router detected, might there be other routers with bag by the router that is made as TTL=N.Therefore, the control part 551 of communicator 550 sends to WAN side address obtaining section 559 with the LAN side address of resulting router.WAN side address obtaining section 559 obtains the WAN side address of this router according to LAN side address.Control part 551, and then WAN side address sent to find with bag generating unit 552.Find that implementing the 2nd router with bag generating unit 552 finds to handle with the transmission of bag, it obtains the WAN side address of detected router, according to the address of the WAN side address prediction upper strata router of router, and generates router and finds with bag.After these processing finished, control part 551 was waited for and is received the response packet of router being found to use bag.
More than be that router is found to receive processing with replying of bag.
(processing example)
The mode of being put down in writing by the 6th execution mode has been shown among Figure 40 has set action under the situation of home network.Here, suppose that router five 30B does not carry out the router that TTL handles.
The discovery of communicator 550 sends TTL is found with bag from 1 router of setting in turn with bag generating unit 552.Afterwards, receive bag analysis unit 553 and reply as it, the router of corresponding TTL=1 is found to obtain the LAN side address of router five 40A with bag.In addition, because router five 30B is the router that does not carry out the TTL processing, the router that therefore arrives the TTL=2 of router five 30B is found with bag, does not carry out the TTL processing and just directly sends to router five 20C.Therefore, receive bag analysis unit 553, find to obtain the address of router five 20C with bag corresponding to the router of TTL=2.Afterwards, router setting portion 556, according to obtained LAN side address, access router 540A and router five 20C carry out NAT setting and fire compartment wall respectively and set.
At this moment, the router discovery of establishing corresponding to TTL=1 is " 192.168.10.3 " with the WAN side address of wrapping obtained router five 40A.WAN side address obtaining section 559 according to from find the LAN side address with the obtained router five 40A of the response packet of bag corresponding to the router of TTL=1, obtains the WAN side address of this router five 40A.In addition, the router discovery of establishing corresponding to TTL=2 is " 192.168.2.1 " with the LAN side address of wrapping obtained router five 20C.Therefore, router address proof department 570, the network address that detects both is inconsistent.
Inconsistent according to this network address, communicator can identify and have other routers between router five 20C and the router five 40A.Therefore, the discovery of communicator 550 according to the WAN side address " 192.168.10.3 " of router five 40A, is inferred the address as the router five 30B of its upper strata router with bag generating unit 552, sends router and finds with bag.Consequently, the reception bag analysis unit 553 of communicator 550 from router being found the response packet with bag, obtains the LAN side address " 192.168.10.1 " of router five 30B.Router setting portion 556, according to this LAN side address, the NAT that carries out router five 30B sets with fire compartment wall and sets.
And then by obtaining the LAN side address of router five 30B, WAN side address obtaining section 559 can obtain the WLAN side address of router five 30B.Afterwards, find to generate and send router and find to obtain LAN side address as the router five 20C of upper strata router with bag with the value of bag generating unit 552 according to this WAN side address.
Be judged as the LAN side address of obtained router five 20C at router address proof department 570, under the corresponding to situation of finding corresponding to the router that is made as TTL=2 with the obtained router of bag of address value, it is all found that control part 551 is judged as undiscovered router.
(action effect)
The communicator of the 6th execution mode is judged the address space from the LAN side address that the router response packet is extracted out, consistent inconsistent with according to the address space of obtained WAN side address, the LAN side address of preceding level router.By like this, can judge from the legitimacy of the LAN side address that the router response packet is extracted out.Under the situation of unanimity, can confirm the LAN side address of being extracted out from the router response packet, be to be used for correct address from the communicator access router.Therefore, do not reduce under the situation of this router that TTL just sends next router to even include in home network, communicator also can be grasped the router topology in the home network, carries out router setting.
In addition, though in the 6th execution mode, NAT to router sets, fire compartment wall is set and is illustrated, but by in the 2nd execution mode and the 4th execution mode, using the method for the 6th execution mode, even at family's network internal storage under the environment of the router of not handling TTL, also can be at a high speed and carry out the setting of wireless aps 60 exactly, or the setting of the wireless communication part 58 of communicator 550, or its both sides.
In addition, though the 5th execution mode, in the 6th execution mode, to using the router that will change TTL described in the 1st execution mode to find the method for setting in turn and sending from TTL=1 with bag, when detecting problem in the process of the address information of detection router, use the LAN side address of the supposition router described in the 2nd execution mode and send router and find with the method for wrapping, the method that obtains the address information of router is illustrated, but this only is an example, can also constitute and carry out the method that the router discovery that will change TTL described in the 1st execution mode is set in turn and sent from TTL=1 with bag from the beginning simultaneously, with the LAN side address of the supposition router described in the 2nd execution mode and send router and find method with bag, and be controlled to be the result under resulting both methods is combined, by so also accessing and the 5th execution mode, the effect that the 6th execution mode is identical.
In addition, though during in the 1st execution mode to the 6 execution modes, the obtaining of the discovery of router, WAN side address, NAT set, fire compartment wall sets, use http or UPnP, this only is an example, and agreement can also be used other agreements such as SLP, SNMP.
(the 7th execution mode :) to the application of P2P communication
In above-mentioned the 1st to the 6th execution mode, the router that use to change TTL is found with the discovery of bag or UPnP to find router with bag etc., carry out fire compartment wall or NAT and set and be illustrated.And in this 7th execution mode, disclose by the method identical and carried out the fire compartment wall of the specification router in the home network or the setting of NAT with the 1st execution mode to the 6 execution modes, use is set the communication line of carrying out and setting by this fire compartment wall or NAT, carries out direct communication (below be called P2P communication) at terminal room.Also promptly, this 7th execution mode with the router setting in the home network of above-mentioned the 1st execution mode to the 6 execution modes, is applied to P2P communication.
In general, under the state that does not generate the P2P communication line, can't communicate between user terminal.Therefore, even other user terminals want to carry out P2P communication, user terminal that also can't notifying communication the other side.The P2P server has the function that addresses this problem, and each user terminal forms communication line in advance and between the P2P server.Then, by carry out the relaying of the communication information between user terminal by the P2P server, before the formation of P2P communication line, just can carry out the communication between user terminal.
The communication line of being established between user terminal and the P2P server is described.In the router, general under situation about communicating from LAN side direction WAN side, carry out NAT setting or fire compartment wall automatically and set.Therefore, from the replying of the bag that user terminal is sent self that sends the destination, under the situation about entering from the WAN side of router, even do not set especially, the user terminal that is connected with the LAN side also can receive.Below, NAT that this router had set or the automatic setting function of fire compartment wall, be called dynamic N APT.
Therefore, the communication line between P2P server and each user terminal if pass through the dynamic N APT of router, begins communication from each user terminal to the P2P server, just can set up simply.For example can consider, set up the method for TCP dialogue from each user terminal to the P2P server, or the method for wrapping to P2P server transmission UDP from each user terminal at regular intervals etc.In addition, when each user terminal is set up communication line to the P2P server, the identifying information of self can be signed in to simultaneously in the P2P server, by the P2P server address information of above-mentioned identifying information and user terminal be associated and manage.By like this, user terminal has been specified the identifying information of communication counterpart in the transmission destination of message, and the P2P server is just according to communicating by letter between identifying information relaying and the other side's user terminal.Also promptly, each carries out the user terminal of P2P communication, as long as know the identifying information of communication counterpart in advance, just can communicate.
As mentioned above, can carry out simply by dynamic N APT from the communication of LAN side direction WAN side.But,, in the communication between user terminal, generally in the router of communication counterpart, need communication line from the WAN side to the LAN side as user terminal a and the user terminal e of Figure 41 described later.Therefore, a lot of following dynamic N APT by router of situation can't communicate.In the present embodiment, can carry out this setting, carry out P2P communication from the communication line of WAN side direction LAN side.
The contrast accompanying drawing describes the 7th execution mode of the present invention.Figure 41 is that the network in the 7th execution mode of the present invention constitutes.
(all formations)
Among Figure 41, home network 6002 and home network 6,003 6001 are connected through the Internet.In addition, be connected with P2P server 603 in the Internet 6001, the generation of communication line of the P2P communication between accessory terminal.There is the user terminal a~d that carries out P2P communication in the home network 6002, is provided with the router 602A~602E of multistage connection.In addition, be provided with the user terminal e that carries out P2P communication and router 602F, the 602G of multistage connection in the home network 6003.For the user terminal that the P2P of this 7th execution mode uses, the combination of the Any user terminal of this 601a~601e all can be carried out P2P communication.
(formation of communicator)
Figure 42 is the structure chart of the user terminal 601 (user terminal 601a~user terminal 601e) of the 7th execution mode.This user terminal 601 has: control part 611, home network analysis unit 612, P2P communication judging part 613, communication line configuration part 614, Department of Communication Force 615.
Control part 611 reaches each function subordinate handles indication.Home network analysis unit 612 detects each router of home network, obtains the annexation of detected router, and the LAN side address of router and WAN side address, is saved in the network configuration information storage part.The P2P judging part 613 of communicating by letter uses the structural information of the obtained home network of home network analysis unit 612 and the home network architecture information by Department of Communication Force 615 resulting communication counterparts, and can judgement carry out P2P communication.And then the P2P judging part 613 of communicating by letter is judged the communication line that is used for carrying out P2P communication.Communication line configuration part 614, the judged result according to P2P communication judging part 613 communicates the setting of circuit to each router.Communication line configuration part 614 has according to obtained address and visits this router, obtains the processing request destination obtaining section 614a of the request destination that the NAT of router is set etc.Department of Communication Force 615, the data between the user terminal of execution and each router 602, P2P server 603 or P2P communication counterpart etc. send to receive and handle.
Action to the user terminal 601 that as above constituted describes.Order when the connection of the performed P2P communication of user terminal 601 has been shown among Figure 43.
At first, wish to carry out the user terminal (below be called user terminal 1) of P2P communication, by P2P server 603, carry out the other side's of P2P communication user terminal (below be called user terminal 2) to hope, notice wants to carry out the meaning of P2P communication.Receive the user terminal 2 of notice, replying of promise returned to user terminal 1.
<STEP1: the grasp of network configuration information 〉
Afterwards, user terminal 1 and user terminal 2, the structural information of investigation home network each other.In addition, obtained under the situation about finishing, do not needed to carry out in the structural information of home network.
The investigation of configuration information, in user terminal 1 and user terminal 2, receive the home network analysis unit 612 of indication from control part 611, find the router in the home network, obtain the information of the annexation of the WAN side address information of each router and each router.Here, annexation is meant, each router is according to what kind of be linked in sequence together information.These information, for example the method by following (1)~(4) obtains.In addition, each user terminal can be grasped the router topology about the router of the part in the home network under the user terminal of self, for example from self user terminal to the router topology of the router of corresponding global address.
(1) information acquisition method 1
Find router, and obtain the method for information of the annexation of the WAN side address information of each router and each router, can use the router discovery identical method (in Figure 43, (1) is grasped by the network configuration that Traceroute realizes) of method of wrapping that changes TTL with the use described in the 1st execution mode.
Specifically, in user terminal 1 and the user terminal 2, the following respectively WAN side address information of each router and the annexation of each router of obtaining.At first, each user terminal will change router and find to find to send to the interior router of home network with wrapping with the router of the TTL of bag.Then, each user terminal, receive from router router is found response packet with bag, obtain the LAN side address of each router in this response packet.Afterwards, each user terminal is visited each router according to LAN side address, thereby can obtain the WAN side address of router.The home network analysis unit 612 of each user terminal according to these obtained addresses, can be grasped the annexation of the router in the home network.
(2) information acquisition method 2
In addition, obtain the method for information of the annexation of the WAN side address information of each router and each router, can use the identical method (in Figure 43, (2) are grasped by the network configuration that UPnP obtains) of method of using bag with the discovery of the employing UPnP IDG specification described in the 3rd execution mode.
Specifically, at first, each user terminal will change router and find to find to send to the interior router of home network with bag with the router of the TTL that wraps.Afterwards, each user terminal receive from router router is found response packet with bag, obtain the LAN side address of each router in this response packet.Afterwards, each user terminal is obtained WAN side address according to LAN side address.Next, each user terminal is obtained the more LAN side address of the router on upper strata according to obtained WAN side address, obtains WAN side address according to LAN side address equally again, and repeats above-mentioned action.The home network analysis unit 612 of each user terminal according to these obtained addresses, can be grasped the annexation of the router in the home network.
(3) information acquisition method 3
In addition, obtain the method for information of the annexation of the WAN side address information of each router and each router, can use and the identical method of method described in the 5th execution mode, it can be applied to include in the home network of the router that overtime bag of ICMP filtered, and treatment effeciency is higher simultaneously.
Specifically, each user terminal is at first found to find the router that sends in the home network with wrapping with the router of the TTL of bag with having changed router.Whether afterwards, each user terminal is found to count with the time that sets in the bag to each router, detect can receive each router is found with the response packet that wraps.Under the situation that can't receive response packet, each user terminal can be thought the detected router of ttl value corresponding to the ttl value little 1 of the response packet that arrives than time at first, is the router that ICMP is filtered.Afterwards, each user terminal is obtained WAN side address according to from from the obtained LAN side address of the response packet of the router that filters.And then each user terminal is obtained the more LAN side address of the router on upper strata according to obtained WAN side address, obtains WAN side address according to LAN side address equally again, repeats aforesaid operations.The home network analysis unit 612 of each user terminal according to these obtained addresses, can be grasped the annexation of the router in the home network.
(4) information acquisition method 4
In addition, obtain the method for information of the annexation of the WAN side address information of each router and each router, can use and the identical method of method described in the 6th execution mode, it can be applied to include in the home network of the router of not carrying out the TTL processing, and treatment effeciency is higher simultaneously.
Specifically, at first, each user terminal will change router and find to find to send to the interior router of home network with bag with the router of the TTL that wraps.Afterwards, each user terminal receive from router router is found response packet with bag, obtain the LAN side address of each router in this response packet.Afterwards, each user terminal is obtained WAN side address according to LAN side address.
Here, each user terminal, to finding LAN side address by the router that is made as TTL=N, and find by the router that is made as TTL=N-1 with the address space of the WAN side address of wrapping detected router consistent testing whether with the obtained router of bag.Each user terminal is being judged as under the inconsistent situation, according to from the router of TTL=N-1 is found to analogize the address with the WAN side address of the obtained router of the response packet of bag, carries out router and finds with the transmission of wrapping, and receive replying it.Afterwards, each user terminal is obtained the LAN side address of the router of TTL=N from this response packet, obtains the WAN side address of router according to this LAN side address.The home network analysis unit 612 of each user terminal according to these obtained addresses, can be grasped the annexation of the router in the home network.
Illustrated among Figure 44 and used the discovery of adopting UPnP IGD specification with bag, obtained one of the information example of the annexation of the WAN side address information of each router of home network and each router.This finds router in addition, obtains the sequence of information of the annexation of the WAN side address information of each router and each router, and is identical with the method described in the 1st execution mode to the 6 execution modes.In simple terms, each user terminal is by the GW (Gate Way) of acquiescence, also promptly to the M-Search request of the router of acquiescence and reply, device description obtains request and replys, and obtains the request destination information to the action of router.Afterwards, obtain the LAN side address of the router that self connected.Afterwards, each user terminal by to the Get External IPAddress request of router with this LAN side address and reply, is obtained the WAN side address of this router.Afterwards, each user terminal is inferred the LAN side address of each router that constitutes home network according to obtained WAN side address, makes the M-Search request of clean culture.Afterwards, each user terminal is obtained the request destination information to the action of router by the replying of this M-Search request, device description being obtained request and replying.Afterwards, obtain the LAN side address of each router.And then each user terminal equally by Get External IPAddress request and reply, is obtained the WAN side address of this router.The home network analysis unit 612 of each user terminal by these obtained addresses, can be grasped the annexation of the router in the home network.
<STEP2: the transmission of address information 〉
Obtained with self upstream (away from the direction of user terminal, also promptly near the direction of the Internet) user terminal of the WAN side address information of each router of the home network that is connected and the information (configuration information of home network) of annexation, indication P2P communication judging part 613 exchange configuration informations.
Shown in (3) address information exchange among Figure 43, receive the P2P communication judging part 613 of indication, use the information of being preserved in the network configuration information storage part 621, calculated address exchanges messages, and sends to P2P server 603 by Department of Communication Force 615.Receive the P2P server 603 that above-mentioned address exchanges messages, with reference to the transmission destination information of being preserved in this message, the user terminal 2 that this address is exchanged messages and sends to communication counterpart.
The P2P communication judging part 613 of user terminal 2 receives above-mentioned address through Department of Communication Force 615 and exchanges messages.Afterwards, the P2P of user terminal 2 judging part 613 of communicating by letter, with received information stores in bipartite network structural information storage part 622.And then the P2P judging part 613 of communicating by letter exchanges messages with user terminal 1 the same calculated address, sends to P2P server 603 by Department of Communication Force 615.This message is come relaying by P2P server 603 equally, is received by communicator 1.
Receive the P2P communication judging part 613 of the user terminal 1 that the address from user terminal 2 exchanges messages, equally with received information stores in bipartite network structural information storage part 622.
The address that user terminal 1 has been shown among Figure 45 example that one of exchanges messages.During the address that user terminal 1 is generated and sent exchanges messages, include the address information that P2P server identification sends the WAN side address information of each router of the transmission destination information that uses the destination, home network and user terminal 1 self.
The address exchanged messages object lesson is shown.If the user terminal a among aforesaid Figure 41, then 6001 router number is 3 from the Internet.Therefore, the address of the WAN side address of router 602E, router 602C, router 602A and user terminal a self is included in the address middle transmission that exchanges messages.In addition, if user terminal c, then 6001 router number is 2 from the Internet.Therefore, the address of the WAN side address of router 602E, router 602C and user terminal c self is included in the address middle transmission that exchanges messages.
<STEP3: the transmission of guaranteeing and visiting destination information of communication line 〉
Among the STEP3, carry out (4) are realized by UPnP among Figure 43 NAT setting, the exchange of (5) visit destination information.By like this, user terminal 1 judging part 613 of communicating by letter with the P2P of user terminal 2, judge respectively and the other side's user terminal between communication line.In addition, set under the completed situation, do not need to carry out NAT and set at NAT.
The judgement of this communication line use self the home network architecture information of being preserved in the network configuration information storage part 621, and the home network architecture information of the user terminal of the communication counterpart that is kept in the bipartite network structural information storage part 622 is carried out.About the determination methods of this communication line, will describe in detail in the back.
The communication line of P2P communication judging part 613 judge finish after, the setting of the communication line that communication line configuration part 614 is used for guaranteeing that P2P communication judging part 613 is judged.This establishing method is identical with the 1st execution mode to the 6 execution modes, and the setting of NAT setting or fire compartment wall is carried out in the LAN side address of each obtained router when using home network architecture to grasp, or its both sides.For example, user terminal a is with during P2P between the user terminal d communicates by letter, and the P2P communication judging part 613 of user terminal a is judged and need be guaranteed communication line in router 602C and router 602A.The communication line configuration part 614 of user terminal a is carried out NAT setting or fire compartment wall and is set according to this judgement in router 602C and router 602A, or its both sides.In addition, the P2P of the user terminal d judging part 613 of communicating by letter, judgement need be guaranteed communication line in router 602D and router 602B.The communication line configuration part 614 of user terminal d is carried out NAT setting or fire compartment wall and is set according to this judgement in router 602D and router 602B, or its both sides.
Use UPnP IGD specification has been shown among Figure 46, has communicated one of the order example of the setting of circuit.In addition, the performed NAT of user terminal a being shown among Figure 47 sets and one of fire compartment wall setting example.Use Figure 47 that one of the setting example is described.
Now, establish user terminal a and carry out P2P communication at port numbering PoTa.User terminal a sets router C and router-A, makes bag to arrive its own IP address AdTa, port numbering PoTa from the user terminal d of communication counterpart.Here, the WAN side address of establishing router C is AdRCw, and the WAN side address of router-A is AdRAw.User terminal a carries out setting and the fire compartment wall of NAT and sets, and the feasible bag that is arrived from the WAN side of router C can arrive the PoTa of user terminal a.For this reason, user terminal a sets router C, the bag that make to arrive the particular port PoRCw1 of router C be transformed into the WAN side address of router-A and particular port (AdRAw, PoRAw1).And then user terminal a carries out the setting of router-A, make the bag among the port PoRAw1 of the WAN side address that arrives router-A be transformed into the port numbering PoTa of directed towards user terminal a (AdTa, PoTa).The result of this setting is, if user terminal d sends to IP address: AdRCw with bag, port numbering: PoRAw1, this bag arrives the port numbering PoTa of user terminal a.
Finished like this after the guaranteeing of communication line, communication line configuration part 614, in order to carry out P2P communication, the other side's user terminal should be sent the address of bag and the information of port numbering (visit destination information), send to the other side's user terminal via P2P server 603.In the example of Figure 47, the WAN side address of user terminal a notice router C with implemented the port numbering that NAT sets (AdRCw, PoRCw1), as the visit destination information.
In addition, the circuit that is judged as the router that needs the circuit setting is being set (NAT sets or fire compartment wall is set) even under the situation of in 1 router, failing, the circuit of all the other routers that cancellation is set is set, and sends the information of expression " not visiting the destination " in the exchange of visit destination information.
<STEP4: the judgement of closure be connected affirmation
Among the ensuing STEP4, comprise (6) connection request among Figure 43, (7) connect reply, (8) connect finish, NAT deletion, (10) that (9) are realized by UPnP connect and finish/each step of connection failure.In addition, utilizing under the situation of predefined communication line the deletion that does not need (9) NAT to set.
After the exchange of visit information was finished, the control part 611 of each user terminal carried out the judgement of closure.The judgement of closure uses the result of visit destination information exchange to carry out.There are 4 kinds of situations as described below in the result of visit destination information exchange.Below, each situation is described.
(a) the two parties terminal all is not the situation of " not visiting the destination "
(b) user terminal 1 is the situation of " not visiting the destination "
(c) user terminal 2 is the situation of " not visiting the destination "
(d) the two parties terminal is the situation of " not visiting the destination "
Below above-mentioned 4 situations are described respectively.
(a) situation
In the two parties terminal all is not in the absence of " visiting the destination ", no matter begin to communicate by letter with which user terminal in the user terminal 2 from user terminal 1, can both carry out P2P and communicate by letter.Here, be made as from user terminal 1 begin communication describe.
User terminal 1 sends to user terminal 2 with connection request message.At this moment, in the connection request message,, send to the assigned ip address and the port numbering of user terminal 2 according to the visit destination information message that receives from user terminal 2 in advance.In addition, this connection request message does not just send to user terminal 2 via the P2P server.This connection request message, the NAT that sets when guaranteeing by above-mentioned communication line sets, and sends destination information by address mapping, and arrives user terminal 2.
Receive the user terminal 2 of connection request message, take out its transmission source address and port numbering and store from the header of connection request message.Then, the transmission source address that this took out is connected response message with the port numbering transmission.
In general, router has been carried out from WAN after the transmission destination-address conversion of LAN, give fixed certain during in, establish communication line.Also promptly, after communication line was established, the transmission source information of the bag that sends from LAN side direction WAN side was by carrying out conversion for the NAT that sets to the communication of LAN from WAN sets.And, have when user terminal receives bag, the transmission source information of bag, the address port that is transformed into and receives the user terminal of bag is numbered corresponding to character.
For example, use Figure 47 that the conversion example is described.At first, establish user terminal a,, in the PoTa of user terminal a, receive bag from the connection request message of user terminal d via the port PoRCw1 of router C and the port numbering PoRAw1 of router-A.Next, user terminal a sends to connect to the user terminal d as the transmission source of message from port numbering PoTa and replys.At this moment, as the transmission source information of port numbering PoTa, be routed device A be transformed into (AdRAw, PoRAw1), and then, be routed device C be transformed into (AdRCw, PoRCw1).Consequently, receive bag among the user terminal d after, the transmission source information of user terminal a, consistent with the destination information (address, port numbering) that user terminal d is sent self.
Next, user terminal 1, from user terminal 2 receive connect response message after, send to connect and finish message.Afterwards, the data of carrying out in the following P2P communication send reception.
The user terminal that both sides have been shown among Figure 48 all is not the situation of " not visiting the destination ", the order under the situation that promptly all can connect from two end side yet.In addition, carrying out under the situation of P2P communication by UDP, message such as this connection request also use UDP to carry out.In addition, consider to be surrounded by the possibility that goes out of use, can also repeatedly send each message.For example shown in Figure 48, under the situation that the user terminal 1 as the promoter begins to communicate by letter, at first 1 pair of user terminal 2 of user terminal is made connection request.Afterwards, can't receive within a certain period of time under the situation of replying from the connection of user terminal 2, user terminal 1 sends connection request once more to user terminal 2.Equally,, in connection request being sent to 1 certain hour of user terminal, can't receive from user terminal 1 and connect under the situation about finishing, send once more to connect and reply as recipient's user terminal 2.In the above explanation, begin communication from user terminal 1 as the promoter.But under the situation (a), user terminal 1 and user terminal 2 all can be obtained the structural information of home network, all can begin to connect from these two user terminals.Therefore, be under promoter's the situation at user terminal 2, can begin communication from user terminal 2.
In addition, under the situation of TCP, the Connection Step of TCP itself plays and equal effects such as connection request message described herein.
In addition because reason such as the setting of fire compartment wall etc. is incomplete, from user terminal 1 under the situation of the connection failure of user terminal 2, also can carry out from the connection of user terminal 2 to user terminal 1.In addition, from the connection of user terminal 1, and from be connected this both sides of user terminal 2, can all try once to user terminal 1 to user terminal 2.
(b) situation
User terminal 1 also is the structural information that user terminal 1 can't be obtained home network for the situation of " not visiting the destination ", and the visit destination information that user terminal 1 sends to user terminal 2 is the situation of " not visiting the destination ".Also promptly, user terminal 1 records the address of visit destination and the situation of port numbering from the received visit destination information of user terminal 2.Therefore, mean and to connect to user terminal 2 from user terminal 1.Among this Figure 49, show user terminal 1 and be the order in the absence of " visiting the destination ".(b) under the situation, carry out initial visit from 1 pair of user terminal of user terminal 2.Afterwards, user terminal 1 sends to connect finishes message, and user terminal 2 receives to connect and finishes after the message, and the data transmission of carrying out P2P at two terminal rooms receives.In addition, if not from the visit of user terminal 1, user terminal 2 can't calling party terminal 1.
(c) situation
User terminal 2 also is the structural information that user terminal 2 can't be obtained home network for the situation of " not visiting the destination ", and the visit destination information that user terminal 2 sends to user terminal 1 is the situation of " not visiting the destination ".Also promptly, user terminal 2 records the address of visit destination and the situation of port numbering from the received visit destination information of user terminal 1.Therefore, mean and to connect to user terminal 1 from user terminal 2.Among this Figure 50, show user terminal 2 and be the order in the absence of " visiting the destination ".(c) under the situation, carry out initial visit from 2 pairs of user terminals of user terminal 1.Afterwards, user terminal 2 sends to connect finishes message, and user terminal 1 receives after this message, and the data of carrying out P2P at two terminal rooms send reception.In addition, if not from the visit of user terminal 2, user terminal 1 can't calling party terminal 1.
(d) situation
Both sides' user terminal is " not visiting the destination ", has all sent the situation of " not visiting the destination " by the exchange of visit destination information for the two parties terminal.Also promptly, two user terminals all can't be obtained the situation of the structural information of home network.In this case, control part 611 is judged as and can't carries out P2P communication, the communication process of ending P2P communication.In addition, in this case, also can be by switching to via the communication between the user terminal of P2P server 603, the transmission that carries out data between user terminal receives.
More than, the order when being the performed P2P communication of user terminal 601.In addition, in the present embodiment, use in the explanation of above-mentioned Figure 43, when carrying out P2P communication, use the router discovery that has changed TTL to use the discovery of wrapping or adopting UPnP IGD specification, grasp the structural information of home network with wrapping.But, also can when power connection of user terminal etc., obtain the structural information of home network in advance, and utilize this information.
In addition, use in the explanation of Figure 43, the judged result in address information exchange back according to communication judging part 613 communicates the setting of circuit.But, also can be when the power connection of user terminal etc., the communication line that is implemented into the router of the superiors is in advance set.Afterwards, be judged as in the superiors' router that needs the communication line setting, carry out NAT in advance and set, be notified to user terminal 2 as the visit destination information with certain port numbering and IP address at P2P communication judging part 613.In this case, even when the P2P communication failure and communication when finishing, the also not setting of deleting communication circuit.
The method that<communication line is judged 〉
Next, the order judged of the communication line that P2P communication judging part 613 is carried out describes.The P2P judging part 613 of communicating by letter, carry out after the above-mentioned address information exchange, by self the home network architecture information of will be preserved in the network configuration information storage part 621, compare with the information in exchanging messages from the received address information of the other side's user terminal, judge communication line.
Be specifically described below.One of the order that Figure 51 judges for the communication line that P2P communication judging part 613 is carried out example.Below, establish the exchange of carrying out the structural information of home network between user terminal 1 and the user terminal 2.Therefore, user terminal 1 has the structural information of the home network of the structural information of home network of user terminal 1 self and user terminal 2.Below, the method that is conceived to the communication line judgement in the user terminal 1 describes.
Step S4601: at first, the P2P of user terminal 1 judging part 613 of communicating by letter, the WAN side address of router of the superiors' (also promptly, near router of Internet) of structural information of taking out the home network of oneself.Equally, the P2P of user terminal 1 judging part 613 of communicating by letter is obtained the WAN side address as the superiors' router of the structural information of the user terminal 2 of communication counterpart.Afterwards, WAN side address of oneself and the other side's WAN side address are compared.Also promptly, the P2P judging part 613 of communicating by letter, at first relatively the WAN side address of the superiors' router of the WAN side address of the router of the superiors of oneself and communication counterpart.
In addition, under the situation of getting back to step S4601 once more, the WAN side address of user terminal 1 with user terminal 2 the 2nd router separately compared mutually.Like this, from the WAN side address of the superiors' router of the home network architecture information of user terminal 1 oneself, be that the WAN side address of the structural information of user terminal 2 compares with the obtained communication counterpart that exchanges messages by address information in turn.
Step S4602: next, the P2P of user terminal 1 judging part 613 of communicating by letter to user terminal 1 or user terminal 2 any, judges whether to still have the information of the WAN side address that will compare.
Step S4603: at the P2P of user terminal 1 communication judging part 613, to any of user terminal 1 or user terminal 2, whether be judged as under the situation of information of the WAN side address that will not compare, next judging to still have in the structural information of user terminal 1 self becomes the WAN of comparison other side address.In the structural information of user terminal 1, do not become under the situation of WAN side address of comparison other, enter step S4605.Otherwise, in the structural information of user terminal 2, do not become under the situation of WAN side address of comparison other, enter step S4607.
Step S4604: do not become in the structural information of user terminal 1 under the situation of WAN side address of comparison other, the P2P of user terminal 1 communication judging part 613 is judged as the setting that does not need communication line.
Step S4605: afterwards, the communication line configuration part 614 of user terminal 1, in step S4604, be judged as the setting that does not need communication line after, do not communicate the setting of circuit fully.Afterwards, the communication line configuration part 614 of user terminal 1 with the IP address of user terminal oneself and employed port numbering during P2P communicates by letter, is notified to user terminal 2 as the visit destination information.
Step S4606: the P2P communication judging part 613 of user terminal 1, in step S4602,, all be judged as under the situation of the information that still has the WAN side address that will compare user terminal 1 or user terminal 2 any, carry out following processing.Whether the P2P judging part 613 of communicating by letter is judged the WAN side address in the home network architecture information of user terminal 1 self, with consistent as the WAN side address in the home network architecture information of the user terminal 2 of communication counterpart.Its result is judged as under the consistent situation at the P2P of user terminal 1 communication judging part 613, returns step S4601.
Step S4607: in step S4606, be judged as under the inconsistent situation in address, the P2P of user terminal 1 judging part 613 of communicating by letter, the router to the lower floor that is positioned at the mutually different router in WAN side address is judged as the setting that need communicate circuit.
Perhaps, in step S4603, do not become in the structural information of user terminal 2 under the situation of WAN side address of comparison other, be judged as the user terminal 2 of communication counterpart, directly be connected with upstream router in the home network of user terminal 2 oneself.Also promptly, the user terminal 2 of communication counterpart directly is connected with certain router.In addition, user terminal 1 is connected with the router that is directly connected in user terminal 2 through the other router more than 1.Therefore, the P2P of user terminal 1 judging part 613 of communicating by letter, the router of judging as current comparison other with the configuration information of home network needs communication line to set to each router that exists between the user terminal 1.
Step S4608: afterwards, the setting of NAT and the setting of fire compartment wall according to the judged result among the step S4607, are carried out in the communication line configuration part 614 of user terminal 1.Also be, the P2P communication judging part 613 of user terminal 1, be judged as in step S4606 under the inconsistent situation in address, NAT setting and fire compartment wall setting are carried out to the router that is positioned under the mutually different router in WAN side address in indication communication line configuration part 614.
On the other hand, establish the P2P communication judging part 613 of user terminal 1, in step S4603, be judged as the WAN side address that does not become comparison other in the structural information of user terminal 2.In this case, communication line configuration part 614, to from as the router of current comparison other to each router that exists the user terminal 1, carry out the setting of NAT and the setting of fire compartment wall.In addition, as previously mentioned, because the user terminal 2 of communication counterpart directly is connected with the router of upstream oneself, therefore can think, original, if self connect communication counterpart from user terminal 1, by dynamic N APT, user terminal does not need to communicate the circuit setting and just can connect.But, consider influence because of the router of processing IC MP not etc., wrong sometimes in the obtained structural information, communicate the setting of circuit, make from the other side's user terminal also can connect the reliability that connects by such raising P2P.
Afterwards, user terminal 1, the router different to address in the communication counterpart, or the direct-connected router of user terminal 2 direct-connected router subordinates of communication counterpart, with its WAN side address and the port numbering that carried out the NAT setting, be notified to the user terminal 2 of communication counterpart as the visit destination information.Also be, among the WAN side address of the obtained router of user terminal 1 self, the WAN side address obtained with the other side's user terminal 2 is initially the WAN side address of different value, and sets the port numbering that sets by NAT in the router of this WAN side address, is notified to user terminal 2.For example, the P2P judging part 613 of communicating by letter, with self structural information and the structural information of communication counterpart in WAN side address when different, send to the communicator of communication counterpart.In addition, communication line configuration part 614 will send to the communicator of communication counterpart by the NAT with router of WAN side address when different is set the port numbering that sets.
More than, be the order that communication line that P2P communication judging part 613 is carried out is judged.
In addition, can consider various setting P2P method for communicating.For example adoptable method is, at first, obtain from communicator to family's network and with the border of wide area network in be connected the router address of each router till these two internetwork border routers.The other side's communicator is obtained the router address till the border router too.Intercourse router address afterwards, and between the other side's the communicator.Next, by judging the consistent or inconsistent of router address, explore the breakout of communication line.Afterwards, the communication line that proceeds to breakout is set, and after the setting of communication line is finished, the address information of breakout is notified to the method for communication counterpart.In addition, can also adopt and set P2P communication in the following method.The communication line that carries out at first, in advance from the communicator to the wide area network is set.Next, obtain the router address of each router till the border router, and intercourse router address between the other side's the communicator, explore breakout.Afterwards, can be notified to communication counterpart, carry out P2P communication by address information with breakout.
The object lesson of the order that<communication line is judged 〉
Next, the order judged of the communication line that uses object lesson that this P2P communication judging part 613 is carried out describes.Below, the situation that the communication between (1) user terminal is carried out through the Internet, the situation of communicating by letter that belongs between the user terminal of same home network with (2) describes.
(1) through the situation of the communication of the Internet
Figure 52 and Figure 53, the example of situation about communicating through the Internet for user terminal 1 (T1) and user terminal 2 (T2).
(1-1) configuration example 1
In the configuration example 1 of Figure 52, user terminal 1 is obtained the WAN side address (AR1W) of the router R1 that is positioned between the Internet and self terminal, as home network architecture.And user terminal 2 is obtained the WAN side address (AR2W) of the router R2 that is positioned between the Internet and self terminal, as home network architecture.Afterwards, user terminal 1 exchanges messages by address information and notifies the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self.Equally, the WAN side address (AR2W) of user terminal 2 notice router R2 and the address AT2 of user terminal 2.
The P2P communication judging part 613 of user terminal 1, relatively this address information because AR1W is different with AR2W, is therefore judged and need be set the communication line of router R1.Afterwards, the communication line configuration part 614 of user terminal 1, the NAT that carries out router R1 sets, and carries out as required after the fire compartment wall setting, to set IP address and the port numbering of the router R1 of NAT, be notified to user terminal 2 as the visit destination information.Equally, the P2P of user terminal 2 judging part 613 of communicating by letter judges that the communication line that needs router R2 sets.Afterwards, carry out after the communication line setting of router R2 communication line configuration part 614, will set IP address and the port numbering of the router R2 of NAT, is notified to user terminal 1 as the visit destination information.
(1-2) configuration example 2
Next, the configuration example 2 to Figure 53 describes.Configuration example 2 is situations that home network is made of multistage router.In this case, user terminal 1 is obtained the WAN side address (AR2W) of the router two that is positioned between the Internet and self terminal and the WAN side address (AR1W) of router R1, as home network architecture.And user terminal 2 is obtained the WAN side address (AR5W) and the WAN side address (AR4W) of router R4 and the WAN side address (AR3W) of router R3 of the router R5 that is positioned between the Internet and self terminal, as home network architecture.Afterwards, user terminal 1 exchanges messages by address information, the WAN side address (AR2W) and the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self of notice router R2.In addition, user terminal 2 exchanges messages by address information, WAN side address (AR5W), the WAN side address (AR4W) of router R4, the WAN side address (AR3W) of router R3 and the address AT2 of user terminal 2 of notice router R5.
The P2P communication judging part 613 of user terminal 1, with oneself structural information the superiors' router (R2) WAN side address, compare with the WAN side address of the superiors' router (R5) of 2 address notified information of user terminal, because AR2W is different with AR5W, therefore judging the router that need be positioned at router R2 downstream, also is that the communication line of router R2 and router R1 is set.According to this judged result, carry out after the communication line setting of router R2 and router R1 the communication line configuration part 614 of user terminal 1, and the IP address and the port numbering that will carry out the router R2 of NAT setting are notified to user terminal 2 as the visit destination information.In addition, user terminal 2 is judged the communication line setting that needs router R5, router R4, router R3 too.Afterwards, carry out the communication line of router R5, router R4, router R3 and set, the IP address and the port numbering that will carry out the router R5 of NAT setting are notified to user terminal 1 as the visit destination information.
(2) situation of same router subordinate's communication
Figure 54~Figure 58 is the example of situation about communicating between the user terminal that belongs to same home network.
(2-1) configuration example 1
In the configuration example 1 of Figure 54, user terminal 1 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, as home network architecture.And user terminal 2 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, as home network architecture.Afterwards, user terminal 1 (T1) exchanges messages by address information, the WAN side address (AGRW) of notice router GR (GR) and the address AT1 of user terminal self.User terminal 2 (T2) is by the exchange messages address AT2 of WAN side address (AGRW) and user terminal 2 oneself of notice router GR (GR) of address information.
The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because both unanimities therefore will more next address.But owing to there is not the next router of the structural information of self, therefore judging does not need communication line to set.Judge according to this to communicate by letter the IP address of user terminal 1 and use port numbering in communication line configuration part 614 with P2P, be notified to user terminal 2 as the visit destination information.In addition, when judgement does not need the setting of communication line, can be when detecting the information of the next router that does not have user terminal 2, be judged as with same router (being GR in this case) and be connected, whether the address of verifying each user terminal is same address space, if not in the situation of same address space, be judged as and connect.
In addition, user terminal 2 is also by same order, and being judged as does not need communication line to set, and communication line configuration part 614 is notified to user terminal 1 with communicate by letter with the P2P port numbering of usefulness of the IP address of user terminal 2 as visiting destination information.
(2-2) configuration example 2
In the configuration example 2 of Figure 55, user terminal 1 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, as home network architecture.And user terminal 2 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal and the WAN side address (AR1W) of router R1, as home network architecture.Afterwards, user terminal 1 (T1) is the same with configuration example 1, exchanges messages by address information and notifies the WAN side address (AGRW) of router GR (GR) and the address AT1 of user terminal self.In addition, user terminal 2 (T2), by address information exchange messages the notice router GR (GR) WAN side address (AGRW), the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self.
The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because both unanimities therefore will more next address.But owing to there is not the next router of the structural information of self, therefore being judged as does not need communication line to set.Judge that according to this communication line configuration part 614 is notified to user terminal 2 with communicate by letter with the P2P port numbering of usefulness of the IP address of user terminal 1 as visiting destination information.The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because both unanimities therefore will more next address.But owing to there is not the next router of the structural information of self, therefore being judged as does not need communication line to set.Judge that according to this communication line configuration part 614 is notified to user terminal 2 with communicate by letter with the P2P port numbering of usefulness of the IP address of user terminal 1 as visiting destination information.
In addition, the P2P communication judging part 613 of user terminal 2, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 1 address notified information of user terminal are compared, because both unanimities, therefore will more next address.But,,, therefore be judged as the communication line that needs router R1 and set owing to there is not the information of next router in 1 address notified information of user terminal though there is the next router (R1) of the structural information of self.Judge that according to this communication line configuration part 614 is carried out the communication line of router R1 and set,, be notified to user terminal 1 as the visit destination information with having carried out IP address and the port numbering of the router R1 of NAT setting.
(2-3) configuration example 3
In the configuration example 3 of Figure 56, user terminal 1 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR2W) of router R2 and the WAN side address (AR1W) of router R1, as home network architecture.And user terminal 2 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR5W) of router R5, the WAN side address (AR4W) of router R4, the WAN side address (AR3W) of router R3, as home network architecture.Afterwards, user terminal 1 (T1), by address information exchange messages the notice router GR (GR) WAN side address (AGRW), the WAN side address (AR2W) of router R2, the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self.In addition, user terminal 2 (T2) exchanges messages by address information and notifies WAN side address (AGRW), the WAN side address (AR5W) of router R5 (R5), the WAN side address (AR4W) of router R4, the WAN side address (AR3W) of router R3 and the address AT2 of user terminal self of router GR (GR).
The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because both unanimities therefore will more next address.In the comparison of next router, in the structural information of oneself, compare the WAN side address (AR2W) of router R2 and the WAN side address (AR5W) of the router R5 of 2 address notified information of user terminal, it is inconsistent to detect both.The result is that P2P communication judging part 613 judges that needing each following router of router R2 is the communication line setting of router R2 and router R1.
The P2P communication judging part 613 of user terminal 2, carried out equally after the WAN side address comparison each other of router GR, carry out the comparison of the WAN side address of router R5 and router R2, it is inconsistent to detect both, judges that needing each following router of router R5 is the communication line setting of router R5, router R4 and router R3.
(2-4) configuration example 4
In the configuration example 4 of Figure 57, user terminal 1 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR2W) of router R2 and the WAN side address (AR1W) of router R1, as home network architecture.And user terminal 2 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR2W) of router R2, the WAN side address (AR1W) of router R1 and the WAN side address (AR3W) of router R3, as home network architecture.Afterwards, user terminal 1 (T1), by address information exchange messages the notice router GR (GR) WAN side address (AGRW), the WAN side address (AR2W) of router R2, the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self.In addition, user terminal 2 (T2) exchanges messages by address information and notifies WAN side address (AGRW), the WAN side address (AR2W) of router R2, the WAN side address (AR1W) of router R1, the WAN side address (AR3W) of router R3 and the address AT2 of user terminal self of router GR (GR).
The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because therefore both unanimities compare the WAN side address as the router R2 of next router.Because this information is also consistent, therefore compare WAN side address as the router R1 of next router.Then, because it is consistent, therefore will more next router, owing to there is not the next router of the structural information of self, therefore judging does not need communication line to set.Judge that according to this communication line configuration part 614 is notified to user terminal 1 with communicate by letter with the P2P port numbering of usefulness of user terminal its own IP address as visiting destination information.
The P2P of user terminal 2 communication judging part 613, same because the WAN side address of router GR is consistent, therefore carry out the comparison of WAN side address of WAN side address, the router R1 of router R2 in turn.Afterwards, WAN side address that more next router.But, though there is the next router (R3) of the structural information of self, there is not the information of next router in 1 address notified information of user terminal, therefore judge the communication line setting that needs router R3.Judge that according to this communication line configuration part 614 is carried out the communication line of router R3 and set,, be notified to user terminal 1 as the visit destination information with having carried out IP address and the port numbering of the router R3 of NAT setting.
(2-5) configuration example 5
In the configuration example 5 of Figure 58, user terminal 1 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR3W) of router R3, the WAN side address (AR2W) of router R2 and the WAN side address (AR1W) of router R1, as home network architecture.And user terminal 2 is obtained the WAN side address (AGRW) of the router GR (GR) that is positioned between the Internet and self terminal, the WAN side address (AR3W) of router R3, the WAN side address (AR2W) of router R2, the WAN side address (AR5W) of router R5 and the WAN side address (AR4W) of router R4, as home network architecture.Afterwards, user terminal 1 (T1), by address information exchange messages the notice router GR (GR) WAN side address (AGRW), the WAN side address (AR3W) of router R3, the WAN side address (AR2W) of router R2, the WAN side address (AR1W) of router R1 and the address AT1 of user terminal self.In addition, user terminal 2 (T2) exchanges messages by address information and notifies WAN side address (AGRW), the WAN side address (AR3W) of router R3, the WAN side address (AR2W) of router R2, the WAN side address (AR5W) of router R5, the WAN side address (AR4W) of router R4 and the address AT2 of user terminal self of router GR (GR).
The P2P communication judging part 613 of user terminal 1, the WAN side address of the superiors' router (GR) of structural information of oneself and the WAN side address of the superiors' router (GR) of 2 address notified information of user terminal are compared, because therefore both unanimities compare the WAN side address as the router R3 of next router.Because this information is also consistent, therefore compare WAN side address as the router R2 of next router.Afterwards, because it is consistent, the information of more next router, by like this, the WAN side address (AR5W) of the WAN side address (AR1W) of router R1 and router R5 relatively, and detect that both are inconsistent.Consequently, the P2P of user terminal 1 judging part 613 of communicating by letter, judgement need communicate circuit to router R1 and set.Judge that according to this communication line configuration part 614 is carried out the communication line of router R1 and set,, be notified to user terminal 2 as the visit destination information with having carried out IP address and the port numbering of the router R1 of NAT setting.
In addition, the P2P communication judging part 613 of user terminal 2, compare the WAN side address of the router GR of the superiors, the WAN side address of router R3, the WAN side address of router R2 equally in turn, than and than the WAN side address (AR5W) of router R5 and the WAN side address (AR1W) of router R1, it is inconsistent to detect both.Consequently, the P2P of user terminal 2 judging part 613 of communicating by letter, judgement need be that router R5, router R4 implement communication line and set to each router below the router R5.Judge that according to this communication line configuration part 614 is carried out the communication line of router R5 and router R4 and set,, be notified to user terminal 1 as the visit destination information with having carried out IP address and the port numbering of the router R5 of NAT setting.
<the address information that sends by the address information clearing house 〉
Next, another example to the address information that sends by the address information clearing house describes.As shown in figure 45, the address of input user terminal self is as the address information that sends by the address information clearing house.But, also can not import the address of user terminal self, whether corresponding to affirmation of address space is placed on when obtaining visit destination information message and carries out in the time of will being located at the same router subordinate.
In addition, shown in Figure 59 (a), can also in address information message, send the LAN side address of router simultaneously, for the router that can't obtain WAN side address, by relatively replacing of LAN side address.But, in this case, even the address unanimity can not be same router in particular.
In addition, though send the WAN side address of router in the address information exchange, but the WAN side address information of this router is the information that is used for discerning router, also can be (for example UUID among the UPnP etc.) information such as identiflication number of the router that can obtain by other agreements.
In addition, in the address information message, can also shown in Figure 59 (b), utilize the P2P server, obtain the global address of distributing to user terminal, this address is also notified by address information.By like this, P2P communication judging part 613 is in turn relatively before the WAN side address of router, and this global address at first relatively can be avoided like this because of can't obtaining the WAN side address of real the superiors' router, and the P2P judging part 613 of communicating by letter carries out false judgment.
Here, utilize the P2P server to obtain the method for the global address of distributing to user terminal, for example can implement by the following, will ask for to such an extent that the message of global address sends to the P2P server from user terminal, receive the P2P server of this message, send the response message that is provided with the transmission source information (IP address, port numbering) of this message in the payload.
In addition, shown in Figure 59 (c), can be when the power source ON of user terminal etc., the communication line that proceeds to the router of the superiors is in advance set, when address information exchanges, the information (carrying out the port numbering that NAT sets) of the communication line set in each router is sent in the lump.By like this, P2P communication judging part 613 must cicada visit destination when judgement needs router that communication line sets, and therefore the switching phase that does not need to visit destination information can be carried out high speed motion.
(action effect)
In this communicator, in the network that multistage router constituted, also can grasp router topology,, can carry out communication lines such as NAT setting and fire compartment wall setting and set by like this.Set by communicating circuit like this, though a side or two sides' communicator in home network under the situation that multistage router is connected, the P2P that also can communicate between device communicates by letter.
(the 8th execution mode: the situation that communicates the setting of machine)
Below, with reference to the accompanying drawings the 8th execution mode of the present invention is described.
(all formations)
The formation of the home network of the 8th execution mode of the present invention has been shown among Figure 60.In the home network 7002, multistagely be connected with a plurality of routers.Communicator 750 is as the network configuration checkout gear performance function of the state that detects home network.
Among Figure 60, the Internet 7001 is connected with home network 7002.In the home network 7002, multistage the 1st router the 720, the 2nd router the 730, the 3rd router 740 that is connected with.The subordinate of the 3rd router 740 is connected with the communicator 750 as network configuration checkout gear performance function.In addition, the 1st router 720 is connected with the Internet 7001 through WAN side communication I/F7201, and the 1st communicating machine 760 of communicating by letter I/F7202 and the 2nd router 730 and having a communication function through the LAN side is connected.The LAN side of the 1st router 720 communication I/F7202 constitutes the network of same stratum with the WAN side of the 2nd router 730 WAN side of I/F7301 and the 1st communicating machine 760 I/F7601 that communicates by letter that communicates by letter.
The 2nd router 730, I/F7301 is connected with the 1st router 720 through the communication of WAN side, is connected with the 3rd router the 740, the 2nd communicating machine 765 through LAN side communication I/F7302 simultaneously.The LAN side of the 2nd router 730 communication I/F7302, the WAN side of communicate by letter with the WAN side of the 3rd router 740 I/F7401, the 2nd communicating machine 765 I/F7605 that communicates by letter constitutes the network of same stratum.
The 3rd router 740 is connected with the 2nd router 730 through WAN side communication I/F7401, simultaneously through the LAN side communicate by letter I/F7402 and communicator 750, the 3rd communicating machine 770 with communication function is connected.The WAN side communication I/F7610 of the WAN side communication I/F7501 of the LAN side of the 3rd router 740 communication I/F7402, communicator 750 and the 3rd communicating machine 770 constitutes the network of same stratum.
Here, can adopt the structure that comprises the network under the WLAN.For example, have under the situation of WLAN interface as the LAN side of the 2nd router 730 communication I/F7302 constituting, the 2nd communicating machine 765 is connected with the 2nd router 730, can adopt the network configuration under the WLAN.
(formation of communicator)
Figure 61 is the functional-block diagram of the formation of expression communicator 750.Communicator 750 has TTL adjusting portion 781, bag sending part 782, address generating unit 783, router grasp portion 784, address grasp portion 785, bag acceptance division 786, machine grasp portion 787, display part 788 and IP handling part 789.
At first, TTL adjusting portion 781, in order to detect the router that exists in the network, the value of regulating TTL also generates the exploration bag of ICMP simultaneously.Here,, the value of TTL is regulated on the value of 1~3 degree, generate and explore bag in order to detect the router that exists in the home network.Bag sending part 782 with the exploration bag that is generated, sends to the destination, address (for example address on the Internet) of suitable setting through IP handling part 789.Here, explore bag, comprise being used for finding the machine discovery bag of the router discovery of router with the communicating machine that wraps and be used for finding to be connected with router.
Bag acceptance division 786 receives response packet to the exploration bag that is sent from bag sending part 782 through IP handling part 789.
Address grasp portion 785 receives by the received response packet of bag acceptance division 786.Afterwards, address grasp portion 785 extracts the interior router of home network or the address of communicating machine out according to this response packet.Address grasp portion 785 sends to router grasp portion 784 with the address of router, and the address of each communicating machine is sent to machine grasp portion 787.
Address generating unit 783, the router of being extracted out according to address grasp portion 785 or the address of communicating machine become the address of the transmission destination of bag.
Router grasp portion 784 according to obtained router address, grasps the information about this router.Equally, machine grasp portion 787 according to obtained communicating machine address, grasps the attribute information about this communicating machine.Here, communicating machine by SNM (Simple NetworkManagement Protocol) etc., is differentiated with reference to MIB (Management Information Base) information by machine grasp portion 787.
Display part 788 demonstrates the information of the detected communicating machine of the information of the detected router of router grasp portion 784 and machine grasp portion 787.
(handling process)
Action to the communicator 750 that is connected with the home network 7002 that is as above constituted describes below.Figure 62 is one of the flow chart example of the action of expression communicator 750.
(1) grasp of router and demonstration
At first, the grasp of router and the processing of demonstration are described.
Step S700, S701: begin after this processing, the TTL adjusting portion 781 of communicator 750 is carried out initialization (S700) by the value of 781 couples of TTL of TTL adjusting portion, and then the value of TTL is increased progressively (S701).TTL is used for preventing to send bag and becomes Infinite Cyclic setting because of setting mistake.By setting TTL, the valid period of expressing bag.
Step S702:TTL adjusting portion 781 judges whether the value of TTL has surpassed set-point.Under the value that TTL adjusting portion 781 is judged as TTL is situation below the predefined set-point, the processing that enters step S703.And surpassed under the situation of set-point being judged as TTL adjusting portion 781, finish the processing of router detection, the processing that enters step S709.
Step S703: the value at TTL among the step S702 does not surpass under the situation of predefined set-point, and bag sending part 782 sends the exploration bag that is used for detecting router through IP handling part 789.Receive the router of exploring bag, allow explore bag by the time value of TTL successively decreased, become in this value under the situation of " 0 ", Time Exceeded message bag is postbacked to the transmission source.
Step S704, S705: the bag acceptance division 786 of communicator 750, the response packet that receiving router postbacks (S704).Address grasp portion 785 resolves bag acceptance division 786 received response packets, obtains the LAN side address of the router that response packet is sended over.
Step S706: address grasp portion 785, judge that the LAN side address of obtained router is global address or local address.
Step S707, S708: address grasp portion 785 is under the situation of local address in the LAN side address of judging router, and identifying it is the router that is present on the network.Afterwards, router grasp portion 784 visits this router, obtains the information (S707) of router.Router grasp portion 784 will export to display part 788 about the information of the router in the network, and display part 788 is presented at (S708) on the picture with this router.Here, address grasp portion 785, according to the LAN side address of obtained router, be used for obtaining this router WAN side address obtain request package, send to corresponding router.Afterwards, address grasp portion 785 receives response packet from this router and obtains WAN side address, grasps this router.Here, machine can be differentiated by SNMP etc. with reference to mib information by router grasp portion 784.
Afterwards, get back to step S701 once more, successively decrease by the value of 781 couples of TTL of TTL adjusting portion.Afterwards, explore the transmission of bag and the reception of response packet, grasp the router on the network, and repeat above action.
(2) grasp of communicating machine and demonstration
Next, the grasp of communicating machine and the processing of demonstration are described.
Step S709: address grasp portion 785 is under the situation of global address in the LAN side address that is judged as obtained router, identifies this router and be the router on the outer the Internet of home network.Afterwards, address grasp portion 785, indication address generating unit 782 is ended router and is explored the generation of using the address, ends the retrieval process of router.On the other hand, address grasp portion 785, indication address generating unit 782 generates the address that is used for exploring the communicating machine that is connected with router.
Address generating unit 782 according to the LAN side address of the obtained router of address grasp portion 785, becomes the address of the communicating machine of searching object.Employed address in the home network, various kinds (kind A, kind B, kind C) are arranged, but here to use kind C to be example, by making the least-significant byte of address of LAN side of obtained router long, between 1~254, change, can infer the address of the communicating machine that is connected with router.Therefore, the address of communicating machine is inferred and generated to address generating unit 783 according to the LAN side address of obtained router.
In addition, under the situation of the address type such as kind A, kind B beyond network is kind C, also can infer the address of communicating machine according to these kinds.
Step S710: bag sending part 782, the address that address generating unit 783 is generated generates and sends the exploration bag that is used for detecting communicating machine as the destination.
Under the communicating machine corresponding to the exploration bag that sent of bag sending part 782 was present in situation on the home network 7002, corresponding communicating machine sent exploring the response packet of bag.Thereby bag acceptance division 786 receives the response packet from communicating machine, and address grasp portion 785 obtains the address of communicating machine from response packet.In addition, as the bag of retrieval communicating machine, except ICMP bag, can also use ARP (Address ResolutionProtocol) bag that is used for according to the network address of IP Address requests physical layer.
Step S711, S712: bag acceptance division 786 receives the response packet (S711) to the exploration bag that sent from communicating machine.Next, address grasp portion 785 judges whether to have obtained from response packet the address (S712) of communicating machine.Under the situation that has obtained machine address, carry out step S713, under situation about not obtaining, carry out step S715.
Step S713: machine grasp portion 787, according to the address of obtained communicating machine, obtain the communicating machine information about communicating machine.
Step S714: machine grasp portion 787, the information of obtained communicating machine is exported to display part 788, display part 788 shows the information of this communicating machine.
Step S715, S716: address grasp portion 785 judges whether to generate the address (S715) that is used for next exploration bag.Here, under the address situation that all search complete that is judged as the address that is speculated as the communicating machine that is connected the router subordinate, carry out retrieval end process (S716).In addition, address grasp portion 785, under further calculated address was gone forward side by side the situation of line retrieval, indication address generating unit 783 generated next address.By this indication, address generating unit 783 is carried out the generation (S709) of address.By like this, continue the retrieval of communicating machine.
By above formation, the exploration bag of the value of communicator 750 by will having changed TTL sends to router, can obtain the address of LAN side communication I/F7202 of LAN side communication I/F7302, the 1st router 720 of LAN side communication I/F7402, the 2nd router 730 of the 3rd router 740 of Figure 60 respectively.
(obtaining of the address of router)
According to Figure 63, the method that obtains the router topology in such network is described.Figure 63 is the key diagram that is used for illustrating the detection method of router.
For example, from communicator 750 send TTL is made as the Echo Request message bag ER1 of 1 ICMP after, will be by the moment of the 3rd router 740, TTL becomes 0.Afterwards, 740 pairs of conducts of the 3rd router send the communicators 750 in source, postback the Time Exceeded message bag TE1 of ICMP.
Next, from communicator 750 send TTL is made as the EchoRequest message bag ER2 and ER3 of 2 and 3 ICMP after, this message bag ER2 and ER3 arrive the 2nd router 730 and the 1st router 720 respectively.Afterwards, the 2nd router 730 and the 1st router 720, Time Exceeded message bag TE2 and the TE3 with ICMP postbacks to communicator 750 respectively.
In addition, can also be from the Echo Request message bag of communicator 750 a plurality of ICMP that the value of transmission TTL is different side by side simultaneously.For example, the value that sends TTL simultaneously from communicator 750 is Echo Request message bag ER1~ER3 of 3 ICMP of 1~3.In this case, the bag ER1 that is made as TTL=1 delivers to the 3rd router 740, and the bag ER2 that is made as TTL=2 delivers to the 2nd router 730, and the bag ER3 that is made as TTL=3 delivers to the 1st router 720.Afterwards, from the Time Exceeded message bag TE1~TE3 of each router, postback to communicator 750 with ICMP.
The Echo Request message bag ER of the ICMP that is sent for communicator 750 postbacks the transmission source address of the response packet TE that comes from router, represents the LAN side address of each router.
Here, to the transmission source address of the response packet TE1 of the EchoRequest message bag ER1 of the ICMP that is made as TTL=1 and sent by communicator 750, be the LAN side address of the 3rd router 740.Equally, the transmission source address of response packet TE2 and TE3 is the LAN side address of the 2nd router 730 and the 1st router 720.By like this, can grasp the LAN side address of each router that is positioned on the network.
Here, when communicator 750 sends the Echo Request message bag of a plurality of ICMP simultaneously, when the value of TTL is successively decreased, serial number increased progressively generate bag, and send the Echo Request of the ICMP that is generated.Communicator 750, ICMP TimeExceeded Message bag that can receiving router sent uses the serial number of the Echo Request message of the ICMP that contains in the received bag, the value of specified TTL when determining transmission.
(obtaining of the address of communicating machine)
According to Figure 60 and Figure 64, the method for the formation that obtains the communicating machine in the network is described.Figure 64 is the key diagram that is used for illustrating the detection method of the communicating machine that is connected with router.In addition, only show the detection method of the 1st communicating machine among Figure 64.
In the home network, use various addresses (kind A, kind B, kind C).For example, be example with the situation of the address of using kind C, according to Figure 64, the method that the LAN side address detected from each router is gone out the address of the communicating machine that is connected with this router describes.
The address generating unit 783 of communicator 750 by the method shown in above-mentioned Figure 63, according to the LAN side address of router, is inferred the address of the communicating machine that is connected with this router.For example, if the LAN side address of establishing the router of obtaining is kind C, address generating unit 783 by allowing the least-significant byte of LAN side address change at 1~254, is inferred and is generated the address that is considered to the communicating machine that is connected with router.For example, as the presumptive address that gets off.
In addition, shown in Figure 60 and Figure 64, if the 1st router 720 is the 1st network 711 with the annexation of the Internet 7001, the LAN side network of the 1st router 720 is the 2nd network 712, the LAN side network of the 2nd router 730 is that the LAN side network of the 3rd network 713, the 3 routers 740 is the 4th network 714.
The address of the 1st communicating machine 760 that is connected with the 2nd network 712 is the identical types in LAN side address with the 1st router 720.In addition, the address of this communicating machine should be made as the value that the low level that makes except the netmask that sets in this address type changes.In the LAN side address of establishing the 1st router 720 is under the situation of kind C, generates the address of least-significant byte length 1~254 variation.By like this, can enlist the services of the address that is present in the 1st communicating machine 760 on the 2nd network 712.To the address that is generated, send the message bag of the Echo Request of ICMP from communicator 750 here.In addition, if the address that is generated is the address that is present in the 1st communicating machine 760 on the 2nd network 712, then the 1st communicating machine 760 normally postbacks the EchoReply message bag as the ICMP of response packet.By like this, this address can be defined as the address of the 1st communicating machine 760.In addition, when generating the address of communicating machine, can also be kind A or the kind B beyond the kind C.
Under the situation of the address that can determine communicating machine, for the communicating machine that can determine addresses from communicator 750, can use SNMP etc. to conduct interviews, obtain the attribute information of each communicating machine.Here, the information that is associated with machine such as attribute information state, icon state, model of being meant Locaion, user's pet name, the machine of machine.
In addition,, also can use UPnP (Universal Plug and Play), obtain the device description of equipment, or obtain attribute information by action request though use SNMP when obtaining the attribute information of each communicating machine.
At the message bag of the Echo Request of the ICMP that communicator 750 is sent, do not have under the situation of Echo Reply message of ICMP, the change address, and send the EchoRequest message bag of ICMP equally.
In addition, though with the indication of address generating unit 783 according to address grasp portion 785, calculated address one by one, and be sent as example one by one and be illustrated by bag sending part 782, generate but can also allow address generating unit 783 once carry out a plurality of addresses, bag sending part 782 will be explored bag and send to a plurality of addresses that generated simultaneously.For example, be under the situation of kind C in the LAN side address of the 1st router 720, can once generate the address of least-significant byte length by address generating unit 783 1~254 variation, once send to the address that bag sending part 782 is generated with exploring bag.
(object lesson)
Figure 65 is the key diagram of the concrete configuration example of expression home network.In the home network, multistage the 1st, the 2nd, the 3rd router 720,730,740 that is connected with.In addition, on the 2nd router 730, be connected with DVD and camera, be connected with television set on the 3rd router 740 with communication function with communication function.
Communicator 750, obtain the LAN side address " 192.168.0.1 " of the 3rd router 740 after, infer the address of the communicating machine be connected with the 3rd router 740 to send to explore and to wrap.Afterwards, communicator 750 can be obtained the address " 192.168.0.5 " of communicating machine from the response packet that television set sends.Communicator 750 sends the bag of request machine information to the address of this communicating machine, and receives response packet.By like this, this machine information that can to obtain this communicating machine be television set.
In addition, communicator 750, obtain the LAN side address " 192.168.5.2 " of the 2nd router 730 after, infer the address of the communicating machine be connected with the 2nd router 730, and send to explore and wrap.Afterwards, communicator 750 can be obtained separately address " 192.168.5.10 ", " 192.168.5.13 " by receiving the response packet from communicating machine.In addition, communicator 750 can send request package from communicator 750 to the address of communicating machine, obtains machine information separately.Consequently, can to obtain the communicating machine that is connected with the 2nd router 730 be DVD recorder and this machine information of camera to communicator 750.Equally, communicator 750 can be obtained the address and the machine information of the communicating machine that is connected the 1st router 720 subordinates.
In addition, communicator 750, detect the global address of interface 7011 that the 1st router 720 connects the Internets after, the retrieval process of ending router.By like this, communicator 750 can only detect the network configuration in the home network.
Be presented on the picture by each router that communicator 750 is as above obtained and the information of communicating machine, even in the multistage network that has a router, the user also can grasp network configuration.Figure 66 is one of the shown network configuration of the display part that passes through communicator example.Shown in Figure 66, the syndeton of each router and each communicating machine has been shown in the display frame.In addition, for each router, demonstrate ON/OFF state and LAN side IP address that place, power supply are set.In addition, to each communicating machine, express ON/OFF state and IP address that place, power supply are set.
In addition, in the present embodiment,, also can send the Echo Request message bag of a plurality of ICMP simultaneously, grasp the LAN side address of router about the processing of the Echo Request message bag of ICMP among Figure 62.
In addition,, also can send at the same time after a plurality of machine (information) retrieval bags, wait for replying from machine though in the present embodiment, also be that 1 bag is handled in the machine (information) retrieval bag.
In addition, though, use the ICMP bag, also can use UDP in order to detect router.Under the situation of using UDP, by changing TTL, change destination-address or port numbering simultaneously, can carry out the control same with ICMP.
(action effect)
As mentioned above, communicator is the router discovery bag of variable by sending with TTL, can obtain the router address of the router in the home network.And then communicator sends the bag of exploring communicating machine according to this router address, by obtaining the address of the communicating machine that is connected with router like this.In addition, by demonstrating these routers of visit and the obtained information of communicating machine, even in the home network that multistage router constituted, the user also can grasp network configuration.
(the 9th execution mode)
Contrast accompanying drawing below, the 9th execution mode of the present invention is described.
(all formations)
The all formations of device in the 9th execution mode of the present invention have been shown among Figure 67, have shown in the home network structure chart of the network of the multistage connection of router.
Among Figure 67, the Internet 8001 is connected with home network 8002.In the home network 8002, the multistage subordinate who is connected with the 1st router the 820, the 2nd router the 830, the 3rd router 840, the 3 routers 840 is connected with the communicator 850 of the function that plays the network configuration checkout gear.In addition, be connected with on the 1st router 820 on the 1st communicating machine 860, the 2 routers 830 and be connected with the 2nd communicating machine 865.Here, each router and communicating machine are connected to each other through LAN side IF communication and WAN side IF communication 8201,8202,8301,8302,8401,8402,8501,8601,8605.
(formation of communicator)
Figure 68 is the functional-block diagram of the formation of expression communicator.Communicator 850 is made of common computer, for example by with the program development of network configuration detection method to RAM, constitute the network configuration checkout gear.
Communicator 850 has address generating unit 881, bag sending part 882, bag acceptance division 886, address grasp portion 885, router grasp portion 884, display part 888, machine grasp portion 887 and IP handling part 889.
(flow process of processing)
Action to the communicator 850 that is connected with the home network 8002 that is as above constituted describes below.Figure 69 is one of the flow chart example of the action of expression communicator 750.
(1) grasp of router and demonstration
At first, the grasp of router and the processing of demonstration are described.
Step S800~S802: the bag sending part 882 of communicator 850 in order to grasp the LAN side address of direct-connected router, sends the bag (S800) that is used for retrieving router.Bag acceptance division 886 receives the response packet (S801) to the bag that is sent.Address grasp portion 885 obtains the LAN side address (S802) of router from response packet.
Step S803: address grasp portion 885 obtains LAN side address, obtains the WAN side address of router according to this LAN side address.
Step S804: address grasp portion 885, judgement is to explore the router that is present on the network, still explores the communicating machine that is connected the router subordinate.
Step S805: under the situation of the exploration of carrying out router, address generating unit 881 is inferred to be positioned at the LAN side address of more leaning on the upper strata router of WAN side according to the WAN side address of router, and calculated address.Here, the kind of employed address in the home network has kind A, kind B, kind C etc.Under the situation of the address of using kind C, by with the least-significant byte of the WAN side address of router 1~254 variation, can infer and generate the LAN side address of upper strata router.
Step S806: bag sending part 882 in order to grasp the LAN side address of upper strata router, sends the exploration bag that is used for retrieving router to the destination, address that address generating unit 881 is generated.Here, about being used for exploring the exploration bag of router, can send the machine (information) retrieval bag of M-SEARCH by clean culture to the address that is generated as UPnP.
Step S807: bag acceptance division 886 if also not having from the replying of router through certain hour from send exploring bag, just being judged as and not having router in the address that is generated.At this moment, address generating unit 881 is calculated address (S805) once more, and bag sending part 882 sends to the destination, address that is generated and explores bag (S806).
Step S808: after bag acceptance division 886 receives response packet, received response packet is handed to address grasp portion 885.Address grasp portion 885 obtains the LAN side address of router from response packet.
Address generating unit 881, bag sending part 882, address grasp portion 885 etc. repeat processing, up to the router that detects as searching object.
Step S809: address grasp portion 885, judge that the LAN side address of obtained router is global address or local address.Address grasp portion 885 is under the situation of global address in the LAN side address that is judged as obtained router, finishes this retrieval process.
Step S810: in the LAN side address that is judged as the obtained router of address grasp portion 885 is under the situation of local address, and router grasp portion 884 obtains the information of router according to this LAN side address, grasps router.
Step S811: router grasp portion 884, the information of obtained router is sent to display part 888, display part 888 demonstrates the information of router.
Afterwards, send the Address requests bag of router from the LAN side address of obtained router, obtain the WAN side address (S803) of router, and repeat following processing.
(2) grasp of communicating machine and demonstration
Next, the grasp of communicating machine and the processing of demonstration are described.
Step S812: communicate at communicator 750 under the situation of retrieval of machine (S804), address generating unit 881 according to the WAN side address of the obtained router of address grasp portion 885, produces the address of the address that is used for predicting communicating machine.Address generating unit 881 is same with the exploration of router, according to the WAN side address of router, infers the address with the communicating machine that network was connected that is arranged in the upper strata same stratum of router of more leaning on the WAN side, and calculated address.As hereinbefore, under the situation of the address of using kind C, by with the least-significant byte of the WAN side address of router 1~254 variation, can infer and generate the address of the communicating machine that upper strata router subordinate connected.
Step S813: the address that 822 pairs of address generating units 881 of bag sending part are generated sends the machine exploration bag that is used for exploring communicating machine.
Step S814: bag acceptance division 886 judges whether to have received the response packet of the machine that is sent being explored bag.Through still not receiving under the situation of response packet preset time, address generating unit 881 generates and is used for the address that next machine is explored bag at bag acceptance division 886.In addition, can also send a plurality of machines simultaneously and explore bag.
Step S815: bag acceptance division 886, be judged as under the situation that has received the response packet of the machine that is sent being explored bag, grasp portion 885 in address obtains the address of communicating machine from response packet.
Step S816: machine grasp portion 887, according to the address of obtained communicating machine, obtain and store the attribute information of this communicating machine.
Step S817: display part 888 demonstrates the information of obtained communicating machine.
Step S818, S819: address grasp portion 885, judge in order whether to finish (S818) in the issuable address, address of predicting communicating machine, judging under the situation that has finished the address end retrieval process (S819).
(address of router and communicating machine is obtained)
According to Figure 70, describe obtaining the method that router in such network constitutes with the formation of communicating machine.Figure 70 is the key diagram that is used for illustrating the detection method of router.
Communicator 850, Designated Router are as the equipment that becomes searching object, and multicast sends the M-SEARCH request under the UPnP.If there is router on the communication line, router is replied the bag that is sent from communicator 850.Communicator 850 can be obtained the LAN side address of communicator 850 direct-connected routers from this response message.In this case, in the communicator 850, obtain the address of the LAN side communication I/F8402 of the 3rd router 840.
Next, communicator 850 to the LAN side address of the 3rd router 840, sends the request package of the WAN side address be used for obtaining the 3rd router 840.Communicator 850 receives the response packet from the 3rd router 840, obtains the WAN side address of the 3rd router 840.Here, from 850 pairs the 3rd routers 840 of communicator, carry out the Get ExternalIP Address request of UPnP IGD defined.Afterwards, after communicator 850 had sent GetExtemal IP Address response packet, communicator 850 can be obtained the WAN side address of the 3rd router 840 from this response packet from the 3rd router 840.
Communicator 850 in order to infer the LAN side address of the 2nd router 830, generates the address of the part of the WAN side address of having changed the 3rd router 840.Here, the LAN side address of the 2nd router 830 is present in and communicates by letter the I/F8401 consolidated network with the WAN side of the 3rd router 840 promptly in the 3rd network 803.Communicator 850 sends the exploration bag that is used for exploring router to the address that is generated.Here, communicator 850 by receiving the response packet from the 2nd router 830, can be found the 2nd router 830 as searching object on network.And then communicator 850 can be grasped the LAN side address of the 2nd router 830 according to the address that communicator 850 is generated by the reception of response packet.
Here, communicator 850, the M-SEARCH that the address clean culture that is generated is sent UPnP asks, and the retrieval router is as the equipment that becomes searching object.Communicator 850 generates LAN side address, and sends the M-SEARCH request to the address that is generated, up to finding router.Communicator 850 is replied by receiving M-SEARCH, can find to be present in the router on the network.
In addition, under the situation of the LAN side address of grasping router, too, communicating machine is also generated the address of supposition, send the exploration bag that is used for retrieving communicating machine.There is communicating machine by receiving in communicator 850 to exploring the response packet of bag, can identifying in the destination, address that is generated.
In addition, though above explanation is, address generating unit 881 is according to the indication of address grasp portion 885, calculated address one by one, and by the bag sending part 882 send one by one, but address generating unit 881 also can once be carried out a plurality of addresses and be generated, and sends simultaneously to a plurality of addresses that bag sending part 882 is generated and explores bag.For example, be under the situation of kind C in the LAN of the 1st router side address, address generating unit 881 once generates the address of least-significant byte length 1~254 variation, and bag sending part 882 once sends the exploration bag to the address that is generated.
(object lesson)
Figure 71 is the key diagram of the concrete configuration example of expression home network.Shown in Figure 71, establish communicator 850, identify the LAN side address " 192.168.0.1 " of direct-connected the 3rd router 840.Here, communicator 850 is inferred the address of the communicating machine with communication function that is connected with the 3rd router 840, and sends the exploration bag, by obtaining address " 192.168.0.5 " from the response packet that communicating machine sent.Communicator 850 sends the bag of request machine information to this address, and receives response packet.By like this, for example, this attribute information that can to obtain this communicating machine be television set.
In addition, communicator 850 sends the bag of asking WAN side address to the 3rd router 840, obtains the WAN side address " 192.168.5.12 " of the 3rd router 840.Communicator 850 according to the WAN side address of the 3rd router 840, is inferred the LAN side address of the 2nd router 830 and the address of communicating machine 210,220, sends to explore bag.Afterwards, communicator 850 by receiving the response packet from communicating machine, is obtained " 192.168.5.2 ", " 192.168.5.10 ", " 192.168.5.13 ".In addition, communicator 850 can send request package to the address of these communicating machines, obtains attribute information separately.Here, attribute information is Location, user's pet name, the state of machine, icon state, the model of machine.Consequently, communicator 850 can access the attribute information that communicating machine is DVD recorder and camera and so on.
And then communicator 850 sends the Address requests bag to the 2nd router 830, and the WAN side address of obtaining the 2nd router 830 is " 192.168.10.1 ".
Communicator 850 according to the WAN side address of the 2nd router 830, is inferred the LAN side address of the 1st router 820, sends router and explores bag.Communicator 850, by receiving the response packet of this router being explored bag, the LAN side address that can obtain the 1st router 820 is " 192.168.10.5 ".
And then communicator 850 sends the Address requests bag to the 1st router 820, and the WAN side address of obtaining the 1st router 820 is " xxx.131.132.132 ".The WAN side address of the 1st router 820 is global addresses.Therefore, communicator 850 can detect the 1st router 820 and be connected with the Internet, and can identify the structure that can grasp home network this moment.
In addition, though in the present embodiment, about the order that the transmission of the exploration bag that carries out router retrieval and the exploration bag of exploring machine receives, the processing of carrying out the transmission of 1 bag and implementing to receive also can send simultaneously and receive a plurality of exploration bags.
Be presented in the picture by each router that communicator 850 is as above obtained and the information of communicating machine, even in the multistage network that has a router, the user also can grasp network configuration.Figure 72 is one of the shown network configuration of the display part that passes through communicator example.Shown in Figure 72, the syndeton of each router and each communicating machine has been shown in the display frame.
(action effect)
The communicator of present embodiment, the router that does not change TTL is found the transmission of bag in home network that the generation of usefulness bag maybe will generate, and also can obtain the structure of router.In addition, even under the situation of the router that includes the processing that does not reduce TTL when forwarding router is found with bag, also can grasp the router topology in the home network.And then, even under the situation that includes the router that the router response packet is filtered, also can grasp the structure of the router in the home network.
(the 10th execution mode: the router detection of using ICMP and UPnP)
Contrast accompanying drawing below, the 10th execution mode of the present invention is described.
(all formations)
Figure 73 is the structure chart of the home network of the 10th execution mode of the present invention.
Among Figure 73, the Internet 9001 is connected with home network 9002.In the home network 9002, the multistage subordinate who is connected with the 1st router the 920, the 2nd router the 930, the 3rd router 940, the 3 routers 940 is connected with the communicator 950 of the function that plays the network configuration checkout gear.In addition, be connected with the 1st communicating machine 960 on the 1st router 920.Here, each router and communicating machine are connected to each other through LAN side IF communication and WAN side IF communication 9201,9202,9301,9302,9401,9402,9501,9601.
(formation of communicator)
Figure 74 is the functional-block diagram of the formation of expression communicator.
Communicator 950 has TTL adjusting portion 981, bag sending part 982, address generating unit 983, router grasp portion 984, address grasp portion 985, bag acceptance division 986, machine grasp portion 987, display part 988 and IP handling part 989.
(flow process of processing)
Figure 75 is one of the flow chart example of the action of expression communicator 950.
Step S900, S901:TTL adjusting portion 981 are carried out initialization (S900) to the value of TTL, and then the value of TTL is increased progressively (S901).
Step S902:TTL adjusting portion 981 judges whether the value of TTL has surpassed set-point.Value at TTL has surpassed under the situation of predefined set-point, finishes the processing of router detection, carries out step S914.
Step S903: the value at TTL does not surpass under the situation of set-point, and bag sending part 982 sends the exploration bag that is used for detecting router.
Step S904: bag acceptance division 786 receives from router and returns next response packet.Carry out step S910 under the situation of response packet receiving, under the situation that does not receive response packet, carry out step S905.
Step S905: bag acceptance division 986, be judged as under the situation that Time Exceed message bag still do not postback through certain hour, address grasp portion 985 obtains the WAN side address of the lower layer side router of the router of replying that does not have Time Exceed message bag.
Step S907, S908: address generating unit 983, generate the address (S907) of WAN side address that the WAN side address prediction be used for according to the obtained router of address grasp portion 985 is positioned at the router on its upper strata, bag sending part 982 sends explores bag (S908).
Step S909, S910: bag acceptance division 986, receive response packet (S909) to the exploration bag that is sent, address grasp portion 985 obtains the LAN side address (S910) of router.
Step S911: address grasp portion 985, judge that the LAN side address of obtained router is global address or local address.
Step S912, S913: router grasp portion 984, according to the LAN side address of obtained router, obtain the information of router, and grasp this router (S912).Display part 988 demonstrates the information (S913) of obtained router.
Step S914: the LAN side address that is judged as router in address grasp portion 985 is under the situation of global address, identifies this router and be the router on the outer the Internet of home network, the retrieval process of ending router.Afterwards, the address of the communicating machine of searching object is inferred and become to address generating unit 983 according to the LAN side address of obtained router.
Step S915: bag sending part 982, the address that address generating unit 983 is generated send the exploration bag that is used for detecting communicating machine as the destination, address.Bag acceptance division 986 receives from the response packet that is present in the communicating machine in the network, and address grasp portion 985 obtains the address of this communicating machine.
Step S916~S918: bag acceptance division 986, the exploration bag that sent is received response packet (S916) from communicating machine, judged whether to obtain the address (S917) of communicating machine.Address grasp portion 985 obtains the address of communicating machine.Next, machine grasp portion 987 obtains the communicating machine information (S918) about communicating machine.
Step S919, S920: address generating unit 983 judges whether to generate the address (S919) that is used for next exploration bag.After generate to finish the address, display part 988 was shown to (S920) in the display part 988 with the information of the communicating machine grasped.
In addition, as the bag of retrieval communicating machine, except ICMP bag, can also use ARP (the Address Resolution Protocol) bag that is used for according to the network address of IP Address requests physical layer.
In addition, illustratedly in the present embodiment be, TTL be made as 0 and do not postback on the network of the router of replying existing, use ICMP and UPnP simultaneously, grasp network configuration efficiently.But, wrap in the router that filters at the router that does not carry out the TTL processing or to ICMP, by using ICMP and UPnP simultaneously, also can grasp network configuration efficiently.
(concrete example)
Figure 76 is the network structure that includes the router that carries out packet filtering.Shown in Figure 76,,, there be not replying from router even then send the ICMP bag if there is the 1st router 920 that the ICMP bag is filtered yet.Therefore, carry out ICMP and handle, up to the router (being the 2nd router 930 here) that sends ICMP and reply.Afterwards, use the LAN side address of handling the 2nd router of being grasped 930 by ICMP, handle the WAN side address of grasping the 2nd router 930, the LAN side address of the 1st router 920 by UPnP.More than, handle by using ICMP to handle with UPnP, even there is the router that the ICMP bag is filtered, also can grasp the structure of router efficiently.According to the address of such router of grasping, communicate the retrieval of machine.
Figure 77 is the network structure that comprises the router of not handling TTL.Shown in Figure 77, if the 2nd router 930 is routers of not handling TTL, then send the EchoRequest message bag ER2 of ICMP of TTL=2 after, what this bag arrived is the 1st router 920.Like this, communicator 950 just can't be grasped the existence of the 2nd router 930.Therefore, use UPnP to handle the legitimacy of checking router address.By like this, communicator 950 is grasped the existence of the 2nd router 930.
Communicator 950 is handled the WAN side address of grasping the 3rd router 940 by UPnP.Afterwards, communicator 950 will compare by LAN side address and this WAN side address that ICMP handles the 1st obtained router 920.Do not exist under the situation of the 2nd router 930 at the 3rd router 940 and 920 of the 1st routers, the WAN side address of the 3rd router 940 is identical with the address space of the LAN side address of the 1st router 920.But, owing to have the 2nd router 930, so the address space difference.By like this, communicator 950 can grasp the 1st router 920 and there are other routers in 940 of the 3rd routers.Therefore, communicator 950 is obtained the LAN side address of the 2nd router 930, the WAN side address of grasping the 2nd router 930 simultaneously by the UPnP processing.Next, communicator 950 compares the WAN side address of the 2nd router 930 and the LAN side address of the 3rd router 940.If same address space, then can grasp and do not have router.More than, use UPnP to handle and the ICMP processing, carry out the address check of router, even there is the router of not handling TTL, also can grasp the existence of router efficiently.According to the address of the router of being grasped like this, communicate the retrieval of machine.
(action effect)
Do not reduce TTL just under the situation of the router that next router is transmitted even contain at home network, communicator also can be grasped the router topology in the home network and the structure of communicating machine.
<other execution mode examples 〉
In the above-mentioned execution mode example, disclose the communicator that in including the home network of multistage router, is connected, can grasp the structure of the structural information of multistage router.But the router number in the home network is unqualified, for example in the home network of 1 router, also can be suitable for the present invention.
Allow computer carry out the computer program of preceding method and the computer readable recording medium storing program for performing that writes down this computer program, comprise within the scope of the invention.Here, as computer readable recording medium storing program for performing, for example can list floppy disk, hard disk, CD-ROM, MO, DVD, DVD-ROM, DVD-RAM, BD (Blue-ray Disc) and semiconductor memory.
Aforementioned calculation machine program is not limited in and is recorded in the aforementioned recording medium, can also transmit via electrical communication line, wireless or wire communication line, the network etc. that is representative with the Internet.
By the present invention, in the home network that multistage router constituted, can carry out router setting.In addition, can also carry out with user terminal that home network that multistage router is constituted is connected between P2P communicate by letter.

Claims (37)

1. communicator belongs to and is connected with wide area network, includes in the home network of a plurality of routers of multistage connection, wherein:
Have: mechanism is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And,
Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain mechanism,
Mechanism is obtained in address, the above-mentioned outside, and repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router,
Mechanism is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of mechanism, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
2. communicator as claimed in claim 1 is characterized in that also having:
Router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
Router response packet receiving mechanism, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and includes a plurality of router response packets of each router address; And,
Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet.
3. communicator as claimed in claim 1 is characterized in that also having:
The trunk information set mechanism, it is according to obtained inboard address access router, sets being used for the trunk information of the communication between relaying and other communicators that are connected via the above-mentioned multistage router that is connected.
4. communicator as claimed in claim 1 is characterized in that:
Whether also have the 2nd decision mechanism, it judges that address, the above-mentioned outside obtains the address, the outside that mechanism newly obtains, be that the address, the outside that connects the gateway of home network and wide area network is a global address,
In address, the above-mentioned outside is under the situation of global address, ends to be obtained by above-mentioned inboard address the obtaining of the new address, the outside of obtaining and obtained by address, the above-mentioned outside mechanism for implementing of the new inboard address of mechanism for implementing.
5. communicator as claimed in claim 1 is characterized in that:
Mechanism is obtained in above-mentioned inboard address, generates the part variation that makes address, the above-mentioned outside obtain the obtained address, the outside of mechanism and the test address that obtains, as the inboard address of router,
Mechanism is obtained in address, the above-mentioned outside, and according to above-mentioned test address, visit is positioned at than the router with address, the above-mentioned outside more leans on the router of wide area network side, and obtains the address, the outside of this router.
6. communicator as claimed in claim 1 is characterized in that also having:
Machine discovery generates mechanism with bag, and it is according to obtained address, the outside, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
Machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
Machine response packet receiving mechanism, it receives above-mentioned machine discovery is replied with bag from least 1 communicating machine, includes the machine response packet of the machine address of this communicating machine; And,
Machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
7. communicator as claimed in claim 6 is characterized in that:
Also have communication setting mechanism, it to one of above-mentioned communicating machine and the communicator of self, is used for the setting of communicating by letter with above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out.
8. communicator as claimed in claim 6 is characterized in that:
Also have machine grasp portion, it grasps the address and the attribute information of above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out.
9. communicator as claimed in claim 8 is characterized in that:
Also have display part, it demonstrates address and attribute information by the obtained communicating machine of above-mentioned machine grasp portion.
10. communicator as claimed in claim 1 is characterized in that:
Above-mentioned communicator is the interior communicator of the 1st home network that includes a plurality of routers of multistage connection,
Also have: router topology information sending part, it is with the part of a plurality of routers of above-mentioned multistage connection, the router topology information that promptly comprises a part of router of the router that communicator self connected, send to other communicators in above-mentioned the 1st home network, or by other communicators in wide area network and the 2nd home network that above-mentioned the 1st home network is connected; And,
The communication judging part, it receives the router topology information of another part router in above-mentioned a plurality of router from above-mentioned other communicators, according to router topology information of communicator of self and received router topology information, judgement could communicate with above-mentioned other communicators
Above-mentioned router topology information is based on obtaining the obtained inboard address of mechanism and/or the obtained address, the outside of mechanism is obtained in address, the outside in the inboard address of each communicator.
11. communicator as claimed in claim 10 is characterized in that:
Also have the trunk information set mechanism, it is according to above-mentioned router topology information, to each router, sets with the trunk information of communicating by letter between other communicators being used for relaying.
12. communicator as claimed in claim 11 is characterized in that:
Above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, in family's network and with the boundary of wide area network, be connected the inboard address and/or the address, the outside of each router till the internetwork border router of both sides
Above-mentioned communication judging part,
Has the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, extract the address of the breakout that is judged as inconsistent communication line at first out
Use the branch address extracted out, judgement could with above-mentioned other communication.
13. communicator as claimed in claim 11 is characterized in that:
Above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, in family's network and with the boundary of wide area network, be connected the inboard address and/or the address, the outside of each router till the internetwork border router of both sides
Above-mentioned communication judging part,
Have: the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, the address of extracting the breakout that is judged as inconsistent communication line at first out; And,
The branch address transmitting mechanism sends to above-mentioned trunk information set mechanism with the branch address of being extracted out,
Above-mentioned trunk information set mechanism, according to the router topology information of communicator of self, visit the router of corresponding above-mentioned branch address and be positioned at this router and the communicator of self between router, set trunk information,
Above-mentioned branch address transmitting mechanism associates the trunk information and the above-mentioned branch address of the router of the above-mentioned branch address of correspondence, sends to other communicators that communicate.
14. a communicator is a kind ofly to be connected with wide area network, includes the communicator in the home network of a plurality of routers of multistage connection, has:
Router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
Router response packet receiving mechanism, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; And,
Handle the request destination and obtain mechanism, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
15. communicator as claimed in claim 14 is characterized in that,
Also has the trunk information set mechanism, it is obtained the obtained request destination information of mechanism according to above-mentioned processing request destination and conducts interviews, and sets being used for the trunk information of the communication between relaying and other communicators that are connected via the above-mentioned multistage router that is connected.
16. communicator as claimed in claim 14 is characterized in that:
Above-mentioned router address is home network side address (below be called inboard address),
Also have address, the outside and obtain mechanism,, obtain the wide area network side address (below be called the outside address) of this router according to above-mentioned processing request destination information access router,
Above-mentioned router address is obtained mechanism, repeat according to address, the above-mentioned outside and obtain the obtained address, the outside of mechanism, obtain and be positioned at than router, and above-mentioned processing request destination is exported in obtained inboard address obtain mechanism more by the action of the inboard address of the router of wide area network side with address, the above-mentioned outside.
17. communicator as claimed in claim 14 is characterized in that:
Above-mentioned router address is inboard address,
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is employed global address in the wide area network,
In above-mentioned inboard address is under the situation of global address, and above-mentioned trunk information set mechanism is ended the setting to the trunk information of above-mentioned router.
18. communicator as claimed in claim 14 is characterized in that:
Above-mentioned router address is inboard address;
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is employed global address in the wide area network,
Above-mentioned router is found to generate mechanism with bag, in above-mentioned inboard address is under the situation of global address, have the bigger permission router number of pass times of permission router number of pass times that the router of global address sets for comparison, end router and find generation with bag.
19. communicator as claimed in claim 14 is characterized in that:
Above-mentioned communicator is the interior communicator of the 1st home network that includes a plurality of routers of multistage connection,
Have: router topology information sending part, it will be as the part of a plurality of routers of above-mentioned multistage connection, and the router topology information that comprises a part of router of the router that communicator self connected, send to other communicators in above-mentioned the 1st home network, or by other communicators in wide area network and the 2nd home network that above-mentioned the 1st home network is connected; And,
The communication judging part, it receives the router topology information of another part router above-mentioned a plurality of router from above-mentioned other communicators, and according to router topology information of communicator of self and received router topology information, judgement could with above-mentioned other communication
Above-mentioned router topology information obtains the obtained router address of mechanism based on above-mentioned router address.
20. communicator as claimed in claim 19 is characterized in that:
Also have the trunk information set mechanism, it is according to above-mentioned router topology information, to each router, sets with the trunk information of communicating by letter between other communicators being used for relaying.
21. communicator as claimed in claim 20 is characterized in that:
Above-mentioned router topology information is made of router address, this router address, be from above-mentioned communicator, in family's network and with the boundary of wide area network, be connected the inboard address and/or the address, the outside of each router till the internetwork border router of both sides
Above-mentioned communication judging part,
Has the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, extract the address of the breakout that is judged as inconsistent communication line at first out
Use the branch address extracted out, judgement could with above-mentioned other communication.
22. communicator as claimed in claim 20 is characterized in that:
Above-mentioned router topology information by from above-mentioned communicator, is connected the router address formation of each router till the internetwork border router of both sides in family's network and with the boundary of wide area network,
Above-mentioned communication judging part,
Have: the branch address drawing mechanism, router address from wide area network side, judge in turn the router address that comprises in the router topology information of communicator of self, with the router topology information of other communicators in the router address that comprises consistent or inconsistent, the address of extracting the breakout that is judged as inconsistent communication line at first out; And,
The branch address transmitting mechanism sends to above-mentioned trunk information set mechanism with the branch address of being extracted out,
Above-mentioned trunk information set mechanism, according to the router topology information of communicator of self, visit the router of corresponding above-mentioned branch address and be positioned at this router and the communicator of self between router, set trunk information,
Above-mentioned branch address transmitting mechanism associates the trunk information and the above-mentioned branch address of the router of the above-mentioned branch address of correspondence, sends to other communicators that communicate.
23. a communicator is a kind ofly to be connected with wide area network, includes the communicator in the home network of a plurality of routers of multistage connection, has:
Router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag;
Router response packet receiving mechanism, it receives above-mentioned router is found to reply with bag from above-mentioned a plurality of routers, comprises a plurality of router response packets of each router address;
Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet;
Machine discovery generates mechanism with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
Machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
Machine response packet receiving mechanism, it receives from least 1 communicating machine above-mentioned machine discovery is replied with wrapping, and comprises the machine response packet of the machine address of this communicating machine; And,
Machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
24. communicator as claimed in claim 23 is characterized in that:
Also have communication setting mechanism, it to one of above-mentioned communicating machine and the communicator of self, is used for the setting of communicating by letter with above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out.
25. communicator as claimed in claim 23 is characterized in that:
Above-mentioned router address is inboard address;
Also have the 1st decision mechanism, judge whether above-mentioned inboard address is global address,
In above-mentioned inboard address is under the situation of global address, the machine discovery of ending to generate mechanism for implementing with bag by above-mentioned machine discovery obtain with the generation of wrapping, by the reception of the machine response packet of above-mentioned machine response packet receiving mechanism enforcement, by above-mentioned machine address mechanism for implementing machine address extraction and by the setting of communicating by letter with above-mentioned communicating machine of being used for of above-mentioned communication setting mechanism for implementing.
26. communicator as claimed in claim 23 is characterized in that:
Above-mentioned machine discovery generates mechanism with bag, generate comprise that a part that makes the router address of being extracted out changes and the test address that obtains as a plurality of machine discoveries of machine address with bag;
Above-mentioned machine address obtains mechanism, from a plurality of machine discoveries that generate according to the above-mentioned test address pairing a plurality of machine response packets of bag, extracts above-mentioned machine address out.
27. communicator as claimed in claim 23 is characterized in that:
Also have machine grasp portion, it grasps the attribute information of above-mentioned communicating machine according to the machine address accessing communication machine of being extracted out.
28. communicator as claimed in claim 25 is characterized in that:
Also have display part, demonstrate by above-mentioned machine address and obtain the address of the communicating machine that mechanism obtains and the attribute information of the communicating machine that above-mentioned machine grasp portion obtains.
29. a communication means is a kind ofly to be connected with wide area network, includes the communication means in the communicator in the home network of a plurality of routers of multistage connection, wherein:
Comprise: step is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And,
Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain step,
Step is obtained in address, the above-mentioned outside, and repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of step, and obtain the action of the address, the outside of this router,
Step is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of step, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
30. a signal procedure is a kind ofly to be connected with wide area network, includes the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, wherein:
This signal procedure by communicator as following mechanism performance function: mechanism is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And,
Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain mechanism,
Mechanism is obtained in address, the above-mentioned outside, and repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router,
Mechanism is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of mechanism, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
31. a computer readable recording medium storing program for performing records with wide area network and is connected, and comprises the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, wherein:
Implement: step is obtained in the inboard address of obtaining the home network side address (below be called inboard address) of each router; And,
Obtain the address, the outside of the wide area network side address (below be called the outside address) of each router and obtain step,
Mechanism is obtained in address, the above-mentioned outside, and repeat according to above-mentioned inboard address and obtain the obtained inboard address access router of mechanism, and obtain the action of the address, the outside of this router,
Mechanism is obtained in above-mentioned inboard address, repeats according to address, the above-mentioned outside and obtains the obtained address, the outside of mechanism, obtains to be positioned at than the router with address, the above-mentioned outside more by the action of the inboard address of the router of wide area network side.
32. a communication means is a kind ofly to be connected with wide area network, includes the communication means in the communicator in the home network of a plurality of routers of multistage connection, comprising:
Router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds to use the bag forwarding step, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
Router response packet receiving step, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; And,
Handle the request destination and obtain step, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
33. a signal procedure is a kind ofly to be connected with wide area network, includes the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, this signal procedure by communicator as following mechanism performance function:
Router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds to use the bag transmitting mechanism, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
Router response packet receiving mechanism, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet; And,
Handle the request destination and obtain mechanism, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
34. a computer readable recording medium storing program for performing records with wide area network and is connected, and comprises the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, this signal procedure comprises:
Router is found to generate step with bag, and its generation includes permission router number of pass times and finds with bag as the router of variable;
Router finds to use the bag forwarding step, and it sends above-mentioned router and finds with bag, makes it pass through the interior a plurality of routers of above-mentioned home network;
Router response packet receiving step, it receives from above-mentioned a plurality of routers above-mentioned router is found to reply with wrapping, and includes a plurality of router response packets of each router address;
Router address is obtained step, and it extracts each router address out from above-mentioned router response packet; And
Handle the request destination and obtain step, it obtains the processing request destination information of the setting of router being handled and/or obtained from the information of router processing according to the router address access router of being extracted out.
35. a communication means is a kind ofly to be connected with wide area network, includes the communication means in the home network of a plurality of routers of multistage connection, comprising:
Router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds that with the bag forwarding step it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag;
Router response packet receiving step, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained step, and it extracts each router address out from above-mentioned router response packet;
Machine discovery generates step with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
Machine discovery is with wrapping forwarding step, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
Machine response packet receiving step, it receives from least 1 communicating machine above-mentioned machine discovery is replied with wrapping, and comprises the machine response packet of the machine address of this communicating machine; And,
Machine address obtains step, and it extracts machine address out from above-mentioned machine response packet.
36. a signal procedure is a kind ofly to be connected with wide area network, includes the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, this signal procedure by communicator as following mechanism performance function:
Router is found to generate mechanism with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds that with the bag transmitting mechanism it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag;
Router response packet receiving mechanism, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained mechanism, and it extracts each router address out from above-mentioned router response packet;
Machine discovery generates mechanism with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
Machine discovery is with wrapping transmitting mechanism, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
Machine response packet receiving mechanism, it receives from least 1 communicating machine above-mentioned machine discovery is replied with wrapping, and comprises the machine response packet of the machine address of this communicating machine; And,
Machine address obtains mechanism, and it extracts machine address out from above-mentioned machine response packet.
37. a computer readable recording medium storing program for performing records with wide area network and is connected, and comprises the performed signal procedure of communicator in the home network of a plurality of routers of multistage connection, this signal procedure is used for implementing:
Router is found to generate step with bag, and its generation comprises the router number of pass times of permission and finds with bag as the router of variable;
Router finds that with the bag forwarding step it finds that above-mentioned router send to a plurality of routers in the above-mentioned home network with bag;
Router response packet receiving step, it is from above-mentioned a plurality of routers, receives above-mentioned router is found to reply with wrapping, and comprises a plurality of router response packets of each router address;
Router address is obtained step, and it extracts each router address out from above-mentioned router response packet;
Machine discovery generates step with bag, and it is according to the router address of being extracted out, generate be used for detecting the communicating machine that is connected with router arbitrarily machine discovery with wrapping;
Machine discovery is with wrapping forwarding step, and it sends at least 1 communicating machine with above-mentioned machine discovery with bag;
Machine response packet receiving step, it receives from least 1 communicating machine above-mentioned machine discovery is replied with wrapping, and comprises the machine response packet of the machine address of this communicating machine; And,
Machine address obtains step, and it extracts machine address out from above-mentioned machine response packet.
CN200580017406A 2004-06-30 2005-06-28 Communication device and communication method Active CN100591038C (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JP194001/2004 2004-06-30
JP2004194001 2004-06-30
JP218671/2004 2004-07-27
JP083904/2005 2005-03-23

Related Child Applications (1)

Application Number Title Priority Date Filing Date
CN2010100021014A Division CN101771613B (en) 2004-06-30 2005-06-28 Communication device and method

Publications (2)

Publication Number Publication Date
CN1961542A true CN1961542A (en) 2007-05-09
CN100591038C CN100591038C (en) 2010-02-17

Family

ID=38072147

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200580017406A Active CN100591038C (en) 2004-06-30 2005-06-28 Communication device and communication method

Country Status (1)

Country Link
CN (1) CN100591038C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017166038A1 (en) * 2016-03-29 2017-10-05 华为技术有限公司 Communication method and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017166038A1 (en) * 2016-03-29 2017-10-05 华为技术有限公司 Communication method and terminal
CN107534585A (en) * 2016-03-29 2018-01-02 华为技术有限公司 Communication means and terminal
CN107534585B (en) * 2016-03-29 2020-04-21 华为技术有限公司 Communication method and terminal

Also Published As

Publication number Publication date
CN100591038C (en) 2010-02-17

Similar Documents

Publication Publication Date Title
CN1278216C (en) Equipment correlation management system network equipment, equipment program and equipment correlation management method
CN1268104C (en) Method and apparatus for setting up firewall
CN1249949C (en) Architecture for home network on world wide web
CN1206837C (en) Method and system of implementing IP data transmission on multi-service-unit according to defined strategy
CN1214330C (en) Network connection apparatus and network system using this
CN101053224A (en) Communication system, information processor, intervening server, indentification information transmitting server, communicatin method and program
CN1650572A (en) Group judgment device
CN1839592A (en) Packet relay device
CN1539250A (en) Device control apparatus and device control system
CN1610276A (en) Wireless LAN system, communication terminal, and communications program therefor
CN1761256A (en) XML schema for network device constitution
CN1835505A (en) Dialogue relaying device
CN1525709A (en) Name resolution server and packet transfer device
CN1770776A (en) Transfer device, distributed processing system, transfer device control method, program, and recording medium
CN1802818A (en) Network system, learning bridge node, learning method, and program thereof
CN1756196A (en) System and program for managing setting
CN1684423A (en) Information-provision control method and information reproduction system
CN1934582A (en) Content use system, information terminal, and settlement system
CN1647455A (en) Methods for communication in a multi-cluster network, device for connection to a network of clusters and bridge for connecting clusters
CN1613050A (en) Printer, server and print system, and data receiving device and data sending/receiving system
CN1770772A (en) Data processing system, data processing device and data processing program
CN1930838A (en) Information processing device, server, communication system, address decision method, address modification method, and program
CN1745369A (en) Information processing device, information processing method, and computer program
CN101069160A (en) Information processing system, information processing device and method, recording medium, and program
CN1783931A (en) System, device, server and program for image processing

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