JP6223871B2 - Relay device - Google Patents
Relay device Download PDFInfo
- Publication number
- JP6223871B2 JP6223871B2 JP2014048686A JP2014048686A JP6223871B2 JP 6223871 B2 JP6223871 B2 JP 6223871B2 JP 2014048686 A JP2014048686 A JP 2014048686A JP 2014048686 A JP2014048686 A JP 2014048686A JP 6223871 B2 JP6223871 B2 JP 6223871B2
- Authority
- JP
- Japan
- Prior art keywords
- dns
- address
- relay device
- packet
- side interface
- 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.)
- Active
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Description
この発明は、一般家庭LANとWANとを分けるホームゲートウェイとして利用可能な中継装置に関する。 The present invention relates to a relay device that can be used as a home gateway that separates a general home LAN and a WAN.
現在、一般家庭でネットワークに接続する場合には、ネットワークへの接続部分においてホームゲートウェイを設け、このホームゲートウェイがDHCPサーバ機能やNAPT機能といったルータとして機能させることが多い。また、光電話やVPNといった種々のサービスが提供されるにつれて、ホームゲートウェイには多数の機能が実装されるようになっている。このため、事業者は開発機種を絞り込み、利用者との契約や設定に応じて、搭載している機能の一部又は全部を使用可能とすることがある。 Currently, when connecting to a network in a general home, a home gateway is often provided at the connection to the network, and this home gateway often functions as a router such as a DHCP server function or a NAPT function. Also, as various services such as optical telephones and VPNs are provided, many functions are implemented in the home gateway. For this reason, the business operator may narrow down the development model and make it possible to use a part or all of the installed functions according to the contract and setting with the user.
利用者の契約によっては、ルータとして利用可能なホームゲートウェイ用中継装置を、L3スイッチとして動作させる設定で設置することもある。この場合、SIPサーバやDNSサーバなどとして動作可能な機能を有していても、それらで用いるパケットをそのままブリッジすることになる。 Depending on the contract of the user, a home gateway relay device that can be used as a router may be set up to operate as an L3 switch. In this case, even if it has a function that can operate as a SIP server, DNS server, or the like, the packets used in those functions are bridged as they are.
このようなホームゲートウェイ用中継装置は、LAN側の端末のwebブラウザからアクセスして、設定変更用のwebページを呼び出し、様々な設定変更を行える物が多い。この設定変更用webページの呼び出し方は、IPv4環境ではhttp://192.168.0.1やhttp://192.168.1.1といったローカルIPアドレスを指定することが従来一般的に行われていた(非特許文献1)。 Many of such home gateway relay devices can be accessed from a web browser of a terminal on the LAN side, call a web page for changing settings, and change various settings. In order to call the setting change web page, in the IPv4 environment, a local IP address such as http://192.168.0.1 or http://192.168.1.1 has been generally specified (Non-Patent Document). 1).
しかし、数字の羅列であるIPアドレスをアドレス欄に入力することはコンピュータに不慣れな利用者にとっては困難な場合も多い。このため、http://web.setup/や、http://(会社名).setup/といった分かりやすいドメインネームを指定することでホームゲートウェイ自体のwebページを呼び出し可能にすることが行われている(例えば非特許文献2)。 However, it is often difficult for a user unfamiliar with a computer to enter an IP address, which is a list of numbers, in the address field. For this reason, by specifying an easy-to-understand domain name such as http: //web.setup/ or http: // (company name) .setup / (For example, Non-Patent Document 2).
しかしながら、一旦L3ブリッジとして設定した中継装置に対して、LAN側の配下端末から設定画面のwebページを要求する場合にドメインネームでアドレスを指定しても失敗する場合がある。ドメインネームでのアクセスにあたって、配下端末はまずDNSの名前を解決するために、DNSパケットを送信するが、L3ブリッジとなっている中継装置はこれをブリッジしてしまい、主に事業者が管理する上位のDNSサーバに送られてしまう。上位のDNSサーバは要求された中継装置の設定画面のドメイン情報を持っていないため、結果として中継装置を指定しようとするDNSの名前を解決する要求に応じることはできない。このため、L3スイッチ化した中継装置自体を指定することができないため、ドメインネームにより設定画面を呼び出すことはできない。 However, when a web page of a setting screen is requested from a subordinate terminal on the LAN side to a relay apparatus once set as an L3 bridge, even if an address is specified by a domain name, it may fail. When accessing with a domain name, a subordinate terminal first transmits a DNS packet in order to resolve the DNS name. However, a relay device that is an L3 bridge bridges this and is mainly managed by the operator. It will be sent to the upper DNS server. Since the upper DNS server does not have the domain information of the requested setting screen of the relay device, it cannot respond to a request for resolving the name of the DNS to be designated as a result. For this reason, since it is not possible to specify the relay device itself that is switched to L3, the setting screen cannot be called by the domain name.
これを解決するには、DNSサーバに個々のホームゲートウェイ用中継装置のドメイン情報を載せることでDNS解決を行うことが考えられる。しかし、ドメインに対して登録できるアドレスには数が限られており、DNSサーバに、返却しうる全てのホームゲートウェイ用中継装置のアドレスを登録することは、現実的ではない。 In order to solve this, it is conceivable to perform DNS resolution by placing domain information of individual home gateway relay devices on the DNS server. However, the number of addresses that can be registered for the domain is limited, and it is not realistic to register all the addresses of the home gateway relay devices that can be returned to the DNS server.
また、別の方法としては、ホームゲートウェイ用中継装置をL3ブリッジに設定する際に、実際にはプロキシとして動作するように設定することが考えられる。プロキシとすれば、DNSの名前の解決の要求に対して、DNSサーバとして振る舞うことができるので、配下端末から中継装置自身を指定するドメインネームの要求があった場合には自身のIPアドレスを返答することで、ドメインネームによるアクセスが可能となる。しかし、プロキシとして動作させるには、全てのパケットを一旦中継装置で終端し、再生成することになるので、スループットの低下は避けられず、中継装置の処理負荷も大きくなるため、装置の能力を上げなければならない場合もある。さらに、プロキシとして活動させてしまうのは、事業者の提供するサービスの区分上、より機能の多いサービスとの差別化を難しくしてしまうことにもなりかねない。 As another method, when the home gateway relay device is set to the L3 bridge, it may be set to actually operate as a proxy. If it is a proxy, it can behave as a DNS server in response to a DNS name resolution request, so if there is a domain name request specifying the relay device itself from a subordinate terminal, it returns its own IP address. By doing so, access by domain name becomes possible. However, in order to operate as a proxy, all packets are once terminated at the relay device and regenerated, so a decrease in throughput is unavoidable and the processing load of the relay device also increases. You may need to raise it. Furthermore, the act of acting as a proxy may make it difficult to differentiate from a service with more functions due to the classification of services provided by the operator.
ところで、ドメインネームでのアクセスは不可能であるが、L3ブリッジ化しても多くの中継装置はIPアドレスを内部に保有しているため、IPアドレスを直打ちして指定すれば設定画面のwebページを呼び出すことは可能である。だが、IPv4でも初心者にとっては困難であったIPアドレスの直打ちによる指定は、可読性の低いIPv6アドレスが主流となった場合にはさらに困難になってしまう。 By the way, although it is impossible to access with a domain name, many relay devices have an IP address even if they are L3 bridged, so if you specify the IP address directly, the web page of the setting screen It is possible to call However, designation by direct typing of an IP address, which is difficult for beginners even with IPv4, becomes even more difficult when IPv6 addresses with low readability become mainstream.
さらに他の方法としては、物理的な初期化を実行することでルータモードに切り替えることが出来る中継装置もあるが、その他ユーザが設定した設定値を含めて初期化されてしまうためユーザの利便性を損なうことが多い。 As another method, there is a relay device that can be switched to the router mode by executing physical initialization, but it is initialized including the setting values set by other users, so it is convenient for the user. Is often impaired.
そこでこの発明は、ホームゲートウェイ用中継装置がL3スイッチとして働く際に、スループットをできるだけ低下させずに、ドメインネームによる自身宛の設定画面の要求に応答可能にして、利用者の利便性を向上させることを目的とする。 Therefore, the present invention improves the convenience for the user by enabling a response to a request for a setting screen addressed to the domain name without reducing the throughput as much as possible when the home gateway relay device functions as an L3 switch. For the purpose.
この発明は、
LAN側インターフェースと、WAN側インターフェースと、それらの間を中継するL3ブリッジ部とを有する中継装置であって、
LAN側インターフェースから受信したDNSクエリーパケットをWAN側インターフェースに転送するとともに、当該DNSクエリーパケットを解析し、解析した結果、当該中継装置自身を指定するDNSクエリーパケットであれば、当該中継装置自身のIPアドレスを含むDNSレスポンスをDNSクエリーパケットの送信元アドレス宛に返送し、その返送に前後して、WAN側インターフェースから受信する外部のDNSサーバから返送された当該DNSクエリーパケットに対するDNSレスポンスを遮断する、中継装置により上記の課題を解決したのである。
This invention
A relay device having a LAN side interface, a WAN side interface, and an L3 bridge unit that relays between them,
The DNS query packet received from the LAN side interface is transferred to the WAN side interface, and the DNS query packet is analyzed. As a result of the analysis, if the DNS query packet designates the relay device itself, the IP address of the relay device itself A DNS response including an address is returned to the source address of the DNS query packet, and before and after the return, the DNS response to the DNS query packet returned from the external DNS server received from the WAN side interface is blocked. The above-described problem has been solved by the relay device.
すなわち、DNSクエリーパケットが中継装置自身のアドレス解決を要求するものであれば、中継装置自身がDNSサーバとして中継装置自身のIPアドレスを伝えることで、要求元が中継装置自身をドメイン名により指定することが可能になる。
一方で、パケットを全て止めた上で解析するのではなく、基本的に全てのパケットをWAN側に転送することで、スループットの低下を防ぐものとする。並行して、DNSクエリーパケットについてはパケットを内部にコピーすることで、その応答がWAN側インターフェースの先にあるDNSサーバから戻ってくる間に、当該DNSクエリーパケットの解析と必要に応じた応答を進めてしまうことができる。そして、当該DNSクエリーパケットが中継装置自身を指定するものであれば、WAN側インターフェースの先にあるDNSサーバはDNSレスポンスとしてエラーを返すが、これを中継装置が遮断することで、LAN側の端末にエラー情報が届くことを防ぎ、中継装置自身が送ったIPアドレスのみが伝わることになる。
That is, if the DNS query packet requests the address resolution of the relay device itself, the relay device itself transmits the IP address of the relay device itself as a DNS server, and the request source specifies the relay device itself by the domain name. It becomes possible.
On the other hand, instead of analyzing after stopping all the packets, basically, all packets are transferred to the WAN side to prevent a decrease in throughput. In parallel, the DNS query packet is copied inside, and while the response is returned from the DNS server at the end of the WAN side interface, the DNS query packet is analyzed and a response as necessary is sent. You can go ahead. If the DNS query packet designates the relay device itself, the DNS server at the end of the WAN side interface returns an error as a DNS response, but the relay device blocks this so that the terminal on the LAN side Error information is prevented from reaching the relay station, and only the IP address sent by the relay device itself is transmitted.
この発明を具体的に実現する形態としては、
LAN側インターフェースと、WAN側インターフェースと、それらの間を中継するL3ブリッジ部とを有する中継装置であって、
DNSクエリーパケットを処理するDNS処理部と、
中継装置を通過するDNSクエリーパケットのうち、中継装置自身を指定したパケットのドメインを記録して、当該DNSクエリーパケットに対するDNSレスポンスを遮断するロック状態である情報を保持するアドレスロックテーブルと、
上記アドレスロックテーブルにおいてロック状態にあるドメインの記録が一つも存在しなければ通過を許可する値とし、ロック状態にあるドメインの記録が一つ以上存在すれば通過を制限する値とするスイッチテーブルと、
を有する中継装置とし、
上記L3ブリッジ部は、
上記LAN側インターフェースから受信したDNSクエリーパケットを上記WAN側インターフェースに転送するとともに、当該DNSクエリーパケットをコピーして上記DNS処理部へ受け渡す、クエリー中継コピー手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、当該DNSレスポンスに含まれるドメインが上記アドレスロックテーブルに記録されたロック状態である情報に該当すれば当該DNSレスポンスのパケットを破棄する該当パケット破棄手段と、
上記中継装置自身の名前の解決を要求するDNSクエリーパケットの送信元アドレスへ、上記中継装置自身のアドレスを含むDNSレスポンスを送信する自己アドレス通知手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、上記スイッチテーブルを参照するスイッチ確認手段と、
上記スイッチテーブルが通過を許可する値であれば当該DNSレスポンスを速やかにL3ブリッジしてLAN側インターフェースに転送するスイッチ参照転送手段と、
を有し、
上記DNS処理部は、
受け取ったDNSクエリーパケットが中継装置自身のアドレスを解決するためのものであるか否かを判断するクエリー判断手段と、
上記クエリー判断手段で中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットの送信元アドレスへ、中継装置自身のIPアドレスを含むDNSの名前を解決するDNSレスポンスを生成する自己アドレス指定手段と、
上記アドレスロックテーブルに、上記クエリー判断手段で中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットのドメインを記録してロック状態とするロックドメイン記録手段と
上記アドレスロックテーブルの記録のうち、遮断の必要がなくなったドメインについて、上記ロック状態を解除するロック解除手段を有する
中継装置によって、実現可能である。
As a form which concretely realizes the present invention,
A relay device having a LAN side interface, a WAN side interface, and an L3 bridge unit that relays between them,
A DNS processing unit for processing a DNS query packet;
An address lock table that records the domain of a packet that specifies the relay device itself among the DNS query packets that pass through the relay device, and holds information in a locked state that blocks a DNS response to the DNS query packet;
A switch table having a value that allows passage if there is no record of the domain in the locked state in the address lock table, and a value that restricts passage if there is one or more records of the domain in the locked state; ,
A relay device having
The L3 bridge is
A query relay copy means for transferring the DNS query packet received from the LAN side interface to the WAN side interface, copying the DNS query packet and delivering it to the DNS processing unit;
Corresponding packet discarding means for discarding the DNS response packet when the DNS response is received from the WAN side interface and the domain included in the DNS response corresponds to the information indicating the lock state recorded in the address lock table. When,
Self-address notifying means for transmitting a DNS response including the address of the relay device itself to a source address of a DNS query packet requesting resolution of the name of the relay device itself;
Switch confirmation means for referring to the switch table when a DNS response is received from the WAN side interface;
If the switch table is a value that allows passage, switch reference transfer means for quickly transferring the DNS response to the LAN side interface by L3 bridging,
Have
The DNS processing unit
Query determination means for determining whether the received DNS query packet is for resolving the address of the relay device itself;
Self-address designation for generating a DNS response that resolves the DNS name including the IP address of the relay device itself to the source address of the DNS query packet determined by the query determination means to resolve the address of the relay device itself Means,
Lock domain recording means for recording the domain of the DNS query packet determined to be for address resolution of the relay device itself by the query determining means in the address lock table and making the lock state, and recording of the address lock table Of these, a domain that no longer needs to be blocked can be realized by a relay device having a lock releasing means for releasing the locked state.
この発明により、ホームゲートウェイ用中継装置をL3スイッチとして使用する際にもスループットの低下を防ぎながら、端末からの容易な設定変更が可能となる。これにより、設置しておけばその後に当該中継装置が有する他の機能を使用するさらなるサービスを享受する契約への変更が容易にできるので、設置者にとっても事業者にとっても応用しやすくなる。 According to the present invention, even when the home gateway relay device is used as an L3 switch, it is possible to easily change the setting from the terminal while preventing a decrease in throughput. Thus, once installed, it is easy to change to a contract for enjoying a further service that uses another function of the relay device, so that it is easy to apply to both the installer and the operator.
以下、この発明について具体的に説明する。
この発明は、LANとWANとの間に設けられる中継装置である。基本的には一般家庭や小規模事業者などのLANにおいて用いられるホームゲートウェイとして利用可能な中継装置を対象とする。すなわち、大規模ネットワークで用いるような高度な演算能力を備えた中継装置ではない。中継装置としては、L3スイッチとして動作する際には、基本的にはルーティングやアドレス変換などの処理を行わないものである。ただし、これらの機能を備えたルータが設定変更によりL3スイッチとして動作するモードに切り替え可能である場合に、本発明にかかる中継装置に含まれる。このような設定変更をLAN側から行えるようにするための発明である。
The present invention will be specifically described below.
The present invention is a relay device provided between a LAN and a WAN. Basically, a relay device that can be used as a home gateway used in a LAN such as a general household or a small-scale business is targeted. In other words, it is not a relay device having a high computing capacity such as that used in a large-scale network. The relay device basically does not perform processing such as routing and address translation when operating as an L3 switch. However, the relay apparatus according to the present invention includes a case where a router having these functions can be switched to a mode that operates as an L3 switch by changing a setting. This is an invention for enabling such setting change from the LAN side.
この発明にかかる中継装置1の機能ブロック図を含む周囲のネットワーク構成図を図1に示す。家庭内ネットワークや小規模事業者ネットワークなどであるLAN5内には、中継装置1にアクセスして設定変更を行うことができるHTTPクライアント機能を有する端末2が設けられている。具体的には、webブラウザをインストールしたパソコンやタブレット、スマートフォンなどである。外部ネットワークであるWAN6は、通信事業者網やインターネットなどを含み、ネットワーク内のアクセスできる環境にDNSサーバ3が設けられ、端末2がwebアクセスをする際に問い合わせ可能となっている。
FIG. 1 shows a surrounding network configuration diagram including a functional block diagram of the
また、LAN5側、WAN6側にその他の機器が設けられていてもよい。例えば、WAN6側にエッジルータ7を介した上で外部ネットワークに接続されていても良い。この場合、実際には当該エッジルータ7によって区切られるLAN5内に中継装置1が存在することになる。以後、この状態を例にとり説明する。
In addition, other devices may be provided on the
中継装置1は、LAN5に繋がるLAN側インターフェース21と、WAN6に繋がるWAN側インターフェース22とを有し、その間を繋ぐL3ブリッジ部11を有する。また、L3ブリッジ部11からパケットを受け渡されるDNS処理部12を有する。これらは、演算部(図示せず)によって実行されるプログラムでもよいし、又は当該機能を有するハードウェアにより実装するものでもよい。
The
また、中継装置1は記憶部17を有する。記憶部17自体は揮発性メモリでも不揮発性メモリでもよいが、この発明で用いる後述のテーブルには基本的に揮発性メモリを用いるとよい。記憶部17には少なくとも一つのテーブルが設けられており、DNS処理部12及びL3ブリッジ部11から参照又は書き換え可能である。
In addition, the
DNS処理部12は、中継装置1自体を指定するDNSクエリーパケットを受け取ったときに、自身でDNSの名前の解決をして端末2に返答するとともに、DNSサーバ3からの当該DNSクエリーパケットに対する応答であるNoSuchName応答パケットは端末2に送らずに自らで遮断する。このため、中継装置1自身を指定するパケットを受け取った際には、その内容を記憶部17に記録しておき、L3ブリッジ部11がWAN側インターフェース22からの応答パケットを受け取ったときに、その記録を参照して必要に応じてパケットを遮断できるようにしておく。具体的には、記憶部17に必要に応じたテーブルを作成する。
When the
アドレスロックテーブル14は、DNSクエリーパケットをDNS処理部12が受け取った際に、そのDNSクエリーパケットが中継装置1自身の有する画面を要求するドメインについて名前の解決を求めるものであった場合に、DNSサーバ3からのNoSuchName応答パケットを破棄するためのブロック対象アドレスを記載したテーブルである。このテーブルの例を図2に示す。受け取ったDNSクエリーパケットの宛先であるDNSサーバ3のアドレスと、リクエストされた中継装置1自身を示すドメインとの組み合わせについて、当該ドメインについて問い合わせたDNSクエリーパケットが、L3ブリッジ部11を通過した件数を、返答が来るまでカウントしておくロック回数と、タイムアウト時間であるタイマーとを有する。
When the
このアドレスロックテーブル14では、端末2が複数存在する場合など、複数のDNSサーバ3に対してDNSクエリーパケットが送られることがある。全てのDNSサーバ3についてのリクエストをまとめても処理可能であるが、中継装置が指定した以外のDNSサーバからのパケットであるか否かを速やかにL3レベルで判断して、効率的にパケットを処理するために、DNSサーバ3ごとにエントリを設けておく方が好ましい。
また、リクエストドメインは単数であることも多いが、例えば中継装置1が対応するサービスごとに異なるドメインを自身に割り当てる場合などには、複数種類のドメインが中継装置1自身を示すアドレスとしてテーブルに並ぶ。
さらに、画面表示に対してクリックが連発された場合や、複数の端末2から1分程度以下の短時間に中継装置1自身を指定するDNSクエリーパケットが送信された場合など、同一のドメインについての問い合わせが並行して中継装置1を通過した場合に、それぞれのDNSクエリーパケットに対してDNSレスポンスが来るため、通過した当該DNSクエリーパケットに対するDNSレスポンスのそれぞれをカウントしてロックの設定と解除ができるように、ロック回数をカウントしておくと好ましい。また、DNSクエリーパケットがUDPで送られた場合、DNSサーバ3からの返答が無い場合もあるため、タイムアウトする時間を経過したらロックを解除できるようにしておく。このタイムアウト時刻は、例えば一のドメイン名について最後のリクエストが到着してから1分後にして、その時間を経過したらエントリを削除するという方式が挙げられる。また、予め定めた秒数をデクリメントしていく方式でもよい。
In this address lock table 14, DNS query packets may be sent to a plurality of DNS servers 3 when there are a plurality of
In addition, there is often a single request domain. For example, when a different domain is assigned to each service corresponding to the
Further, when a click is repeatedly generated on the screen display, or when a DNS query packet specifying the
設定画面ドメインテーブル13は、要求されたドメインが中継装置1自体を指すものであるか否かを参照するためのテーブルである。また、中継装置1自身を示すドメインが複数ある場合に、個々のドメインが指定することになる画面の種類を識別するためのテーブルである。この設定画面ドメインテーブル13の例を図3に示す。ドメインが複数ある場合とは、大規模なWEBサーバを運用しているサービス事業者が複数のHTTPサーバーを提供している場合や、ホームゲートウェイのように単純にHTTPクライアントから指定された場合の一般用(図中「Native」で示す)に加えて、中継装置がWebサーバとして実行するJava(登録商標)が提供する画面や、ルータライブラリ用のドメインなどが挙げられる。図3中では「Native」が一般用の画面(ページ)を呼び出すことを指示し、「Java」がJava専用の保持画面(ページ)を呼び出すことを指示するものである。これらのロケーションの違いを発揮させるには、例えば、端末に対して自己のアドレスを通知する際に指定されるべきポート番号を、Nativeであれば80番ポートにし、Javaであれば8080番ポートを指定するといった形態で変更することにより、提供するWebページを変えることができる。この設定画面ドメインテーブル13と、それに付随するポート番号などの設定を参照することにより、Native側からそれ以外のWebサーバ機能のアドレスを判別したり、逆に他のWebサーバ機能から、Native側の機能のアドレスを判別したりすることが可能となる。なお、中継装置1を示すドメインが一つだけである場合、図3のような区分を有するテーブルの代わりに、ドメインの値のみのテーブル、又は変数であればよい。
The setting screen domain table 13 is a table for referring to whether or not the requested domain indicates the
スイッチテーブル15は、L3ブリッジ部11がDNSレスポンスをWAN側インターフェース22から受信した際に、当該パケットを通過させるか、DNS処理部12の処理に引き渡すかを決定するテーブルである。その例を図4に示す。基本的には一項目のみであり、デフォルトは通過可能(図中「OK」で示す)である。また、1又は0の1ビットの変数として記録しておいてもよい。この項目は、アドレスロックテーブル14のロック回数に対応しており、全てのドメインの記録のロック回数が0である場合には、DNS処理部12で処理する必要が無いので、通過可能となる。アドレスロックテーブル14のテーブルを全て走査していると処理負荷が大きすぎるため、ロックがかかっていない場合はスイッチテーブル15の値のみを参照することで通過可能とすることで、スループットを維持することができる。DNS処理部12がアドレスロックテーブル14を参照して変更可能とし、L3ブリッジ部11からは閲覧のみ可能にしておくとよい。または、通過可能の値となっているときは、無条件で通過させるようにしてもよい。
The switch table 15 is a table that determines whether the L3 bridge unit 11 passes the packet or passes it to the processing of the
この発明にかかる中継装置1の実施形態例の処理フローを、図5以降のフロー例を用いて説明する。
まず(S101)、LAN側インターフェース21からパケットを受信したL3ブリッジ部11は(S102)、取得したパケットのL3レイヤを確認するL3レイヤ確認手段116を実行する(S103)。このL3レイヤ確認手段として、次のS104及びS106を行う。まず、L3レイヤのアドレスが、中継装置1自身を示すIPアドレスであるか否かを判断する(S104)。中継装置1自身を示すIPアドレスであれば(S104−Yes)、下記の一連の手順を経てDNSの名前の解決がされた後に直接に端末2からアクセスされたパケットであるため、ポート番号に応じて自身の各モジュールに引き渡して設定画面の選択及びその送信といったルーティング処理を行う(S105)。
A processing flow of the embodiment of the
First (S101), the L3 bridge unit 11 that has received a packet from the LAN side interface 21 (S102) executes L3 layer confirmation means 116 for confirming the L3 layer of the acquired packet (S103). As this L3 layer confirmation means, the following S104 and S106 are performed. First, it is determined whether the address of the L3 layer is an IP address indicating the
一方、L3レイヤの宛先アドレスが中継装置1自身でない場合は(S104−No)、さらに、L3レイヤのプロトコル番号がDNSか否かを確認する(S106)。DNSでなければ(S106−No)、L3ブリッジ部11はそのまま中継して構わないため、WAN側インターフェース22にパケットを転送する(S108)。一方、L3レイヤのプロトコル番号がDNSであった場合(S106−Yes)、すなわち、DNSクエリーパケットである場合は、DNS処理部12は当該パケットをコピーしてDNS処理部12に受け渡す(S107)とともに、WAN側インターフェース22へ転送する(S108)クエリー中継コピー手段111を実行する。これにより、中継装置1としての転送は時間をかけずに行われる一方で、DNSクエリーパケットについては次のフローに記載のようにDNS処理部12で処理する並行作業が可能となる。
On the other hand, when the destination address of the L3 layer is not the
次に、S107でDNSクエリーパケットを受け渡されたDNS処理部12での処理について図6のフロー例を用いて説明する。L3ブリッジ部11からコピーされたDNSクエリーパケットを受けとると(S112)、当該DNSクエリーパケットが中継装置1自身のアドレスを解決するためのものであるか否かを判断するクエリー判断手段121を実行する。具体的にはまず、当該DNSクエリーパケットの宛先IPアドレスとドメインを抽出する(S113)。ここで、宛先IPアドレスは、基本的には端末2が使用するDNSサーバ3になる。抽出したドメインを、設定画面ドメインテーブル13に記録されたドメインと比較する(S114)。なお、設定画面ドメインテーブル13が無い場合は、この代わりに中継装置1を示すドメインを格納した固定の値を参照する。まとめて設定画面ドメインテーブル13として説明する。このドメインが中継装置1の保持する画面を指定するものである場合には(S115−Yes)、S116以降の処理へ移る。該当しなければ(S115−No)、WAN6上の他のサーバについてのDNSの名前を解決するものであり、DNSサーバ3が応答できるものであるので、そこでDNS処理部12の処理は終了する。ここまでがクエリー判断手段121である。
Next, processing in the
上記の抽出したドメインが該当する場合、当該DNSクエリーパケットがDNSサーバ3に到達し、その応答によって返ってくるDNSレスポンスを遮断する必要がある。そのために、遮断しなければならないDNSサーバ3からのレスポンスに対応する情報を登録する、ロックドメイン記録手段123を実行する。具体的にはまず、当該DNSクエリーパケットの宛先IPアドレスとドメインの組み合わせが、アドレスロックテーブル14に登録済みのエントリに該当するか否かを判断する(S116)。
登録済みでなければ次に割り込みの処理として、アドレスロックテーブル14に、登録済みのエントリが存在するか否かを判断する(S117)。もしエントリが一つも存在しなければ、デフォルトでは通過可能「OK」になっているスイッチテーブル15の値を、通過制限「NG」へと変更する(S118)、スイッチNG切替手段125を実行する。エントリが既に存在している場合は、スイッチテーブル15の値は既に「NG」になっているので、そのまま次の処理へと進む。
If the extracted domain is applicable, the DNS query packet reaches the DNS server 3 and it is necessary to block the DNS response returned by the response. For this purpose, the lock
If it has not been registered, then as an interrupt process, it is determined whether or not there is a registered entry in the address lock table 14 (S117). If there is no entry, the value of the switch table 15 that is “OK” that can be passed by default is changed to the passage restriction “NG” (S118), and the switch NG switching means 125 is executed. If the entry already exists, the value of the switch table 15 is already “NG”, and the process proceeds to the next process.
なお、S117及びS118の組み合わせからなるスイッチNG切替手段125は、S119との順序が前後しても良い。 Note that the switch NG switching means 125, which is a combination of S117 and S118, may be back and forth with S119.
次に、上記ロックドメイン記録手段123の具体的手続きとして、宛先IPアドレス、すなわちDNSサーバ3のアドレスと、要求しているドメインとを、アドレスロックテーブル14に新たなエントリとして記録する(S119)。その上で、アドレスロックテーブル14の当該エントリのロック回数を+1し、DNSレスポンスが来たときには遮断できるように設定する(S120)。同時に、タイマーの数値を更新する。更新後の値は特に限定されないが、DNSクエリーパケットがUDPである場合に、パケットが破棄されたと考えられる程度の時間であると好ましい。具体的には60秒程度でよい。タイマーの設定としては、タイムアウトの時刻を登録・更新してもよいし、カウントされる秒数を1秒ごとにデクリメントしていく方式でもよい。
Next, as a specific procedure of the lock
一方、S116において、既に同一のIPアドレスとドメインの組み合わせのエントリが存在するのであれば(S116−Yes)、同一のDNSサーバ3への同一の問い合わせであるので、当該エントリのロック回数を+1するとともにタイマーの数値を更新する(S120)。立て続けに複数の問い合わせがあった場合にこのような状態となる。インクリメントする処理とタイマーの更新処理自体は上記と同じである。 On the other hand, if an entry with the same IP address and domain combination already exists in S116 (S116-Yes), the same query is sent to the same DNS server 3, and the lock count of the entry is incremented by one. At the same time, the numerical value of the timer is updated (S120). This is the case when there are multiple inquiries in succession. The incrementing process and the timer updating process itself are the same as described above.
その上で、DNS処理部12は受け取ったDNSクエリーパケットに対する応答として、中継装置1自身のIPアドレスを付与したDNSレスポンスのパケットを生成する自己アドレス指定手段122を実行する。設定画面ドメインテーブル13におけるロケーションが複数ある場合には、ポート番号など、その他の情報を付したパケットを生成するとよい。このDNSレスポンスのパケットをL3ブリッジ部11に受け渡すと、L3ブリッジ部11は、元のDNSクエリーパケットの送信元アドレスを宛先として、当該DNSレスポンスのパケットを送信する自己アドレス通知手段113を実行する(S121)。
After that, the
このDNSレスポンスを受けとった端末2は、中継装置1のIPアドレスに対してHTTPアクセスを行う。これを受け取った中継装置1は、内蔵するHTTPサーバ機能部(図示せず)により、設定画面ドメインテーブル13にて定義したサービスに対応したwebページのデータを送信して、端末2からの設定変更を受け付け可能にする。
The
これと並行して、L3ブリッジ部11が中継したDNSクエリーパケットはDNSサーバ3に到達する。このDNSクエリーパケットが問い合わせるドメインが、DNSサーバ3で名前の解決を果たせるドメインであれば対応するIPアドレスを含むDNSレスポンスを返すことができるが、中継装置1を示すものであれば、基本的にはDNSの名前の解決が不可能であるドメイン名であるので、タイムアウトの後、NoSuchNameパケットであるDNSレスポンスを返す。 In parallel with this, the DNS query packet relayed by the L3 bridge unit 11 reaches the DNS server 3. If the domain inquired by the DNS query packet is a domain in which the DNS server 3 can resolve the name, a DNS response including the corresponding IP address can be returned. Is a domain name that cannot resolve the DNS name, and returns a DNS response that is a NoSuchName packet after a timeout.
このDNSレスポンスがWAN側インターフェース22から返ってきたときの中継装置1の挙動を図7のフロー例を用いて説明する。まず(S201)、WAN側インターフェース22からパケットを受信すると(S202)、L3ブリッジ部11はそのパケットのL3レイヤを確認する指定判別手段117を実行する(S203)。そのL3レイヤのアドレスが中継装置1自身を宛先とするものであれば(S204−Yes)、ブリッジせずにルーティング処理を行う(S205)。中継装置1自身を宛先とするものでなければ(S204−No)、ブリッジのための処理判断へと移る。
The behavior of the
ここで、L3ブリッジ部11は、スイッチテーブル15の値を参照するスイッチ確認手段114を実行する(S206)。スイッチテーブル15の値が通過可能(「OK」)であれば(S207−Yes)、その時点ではDNS処理部12が遮断すべきDNSレスポンスを待機しているわけではないので、L3ブリッジ部11は当該パケットをそのままL3ブリッジしてLAN側インターフェース21に転送するスイッチ参照転送手段115を実行する(S211)。スイッチテーブル15の値が通過可能でない場合(S207−No)、当該パケットが破棄すべきものか否かをDNS処理部12に問い合わせる破棄問合手段118を実行する(S208)。この問い合わせに対する処理は後述する。DNS処理部12から処理結果を通知されるまでは、当該パケットを保持したまま待機する(S209→S210)。予め定めた設定時間経過後までにDNS処理部12から通知が来なければ、当該DNSレスポンスのパケットを破棄する該当パケット破棄手段112を実行する(S210→S212)。
Here, the L3 bridge unit 11 executes the
なお、DNS処理部12から、当該パケットを破棄する旨の具体的な通知がL3ブリッジ部11に伝達されるようにしてもよい。この場合、S210で待機することなく、通知が到達したらパケットを転送することなくそのまま終了させるという手順で該当パケット破棄手段112を実行する(S212)。
Note that a specific notification that the packet is to be discarded may be transmitted from the
次に(S221)、S208で破棄問合手段118によるDNSレスポンスを受け渡されたDNS処理部12によるロック状態確認手段126の処理を図8のフローを用いて説明する。L3ブリッジ部11より処理を引き継いだDNS処理部12は、当該DNSレスポンスのパケットに含まれる送信元IPアドレス及びドメインを抽出する(S223)。ここで送信元IPアドレスとはDNSサーバ3のアドレスである。その上でアドレスロックテーブル14を確認し(S224)、抽出したDNSサーバ3のアドレスとドメインの組み合わせがアドレスロックテーブル14にあるか否かを判断する(S225)。
Next, the process of the lock
その組み合わせが存在していなければ(S225−No)、当該DNSレスポンスは中継装置1自身を指定したDNSクエリーパケットに対する応答ではなく、WAN6内のいずれかのサーバを指定したものであるため、そのまま遮断することなく転送して構わない。このため、L3ブリッジ部11へ、通過させてよい旨の返答通知を送信する(S226→S209−Yes)。上記の通り、この返答通知を受けたL3ブリッジ部11は保持していたパケットをLAN側インターフェース21に転送し、端末2にDNSレスポンスが届くことになる(S211)。
If the combination does not exist (S225-No), the DNS response is not a response to the DNS query packet designating the
一方、上記の組み合わせが存在していれば(S225−Yes)、当該DNSレスポンスは、中継装置1自身のドメインを指定したDNSクエリーパケットに対する応答であり、基本的にはNoSuchNameパケットである。この場合は、L3ブリッジ部11に対して転送を認める旨の通知を出さない。ただし、遮断すべきDNSレスポンスが返ってきたので、その遮断の役目を終えた分のロック状態の解除作業を行う。まず、アドレスロックテーブル14から、当該組み合わせのエントリのロック回数を−1する(S227)。当該エントリのDNSサーバ3及びドメインについて、もし待機しているDNSレスポンスの数、すなわちL3ブリッジ部を先に通過したDNSクエリーパケットが残り一つであった場合には、ロック回数が−1されて0になり、ロック状態が解除されるロック解除手段124が実行されることになる。
On the other hand, if the above combination exists (S225-Yes), the DNS response is a response to the DNS query packet designating the domain of the
その上で、DNS処理部12は、アドレスロックテーブル14の中に、ロック回数が0となっているエントリがあるか否かを確認する解除エントリ確認手段127を実行し(S228)、もし該当するエントリがあれば(S228−Yes)当該エントリを削除する(S229)。
Then, the
さらに(S228−No)、アドレスロックテーブル14のエントリのうち、終了時刻を記録する方式であればその時刻を経過しているものが存在しているか否か、残り時間をデクリメントする方式の場合はタイマーが0秒になっているものが存在しているか否かを確認するタイマー確認手段128を実行し(S230)、もし該当するエントリがあれば(S230−Yes)、当該エントリを削除する(S231)。 Further, (S228-No), if there is a method of recording the end time among the entries of the address lock table 14, whether or not there is an elapse of the time, or in the case of a method of decrementing the remaining time The timer confirmation means 128 for confirming whether there is a timer whose timer is 0 second is executed (S230). If there is a corresponding entry (S230-Yes), the entry is deleted (S231). ).
これらのテーブルの整理後に(S230−No)、アドレスロックテーブル14にエントリがまだ存在するのであれば、L3ブリッジ部11はまだWAN側インターフェースから受信したパケットを遮断するか否かの判断を継続しなければならないので(S232−Yes)、そのまま処理が終了する(S234)。一方、アドレスロックテーブル14のエントリが全て削除されていれば(S232−No)、DNSレスポンスを遮断する必要がなくなったので、スイッチテーブル15の通過の可否の値を通過可能な「OK」に変更する、スイッチ許可手段129を実行する(S233)。これにより、以後は新たなエントリがアドレスロックテーブル14に追加されるまでは、L3ブリッジ部11はWAN側インターフェース22から受信した中継装置1を指定する以外のパケットについてそのままブリッジしてLAN側インターフェース21に転送するスイッチ参照転送手段115を実行することになり、ブリッジとしてスループットを維持できるようになる。
After the arrangement of these tables (S230-No), if there are still entries in the address lock table 14, the L3 bridge unit 11 continues to determine whether or not to block packets received from the WAN side interface. Since it must be present (S232-Yes), the process ends as it is (S234). On the other hand, if all entries in the address lock table 14 have been deleted (S232-No), it is no longer necessary to block the DNS response, so the pass / fail value of the switch table 15 is changed to “OK” that can be passed. The switch permission means 129 is executed (S233). Accordingly, thereafter, until a new entry is added to the address lock table 14, the L3 bridge unit 11 bridges the packets other than the one specifying the
いずれにしても、L3ブリッジ部11に対してパケットの通過を認める旨の通知を出さなかった場合、L3ブリッジ部11は、予め定められた時間のタイムアウトを待って(S210)、保留されているDNSレスポンスのパケットは破棄される該当パケット破棄手段112を実行する。 In any case, if the L3 bridge unit 11 is not notified that the packet is allowed to pass, the L3 bridge unit 11 waits for a predetermined time-out (S210) and is suspended. The corresponding packet discarding means 112 for discarding the DNS response packet is executed.
なお、DNS処理部12は、S227に前後して、当該パケットを通過させずに破棄させる旨の通知をL3ブリッジ部11に通知してもよい。この場合、L3ブリッジ部11はタイムアウトを待つことなく、保持していた当該DNSレスポンスのパケットを破棄する該当パケット破棄手段112を実行する。
Note that the
上記の一連の流れを図9及び図10に示すシーケンス図により解説する。
まず端末2は、LAN5を構成するエッジルータ7に対してRS(Router Solicitation)を送信し(S301)、エッジルータ7からRA(Router Advertisement)を受信する(S302)。次いでInformation Requestを送信して、DNSサーバ3のアドレスを含む応答をエッジルータから受信する。ここまでは中継装置1は単純にL3ブリッジとして作用し、パケットを素通しする。
The above series of flows will be described with reference to the sequence diagrams shown in FIGS.
First, the
次いで、端末2が中継装置1を指定するために、DNSクエリーパケットを送信する(S311)。ここでL3ブリッジ部11は、L3レイヤ確認手段116でDNSクエリーパケットと確認したら、WAN側インターフェース22(S312、S108)とDNS処理部12(S313、S107)との両方に当該パケットを渡すクエリー中継コピー手段111を実行する。中継装置1を指定したDNSクエリーパケットに対して、DNS処理部12は中継装置1自身のIPアドレスを含むDNSレスポンスを生成してL3ブリッジ部11に渡す(S314,S121)自己アドレス指定手段122を実行する。DNSレスポンスを受け取ったL3ブリッジ部11は端末2へ当該DNSレスポンスを送信する自己アドレス通知手段113を実行する(S316、S121)。また、並行して、当該DNSサーバ3のアドレスと要求したドメインとをアドレスロックテーブル14に登録してロック状態にするロックドメイン記録手段123を実行する(S315,S119,S120)。併せて、スイッチテーブル15で通過を「NG」とするスイッチNG切替手段125を実行する(S317、S118)。
Next, the
中継装置1のIPアドレスを得た端末は、中継装置1の設定画面を呼び出すためにHTTPクライアントから当該IPアドレスを指定したリクエストを送信する(S321)。このパケットはIPアドレスで直接に中継装置1を指定しているので、L3ブリッジ部11はブリッジせずに、中継装置1の内部のHTTPサーバ18にリクエストを受け渡す(S322)。HTTPサーバ18は設定画面ドメインテーブル13で定義されたサービスに従って、対応するwebページのデータを生成してL3ブリッジ部11に渡し(S325)、L3ブリッジ部11はそのデータを端末2に送信する(S326)。以下図示しないが、当該webページのフォームを用いて中継装置1の設定を変更することができる。
The terminal that has obtained the IP address of the
一方、S312でDNSサーバ3に送られたDNSクエリーパケットについて、DNSサーバ3は当然にDNSの名前の解決ができず、タイムアウトとなって、NoSuchNameとなるDNSレスポンスを返送する(S331)。L3ブリッジ部11はこれを受信したら、スイッチテーブル15を参照してこれを保留し、所定の時間が経過したり、破棄の指示を受け取ったら該当パケット破棄手段112を実行する。
On the other hand, with respect to the DNS query packet sent to the DNS server 3 in S312, the DNS server 3 naturally cannot resolve the DNS name and times out and returns a DNS response that becomes NoSuchName (S331). When the L3 bridge unit 11 receives this, the L3 bridge unit 11 refers to the switch table 15 to hold it, and executes the packet discard
なお、中継装置1以外についてIPアドレスを求めるDNSクエリーパケット(S351)に対しては、クエリー中継コピー手段111が実行されるものの(S352,S353)、DNS処理部12でドメインを確認して、中継装置1自身でないことが確認されれば、アドレスロックテーブル14やスイッチテーブル15の更新が行われない。一方で、DNSサーバ3からDNSレスポンスが返ってくる(S354)が、このときにスイッチ確認手段114を実行してスイッチテーブル15が通過「OK」となっていれば、L3ブリッジ部11はそのままLAN側インターフェースへと転送するスイッチ参照転送手段115を実行する。これによりDNSの名前が解決され、端末2は外部のHTTPサーバにアクセスすることができ(S355,S356)、このときに中継装置1が障害となることはない。
For the DNS query packet (S351) for obtaining an IP address other than the
1 中継装置
2 端末
3 DNSサーバ
5 LAN
6 WAN
7 エッジルータ
11 L3ブリッジ部
12 DNS処理部
13 設定画面ドメインテーブル
14 アドレスロックテーブル
15 スイッチテーブル
17 記憶部
18 HTTPサーバ
21 LAN側インターフェース
22 WAN側インターフェース
111 クエリー中継コピー手段
112 該当パケット破棄手段
113 自己アドレス通知手段
114 スイッチ確認手段
115 スイッチ参照転送手段
116 L3レイヤ確認手段
117 指定判別手段
118 破棄問合手段
121 クエリー判断手段
122 自己アドレス指定手段
123 ロックドメイン記録手段
124 ロック解除手段
125 スイッチNG切替手段
126 ロック状態確認手段
127 解除エントリ確認手段
128 タイマー確認手段
129 スイッチ許可手段
1
6 WAN
7 Edge router 11
Claims (4)
LAN側インターフェースから受信したDNSクエリーパケットをWAN側インターフェースに転送することと並行して、当該DNSクエリーパケットを解析し、解析した結果、当該中継装置自身を指定するDNSクエリーパケットであれば、当該中継装置自身のIPアドレスを含むDNSレスポンスをDNSクエリーパケットの送信元アドレス宛に返送し、その返送に前後して、WAN側インターフェースから受信する外部のDNSサーバから返送された当該DNSクエリーパケットに対するDNSレスポンスを遮断する中継装置。 A relay device having a LAN side interface, a WAN side interface, and an L3 bridge unit that relays between them,
In parallel with transferring the DNS query packet received from the LAN side interface to the WAN side interface, the DNS query packet is analyzed, and if the DNS query packet that designates the relay device itself is analyzed, A DNS response including the IP address of the device itself is returned to the transmission source address of the DNS query packet, and before and after the return, the DNS response to the DNS query packet returned from the external DNS server received from the WAN side interface Relay device that shuts off.
上記中継装置を通過するDNSクエリーパケットのうち、上記中継装置自身を指定したパケットのドメインを記録して、当該DNSクエリーパケットに対するDNSレスポンスを遮断するロック状態である情報を保持するアドレスロックテーブルと、
上記アドレスロックテーブルにおいてロック状態にあるドメインの記録が一つも存在しなければ通過を許可する値とし、ロック状態にあるドメインの記録が一つ以上存在すれば通過を制限する値とするスイッチテーブルと、
を有し、
上記L3ブリッジ部は、
上記LAN側インターフェースから受信したDNSクエリーパケットを上記WAN側インターフェースに転送することと並行して、当該DNSクエリーパケットをコピーして上記DNS処理部へ受け渡すクエリー中継コピー手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、当該DNSレスポンスに含まれるドメインが上記アドレスロックテーブルに記録されてロック状態である情報に該当すれば当該DNSレスポンスのパケットを破棄する該当パケット破棄手段と、
上記中継装置自身の名前の解決を要求するDNSクエリーパケットの送信元アドレスへ、上記中継装置自身のアドレスを含むDNSレスポンスを送信する自己アドレス通知手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、上記スイッチテーブルを参照するスイッチ確認手段と、
上記スイッチテーブルが通過を許可する値であれば当該DNSレスポンスをL3ブリッジしてLAN側インターフェースに転送するスイッチ参照転送手段と、
を有し、
上記DNS処理部は、
受け取ったDNSクエリーパケットが上記中継装置自身のアドレスを解決するためのものであるか否かを判断するクエリー判断手段と、
上記クエリー判断手段で上記中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットの送信元アドレスへ、上記中継装置自身のIPアドレスを含むDNSの名前を解決するDNSレスポンスを生成する自己アドレス指定手段と、
上記アドレスロックテーブルに、上記クエリー判断手段で中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットのドメインを記録してロック状態とするロックドメイン記録手段と、
上記アドレスロックテーブルの記録のうち、遮断の必要がなくなったドメインについて、上記ロック状態を解除するロック解除手段とを有する、
請求項1に記載の中継装置。 A DNS processing unit for processing a DNS query packet;
An address lock table for recording a domain of a packet specifying the relay device itself among DNS query packets passing through the relay device, and holding information in a locked state for blocking a DNS response to the DNS query packet;
A switch table having a value that allows passage if there is no record of the domain in the locked state in the address lock table, and a value that restricts passage if there is one or more records of the domain in the locked state; ,
Have
The L3 bridge is
In parallel with transferring the DNS query packet received from the LAN side interface to the WAN side interface, a query relay copy unit that copies the DNS query packet and delivers it to the DNS processing unit;
Corresponding packet discarding means for discarding the DNS response packet when the DNS response is received from the WAN side interface and the domain included in the DNS response corresponds to the information recorded in the address lock table and in the locked state. When,
Self-address notifying means for transmitting a DNS response including the address of the relay device itself to a source address of a DNS query packet requesting resolution of the name of the relay device itself;
Switch confirmation means for referring to the switch table when a DNS response is received from the WAN side interface;
If the switch table is a value that allows passage, a switch reference transfer means for transferring the DNS response to the LAN side interface via L3 bridge;
Have
The DNS processing unit
Query determination means for determining whether the received DNS query packet is for resolving the address of the relay device itself;
Self that generates a DNS response that resolves the DNS name including the IP address of the relay device itself to the source address of the DNS query packet determined by the query determination means to resolve the address of the relay device itself Addressing means;
Lock domain recording means for recording the domain of the DNS query packet determined to be for address resolution of the relay device itself by the query determining means in the address lock table and setting the locked state;
Of the records in the address lock table, the domain that no longer needs to be blocked has unlocking means for releasing the locked state,
The relay device according to claim 1.
LAN側インターフェースから受信したDNSクエリーパケットをWAN側インターフェースに転送することと並行して、当該DNSクエリーパケットをコピーして解析し、当該中継装置自身を指定するDNSクエリーパケットであれば、当該中継装置自身のIPアドレスを含むDNSレスポンスをDNSクエリーパケットの送信元アドレス宛に返送すると共に、WAN側インターフェースから受信した該当するDNSレスポンスを遮断する、中継装置の運用方法。 For a relay device having a LAN side interface, a WAN side interface, and an L3 bridge that relays between them,
In parallel with transferring the DNS query packet received from the LAN side interface to the WAN side interface, the DNS query packet is copied and analyzed, and if the DNS query packet designates the relay device itself, the relay device A method for operating a relay device, which returns a DNS response including its own IP address to the source address of the DNS query packet and blocks the corresponding DNS response received from the WAN side interface.
上記記憶部に、上記中継装置を通過するDNSクエリーパケットのうち、中継装置自身を指定したパケットのドメインを記録して、それに対するDNSレスポンスを遮断するロック状態である情報を保持するアドレスロックテーブルと、
上記アドレスロックテーブルにおいてロック状態にあるドメインの記録が一つも存在しなければ通過を許可する値とし、ロック状態にあるドメインの記録が一つ以上存在すれば通過を制限する値とするスイッチテーブルと、
を設け、
上記L3ブリッジ部を
上記LAN側インターフェースから受信したDNSクエリーパケットを上記WAN側インターフェースに転送することと並行して、当該DNSクエリーパケットをコピーして上記DNS処理部へ受け渡すクエリー中継コピー手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、当該DNSレスポンスに含まれるドメインが上記アドレスロックテーブルに記録されてロック状態であれば当該DNSレスポンスのパケットを破棄する該当パケット破棄手段と、
上記中継装置自身の名前の解決を要求するDNSクエリーパケットの送信元へ、上記中継装置自身のアドレスを含むDNSレスポンスを送信する自己アドレス通知手段と、
上記WAN側インターフェースからDNSレスポンスを受信した際に、上記スイッチテーブルを参照するスイッチ確認手段と、
上記スイッチテーブルが通過を許可する値であれば当該DNSレスポンスを速やかにL3ブリッジしてLAN側インターフェースに転送するスイッチ参照転送手段と、
して機能させ、
上記DNS処理部を、
受け取ったDNSクエリーパケットが中継装置自身のアドレスを解決するためのものであるか否かを判断するクエリー判断手段と、
上記クエリー判断手段で中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットの送信元アドレスへ、DNSの名前を解決するDNSレスポンスを生成する自己アドレス指定手段と、
上記アドレスロックテーブルに、上記クエリー判断手段で中継装置自身のアドレス解決のためであると判断されたDNSクエリーパケットのドメインを記録してロック状態とするロックドメイン記録手段と、
上記アドレスロックテーブルの記録のうち、遮断の必要がなくなったドメインについて、上記ロック状態を解除するロック解除手段として機能させるためのプログラム。 For a relay device having a LAN side interface and a WAN side interface, an L3 bridge unit that connects between them, a DNS processing unit that processes a DNS query packet, and a storage unit that can record a table,
An address lock table that records the domain of a packet that specifies the relay device itself among DNS query packets that pass through the relay device in the storage unit, and holds information in a locked state that blocks a DNS response to the packet domain; ,
A switch table having a value that allows passage if there is no record of the domain in the locked state in the address lock table, and a value that restricts passage if there is one or more records of the domain in the locked state; ,
Provided,
In parallel with transferring the DNS query packet received from the LAN side interface to the WAN side interface, the L3 bridge unit copies the DNS query packet and passes it to the DNS processing unit;
When a DNS response is received from the WAN side interface, if the domain included in the DNS response is recorded in the address lock table and is in a locked state, a corresponding packet discarding unit for discarding the DNS response packet;
A self-address notifying means for transmitting a DNS response including the address of the relay device itself to a source of a DNS query packet requesting resolution of the name of the relay device itself;
Switch confirmation means for referring to the switch table when a DNS response is received from the WAN side interface;
If the switch table is a value that allows passage, switch reference transfer means for quickly transferring the DNS response to the LAN side interface by L3 bridging,
To function,
The DNS processing unit is
Query determination means for determining whether the received DNS query packet is for resolving the address of the relay device itself;
A self-addressing means for generating a DNS response for resolving the DNS name to the source address of the DNS query packet determined by the query determination means to resolve the address of the relay device itself;
Lock domain recording means for recording the domain of the DNS query packet determined to be for address resolution of the relay device itself by the query determining means in the address lock table and setting the locked state;
A program for functioning as a lock release means for releasing the lock state for a domain that is no longer required to be blocked in the record of the address lock table.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014048686A JP6223871B2 (en) | 2014-03-12 | 2014-03-12 | Relay device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2014048686A JP6223871B2 (en) | 2014-03-12 | 2014-03-12 | Relay device |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2015173381A JP2015173381A (en) | 2015-10-01 |
| JP6223871B2 true JP6223871B2 (en) | 2017-11-01 |
Family
ID=54260455
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2014048686A Active JP6223871B2 (en) | 2014-03-12 | 2014-03-12 | Relay device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6223871B2 (en) |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20070078996A1 (en) * | 2005-10-04 | 2007-04-05 | Wei-Che Chen | Method for managing a network appliance and transparent configurable network appliance |
| JP2007266931A (en) * | 2006-03-28 | 2007-10-11 | Matsushita Electric Works Ltd | Communication cutoff device, communication cutoff program |
-
2014
- 2014-03-12 JP JP2014048686A patent/JP6223871B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2015173381A (en) | 2015-10-01 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP7060636B2 (en) | Virtual network interface object | |
| CN108616490B (en) | Network access control method, device and system | |
| US9319315B2 (en) | Distributing transmission of requests across multiple IP addresses of a proxy server in a cloud-based proxy service | |
| US8180891B1 (en) | Discovery, access control, and communication with networked services from within a security sandbox | |
| US8621038B2 (en) | Incompatible network gateway provisioned through DNS | |
| US8861522B2 (en) | Method for providing an internal server with reduced IP addresses | |
| US8667574B2 (en) | Assigning a network address for a virtual device to virtually extend the functionality of a network device | |
| JP4487150B2 (en) | Communication apparatus, firewall control method, and firewall control program | |
| US10425675B2 (en) | Discovery, access control, and communication with networked services | |
| US10440057B2 (en) | Methods, apparatus and systems for processing service requests | |
| JP6456398B2 (en) | Method of processing host route in virtual subnet, related device and communication system | |
| US20110002346A1 (en) | Extended Network Protocols for Communicating Metadata with Virtual Machines | |
| KR20210025118A (en) | Address migration service | |
| CN107211051A (en) | For integrated inside and the method and system of cloud domain name system | |
| US12113770B2 (en) | DHCP snooping with host mobility | |
| US20130111040A1 (en) | Auto-Split DNS | |
| CN111615128A (en) | A multi-access edge computing method, platform and system | |
| US9697173B2 (en) | DNS proxy service for multi-core platforms | |
| US20130254425A1 (en) | Dns forwarder for multi-core platforms | |
| CN109076022B (en) | Network address translation device, setting requesting device, communication system, communication method, and storage medium storing program | |
| US20110276673A1 (en) | Virtually extending the functionality of a network device | |
| JP6687101B2 (en) | Communication system, control device, and control method | |
| JP6223871B2 (en) | Relay device | |
| JP7230593B2 (en) | Relay device and program | |
| JP6003726B2 (en) | Packet processing apparatus, packet processing program, and network system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20160229 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20170116 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20170228 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170419 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20171003 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20171004 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6223871 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |