[go: up one dir, main page]

WO2011117959A1 - 通信装置、通信装置の制御方法、プログラム - Google Patents

通信装置、通信装置の制御方法、プログラム Download PDF

Info

Publication number
WO2011117959A1
WO2011117959A1 PCT/JP2010/054917 JP2010054917W WO2011117959A1 WO 2011117959 A1 WO2011117959 A1 WO 2011117959A1 JP 2010054917 W JP2010054917 W JP 2010054917W WO 2011117959 A1 WO2011117959 A1 WO 2011117959A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
packet
transmission
destination
transmitted
Prior art date
Application number
PCT/JP2010/054917
Other languages
English (en)
French (fr)
Inventor
雄弘 和田
Original Assignee
キヤノン株式会社
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 キヤノン株式会社 filed Critical キヤノン株式会社
Priority to JP2012506687A priority Critical patent/JP5638063B2/ja
Priority to PCT/JP2010/054917 priority patent/WO2011117959A1/ja
Priority to US13/052,914 priority patent/US20110235641A1/en
Publication of WO2011117959A1 publication Critical patent/WO2011117959A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/10Mapping addresses of different types
    • H04L61/103Mapping addresses of different types across network layers, e.g. resolution of network layer into physical layer addresses or address resolution protocol [ARP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses

Definitions

  • the present invention relates to a communication apparatus connected via a network to an external apparatus to which a plurality of addresses are assigned, a communication apparatus control method, and a program.
  • IP address a unique address assigned to each device, and each device is identified using this IP address.
  • IPv4 IP version 4
  • IPv6 IP version 6
  • link local address IP address
  • Non-Patent Document 1 (RFC3484) is known as a method for selecting an IP address when a plurality of IP addresses are assigned to one network interface.
  • an IP address having a longer prefix length is selected from a plurality of IP addresses that meet the conditions.
  • the device A designates the IP address B as the destination address of the request transmitted to the device B.
  • the IP address A used as the transmission source address of the request from the device A to the device B is set as the destination address of the response from the device B to the device A.
  • the device B selects one of the IP addresses B and C according to the method of Non-Patent Document 1. That is, the device B selects an IP address having a longer prefix length for the IP address A among the IP addresses B and C.
  • IP address C is selected as the source address as a result of selection by device B, a problem arises. Because device A has sent a request with IP address B as the destination, it waits only for a response with IP address B as the source address, and discards even if a response with IP address C as the source address arrives. Because it will end up.
  • Non-Patent Document 2 (WS-Eventing) is known.
  • MessageID RequestID
  • a response is identified with reference to this ID.
  • the request and the response are associated with each other by referring to the ID added to the higher layer data, instead of referring to the response source address.
  • IPv6 Internet Engineering Task RFC3484 “Default Address Selection for Internet Protocol version 6 (IPv6)” ⁇ URL: 1269306530609_0.txt> Web Services Eventing (WS-Eventing) ⁇ URL: http://www.w3.org/Submission/WS-Eventing/>
  • Non-Patent Document 2 it is necessary to add an ID to data corresponding to a layer higher than the transport layer.
  • the content of data corresponding to a layer higher than the transport layer may be fixed, and it may be difficult to add an ID as shown in Non-Patent Document 2. . That is, when identifying a response by referring to an ID, the ID must be added to all packets. For this purpose, the program contents of the application must be significantly changed, which requires much effort and cost.
  • the present invention has been made in view of the above problems, and provides a mechanism for enabling communication with an external device to which a plurality of addresses are assigned without much effort and cost. With the goal.
  • a communication device of the present invention is a communication device connected via a network to an external device to which a plurality of addresses are assigned, and a packet including predetermined identification information is transmitted to the plurality of addresses.
  • a transmitting unit that transmits the first address included in the address as a destination to the external device; a receiving unit that receives a packet transmitted from the external device; and the predetermined identification information in the packet received by the receiving unit If it is included, the extraction means for extracting the transmission source address of the received packet and the transmission source address extracted by the extraction means is a second address different from the first address, And a control unit that controls to transmit the second address as a destination when transmitting a packet to the external device thereafter.
  • FIG. 1 is an overall view of a communication system in an embodiment of the present invention. It is a block diagram which shows the hardware constitutions of client PC100 in embodiment of this invention. It is a block diagram which shows the hardware constitutions of the server 110 in embodiment of this invention. It is a figure which shows the software structure of the client PC100 and the server 110 in embodiment of this invention. It is a sequence diagram explaining the basic mechanism of packet communication between the client PC 100 and the server 110 in the embodiment of the present invention. It is a sequence diagram explaining the detail of the packet communication between the client PC100 and the server 110 in embodiment of this invention. It is a flowchart explaining the process of the communication control part 405 by the side of client PC100 in embodiment of this invention.
  • FIG. 1 is an overall view of a communication system according to an embodiment of the present invention.
  • the client PC 100 and the server 110 are connected via a network 120 so that they can communicate with each other.
  • Both the client PC 100 and the server 110 are compatible with IPv6, and a plurality of IP addresses are assigned.
  • IPv6 IPv6
  • the packet is delivered to the server 110 by using any one of a plurality of IP addresses assigned to the server 110 as a destination address.
  • the server 110 provides a service that responds to a request from the client PC 100. Examples of services provided by the server 110 include Web, DNS, e-mail, SNMP agent, and WS-Eventing server functions.
  • FIG. 2 is a block diagram showing a hardware configuration of the client PC 100.
  • a control unit 210 including a CPU 211 controls the operation of the entire client PC 100.
  • the CPU 211 reads the control program stored in the ROM 212 and executes various control processes.
  • the RAM 213 is used as a temporary storage area such as a main memory or work area for the CPU 211.
  • the HDD 214 stores image data and various programs.
  • the input / output device I / F 215 connects the keyboard 220, the mouse 230, and the display 240 to the control unit 210.
  • the network I / F 216 connects the control unit 210 (client PC 100) to the network 120.
  • the network I / F 216 controls communication with an external device (for example, the server 110) via the network 120.
  • FIG. 3 is a block diagram illustrating a hardware configuration of the server 110.
  • a control unit 310 including a CPU 311 controls the operation of the entire server 110.
  • the CPU 311 reads out the control program stored in the ROM 312 and executes various control processes.
  • the RAM 313 is used as a temporary storage area such as a main memory or work area of the CPU 311.
  • the HDD 314 stores image data and various programs.
  • the network I / F 315 connects the control unit 310 (server 110) to the network 120.
  • the network I / F 315 transmits / receives various information to / from other devices (for example, the client PC 100) on the network 120.
  • FIG. 4 shows a software configuration of the client PC 100 and the server 110. Each functional unit illustrated in FIG. 4 is realized by the CPU 211 and the CPU 311 included in each of the client PC 100 and the server 110 executing a control program.
  • the client PC 100 is provided with an application 406. Although only one application is shown here, a plurality of applications may be provided.
  • the application 406 transmits / receives data to / from the server 110, it makes a request to the communication control unit 405 in the client PC 100.
  • the communication control unit 405 Upon receiving a request from the application 406, the communication control unit 405 communicates with the server 110 via the operating system communication library 404.
  • the communication library 404 supports communication by RPC (Remote Procedure Call), Web service, etc. in addition to socket communication.
  • the server 110 includes an application 401. Although only one application is shown here, a plurality of applications may be provided.
  • the application 401 transmits / receives data to / from the client PC 100
  • the application 401 makes a request to the communication control unit 402 in the server 110.
  • the communication control unit 402 Upon receiving a request from the application 401, the communication control unit 402 communicates with the client PC 100 via the operating system communication library 403. Similar to the communication library 404, the communication library 403 supports communication by RPC, Web service, etc. in addition to socket communication.
  • FIG. 5 is a sequence diagram illustrating a basic mechanism of packet communication between the client PC 100 and the server 110.
  • a plurality of IP addresses are assigned to the client PC 100, as will be described later, but only one IP address a (2001: db8: abcd :: ef) is assigned here for the sake of simplicity. To do.
  • a plurality of IP addresses are assigned to the server 110, but only one IP address b (2001: db8: aaaa :: a) is assigned here.
  • the transmission packet 501 transmitted from the client PC 100 to the server 110 includes a destination address 504, a transmission source address 503, and request data 502.
  • the destination address 504 and the source address 503 correspond to “Destination Address” and “Source Address” of the IP address of the network layer in the OSI reference model.
  • the IP address b is used as the destination address
  • the IP address a is used as the transmission source address.
  • Request data 502 included in the transmission packet 501 is data corresponding to the transport layer in the OSI reference model.
  • the server 110 that has received the transmission packet 501 processes the request data 502 and generates response data 505 for the request data 502. Then, the server 110 transmits a reply packet 508 including response data 505 to the client PC 100.
  • the reply packet 508 includes a destination address 507, a transmission source address 506, and response data 505.
  • the destination address 507 and the source address 506 correspond to the “Destination Address” and “Source Address” of the IP address of the network layer in the OSI reference model.
  • the IP address a used as the transmission source address 503 of the transmission packet 501 is used as the destination address 507.
  • the IP address b assigned to the server 110 is used as the source address 506 of the reply packet.
  • the source address of the reply packet selected by the server 110 according to RFC3484 is used.
  • the Response data 505 included in the reply packet 508 is data corresponding to the transport layer in the OSI reference model.
  • FIG. 6 is a sequence diagram illustrating details of packet communication between the client PC 100 and the server 110 in the first embodiment.
  • the client PC 100 is assigned an IP address c (2001: db8: cccc :: c) in addition to an IP address a (2001: db8: abcd :: ef).
  • the server 110 is assigned an IP address d (2001: db8: bbbb :: b) in addition to the IP address b (2001: db8: aaaa :: a).
  • a transmission packet including request data is transmitted with the IP address b or d assigned to the server 110 as a destination.
  • the source address of the reply packet from the server 110 for the transmission packet may be different from the destination address of the transmission packet (details of this reason will be described later).
  • the client PC discards the packet without processing even if a packet having a source address different from that used as the destination address of the transmission packet is received. I can't receive it.
  • the client PC 100 of the first embodiment transmits a transmission packet including predetermined identification information (ID) to the server 110 only once. Thereafter, when the packet is received, if the above-described ID is added to the received packet, the source address of the received packet is extracted. Then, when a packet is transmitted to the server 110 after the next time, the packet is transmitted with the extracted transmission source address as the destination.
  • ID predetermined identification information
  • the client PC 100 transmits a transmission packet in P601 as a preparation for transmitting the request data.
  • An ID of 0xABCD is added to this transmission packet.
  • the IP address b and d assigned to the server 110 that is arbitrarily selected by the client PC 100 is used.
  • the arbitrary selection here means, for example, selecting an IP address having the highest priority among a plurality of IP addresses obtained by performing name resolution using DNS (Domain Name System). Means.
  • the IP address d is selected and used as the destination address.
  • the IP address selected by the method according to RFC3484 among the IP addresses a and c assigned to the client PC 100 is used as the source address of the transmission packet transmitted in P601. That is, an IP address having a longer prefix length than the IP address d selected as the destination address is selected from the IP addresses a and c.
  • the IP address a is selected and used as the source address.
  • the server 110 In P602, the server 110 generates a reply packet. The ID included in the transmission packet is added to the reply packet. In subsequent P603, a reply packet is transmitted to the client PC 100. As the destination address of this reply packet, the IP address a used as the source address of the transmission packet of P601 is used. Further, the IP address selected by the method according to RFC3484 among the IP addresses b and d assigned to the server 110 is used as the source address of the reply packet transmitted in P603. That is, an IP address having a longer prefix length than the IP address a selected as the destination address is selected from the IP addresses b and d. In the example shown in FIG. 6, the IP address b is selected and used as the source address.
  • the transmission source address (IP address b) of the reply packet transmitted from the server 110 is different from the destination address (IP address d) of the transmission packet transmitted first by the client PC 100.
  • the client PC 100 that has received the packet from the server 110 refers to the ID (0xABCD) in the reply packet, and identifies that the received packet is a reply packet to the transmission packet transmitted in P601. Then, the source address of the received reply packet is extracted, and a table shown in FIG. 9 to be described later is updated.
  • the IP address used when the client PC 100 transmits a packet to the server 110 after the next time is changed from the IP address d used in the transmission in P601 to the IP address b extracted in P604. If the destination address of the transmission packet transmitted by the client PC 100 in P601 matches the transmission source address of the reply packet transmitted by the server 110 in P603, the processing in P605 is not necessary.
  • the transmission packet including the request data is transmitted to the server 110.
  • the ID added to the transmission packet of P601 is not added to the request data.
  • the IP address b changed in P605 is used as the destination address of the transmission packet transmitted in P606, and the IP address a is used as the source address.
  • the server 110 processes the request data and generates response data for the request data. Note that the ID added to the reply packet in P603 is not added to this response data.
  • a reply packet including response data is transmitted to the client PC 100.
  • the IP address a used as the source address of the transmission packet of P606 is used.
  • the IP address selected by the method according to RFC3484 among the IP addresses b and d assigned to the server 110 is used as the source address of the reply packet transmitted in P608. That is, an IP address having a longer prefix length than the IP address a selected as the destination address is selected from the IP addresses b and d. As a result, the same IP address b used as the source address of the reply packet of P603 is selected.
  • the client PC 100 Since the client PC 100 receives a packet whose source is an IP address that matches the destination address of the transmission packet transmitted in P606, the client PC 100 identifies that it is a reply packet to the transmission packet transmitted in P606. Can do. As described above, the client PC 100 transmits the transmission packet with the predetermined identification information (ID) to the server 110 only once as a preparation for transmitting the request data. Then, the source address of the reply packet is extracted and used as the next and subsequent destination addresses. This makes it possible to associate request data with response data (transmission packet and reply packet) without adding an ID to request data to be transmitted to the server 110 from the next time onward.
  • ID predetermined identification information
  • FIG. 7 is a flowchart for explaining processing of the communication control unit 405 on the client PC 100 side when a packet is transmitted from the client PC 100 to the server 110.
  • Each operation shown in the flowchart of FIG. 7 is executed by the CPU 211 of the client PC 100 executing a control program.
  • step S701 a transmission request from the application 406 is accepted.
  • step S702 an address management table, which will be described later with reference to FIG. 9, is referred to, and it is determined whether or not a request address 903 in the table matches the destination address designated by the application 406. As a result of this determination, if there is a matching IP address, the process proceeds to step S707, and if not, the process proceeds to step S703.
  • step S703 a transmission packet to which predetermined identification information (ID) is added is transmitted to the destination address designated by the application 406 (P601 in FIG. 6). At this time, the destination address designated by the application 406 is added as a new record to the request address 903 of the address management table shown in FIG.
  • step S704 it is determined whether a packet addressed to the client PC 100 has been received. If a packet addressed to the client PC 100 is received, the process proceeds to step S705, and it is determined whether the same ID as the ID added to the transmission packet transmitted in step S703 is added to the received packet. If the result of this determination is that an ID has been added, processing proceeds to step S706. If an ID is added to the received packet, it can be identified that the packet is a reply packet to the transmission packet transmitted in step S703.
  • step S706 the source address of the received reply packet is extracted and added to the source address 904 in the address management table shown in FIG. 9 (P604 in FIG. 6).
  • step S707 if the destination address specified by the application 406 is different from the source address extracted in step S706, the destination address to be used is changed to that extracted in step S706 (FIG. 6). P605). If the destination address specified from the application 406 is the same as the source address extracted in step S706, no change is necessary here.
  • step S708 using the transmission source address extracted in step S706 as the destination address, the data requested to be transmitted from the application is transmitted to the server 110 (P606 in FIG. 6).
  • step S709 it is determined whether a packet addressed to the client PC 100 has been received.
  • the process proceeds to step S710, and it is determined whether or not the transmission source address of the received packet matches the destination address of the transmission packet transmitted in step S708. As a result of this determination, if the addresses match, the process proceeds to step S711. If the addresses match, it can be identified that the received packet is a reply packet to the transmission packet transmitted in step S708.
  • step S711 the communication result with the server 110 is called back (notified) to the application 406.
  • the IP address of the server 110 notified to the application 406 is the IP address originally designated by the application 406, the IP address after the change in step S707, or both. This can be set in advance.
  • step S712 it is determined whether or not there is a close request from the application 406. If there is a close request, communication is disconnected in step S713 and the process is terminated. If there is no close request from the application 406, the process returns to step S701 and continues.
  • FIG. 8 is a flowchart for explaining processing of the communication control unit 402 on the server 110 side when a packet is transmitted from the client PC 100 to the server 110. Each operation shown in the flowchart of FIG. 8 is executed by the CPU 311 of the server 110 executing a control program.
  • step S801 a packet addressed to server 110 is received.
  • step S802 it is determined whether or not predetermined identification information (ID) is added to the received packet. As a result of this determination, if an ID is added, the process proceeds to step S807, and if not, the process proceeds to step S803.
  • step S807 the communication control unit 402 generates and transmits a reply packet without transferring the data in the received packet to the application 401 (P603 in FIG. 6). At this time, the source address of the packet received in step S801 is used as the destination address of the reply packet.
  • the IP address selected by the method according to RFC3484 is used as the source address of the reply packet.
  • step S803 it is determined whether the received packet is a processing request for the application 401. If the received packet is a processing request for the application 401, the process proceeds to step S804. If it is not a processing request for the application 401, the received packet is discarded and the process proceeds to step S808. In step S804, the data included in the received packet is transferred to the application 401. In a succeeding step S805, a transmission request from the application 401 is accepted.
  • step S806 data requested to be transmitted from the application 401 (response data) is transmitted as a reply packet (P608 in FIG. 6).
  • the source address of the packet received in step S801 is used as the destination address of the reply packet.
  • an IP address selected by a method according to RFC3484 is used as described in P607 of FIG.
  • step S808 it is determined whether or not the service provided by the application 401 is to be terminated. If the service is to be terminated, the processing is terminated. If the service is not terminated, the process returns to step S801 and continues.
  • FIG. 9 is a diagram showing an address management table stored in the HDD 214. In the address management table, a management number 901, an application identification 902, a request address 903 from the application, and a source address 904 of a reply packet are managed in association with each other.
  • the management number 901 is information for uniquely identifying each record managed in the address management table.
  • the application identification 902 is information for identifying the application that made the transmission request in step S701 in FIG.
  • the request address 903 from the application is information added to the address management table in step S703.
  • the source address 904 of the reply packet is information added to the address management table in step S706.
  • a transmission packet with an ID added is transmitted only once, and the source address of a reply packet for this transmission packet is extracted.
  • the extracted transmission source address is used as the destination address.
  • a transmission packet to which an ID is added is transmitted only once, and a transmission source address of a reply packet for the transmission packet is extracted.
  • a communication device such as a router or software such as a firewall
  • an “Ingress Filtering Problem” may occur. This is a problem that when the destination address of the transmission packet is different from the source address of the reply packet, the router or firewall does not pass the reply packet and discards it.
  • a TCP packet is used in which the transmission source address of the reply packet transmitted by the server 110 is not different from the destination address of the transmission packet transmitted by the client PC 100.
  • FIG. 10 is a sequence diagram illustrating details of packet communication between the client PC 100 and the server 110 in the second embodiment. Similar to FIG. 6, in addition to the IP address a (2001: db8: abcd :: ef), the client PC 100 is assigned an IP address c (2001: db8: cccc :: c). The server 110 is assigned an IP address d (2001: db8: bbbb :: b) in addition to the IP address b (2001: db8: aaaa :: a).
  • the client PC 100 in the second embodiment requests an address list from the server 110 using a TCP packet in P1001.
  • the server 110 Upon receiving this request, the server 110 generates an address list describing a plurality of IP addresses assigned to the own device in P1002. In P1003, the address list is transmitted to the client PC 100 using the TCP packet.
  • the destination address of the transmission packet is used as the source address of the reply packet, so that the source address of the reply packet does not differ from the destination address of the transmission packet.
  • the client PC 100 stores the received address list in the HDD 214.
  • a transmission packet to which predetermined identification information (ID) is added is transmitted to the server 110 in the same manner as in P601 in FIG.
  • This transmission packet is a UDP packet.
  • the server 110 generates a reply packet in the same manner as in P602 in FIG. The ID included in the transmission packet is added to the reply packet.
  • a reply packet is transmitted to the client PC 100 as in the case of P603 in FIG.
  • a reply packet from the server 110 is discarded by a router or a firewall existing between the client PC 100 and the server 110. Because the destination address (IP address d) of the transmission packet of P1005 and the transmission source address (IP address b) of the return packet of P1007 are different, it is determined that there is a possibility of DoS (Denial of Service) attack. Because it will end up.
  • DoS Delivery of Service
  • the client PC 100 After transmitting the transmission packet in P1005, the client PC 100 detects that a predetermined time has elapsed without receiving a reply packet from the server 110.
  • the address list stored in P1004 is referred to, an IP address other than the destination address used in the transmission packet of P1005 is acquired, and the destination address is changed to the acquired IP address.
  • the transmission packet to which the ID is added is transmitted to the server 110 again with the changed IP address as the destination.
  • the server 110 generates a reply packet.
  • the ID included in the transmission packet is added to the reply packet.
  • a reply packet is transmitted to the client PC 100, as in P1007 of FIG.
  • the reply packet transmitted in P1013 passes through the router or firewall and is delivered to the client PC 100. This is because the destination address (IP address b) of the transmission packet of P1011 matches the transmission source address (IP address b) of the reply packet of P1013. From the above flow, the client PC 100 can know an IP address (IP address b) suitable for transmitting a UDP packet to the server 110. Thus, when request data is transmitted to the server 110 from the next time onward, the IP address b is used as the destination address, so that the server 110 can communicate normally.
  • FIG. 11 is a flowchart for explaining processing of the communication control unit 405 on the client PC 100 side when a packet is transmitted from the client PC 100 to the server 110.
  • Each operation shown in the flowchart of FIG. 11 is executed by the CPU 211 of the client PC 100 executing a control program.
  • the flowchart shown in FIG. 11 is started when it is determined “No” in step S702 of FIG.
  • step S1101 the server 110 is requested for an address list using a TCP packet (P1001 in FIG. 10).
  • step S1102 it is determined whether an address list has been received from the server 110. If an address list has been received, the process advances to step S1103. In step S1103, the received address list is stored in the HDD 214 (P1004 in FIG. 10). In step S1104, a transmission packet added with predetermined identification information (ID) is transmitted to the destination address designated by the application 406 (P1005 in FIG. 10). At this time, the destination address designated by the application 406 is added as a new record to the request address 903 of the address management table shown in FIG.
  • ID predetermined identification information
  • step S1105 it is determined whether a packet addressed to the client PC 100 has been received. If a packet addressed to the client PC 100 is received, the process proceeds to step S1106, and it is determined whether or not the ID added to the transmission packet transmitted in step S1104 is added to the received packet. If the result of this determination is that an ID has been added, processing proceeds to step S706 in FIG. If an ID is added to the received packet, it can be identified that the packet is a reply packet to the transmission packet transmitted in step S1104.
  • step S1105 determines whether or not a packet addressed to the client PC 100 has been received. If it is determined that the predetermined time has elapsed, the process proceeds to step S1108; otherwise, the process returns to step S1105. In step S1108, the destination address is changed to a different IP address included in the address list stored in S1103 from that used in the transmission packet in step S1104.
  • the process returns to step S1104 to transmit a transmission packet with an ID added to the changed destination address.
  • the address list of the server 110 is acquired using a TCP packet as a preparation for transmitting request data. If a reply packet from the server 110 cannot be received due to the presence of a router or a firewall, a transmission packet with an ID added with another IP address included in the address list as a destination is retransmitted. As a result, communication with the server 110 can be normally performed even in an environment where a router and a firewall exist.
  • the object of the present invention can also be achieved by executing the following processing. That is, a storage medium that records a program code of software that realizes the functions of the above-described embodiments is supplied to a system or apparatus, and a computer (or CPU or MPU) of the system or apparatus is stored in the storage medium. This is the process of reading the code.
  • the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code and the storage medium storing the program code constitute the present invention.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

多くの手間やコストをかけることなく、複数のアドレスが割り当てられた外部装置と通信することを可能にするための仕組みを提供することを目的とする。 複数のアドレスが割り当てられた外部装置とネットワークを介して接続される通信装置において、所定の識別情報を含むパケットを第1のアドレスを宛先として外部装置に送信し(S703)、受信したパケットに所定の識別情報が含まれている場合に、当該受信したパケットの送信元アドレスを抽出する(S706)。そして、抽出した送信元アドレスが第1のアドレスとは異なる第2のアドレスである場合は、次回以降に外部装置に対してパケットを送信する際に第2のアドレスを宛先として送信する(S708)。

Description

通信装置、通信装置の制御方法、プログラム
本発明は、複数のアドレスが割り当てられた外部装置とネットワークを介して接続される通信装置、通信装置の制御方法、プログラムに関する。
 従来、ネットワーク(LAN、インターネット等)に接続され、ネットワーク上の外部装置と通信する様々な通信装置が知られている。
 ネットワークに接続される通信装置において広く使用されているプロトコルはインターネットプロトコルである。インターネットプロトコルでは各装置に固有のアドレス(IPアドレス)を割り当て、このIPアドレスを用いて互いの装置を識別している。
 従来のIP規約(IPv4:IPバージョン4)では、1つのネットワークインターフェースに対して1つのIPアドレスが割り当てられることが一般的であった。一方、近年普及しつつあるIPv6(IPバージョン6)では、通信装置がルータに接続されると、ルータによってIPアドレスが割り当てられる。また、ルータが存在しない場合にも通信を行えるようにするために、ネットワークインターフェース毎に1つのIPv6アドレス(リンクローカルアドレス)が割り当てられる。更には、DHCPサーバが存在する場合は、DHCPサーバが発行したIPアドレスを取得することもできる。
 このように、IPv6に対応している通信装置では、1つのネットワークインターフェースに対してIPv4アドレスや複数のIPv6アドレスといった複数のIPアドレスが割り当てられることになる。
  1つのネットワークインターフェースに複数のIPアドレスが割り当てられた場合におけるIPアドレスの選択方法として、非特許文献1(RFC3484)が知られている。非特許文献1に示される方法では、条件に合致する複数のIPアドレスのうちプレフィックス長がより長いIPアドレスを選択する。
 非特許文献1の方法を用いたIPアドレスの選択が行われる場合、次のような問題が発生することがある。例えば、IPアドレスAが割り当てられた装置AとIPアドレスB及びCが割り当てられた装置BがUDP通信する場合、装置Aが装置Bに送信するリクエストの宛先アドレスとしてIPアドレスBを指定したとする。このとき、装置Bから装置Aに対するレスポンスの宛先アドレスは、装置Aから装置Bへのリクエストの送信元アドレスとして使用されたIPアドレスAが設定される。また、装置Bから装置Aに対するレスポンスの送信元アドレスは、非特許文献1の方法に従って装置BがIPアドレスB及びCのいずれかを選択する。即ち、装置Bは、IPアドレスB及びCのうち、IPアドレスAに対するプレフィックス長がより長い方のIPアドレスを選択する。
 しかしながら、装置Bよる選択の結果、送信元アドレスとしてIPアドレスCが選択されたとすると問題が生じる。なぜなら、装置AはIPアドレスBを宛先としてリクエストを送信したため、IPアドレスBを送信元アドレスとするレスポンスのみを待ち続けており、IPアドレスCを送信元アドレスとするレスポンスが届いたとしても破棄してしまうからである。
 このような問題に対処するために、非特許文献2(WS-Eventing)が知られている。非特許文献2に示される方法では、トランスポート層よりも上位の層に対応するデータにMessageID(RequestID)を付加し、このIDを参照してレスポンスを識別する。即ち、レスポンスの送信元アドレスを参照するのではなく、上位層のデータに付加されたIDを参照することによりリクエストとレスポンスを関連付ける。これにより、リクエストの宛先アドレスとして用いたIPアドレスとは異なるIPアドレスがレスポンスの発信元アドレスとして用いられたとしても、リクエストとレスポンスを関連付けることが可能となっている。
Internet Engineering Task Force RFC3484 "Default Address Selection for Internet Protocol version 6 (IPv6)"<URL: 1269306530609_0.txt> Web Services Eventing (WS-Eventing)<URL: http://www.w3.org/Submission/WS-Eventing/>
  上述した非特許文献2に示される方法の場合、トランスポート層よりも上位の層に対応するデータにIDを付加する必要がある。
 しかしながら、アプリケーションによってはトランスポート層よりも上位の層に対応するデータの内容を固定的なものとしていることがあり、非特許文献2に示されるようなIDを付加することが困難な場合がある。即ち、IDを参照することによるレスポンスの識別を行う場合、全てのパケットにIDを付加するようにしなければならない。このためには、アプリケーションのプログラム内容を大幅に変更しなければならず、多くの手間やコストがかかってしまう。
 本発明は、上記の問題点に鑑みなされたものであり、多くの手間やコストをかけることなく、複数のアドレスが割り当てられた外部装置と通信することを可能にするための仕組みを提供することを目的とする。
 上記の目的を達成するために本発明の通信装置は、複数のアドレスが割り当てられた外部装置とネットワークを介して接続される通信装置であって、所定の識別情報を含むパケットを、前記複数のアドレスに含まれる第1のアドレスを宛先として前記外部装置に送信する送信手段と、前記外部装置から送信されたパケットを受信する受信手段と、前記受信手段が受信したパケットに前記所定の識別情報が含まれている場合に、当該受信したパケットの送信元アドレスを抽出する抽出手段と、前記抽出手段が抽出した送信元アドレスが前記第1のアドレスとは異なる第2のアドレスである場合は、次回以降に前記外部装置に対してパケットを送信する際に前記第2のアドレスを宛先として送信するよう制御する制御手段とを備えることを特徴とする。
 本発明によれば、多くの手間やコストをかけることなく、複数のアドレスが割り当てられた外部装置と通信することが可能となる。
本発明の実施形態における通信システムの全体図である。 本発明の実施形態におけるクライアントPC100のハードウェア構成を示すブロック図である。 本発明の実施形態におけるサーバ110のハードウェア構成を示すブロック図である。 本発明の実施形態におけるクライアントPC100及びサーバ110のソフトウェア構成を示す図である。 本発明の実施形態におけるクライアントPC100とサーバ110との間のパケット通信の基本的な仕組みを説明するシーケンス図である。 本発明の実施形態におけるクライアントPC100とサーバ110との間のパケット通信の詳細を説明するシーケンス図である。 本発明の実施形態におけるクライアントPC100側の通信制御部405の処理を説明するフローチャートである。 本発明の実施形態におけるサーバ110側の通信制御部402の処理を説明するフローチャートである。 本発明の実施形態におけるアドレス管理テーブルを示す図である。 本発明の実施形態におけるクライアントPC100とサーバ110との間のパケット通信の詳細を説明するシーケンス図である。 本発明の実施形態におけるクライアントPC100側の通信制御部405の処理を説明するフローチャートである。
 以下、図面を参照して本発明の実施の形態を詳しく説明する。尚、以下の実施の形態は特許請求の範囲に係る発明を限定するものでなく、また実施の形態で説明されている特徴の組み合わせの全てが発明の解決手段に必須のものとは限らない。
 図1は、本発明の実施形態における通信システムの全体図である。クライアントPC100及びサーバ110はネットワーク120を介して互いに通信可能に接続されている。クライアントPC100及びサーバ110はいずれもIPv6に対応しており、複数のIPアドレスが割り当てられている。例えば、サーバ110に対してパケットを送信したい場合には、サーバ110に割り当てられている複数のIPアドレスのいずれかを宛先アドレスとすることにより、パケットはサーバ110に届けられる。
サーバ110は、クライアントPC100からのリクエストに応答するサービスを提供している。サーバ110が提供するサービスとしては、例えばWeb、DNS、電子メール、SNMPエージェント、WS-Eventingのサーバ機能が挙げられる。
 図2は、クライアントPC100のハードウェア構成を示すブロック図である。CPU211を含む制御部210は、クライアントPC100全体の動作を制御する。CPU211は、ROM212に記憶された制御プログラムを読み出して各種制御処理を実行する。RAM213は、CPU211の主メモリ、ワークエリア等の一時記憶領域として用いられる。HDD214は、画像データや各種プログラムを記憶する。入出力装置I/F215は、キーボード220、マウス230、及びディスプレイ240を制御部210に接続する。
 ネットワークI/F216は、制御部210(クライアントPC100)をネットワーク120に接続する。ネットワークI/F216は、ネットワーク120を経由した外部装置(例えば、サーバ110)との通信を制御する。
 図3は、サーバ110のハードウェア構成を示すブロック図である。CPU311を含む制御部310は、サーバ110全体の動作を制御する。CPU311は、ROM312に記憶された制御プログラムを読み出して各種制御処理を実行する。RAM313は、CPU311の主メモリ、ワークエリア等の一時記憶領域として用いられる。HDD314は、画像データや各種プログラムを記憶する。
 ネットワークI/F315は、制御部310(サーバ110)をネットワーク120に接続する。ネットワークI/F315は、ネットワーク120上の他の装置(例えば、クライアントPC100)との間で各種情報を送受信する。 
 図4は、クライアントPC100及びサーバ110のソフトウェア構成を示す。図4に示す各機能部は、クライアントPC100及びサーバ110のそれぞれが備えるCPU211及びCPU311が制御プログラムを実行することにより実現される。
 クライアントPC100にはアプリケーション406が備えられている。なお、ここでは1つのアプリケーションのみを示すが、複数のアプリケーションが備えられていても構わない。
 アプリケーション406がサーバ110との間でデータを送受信する場合は、クライアントPC100内の通信制御部405に対して要求を行う。通信制御部405は、アプリケーション406からの要求を受けて、オペレーティングシステムの通信ライブラリ404を介してサーバ110と通信する。なお、通信ライブラリ404は、ソケット通信以外にRPC(Remote Procedure Call)やWebサービス等による通信にも対応している。
 一方、サーバ110にはアプリケーション401が備えられている。なお、ここでは1つのアプリケーションのみを示すが、複数のアプリケーションが備えられていても構わない。
 アプリケーション401がクライアントPC100との間でデータを送受信する場合は、サーバ110内の通信制御部402に対して要求を行う。通信制御部402は、アプリケーション401からの要求を受けて、オペレーティングシステムの通信ライブラリ403を介してクライアントPC100と通信する。なお、通信ライブラリ403は、通信ライブラリ404と同様に、ソケット通信以外にRPCやWebサービス等による通信にも対応している。
 図5は、クライアントPC100とサーバ110との間のパケット通信の基本的な仕組みを説明するシーケンス図である。クライアントPC100には後述する通り複数のIPアドレスが割り当てられているが、ここでは説明を簡単にするために1つのIPアドレスa(2001:db8:abcd::ef)のみが割り当てられているものとする。同様に、サーバ110にも複数のIPアドレスが割り当てられているが、ここでは1つのIPアドレスb(2001:db8:aaaa::a)のみが割り当てられているものとする。
 クライアントPC100からサーバ110に送信される送信パケット501には、宛先アドレス504、送信元アドレス503、及びリクエストデータ502が含まれる。宛先アドレス504及び送信元アドレス503は、OSI参照モデルにおけるネットワーク層のIPアドレスの「Destination Address」及び「Source Address」に対応する。送信パケット501では、IPアドレスbが宛先アドレスとして用いられ、IPアドレスaが送信元アドレスとして用いられている。送信パケット501に含まれるリクエストデータ502は、OSI参照モデルにおけるトランスポート層に対応するデータである。
 送信パケット501を受信したサーバ110は、リクエストデータ502を処理し、リクエストデータ502に対するレスポンスデータ505を生成する。そして、サーバ110は、レスポンスデータ505を含む返信パケット508をクライアントPC100に対して送信する。
 返信パケット508には、宛先アドレス507、送信元アドレス506、及びレスポンスデータ505が含まれる。宛先アドレス507及び送信元アドレス506は、OSI参照モデルにおけるネットワーク層のIPアドレスの「Destination Address」及び「Source Address」に対応する。返信パケット508では、送信パケット501の送信元アドレス503として使用されていたIPアドレスaが宛先アドレス507として用いられる。
 また、返信パケットの送信元アドレス506には、サーバ110に割り当てられているIPアドレスbが使用される。なお、実際には、サーバ110に複数のIPアドレスが割り当てられているので、図6のP602及びP607で説明する通り、返信パケットの送信元アドレスは、RFC3484に従ってサーバ110が選択したものが使用される。
 返信パケット508に含まれるレスポンスデータ505は、OSI参照モデルにおけるトランスポート層に対応するデータである。
 図6は、第1の実施形態におけるクライアントPC100とサーバ110との間のパケット通信の詳細を説明するシーケンス図である。図示する通り、クライアントPC100には、IPアドレスa(2001:db8:abcd::ef)に加えて、IPアドレスc(2001:db8:cccc::c)が割り当てられている。また、サーバ110には、IPアドレスb(2001:db8:aaaa::a)に加えてIPアドレスd(2001:db8:bbbb::b)が割り当てられている。
 ここでは、クライアントPC100のアプリケーション406が、サーバ110のアプリケーション401に対してリクエストデータを送信しようとする場合について説明する。この場合、従来は、サーバ110に割り当てられているIPアドレスbまたはdのいずれかを宛先としてリクエストデータを含む送信パケットを送信していた。しかしながら、送信パケットに対するサーバ110からの返信パケットの送信元アドレスが、送信パケットの宛先アドレスと異なる場合があった(この理由の詳細は後述する)。この場合、クライアントPCは、送信パケットの宛先アドレスとして使用したものとは異なるIPアドレスを送信元アドレスとしたパケットが届いたとしても処理せずに破棄してしまうため、サーバ110からの返信パケットを受け取ることができない。
 一方、従来、返信パケットの送信元アドレスに基づいて送信パケットと返信パケットの関連付けを行うのではなく、トランスポート層に対応するデータ内にIDを付加し、このIDを参照して関連付けを行うことが知られている。
 しかしながら、この方法を採用する場合、サーバ110に送信する全てのパケットのデータ部分にIDを付加するように、クライアントPC100及びサーバ110双方のアプリケーションの内容を大幅に変更する必要がある。この場合、多くの手間とコストがかかってしまう。
 そこで、第1の実施形態のクライアントPC100は、リクエストデータを送信するための前準備として、所定の識別情報(ID)を含む送信パケットを一度だけサーバ110に送信する。その後、パケットを受信した場合に、受信したパケット内に前述したIDが付加されていれば、受信したパケットの送信元アドレスを抽出する。そして、次回以降にサーバ110にパケットを送信する際は、抽出した送信元アドレスを宛先としてパケットを送信する。
 以上説明した流れを、図6に示すシーケンス図を参照して説明する。クライアントPC100は、リクエストデータを送信するための前準備として、P601において、送信パケットを送信する。この送信パケットには、0xABCDというIDが付加されている。また、この送信パケットの宛先アドレスは、サーバ110に割り当てられているIPアドレスb及びdのうち、クライアントPC100が任意に選択したものを使用する。
 ここでの任意の選択とは、例えば、DNS(Domain Name System)を用いた名前解決を行って得られた複数のIPアドレスのうち、最も高い優先度が設定されているIPアドレスを選択することを意味する。図6に示す例では、IPアドレスdが選択され、宛先アドレスとして使用される。
 更に、P601で送信される送信パケットの送信元アドレスには、クライアントPC100に割り当てられているIPアドレスa及びcのうち、RFC3484に従った方法で選択されたIPアドレスが使用される。即ち、IPアドレスa及びcのうち、宛先アドレスとして選択したIPアドレスdに対してプレフィックス長がより長いIPアドレスが選択される。図6に示す例では、IPアドレスaが選択され、送信元アドレスとして使用される。
 P602では、サーバ110が返信パケットを生成する。この返信パケットには、送信パケットに含まれていたIDが付加される。続くP603において、返信パケットをクライアントPC100に対して送信する。
 この返信パケットの宛先アドレスは、P601の送信パケットの送信元アドレスとして使用されていたIPアドレスaが使用される。更に、P603で送信される返信パケットの送信元アドレスには、サーバ110に割り当てられているIPアドレスb及びdのうち、RFC3484に従った方法で選択されたIPアドレスが使用される。即ち、IPアドレスb及びdのうち、宛先アドレスとして選択したIPアドレスaに対してプレフィックス長がより長いIPアドレスが選択される。図6に示す例では、IPアドレスbが選択され、送信元アドレスとして使用されるものとする。
 以上の流れにより、サーバ110から送信される返信パケットの送信元アドレス(IPアドレスb)は、クライアントPC100が最初に送信した送信パケットの宛先アドレス(IPアドレスd)とは異なるものとなる。
 P604では、サーバ110からのパケットを受信したクライアントPC100が、返信パケット内のID(0xABCD)を参照し、受信したパケットがP601で送信した送信パケットに対する返信パケットであることを識別する。そして、受信した返信パケットの送信元アドレスを抽出し、後述する図9に示すテーブルを更新する。
 P605では、クライアントPC100がサーバ110に対して次回以降にパケットを送信する際に使用するIPアドレスを、P601での送信で使用したIPアドレスdから、P604で抽出したIPアドレスbに変更する。なお、P601でクライアントPC100が送信した送信パケットの宛先アドレスと、P603でサーバ110が送信した返信パケットの送信元アドレスが一致する場合は、P605の処理は必要ない。
 P606では、リクエストデータを含む送信パケットをサーバ110に対して送信する。リクエストデータには、P601の送信パケットに付加されていたIDは付加されない。P606で送信される送信パケットの宛先アドレスには、P605で変更されたIPアドレスbが使用され、送信元アドレスにはIPアドレスaが使用される。
 P607では、サーバ110がリクエストデータを処理し、リクエストデータに対するレスポンスデータを生成する。なお、このレスポンスデータにもやはり、P603の返信パケットに付加されていたIDは付加されない。
 続くP608では、レスポンスデータを含む返信パケットがクライアントPC100に対して送信される。この返信パケットの宛先アドレスは、P606の送信パケットの送信元アドレスとして使用されていたIPアドレスaが使用される。更に、P608で送信される返信パケットの送信元アドレスには、サーバ110に割り当てられているIPアドレスb及びdのうち、RFC3484に従った方法で選択されたIPアドレスが使用される。即ち、IPアドレスb及びdのうち、宛先アドレスとして選択したIPアドレスaに対してプレフィックス長がより長いIPアドレスが選択される。この結果、P603の返信パケットの送信元アドレスとして使用されたものと同じIPアドレスbが選択される。
 クライアントPC100は、P606で送信した送信パケットの宛先アドレスと一致するIPアドレスを送信元とするパケットを受信することになるため、それがP606で送信した送信パケットに対する返信パケットであることを識別することができる。
 以上の通り、クライアントPC100は、リクエストデータを送信するための前準備として、所定の識別情報(ID)を付加した送信パケットを一度だけサーバ110に送信する。そして、それに対する返信パケットの送信元アドレスを抽出し、次回以降の宛先アドレスとして使用する。これにより、次回以降にサーバ110に対して送信するリクエストデータにIDを付加しなくとも、リクエストデータとレスポンスデータ(送信パケットと返信パケット)を関連付けることが可能となる。
 図7は、クライアントPC100からサーバ110にパケットを送信する際の、クライアントPC100側の通信制御部405の処理を説明するフローチャートである。図7のフローチャートに示す各動作は、クライアントPC100のCPU211が制御プログラムを実行することにより実行される。
 ステップS701では、アプリケーション406からの送信要求を受け付ける。ステップS702では、図9を用いて後述するアドレス管理テーブルを参照し、アプリケーション406から指定された宛先アドレスと一致するものがテーブル内の要求アドレス903に含まれているか否かを判定する。この判定の結果、一致するIPアドレスが存在する場合はステップS707に進み、そうでなければステップS703に進む。
 ステップS703では、アプリケーション406から指定された宛先アドレスに対して、所定の識別情報(ID)を付加した送信パケットを送信する(図6のP601)。このとき、アプリケーション406から指定された宛先アドレスを、図9に示すアドレス管理テーブルの要求アドレス903に、新規レコードとして追加する。
 ステップS704では、クライアントPC100宛てのパケットを受信したか否かを判定する。クライアントPC100宛てのパケットを受信した場合は、ステップS705に進み、ステップS703で送信した送信パケットに付加したIDと同じIDが、受信したパケットに付加されているか否かを判定する。この判定の結果、IDが付加されていた場合はステップS706に進む。受信したパケットにIDが付加されている場合は、そのパケットがステップS703で送信した送信パケットに対する返信パケットであることが識別できる。
 ステップS706では、受信した返信パケットの送信元アドレスを抽出し、図9に示すアドレス管理テーブルの送信元アドレス904に追加する(図6のP604)。続くステップS707では、アプリケーション406から指定された宛先アドレスと、ステップS706で抽出した送信元アドレスとが異なるものである場合は、使用する宛先アドレスをステップS706で抽出したものに変更する(図6のP605)。なお、アプリケーション406から指定された宛先アドレスと、ステップS706で抽出した送信元アドレスとが同じものである場合は、ここでの変更は必要ない。
 ステップS708では、ステップS706で抽出した送信元アドレスを宛先アドレスとして、アプリケーションから送信要求されたデータをサーバ110に送信する(図6のP606)。
 ステップS709では、クライアントPC100宛てのパケットを受信したか否かを判定する。クライアントPC100宛てのパケットを受信した場合は、ステップS710に進み、受信したパケットの送信元アドレスが、ステップS708で送信した送信パケットの宛先アドレスと一致するか否かを判定する。この判定の結果、アドレスが一致した場合はステップS711に進む。アドレスが一致した場合は、受信したパケットがステップS708で送信した送信パケットに対する返信パケットであることが識別できる。
 ステップS711では、サーバ110との通信結果をアプリケーション406に対してコールバック(通知)する。このとき、アプリケーション406に対して通知するサーバ110のIPアドレスを、元々アプリケーション406が指定したIPアドレスとするか、ステップS707で変更された後のIPアドレスとするか、或いは、それらの両方とするかは予め設定可能である。
 ステップS712では、アプリケーション406からのクローズ要求があったかどうかを判定し、クローズ要求があった場合はステップS713で通信を切断して処理を終了する。アプリケーション406からのクローズ要求がない場合は、ステップS701に戻り処理を継続する。
 図8は、クライアントPC100からサーバ110にパケットを送信する際の、サーバ110側の通信制御部402の処理を説明するフローチャートである。図8のフローチャートに示す各動作は、サーバ110のCPU311が制御プログラムを実行することにより実行される。
 ステップS801では、サーバ110宛てのパケットを受信する。ステップS802では、受信したパケットに所定の識別情報(ID)が付加されているか否かを判定する。この判定の結果、IDが付加されている場合はステップS807に進み、そうでなければステップS803に進む。
 ステップS807では、受信したパケット内のデータをアプリケーション401に転送することなく、通信制御部402が返信パケットを生成し、送信する(図6のP603)。このとき、返信パケットの宛先アドレスは、ステップS801で受信したパケットの送信元アドレスを用いる。また、返信パケットの送信元アドレスは、図6のP602で説明した通り、RFC3484に従った方法で選択されたIPアドレスが使用される。
 ステップS803では、受信したパケットがアプリケーション401に対する処理要求であるか否かを判定し、アプリケーション401に対する処理要求である場合はステップS804に進む。アプリケーション401に対する処理要求でない場合は、受信したパケットを破棄してステップS808に進む。
 ステップS804では、受信したパケットに含まれるデータをアプリケーション401に転送する。続くステップS805では、アプリケーション401からの送信要求を受け付ける。
 ステップS806では、アプリケーション401から送信が要求されたデータ(レスポンスデータ)を返信パケットとして送信する(図6のP608)。このとき、返信パケットの宛先アドレスは、ステップS801で受信したパケットの送信元アドレスを用いる。また、返信パケットの送信元アドレスは、図6のP607で説明した通り、RFC3484に従った方法で選択されたIPアドレスが使用される。
 ステップS808では、アプリケーション401が提供するサービスを終了するか否かを判定し、サービスを終了する場合はそのまま処理を終了する。サービスを終了しない場合は、ステップS801に戻り処理を継続する。
 図9は、HDD214に記憶されているアドレス管理テーブルを示す図である。アドレス管理テーブルには、管理番号901、アプリケーション識別902、アプリケーションからの要求アドレス903、及び返信パケットの送信元アドレス904が対応付けて管理されている。
 管理番号901は、アドレス管理テーブルに管理されている各レコードを一意に識別ための情報である。アプリケーション識別902は、図7のステップS701において送信要求を行ったアプリケーションを識別するための情報である。
 アプリケーションからの要求アドレス903は、ステップS703においてアドレス管理テーブルに追加される情報である。返信パケットの送信元アドレス904は、ステップS706においてアドレス管理テーブルに追加される情報である。
 以上の通り、第1の実施形態では、リクエストデータを送信するための前準備としてIDを付加した送信パケットを一度だけ送信し、この送信パケットに対する返信パケットの送信元アドレスを抽出する。そして、次回以降のパケット送信(リクエストデータの送信)では、抽出した送信元アドレスを宛先アドレスとして使用する。これにより、UDP通信を行う場合に、アプリケーションが扱うデータにIDを付加せずともリクエストとレスポンス(送信パケットと返信パケット)を関連付けることができる。即ち、アプリケーションのプログラム内容を大幅に変更せずとも、サーバ110側に多数のTCPセッションを確立するためのリソースがない場合に、クライアントPC100とサーバ110がUDPで通信することができる。
 次に本発明の第2の実施形態について説明する。第1の実施形態では、リクエストデータを送信するための前準備としてIDを付加した送信パケットを一度だけ送信し、この送信パケットに対する返信パケットの送信元アドレスを抽出する処理を行った。
 しかしながら、クライアントPC100とサーバ110との間に、ルータのような通信機器やファイアウォールのようなソフトウェアが介在する場合には、“Ingress Filtering Problem”が発生しうる。これは、送信パケットの宛先アドレスと、返信パケットの発信元アドレスが異なる場合は、ルータやファイアウォールが返信パケットを通さず、破棄してしまうという問題である。
 従って、サーバ110が送信する返信パケットの送信元アドレスが、クライアントPC100が送信した送信パケットの宛先アドレスと異なるものである場合、クライアントPC100はパケットを受信することすらできない。このため、第1の実施形態で説明した方法では対応することができない。
 そこで第2の実施形態では、サーバ110が送信する返信パケットの送信元アドレスが、クライアントPC100が送信した送信パケットの宛先アドレスと異なるものになることがないTCPパケットを利用する。
 図10は、第2の実施形態におけるクライアントPC100とサーバ110との間のパケット通信の詳細を説明するシーケンス図である。図6と同様に、クライアントPC100には、IPアドレスa(2001:db8:abcd::ef)に加えて、IPアドレスc(2001:db8:cccc::c)が割り当てられている。また、サーバ110には、IPアドレスb(2001:db8:aaaa::a)に加えてIPアドレスd(2001:db8:bbbb::b)が割り当てられている。
 第2の実施形態におけるクライアントPC100は、リクエストデータを送信するための前準備として、P1001において、TCPパケットを用いてサーバ110に対してアドレスリストを要求する。この要求を受けたサーバ110は、P1002において、自装置に割り当てられている複数のIPアドレスを記述したアドレスリストを生成する。そして、P1003において、TCPパケットを用いてクライアントPC100にアドレスリストを送信する。
 なお、TCPパケットを用いた通信の場合、送信パケットの宛先アドレスが返信パケットの送信元アドレスとして使用されるため、返信パケットの送信元アドレスが送信パケットの宛先アドレスと異なるものとなることはない。
 P1004では、クライアントPC100が、受信したアドレスリストをHDD214に記憶する。
 P1005では、図6のP601の処理と同様に、所定の識別情報(ID)を付加した送信パケットをサーバ110に対して送信する。なお、この送信パケットはUDPパケットである。
 P1006では、図6のP602の処理と同様に、サーバ110が返信パケットを生成する。この返信パケットには、送信パケットに含まれていたIDが付加される。続くP1007では、図6のP603と同様に、返信パケットをクライアントPC100に対して送信する。
 P1008では、クライアントPC100とサーバ110との間に存在するルータまたはファイアウォールによって、サーバ110からの返信パケットが破棄される。なぜなら、P1005の送信パケットの宛先アドレス(IPアドレスd)と、P1007の返信パケットの送信元アドレス(IPアドレスb)が異なっているため、DoS(Denial of Service)攻撃の可能性があると判断されてしまうからである。
 P1009では、クライアントPC100が、P1005で送信パケットを送信した後、サーバ110からの返信パケットを受信しないまま所定時間が経過したことを検知する。そして、P1010では、P1004で記憶したアドレスリストを参照し、P1005の送信パケットで使用した宛先アドレス以外のIPアドレスを取得し、宛先アドレスを取得したIPアドレスに変更する。
 P1011では、変更後のIPアドレスを宛先として、IDを付加した送信パケットを再度サーバ110に送信する。P1012では、サーバ110が返信パケットを生成する。この返信パケットには、送信パケットに含まれていたIDが付加される。続くP1013では、図6のP1007と同様に、返信パケットをクライアントPC100に対して送信する。
 P1013で送信される返信パケットは、P1007で送信される返信パケットとは異なり、ルータやファイアウォールを通過してクライアントPC100に届けられる。なぜなら、P1011の送信パケットの宛先アドレス(IPアドレスb)と、P1013の返信パケットの送信元アドレス(IPアドレスb)が一致しているからである。
 以上の流れで、クライアントPC100は、サーバ110に対してUDPパケットを送信するのに適したIPアドレス(IPアドレスb)を知ることができる。これにより、次回以降にサーバ110にリクエストデータを送信する際に、IPアドレスbを宛先アドレスとして使用することにより、サーバ110と正常に通信することができる。
 図11は、クライアントPC100からサーバ110にパケットを送信する際の、クライアントPC100側の通信制御部405の処理を説明するフローチャートである。図11のフローチャートに示す各動作は、クライアントPC100のCPU211が制御プログラムを実行することにより実行される。
 図11に示すフローチャートは、図7のステップS702で「いいえ」と判定された場合に開始される。ステップS1101では、TCPパケットを用いてサーバ110にアドレスリストを要求する(図10のP1001)。
 ステップS1102では、サーバ110からアドレスリストを受信したか否かを判定し、アドレスリストを受信した場合はステップS1103に進む。ステップS1103では、受信したアドレスリストをHDD214に記憶する(図10のP1004)。
 ステップS1104では、アプリケーション406から指定された宛先アドレスに対して、所定の識別情報(ID)を付加した送信パケットを送信する(図10のP1005)。このとき、アプリケーション406から指定された宛先アドレスを、図9に示すアドレス管理テーブルの要求アドレス903に、新規レコードとして追加する。
 ステップS1105では、クライアントPC100宛てのパケットを受信したか否かを判定する。クライアントPC100宛てのパケットを受信した場合は、ステップS1106に進み、ステップS1104で送信した送信パケットに付加したIDが、受信したパケットに付加されているか否かを判定する。この判定の結果、IDが付加されていた場合は図7のステップS706に進む。受信したパケットにIDが付加されている場合は、そのパケットがステップS1104で送信した送信パケットに対する返信パケットであることが識別できる。
 一方、ステップS1105でクライアントPC100宛てのパケットを受信していないと判定した場合は、ステップS1107に進み、ステップS1104で送信パケットを送信してから所定時間が経過したかどうかを判定する。
 この判定の結果、所定時間が経過していればステップS1108に進み、そうでなければステップS1105に戻る。ステップS1108では、S1103で記憶したアドレスリストに含まれるIPアドレスのうち、ステップS1104の送信パケットで使用したものと異なるものに宛先アドレスを変更する。
 なお、使用していないIPアドレスが存在しない(アドレスリストに含まれるIPアドレスが全て使用済みである)場合は、アプリケーション406に対して通信エラーを通知する。ステップS1108で宛先アドレスを変更した後、ステップS1104に戻り、変更後の宛先アドレスに対して、IDを付加した送信パケットを送信する。
 以上の通り、第2の実施形態では、リクエストデータを送信するための前準備としてTCPパケットを用いてサーバ110のアドレスリストを取得する。そして、ルータやファイアウォールの存在により、サーバ110からの返信パケットを受信できなかった場合は、アドレスリストに含まれる他のIPアドレスを宛先としてIDを付加した送信パケットを再送信する。これにより、ルータやファイアウォールが存在する環境においても、サーバ110との通信を正常に行うことが可能となる。
他の実施例
なお、本発明の目的は、以下の処理を実行することによっても達成される。即ち、上述した実施形態の機能を実現するソフトウェアのプログラムコードを記録した記憶媒体を、システム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)が記憶媒体に格納されたプログラムコードを読み出す処理である。
 この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施の形態の機能を実現することになり、そのプログラムコード及び該プログラムコードを記憶した記憶媒体は本発明を構成することになる。
 本発明は上記実施の形態に制限されるものではなく、本発明の精神及び範囲から離脱することなく、様々な変更及び変形が可能である。従って、本発明の範囲を公にするために以下の請求項を添付する。

Claims (8)

  1.  複数のアドレスが割り当てられた外部装置とネットワークを介して接続される通信装置であって、
     所定の識別情報を含むパケットを、前記複数のアドレスに含まれる第1のアドレスを宛先として前記外部装置に送信する送信手段と、
     前記外部装置から送信されたパケットを受信する受信手段と、
     前記受信手段が受信したパケットに前記所定の識別情報が含まれている場合に、当該受信したパケットの送信元アドレスを抽出する抽出手段と、
     前記抽出手段が抽出した送信元アドレスが前記第1のアドレスとは異なる第2のアドレスである場合は、次回以降に前記外部装置に対してパケットを送信する際に前記第2のアドレスを宛先として送信するよう制御する制御手段と、
     を備えることを特徴とする通信装置。
  2.  前記外部装置に対して次回以降に送信するパケットには、前記所定の識別情報が含まれないことを特徴とする請求項1に記載の通信装置。
  3.  前記送信手段が前記所定の識別情報を含むパケットを送信する際に用いた宛先アドレスと、前記抽出手段により抽出された送信元アドレスとを対応付けて管理する管理手段と、
     所定のアドレスを宛先とする新規のパケット送信が要求された場合に、当該所定のアドレスが前記管理手段により管理されている宛先アドレスと一致するか否かを判定する判定手段と、
     前記制御手段は、前記判定手段による判定の結果、前記所定のアドレスが前記管理手段により管理されている宛先アドレスと一致すると判定された場合に、当該所定のアドレスに対応付けて前記管理手段により管理されている送信元アドレスを宛先として前記新規のパケット送信を行うよう制御することを特徴とする請求項1に記載の通信装置。
  4.  前記判定手段による判定の結果、前記所定のアドレスが前記管理手段により管理されている宛先アドレスと一致しないと判定された場合に、前記送信手段は、当該所定のアドレスを宛先として前記所定の識別情報を含むパケットを送信することを特徴とする請求項3に記載の通信装置。
  5.  TCPパケットを送信することにより、前記外部装置に割り当てられた前記複数のアドレスを示すアドレスリストを前記外部装置に対して要求する要求手段と、
     前記要求手段による要求に応じて前記外部装置から送信されたアドレスリストを記憶する記憶手段と、を更に備え、
     前記送信手段は、前記記憶手段に記憶されているアドレスリストを参照し、当該アドレスリストに含まれているアドレスに対して、前記所定の識別情報を含むパケットを送信することを特徴とする請求項1に記載の通信装置。
  6.  前記送信手段が送信するパケットは、UDPパケットであることを特徴とする請求項1に記載の通信装置。
  7.  複数のアドレスが割り当てられた外部装置とネットワークを介して接続される通信装置の制御方法であって、
     所定の識別情報を含むパケットを、前記複数のアドレスに含まれる第1のアドレスを宛先として前記外部装置に送信する送信工程と、
     前記外部装置から送信されたパケットを受信する受信工程と、
     前記受信工程で受信したパケットに前記所定の識別情報が含まれている場合に、当該受信したパケットの送信元アドレスを抽出する抽出工程と、
     前記抽出工程で抽出した送信元アドレスが前記第1のアドレスとは異なる第2のアドレスである場合は、次回以降に前記外部装置に対してパケットを送信する際に前記第2のアドレスを宛先として送信するよう制御する制御工程と、
     を備えることを特徴とする通信装置の制御方法。
  8.  請求項7に記載の通信装置の制御方法をコンピュータに実行させるためのプログラム。
PCT/JP2010/054917 2010-03-23 2010-03-23 通信装置、通信装置の制御方法、プログラム WO2011117959A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2012506687A JP5638063B2 (ja) 2010-03-23 2010-03-23 通信装置、通信装置の制御方法、プログラム
PCT/JP2010/054917 WO2011117959A1 (ja) 2010-03-23 2010-03-23 通信装置、通信装置の制御方法、プログラム
US13/052,914 US20110235641A1 (en) 2010-03-23 2011-03-21 Communication apparatus, method of controlling the communication apparatus,and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2010/054917 WO2011117959A1 (ja) 2010-03-23 2010-03-23 通信装置、通信装置の制御方法、プログラム

Publications (1)

Publication Number Publication Date
WO2011117959A1 true WO2011117959A1 (ja) 2011-09-29

Family

ID=44656438

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2010/054917 WO2011117959A1 (ja) 2010-03-23 2010-03-23 通信装置、通信装置の制御方法、プログラム

Country Status (3)

Country Link
US (1) US20110235641A1 (ja)
JP (1) JP5638063B2 (ja)
WO (1) WO2011117959A1 (ja)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014022880A (ja) * 2012-07-17 2014-02-03 Oki Electric Ind Co Ltd 通信装置及び通信プログラム
WO2024058095A1 (ja) * 2022-09-12 2024-03-21 コネクトフリー株式会社 ネットワークシステム、情報処理装置および通信方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5393719B2 (ja) * 2011-03-24 2014-01-22 京セラドキュメントソリューションズ株式会社 画像形成装置
CN109842574B (zh) * 2017-11-28 2020-07-17 中国科学院声学研究所 一种基于可编程网络技术的多宿主网络路由转发方法

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004274129A (ja) * 2003-03-05 2004-09-30 National Institute Of Information & Communication Technology マルチホーミング接続装置
JP2008078814A (ja) * 2006-09-19 2008-04-03 Toshiba Corp 通信に用いるアドレスを選択する装置、方法およびプログラム

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10320327A (ja) * 1997-03-19 1998-12-04 Fujitsu Ltd 二重化された通信アダプタの切替方法、切替方式、および切替用プログラムを格納した記録媒体
US7161897B1 (en) * 2000-11-27 2007-01-09 Nortel Networks Limited Communications system, apparatus and method therefor
US7492787B2 (en) * 2002-03-29 2009-02-17 Fujitsu Limited Method, apparatus, and medium for migration across link technologies
JP3665622B2 (ja) * 2002-03-29 2005-06-29 株式会社東芝 ソースアドレス選択システム、ルータ装置、通信ノード及びソースアドレス選択方法
JP2005072685A (ja) * 2003-08-27 2005-03-17 Ntt Docomo Inc ルータ装置及びその装置における経路情報の配布方法並びに通信システム
JP4785338B2 (ja) * 2003-09-18 2011-10-05 株式会社野村総合研究所 データ転送方法、通信システム、および通信装置
JP2006086800A (ja) * 2004-09-16 2006-03-30 Fujitsu Ltd ソースアドレスを選択する通信装置
US7706281B2 (en) * 2006-01-06 2010-04-27 Cisco Technology, Inc. Selecting paths in multi-homed transport-layer network associations
US8539053B2 (en) * 2009-02-27 2013-09-17 Futurewei Technologies, Inc. Apparatus and method for dynamic host configuration protocol version 6 extensions for configuring hosts with multiple interfaces

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004274129A (ja) * 2003-03-05 2004-09-30 National Institute Of Information & Communication Technology マルチホーミング接続装置
JP2008078814A (ja) * 2006-09-19 2008-04-03 Toshiba Corp 通信に用いるアドレスを選択する装置、方法およびプログラム

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
R. DRAVES: "Default Address Selection for Internet Protocol version 6 (IPv6), RFC 3484", IETF NETWORK WORKING GROUP, February 2003 (2003-02-01), Retrieved from the Internet <URL:http://www.ietf.org/rfc/rfc3484.txt> *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014022880A (ja) * 2012-07-17 2014-02-03 Oki Electric Ind Co Ltd 通信装置及び通信プログラム
WO2024058095A1 (ja) * 2022-09-12 2024-03-21 コネクトフリー株式会社 ネットワークシステム、情報処理装置および通信方法

Also Published As

Publication number Publication date
JP5638063B2 (ja) 2014-12-10
JPWO2011117959A1 (ja) 2013-07-04
US20110235641A1 (en) 2011-09-29

Similar Documents

Publication Publication Date Title
EP1653704B1 (en) Method and system for establishing a bidirectional tunnel
US7769878B2 (en) Tunneling IPv6 packets
US7245622B2 (en) Allowing IPv4 clients to communicate over an IPv6 network when behind a network address translator with reduced server workload
KR101055048B1 (ko) 정보 통신 시스템, 정보 처리 장치 및 방법, 및 기록 매체
US20050175020A1 (en) Tunneling service method and system
JP2007531166A (ja) ピアツーピアネットワークにおいてファイアウォールを介してwebブラウジングを提供するための方法及びシステム
KR100429902B1 (ko) 공중망에서 사설망 내의 디바이스를 제어하기 위한 장치및 방법
JP2018533872A (ja) リソース取得方法および装置
EP2656591B1 (en) DNS proxy service for multi-core platforms
JP5638063B2 (ja) 通信装置、通信装置の制御方法、プログラム
JP4600394B2 (ja) ネットワークアクセスルータ、ネットワークアクセス方法、プログラム、及び記録媒体
US20040117473A1 (en) Proxy network control apparatus
JP2005269348A (ja) 通信システム、ゲートウェイ装置
JP4352645B2 (ja) 端末装置、中継装置、通信方法及びその通信プログラムを記録した記録媒体
JP2004135108A (ja) 通信制御方法、通信端末、ルータ、通信端末の制御プログラム、およびルータの制御プログラム
JP4331638B2 (ja) ネットワーク制御システム及びネットワーク制御方法
US11962502B2 (en) Control apparatus, communication system, control method and program
JP5084716B2 (ja) Vpn接続装置、dnsパケット制御方法、及びプログラム
JP3808471B2 (ja) ネットワーク及びルータ装置並びにそれらに用いるアドレス通知方法
JP2008206081A (ja) マルチホーミング通信システムに用いられるデータ中継装置およびデータ中継方法
Crutcher et al. Computer Networks and Distributed Systems
TWI385999B (zh) And a method of accessing the connection between the user side and the network device in the network system
Kang et al. IPv6 anycast routing aware of a service flow
JP2006039827A (ja) 情報提供システム、情報処理装置、プログラムおよび記録媒体
Horley IPv6 Addressing

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 10848352

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012506687

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 10848352

Country of ref document: EP

Kind code of ref document: A1