JP5169992B2 - Network, network device, and load balancing method used therefor - Google Patents
Network, network device, and load balancing method used therefor Download PDFInfo
- Publication number
- JP5169992B2 JP5169992B2 JP2009127119A JP2009127119A JP5169992B2 JP 5169992 B2 JP5169992 B2 JP 5169992B2 JP 2009127119 A JP2009127119 A JP 2009127119A JP 2009127119 A JP2009127119 A JP 2009127119A JP 5169992 B2 JP5169992 B2 JP 5169992B2
- Authority
- JP
- Japan
- Prior art keywords
- network
- port
- address
- vrid
- virtual
- 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
本発明はネットワーク、ネットワーク装置及びそれらに用いる負荷分散方法に関し、特にNAT(Network Address Translation)/NAPT(Network Address Port Translation)装置の負荷分散方法に関する。 The present invention relates to a network, a network device, and a load distribution method used therefor, and more particularly, to a load distribution method of a NAT (Network Address Translation) / NAPT (Network Address Port Translation) device.
ネットワーク間の接続に用いられるルータにおいては、負荷分散する手段としてVRRP(Virtual Router Redundancy Protocol)を利用する手段が広く知られている。 In routers used for connection between networks, means using VRRP (Virtual Router Redundancy Protocol) is widely known as means for distributing loads.
VRRPは、ルータの多重化を行うためのプロトコルである。このプロトコルでは、VRRPに対応した複数のルータを1つのグループに所属させ、通常、それらのルータのうちの1つが通信を行うが、そのルータに障害が発生した場合、同じグループに属するルータが自動的にその通信を受け継いでいる。 VRRP is a protocol for multiplexing routers. In this protocol, a plurality of routers corresponding to VRRP belong to one group, and usually one of those routers communicates. When a failure occurs in that router, the routers belonging to the same group are automatically Inherit the communication.
同一グループにおいて、通信を行うルータは1台に限られるが、1つのルータが複数のグループに属することもできるため、その設定によって負荷分散を同時に実現することも可能である。VRRPについては、下記の非特許文献1に記載されている。
In the same group, the number of routers that perform communication is limited to one. However, since one router can belong to a plurality of groups, load distribution can be realized at the same time by the setting. VRRP is described in Non-Patent
上述した本発明に関連するルータでは、NAPTを利用している場合、アドレスが1つに集約されてしまうため、VRRPでは負荷分散することができないという課題がある。 In the router related to the present invention described above, when NAPT is used, addresses are aggregated into one, so that there is a problem that load distribution cannot be performed with VRRP.
ここで、NAPTは、プライベートアドレスを利用したいLAN上の複数の端末が、端末数より少ないグローバルアドレスで、同時にインタネットにアクセスしたい場合に利用する機能である。通信の各セッションは、ゲートウェイが端末のプライベートアドレス毎にTCP/UDPのポート番号を変換することで区別される。 Here, NAPT is a function used when a plurality of terminals on a LAN that want to use private addresses want to access the Internet at the same time with a global address that is smaller than the number of terminals. Each communication session is distinguished by the gateway converting the TCP / UDP port number for each private address of the terminal.
本発明に関連するVRRPの仕組みでは、冗長構成を組んでいるルータの両方で同じNAPTアドレスに変換するようにしても、通信の戻りのパケットがNAPTアドレスがマスタとなっているルータしか受信できないため、変換テーブルを共有化するシステムがないと動作しない。 In the VRRP mechanism related to the present invention, even if both routers in a redundant configuration convert to the same NAPT address, only the router having the NAPT address as the master can receive the communication return packet. It does not work without a system that shares the conversion table.
そこで、本発明の目的は上記の問題点を解消し、他方のルータのNAT/NAPT変換テーブルを全く意識することなく、NAT/NAPT変換を実行することができるネットワーク、ネットワーク装置及びそれらに用いる負荷分散方法を提供することにある。 SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to solve the above-described problems and to perform a NAT / NAPT conversion without being aware of the NAT / NAPT conversion table of the other router, and a load used for them. It is to provide a dispersion method.
本発明によるネットワークは、第1及び第2のネットワーク間を接続し、NAT(Network Address Translation)/NAPT(Network Address Port Translation)を実行する第1及び第2のネットワーク装置を含むネットワークであって、
前記第1及び第2のネットワーク装置に対して、前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
前記第1及び第2のネットワーク装置各々において、VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
ポート変換対象のポート番号が偶数のパケットだけを処理する手段を前記第1のVRIDがマスタのネットワーク装置に備え、
前記ポート変換対象のポート番号が奇数のパケットだけを処理する手段を前記第2のVRIDがマスタのネットワーク装置に備えている。
A network according to the present invention is a network including first and second network devices that connect between a first network and a second network and execute NAT (Network Address Translation) / NAPT (Network Address Port Translation),
For the first and second network devices, different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the network side, and for each of the first and second VRIDs on the second network side. Setting a second virtual IP address different from and common to the first virtual IP address;
Each of the first and second network devices operates to receive a packet even in a VRRP (Virtual Router Redundancy Protocol) backup state,
The first VRID has a means for processing only a packet having an even port number to be port-converted in the master network device,
The second VRID has a means for processing only packets having an odd port number for port conversion in the master network device.
本発明によるネットワーク装置は、第1及び第2のネットワーク間を接続し、NAT(Network Address Translation)/NAPT(Network Address Port Translation)を実行するネットワーク装置であって、
前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
前記第1のVRIDがマスタの場合にポート変換対象のポート番号が偶数のものだけを処理する手段と、前記第2のVRIDがマスタの場合に前記ポート変換対象のポート番号が奇数のものだけを処理する手段とのうちの少なくとも一方を備えている。
A network device according to the present invention is a network device that connects between a first network and a second network, and executes NAT (Network Address Translation) / NAPT (Network Address Port Translation),
Different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively, and each of the first and second VRIDs is set on the first network side. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the second network side, which is different from and common to the first virtual IP address. Set the second virtual IP address,
It operates to receive packets even in the VRRP (Virtual Router Redundancy Protocol) backup state,
When the first VRID is a master, only the port conversion target port number is processed, and when the second VRID is the master, only the port conversion target port number is an odd number. At least one of processing means.
本発明による負荷分散方法は、第1及び第2のネットワーク間を接続し、NAT(Network Address Translation)/NAPT(Network Address Port Translation)を実行する第1及び第2のネットワーク装置を含むネットワークに用いる負荷分散方法であって、
前記第1及び第2のネットワーク装置に対して、前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
前記第1及び第2のネットワーク装置各々において、VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
ポート変換対象のポート番号が偶数のものだけを処理する処理を前記第1のVRIDがマスタのネットワーク装置に備え、
前記ポート変換対象のポート番号が奇数のものだけを処理する処理を前記第2のVRIDがマスタのネットワーク装置に備えている。
The load distribution method according to the present invention is used for a network including first and second network devices that connect between a first network and a second network and execute NAT (Network Address Translation) / NAPT (Network Address Port Translation). A load balancing method,
For the first and second network devices, different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the network side, and for each of the first and second VRIDs on the second network side. Setting a second virtual IP address different from and common to the first virtual IP address;
Each of the first and second network devices operates to receive a packet even in a VRRP (Virtual Router Redundancy Protocol) backup state,
The first VRID has a process for processing only the port number to be converted into an even number in the master network device,
The second VRID has a process of processing only the odd port number of the port conversion target in the master network device.
本発明は、上記のような構成及び動作とすることで、他方のルータのNAT/NAPT変換テーブルを全く意識することなく、NAT/NAPT変換を実行することができるという効果が得られる。 By adopting the configuration and operation as described above, the present invention provides an effect that NAT / NAPT conversion can be executed without being conscious of the NAT / NAPT conversion table of the other router.
次に、本発明の実施の形態について図面を参照して説明する。まず、本発明によるネットワークについて説明する。本発明によるネットワークは、NAT(Network Address Translation)/NAPT(Network Address Port Translation)を実行しているルータにおいて、VRRP(Virtual Router Redundancy Protocol)による負荷分散を可能にすることを特徴とする。 Next, embodiments of the present invention will be described with reference to the drawings. First, a network according to the present invention will be described. The network according to the present invention is characterized in that load distribution by VRRP (Virtual Router Redundancy Protocol) is enabled in a router executing NAT (Network Address Translation) / NAPT (Network Address Port Translation).
以下、本発明によるネットワークについて、2台のルータで負荷分散する場合を説明する。 Hereinafter, a case where the load distribution is performed by two routers in the network according to the present invention will be described.
本発明によるネットワークでは、2台のルータ各々において、LAN(Local Area Network)側とWAN(Wide Area Network)側とにそれぞれVRID(Virtual Router IDentifier)#1とVRID#2とを設定し、それぞれの側で同じ仮想IP(Internet Protocol)アドレスを設定する。つまり、2台のルータ各々においては、LAN側とWAN側とで同じ仮想IPアドレスが設定される。
In the network according to the present invention, VRID (Virtual Router IDentifier) # 1 and
VRRPは、バックアップ状態であってもパケットを受信するように動作を変更し、その代わりにVRID#1がマスタのルータは、ポート変換対象のポート番号(LAN側端末から見た送信元ポート番号)が偶数のものだけを処理するように動作を変更する。また、VRID#2がマスタのルータは、ポート変換対象のポート番号が奇数のものだけを処理するように動作を変更する。
VRRP changes its operation to receive packets even in the backup state. Instead, the router whose
本発明によるネットワークは、NAPTのポート変換も偶数、奇数を変更しないようにポート変換を行うことで、アドレスが1つしかなくてもポート番号が偶数か奇数かで処理されるルータが変更され、負荷分散が行われる。 The network according to the present invention performs port conversion so that the port conversion of NAPT does not change even number and odd number, so that even if there is only one address, the router to be processed is changed depending on whether the port number is even or odd, Load balancing is performed.
上記の条件は、任意に変更可能なため、3台以上やTCP(Transmission Control Protocol)/UDP(User Datagram Protocol)以外の通信がある環境での負荷分散も、上記と同様に可能である。 Since the above conditions can be arbitrarily changed, load distribution in an environment where there is communication other than three or more than TCP (Transmission Control Protocol) / UDP (User Datagram Protocol) is also possible as described above.
図1は本発明の第1の実施の形態によるネットワークの構成例を示すブロック図である。図1において、本発明の第1の実施の形態によるネットワークは、ルータ1,2と、プライベートネットワーク100(上記のLAN側)と、グローバルネットワーク200(上記のWAN側)とから構成されている。プライベートネットワーク100には端末3,4が属し、グローバルネットワーク200には端末5が属している。
FIG. 1 is a block diagram showing a configuration example of a network according to the first embodiment of the present invention. In FIG. 1, the network according to the first embodiment of the present invention includes
ルータ1,2は、グローバルアドレス側に共通のNAPTアドレスであるIPアドレスAを持ち、プライベートアドレス側にプライベート端末(端末3,4)のゲートウェイアドレスとなる共通のIPアドレスBを持っているものとする。
The
VRRPの設定は、以下のように設定される。まず、グローバル側のVRID#1及びVRID#2は、仮想IPアドレスがIPアドレスAで設定され、VRID#1はルータ1がマスタ、ルータ2がバックアップとなるように、VRID#2はルータ2がマスタ、ルータ1がバックアップとなるように設定される。
The VRRP is set as follows. First,
また、同様にプライベート側のVRID#1及びVRID#2は、仮想IPアドレスがIPアドレスBで設定され、VRID#1はルータ1がマスタ、ルータ2がバックアップとなるように、VRID#2はルータ2がマスタ、ルータ1がバックアップとなるように設定される。
Similarly,
アドレスが同じであることを除けば、広く知られているVRRPの負荷分散の設定であるので、マスタとバックアップとの設定方法についてはその説明を省略する。 Except for the fact that the addresses are the same, the VRRP load distribution setting is well known, and therefore the description of the setting method for the master and the backup is omitted.
複数のVRIDで同じアドレスを設定するため、本実施の形態におけるVRRP機能はいくつか動作を変更すべき点が生じる。まず、異なるVRIDに同じアドレスが付与できる必要があり、さらに仮想MAC(Media Access Control)アドレスに対するARP(Address Resolution Protocol)応答は、特定のVRIDだけ応答させるようにできることが好ましい。 Since the same address is set with a plurality of VRIDs, the VRRP function in the present embodiment has some points that should be changed. First, it is necessary to be able to assign the same address to different VRIDs, and it is preferable that an ARP (Address Resolution Protocol) response to a virtual MAC (Media Access Control) address can be made to respond only to a specific VRID.
但し、これらは必須用件ではなく、異なるVRIDに同じアドレスを付与できない場合は、ダミーの利用しない任意のアドレスを設定することにしても良い。この場合は、利用する仮想IPアドレスを持っているVRIDのみがARP応答をするので、特定のVRIDのみARP応答させる機能を用意する必要はない。 However, these are not essential requirements. If the same address cannot be assigned to different VRIDs, an arbitrary address not used as a dummy may be set. In this case, since only the VRID having the virtual IP address to be used makes an ARP response, it is not necessary to prepare a function for making an ARP response only to a specific VRID.
さらに、通常、VRRPは、仮想MACアドレスに対応するVRIDがマスタの場合のみパケットを受信するが、本実施の形態によるVRRP機能は、マスタ及びバックアップの条件ではなく、別のパケット受信条件が設定できなければならない。 Furthermore, VRRP normally receives a packet only when the VRID corresponding to the virtual MAC address is the master, but the VRRP function according to this embodiment can set different packet reception conditions instead of the master and backup conditions. There must be.
別の条件とは、VRID#1がマスタのルータにおいてポート変換対象のポート番号(LAN側端末から見た送信元ポート番号)が偶数のものだけを受信し、同様にVRID#2がマスタのルータにおいてポート変換対象のポート番号が奇数のものだけ受信する、というように動作させることである。
Another condition is that
図2は図1に示すルータ1の内部構成を示すブロック図である。図2において、ルータ1は、プライベート側インタフェース11と、グローバル側インタフェース12とを備えている。尚、図示していないが、図1に示すルータ2の内部構成は、図2に示すルータ1の内部構成と同様の構成となっている。
FIG. 2 is a block diagram showing an internal configuration of the
プライベート側インタフェース11は、受信部111と、送信部112と、受信判定部113と、プライベート側受信条件記憶部114と、VRRP状態記憶部115とを備えている。
The
グローバル側インタフェース12は、受信部121と、送信部122と、受信判定部123と、グローバル側受信条件記憶部124と、VRRP状態記憶部125と、NAPT変換記憶部126とを備え、受信部121及び送信部122には、それぞれNAPT処理部1211,1221を備えている。
The
受信判定部113,123は、本発明に特有のものである。受信判定部113は、プライベート側受信条件記憶部114とVRRP状態記憶部115とを参照する。受信判定部123は、グローバル側受信条件記憶部124とVRRP状態記憶部125とを参照する。
The
図3(a)は図2に示すプライベート側受信条件記憶部114の構成例を示す図であり、図3(b)は図2に示すグローバル側受信条件記憶部124の構成例を示す図である。
3A is a diagram illustrating a configuration example of the private-side reception
図3(a)において、プライベート側受信条件記憶部114は、受信パケット種別毎に処理条件を記憶している。TCPの場合は、送信元ポートが奇数であればVRID#1がマスタ、送信元ポートが偶数であればVRID#2がマスタであり、UDPの場合は、送信元ポートが奇数であればVRID#1がマスタ、送信元ポートが偶数であればVRID#2がマスタである。また、TCP/UDP以外のプロトコルの場合は、VRID#1がマスタである。
In FIG. 3A, the private-side reception
図3(b)において、グローバル側受信条件記憶部124は、受信パケット種別毎に処理条件を記憶している。TCPの場合は、送信先ポートが奇数であればVRID#1がマスタ、送信先ポートが偶数であればVRID#2がマスタであり、UDPの場合は、送信先ポートが奇数であればVRID#1がマスタ、送信先ポートが偶数であればVRID#2がマスタである。TCP/UDP以外のプロトコルの場合は、VRID#1がマスタである。
In FIG. 3B, the global-side reception
受信判定部113は、上記のプライベート側受信条件記憶部114を参照して動作を行い、受信判定部123は、上記のグローバル側受信条件記憶部124を参照して動作を行う。
The
また、本実施の形態によるNAT/NAPT機能にも必要な条件がある。図2に示す通り、NAPT処理部1211,1221は、それぞれ受信部121及び送信部122で動作しており、NAPT変換記憶部126を参照して動作する。この構成は通常のNAPTのものである。
There are also necessary conditions for the NAT / NAPT function according to the present embodiment. As shown in FIG. 2, the
但し、NAPTは、ポート変換の際に、変換後のポート番号も、図3に示すVRRPの受信条件を維持させなければならない。具体的には、図3に示す例の場合、NAPTが偶数ポートを変換する場合は変換後のポート番号も必ず偶数になるように、奇数ポートを変換する場合は必ず奇数となるようにする必要がある。これは、同一セッションのパケットが必ず同じルータを通るようにするための必須の条件である。 However, the NAPT must maintain the VRRP reception conditions shown in FIG. 3 for the port number after conversion at the time of port conversion. Specifically, in the example shown in FIG. 3, it is necessary that the port number after conversion is always an even number when NAPT converts an even number port, and an odd number when converting an odd number port. There is. This is an essential condition for ensuring that packets of the same session pass through the same router.
本実施の形態では、VRRP機能とNAT/NAPT機能とに上記の特徴を付与することで、NAPT環境であってもVRRPによる負荷分散が可能となる。尚、NAT/NAPT及びVRRPの動作については、当業者にとってよく知られており、詳細な構成や動作の説明は省略する。 In the present embodiment, by providing the above features to the VRRP function and the NAT / NAPT function, load distribution by VRRP is possible even in a NAPT environment. The operations of NAT / NAPT and VRRP are well known to those skilled in the art, and detailed description of the configuration and operation will be omitted.
図4は図1に示す端末3から送信されるパケットのヘッダの一例を示す図であり、図5は図1に示すルータ1での変換後のパケットのヘッダの一例を示す図であり、図6は図5に示すパケットに対する応答パケットのヘッダの一例を示す図であり、図7は図1に示すルータ1での変換後の応答パケットのヘッダの一例を示す図である。これら図1〜図7を参照してパケットが負荷分散される例について説明する。
4 is a diagram showing an example of a header of a packet transmitted from the terminal 3 shown in FIG. 1, and FIG. 5 is a diagram showing an example of a header of a packet after conversion by the
図1に示すルータ1,2は、グローバルネットワーク200側とプライベートネットワーク100側ともにVRID#1,VRID#2を設定する。
The
グローバルアドレス側のVRID#1は、仮想IPアドレスAと、VRIDから決定される仮想MACアドレスCとが設定される。グローバルアドレス側のVRID#2は、仮想IPアドレスAと、VRIDから決定される仮想MACアドレスDとが設定される。
通常のVRRPは、異なるVRRPで同じ仮想IPアドレスを設定して正しく動作させることはできない(ARP解決の際に応答するMACアドレスが決定できないため)が、ここでは設定可能としておく必要がある。1つの仮想IPアドレスAに複数の仮想MACアドレスC,Dを設定した場合にARP応答が1つのMACアドレスになるようにするためには、例えば特定のVRID以外のARP応答動作を止めれば良い。ここでは、ARP応答をVRID#1のマスタのルータ1のみが行うものとする。
Ordinary VRRP cannot be operated correctly by setting the same virtual IP address with different VRRPs (because the MAC address that responds when ARP is resolved cannot be determined), but it needs to be settable here. In order to make an ARP response become one MAC address when a plurality of virtual MAC addresses C and D are set for one virtual IP address A, for example, an ARP response operation other than a specific VRID may be stopped. Here, it is assumed that only the
同様に、プライベートアドレス側のVRID#1は、仮想IPアドレスBと、VRIDから決定される仮想MACアドレスEとが設定される。プライベートアドレス側のVRID#2は、仮想IPアドレスBと、VRIDから決定される仮想MACアドレスFとが設定される。こちらも、ARP応答をVRID#1のマスタのルータ1のみが行うものとする。
Similarly,
また、仮想IPアドレスAは、NAPTアドレスとして利用する。ルータ1とルータ2とで同じNAPTアドレスが設定されることになる。
The virtual IP address A is used as a NAPT address. The same NAPT address is set in the
端末3は、IPアドレスaを持ち、デフォルトゲートウェイにIPアドレスBが設定されている。端末4は、IPアドレスbを持ち、デフォルトゲートウェイにIPアドレスBが設定されている。端末5は、IPアドレスcを持ち、デフォルトゲートウェイにIPアドレスAが設定されている。
The terminal 3 has an IP address a, and the IP address B is set as the default gateway. The
ここで、端末3から端末5に通信を行う場合について述べる。プロトコルはTCPでもUDPでも良い。送信先MACアドレスは、端末3のデフォルトゲートウェイとして設定されているIPアドレスBに対するARP解決で決定される。IPアドレスBに対するARPの応答は、上述した通り、VRID#1のマスタルータが行うと決めているので、ルータ1が仮想MACアドレスEを応答する。
Here, a case where communication is performed from the terminal 3 to the terminal 5 will be described. The protocol may be TCP or UDP. The destination MAC address is determined by ARP resolution for the IP address B set as the default gateway of the terminal 3. Since the ARP response to the IP address B is determined to be performed by the master router of
端末3が端末5宛てに送信したパケットは、送信先のMACアドレスが仮想MACアドレスEになる。このため、通常のVRRPでは、仮想MACアドレスEを持つVRID#1がマスタのルータ1でのみ受信処理されるが、本実施の形態では、このパケットをVRID#1がマスタかバックアップかではなく、ルータ1及びルータ2ともに受信部111でパケットを受信し、受信判定部113がプライベート側受信条件記憶部114及びVRRP状態記憶部115の情報[図3(a)に示す条件]を参照して受信処理を継続するか廃棄するかを決定する。
In the packet transmitted from the terminal 3 to the terminal 5, the destination MAC address is the virtual MAC address E. Therefore, in normal VRRP,
ここでは、図4に示すように、送信元ポート番号「5001」と奇数のパケットを送信しているため、図3に示す条件により、このパケットはVRID#1がマスタのルータ1でのみ受信処理される。ルータ2では、VRID#1がマスタではないので、パケットを廃棄して何も処理を行わない。
In this example, as shown in FIG. 4, since the transmission source port number “5001” and an odd-numbered packet are transmitted, this packet is received only by the
ルータ1は、パケットを通常どおり処理し、グローバル側インタフェース12でNAPT処理部1221がNAPT変換してパケットを送信する。その時の変換後のパケットは、図5に示すようになるものとする。NAT/NAPT変換の詳細な説明については省略するが、本実施の形態によるNAPT処理部1221は、ポート番号を変換する必要がある場合、ルータ1では必ずポート番号が奇数になるように処理する必要がある(ここでは、仮に「50001」としている)。
The
これは、ルータ1で変換したパケットの応答パケット(図6に示すヘッダ参照)が必ずNAPT処理したルータに戻ってくるようにするためである。そして、ルータ1で図4に示すヘッダのパケットを図5に示すヘッダのパケットに変換した情報は、ルータ1のNAPT変換記憶部126に記録される。
This is to ensure that the response packet of the packet converted by the router 1 (see the header shown in FIG. 6) always returns to the NAPT-processed router. Information obtained by converting the header packet shown in FIG. 4 into the header packet shown in FIG. 5 by the
NAPT変換された図5に示すヘッダのパケットは、通常どおり、端末5に送信され、端末5は図6に示すヘッダの応答パケットを生成して送信する。 The NAPT-converted header packet shown in FIG. 5 is transmitted to the terminal 5 as usual, and the terminal 5 generates and transmits a header response packet shown in FIG.
この図6に示すヘッダの送信先MACアドレスは、上述したプライベート側と同様のARP解決によりVRID#1の仮想MACアドレスCとなる。グローバル側インタフェース12でもプライベート側インタフェース11の場合と同様に、ルータ1及びルータ2ともに応答パケットを受信し、それぞれの受信判定部123がグローバル側受信条件記憶部124及びVRRP状態記憶部125の情報[図3(b)に示す条件]を参照して受信処理を継続するか、廃棄するかを決定する。
The transmission destination MAC address of the header shown in FIG. 6 becomes the virtual MAC address C of
図3に示す条件はNAPTに使用されていないプライベートネットワーク側のVRRPは送信元ポート番号を、NAPTに使用されているグローバルネットワーク側のVRRPは送信先ポート番号で、処理するルータが決定されることに注意する。 The condition shown in FIG. 3 is that VRRP on the private network side not used for NAPT is the source port number, and VRRP on the global network side used for NAPT is the destination port number, and the router to be processed is determined. Be careful.
図6に示すヘッダの応答パケットをNAPT変換できるのは、NAPT記憶部126に変換情報が記憶されているルータ1である。このため、端末5が送信する応答パケットは、送信パケットと同じルータに処理させる必要があるが、どちらもNAPTで変換に利用されるポート番号となっており、上述したように、NAPTがポート番号の偶数奇数の条件を保存しておくことで、これを実現することができる。
It is the
図6に示すヘッダの応答パケットの送信先ポート番号は「50001」と奇数のため、ルータ2では何も処理を行わない。ルータ1は、応答パケットを通常どおり処理し、NAPT処理部1221がNAPT記憶部126を参照してNAPT変換を行う。この変換は、通常のNAPT変換であるため、その説明は省略する。変換後のパケットのヘッダは、図7に示す通りである。
Since the transmission destination port number of the response packet in the header shown in FIG. 6 is an odd number “50001”, the
また、端末3から送信したパケットの送信元ポート番号が偶数だった場合、端末5宛ての通信がルータ2を通り、端末5からの応答パケットもルータ2を通ることは、上述した送信元ポート番号が奇数だった場合の説明から明らかである。
Further, when the transmission source port number of the packet transmitted from the terminal 3 is an even number, the communication addressed to the terminal 5 passes through the
これにより、NAPT変換に利用されるポート番号が奇数であればルータ1が、偶数であればルータ2が処理し、端末3と端末5との通信は成立する。ポート番号が偶数か奇数かで処理するルータが切り替わり、奇数ポートのみを処理するルータは、偶数ポートの変換テーブルを持つ必要がないことから、負荷分散が実現されている。
Thereby, if the port number used for the NAPT conversion is an odd number, the
尚、ルータ1やルータ2が障害となった場合は、他方がVRID#1,VRID#2ともにマスタルータとなるので、一方のみでも継続して変換処理は行うことができる。但し、障害発生時に通信していたセッションは、この方式では通信継続が保証されないので、注意が必要である。
If
このように、本実施の形態では、以下に記載するような効果を奏する。通常、NAPTの負荷分散では、複数のルータの変換テーブルが競合しないように、互いの変換テーブルを監視したり、同一の変換テーブルを参照したりする必要があるが、本実施の形態では、予め処理するパケットを固定的な条件で分離しているため、他方のルータのNAT/NAPT変換テーブルを全く意識することなく、NAT/NAPT変換を実行することができる。このため、安価なルータでも容易に負荷分散を実現することが可能となる。 As described above, the present embodiment has the following effects. Normally, in NAPT load distribution, it is necessary to monitor each other's conversion tables or refer to the same conversion table so that the conversion tables of a plurality of routers do not compete with each other. Since packets to be processed are separated under a fixed condition, NAT / NAPT conversion can be executed without being aware of the NAT / NAPT conversion table of the other router. For this reason, it is possible to easily realize load distribution even with an inexpensive router.
本発明は、上記の説明のように、2台のルータ1,2の場合について述べているが、n台(nは3以上の整数)のルータで実施した場合も、ポート番号がnで割った余りに応じて処理を行う等のルールに変更すれば、上記の実施の形態と同様に対応可能である。
In the present invention, as described above, the case of two
また、本発明は、プライベートネットワーク側の端末から見て送信元ポート番号を利用して負荷分散を実行しているが、送信先ポートや送信先アドレスを条件に含めても良い。送信元ポートを条件に含めない場合は、NAPTの変換ポートに特殊な条件(偶数/奇数を保存する等)を付与する必要はないが、送信元ポート利用よりも負荷分散に偏りが生じやすい。 In the present invention, load distribution is performed using a source port number when viewed from a terminal on the private network side. However, a destination port and a destination address may be included in the condition. When the source port is not included in the condition, it is not necessary to give a special condition (such as storing even / odd number) to the NAPT conversion port, but the load distribution is more likely to be biased than when the source port is used.
1,2 ルータ
3〜5 端末
11 プライベート側インタフェース
12 グローバル側インタフェース
100 プライベートネットワーク
111,121 受信部
112,122 送信部
113,123 受信判定部
114 プライベート側受信条件記憶部
115,125 VRRP状態記憶部
124 グローバル側受信条件記憶部
126 NAPT変換記憶部
200 グローバルネットワーク
1211,1221 NAPT処理部
1, 2 routers
3-5 terminals
11 Private side interface
12 Global interface
100
114 Private-side reception
124 Global-side reception condition storage unit
126 NAPT conversion storage unit
200
Claims (15)
前記第1及び第2のネットワーク装置に対して、前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
前記第1及び第2のネットワーク装置各々において、VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
ポート変換対象のポート番号が偶数のパケットだけを処理する手段を前記第1のVRIDがマスタのネットワーク装置に有し、
前記ポート変換対象のポート番号が奇数のパケットだけを処理する手段を前記第2のVRIDがマスタのネットワーク装置に有することを特徴とするネットワーク。 A network including first and second network devices that connect between a first network and a second network and execute NAT (Network Address Translation) / NAPT (Network Address Port Translation),
For the first and second network devices, different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the network side, and for each of the first and second VRIDs on the second network side. Setting a second virtual IP address different from and common to the first virtual IP address;
Each of the first and second network devices operates to receive a packet even in a VRRP (Virtual Router Redundancy Protocol) backup state,
The first VRID has a means for processing only a packet having an even port number to be port-converted in the master network device,
The network characterized in that the second VRID has a means for processing only a packet having an odd port number for port conversion in the master network device.
前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
前記第1のVRIDがマスタの場合にポート変換対象のポート番号が偶数のものだけを処理する手段と、前記第2のVRIDがマスタの場合に前記ポート変換対象のポート番号が奇数のものだけを処理する手段とのうちの少なくとも一方を有することを特徴とするネットワーク装置。 A network device that connects between a first network and a second network and executes NAT (Network Address Translation) / NAPT (Network Address Port Translation),
Different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively, and each of the first and second VRIDs is set on the first network side. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the second network side, which is different from and common to the first virtual IP address. Set the second virtual IP address,
It operates to receive packets even in the VRRP (Virtual Router Redundancy Protocol) backup state,
When the first VRID is a master, only the port conversion target port number is processed, and when the second VRID is the master, only the port conversion target port number is an odd number. A network apparatus comprising at least one of processing means.
前記第1及び第2のネットワーク装置に対して、前記第1のネットワーク側と前記第2のネットワーク側とにそれぞれ異なる第1及び第2のVRID(Virtual Router IDentifier)を設定し、前記第1のネットワーク側において前記第1及び第2のVRID各々に対して共通の第1の仮想IP(Internet Protocol)アドレスを設定し、前記第2のネットワーク側において前記第1及び第2のVRID各々に対して前記第1の仮想IPアドレスとは異なりかつ共通の第2の仮想IPアドレスを設定し、
前記第1及び第2のネットワーク装置各々において、VRRP(Virtual Router Redundancy Protocol)のバックアップ状態であってもパケットを受信するように動作し、
ポート変換対象のポート番号が偶数のものだけを処理する処理を前記第1のVRIDがマスタのネットワーク装置に有し、
前記ポート変換対象のポート番号が奇数のものだけを処理する処理を前記第2のVRIDがマスタのネットワーク装置に有することを特徴とする負荷分散方法。 A load distribution method used for a network including first and second network devices that connect between a first network and a second network and execute NAT (Network Address Translation) / NAPT (Network Address Port Translation),
For the first and second network devices, different first and second VRIDs (Virtual Router IDentifiers) are set on the first network side and the second network side, respectively. A common first virtual IP (Internet Protocol) address is set for each of the first and second VRIDs on the network side, and for each of the first and second VRIDs on the second network side. Setting a second virtual IP address different from and common to the first virtual IP address;
Each of the first and second network devices operates to receive a packet even in a VRRP (Virtual Router Redundancy Protocol) backup state,
The first VRID has a process for processing only an even number port conversion target port number in the master network device,
The load distribution method, wherein the second VRID has a process for processing only an odd number of port numbers to be port-converted in a master network device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009127119A JP5169992B2 (en) | 2009-05-27 | 2009-05-27 | Network, network device, and load balancing method used therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009127119A JP5169992B2 (en) | 2009-05-27 | 2009-05-27 | Network, network device, and load balancing method used therefor |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2010278584A JP2010278584A (en) | 2010-12-09 |
JP5169992B2 true JP5169992B2 (en) | 2013-03-27 |
Family
ID=43425159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009127119A Active JP5169992B2 (en) | 2009-05-27 | 2009-05-27 | Network, network device, and load balancing method used therefor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5169992B2 (en) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5589866B2 (en) | 2011-01-24 | 2014-09-17 | 富士通株式会社 | Address translation method, address translation proxy response method, address translation device, and address translation proxy response device |
JP5678769B2 (en) * | 2011-03-30 | 2015-03-04 | 沖電気工業株式会社 | Communication system, network address processing device, path control unit, and packet processing program for network address processing device |
JP5817299B2 (en) | 2011-08-01 | 2015-11-18 | 富士通株式会社 | Address translation apparatus, communication system, and address translation method |
JP5741312B2 (en) * | 2011-08-12 | 2015-07-01 | 富士通株式会社 | Address translation device, communication system, address translation program, and address translation method |
CN104247342A (en) * | 2012-03-30 | 2014-12-24 | 日本电气株式会社 | Network appliance redundancy system, control device, network appliance redundancy method and program |
JP5980724B2 (en) * | 2013-05-24 | 2016-08-31 | 日本電信電話株式会社 | Network device, relay management method, relay management program, and communication system |
JP6571400B2 (en) * | 2015-06-05 | 2019-09-04 | Necプラットフォームズ株式会社 | Router device, redundancy method and redundancy program |
CN109547354B (en) * | 2018-11-21 | 2022-08-30 | 广州市百果园信息技术有限公司 | Load balancing method, device, system, core layer switch and storage medium |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3809882B2 (en) * | 1997-03-14 | 2006-08-16 | 株式会社日立コミュニケーションテクノロジー | Communication system between LANs |
JP2000209278A (en) * | 1999-01-12 | 2000-07-28 | Fujitsu Ltd | Router and packet relay system using the router |
JP3956685B2 (en) * | 2001-05-31 | 2007-08-08 | 古河電気工業株式会社 | Network connection method, virtual network connection device, and network connection system using the device |
JP2003023444A (en) * | 2001-07-06 | 2003-01-24 | Fujitsu Ltd | Dynamic load distribution system utilizing virtual router |
JP3637893B2 (en) * | 2001-11-26 | 2005-04-13 | 日本電気株式会社 | Separation method and separation method for network address translation device |
JP2003163689A (en) * | 2001-11-28 | 2003-06-06 | Hitachi Ltd | Network linkage information processing system and method for moving access between load distributors |
-
2009
- 2009-05-27 JP JP2009127119A patent/JP5169992B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2010278584A (en) | 2010-12-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5169992B2 (en) | Network, network device, and load balancing method used therefor | |
US9923812B2 (en) | Triple-tier anycast addressing | |
US9363167B2 (en) | Link aggregation based on port and protocol combination | |
CN103155500B (en) | For the method and system of the stateless load balance of network service flow | |
US8166187B2 (en) | Distributed IP gateway based on sharing a MAC address and IP address concurrently between a first network switching device and a second network switching device | |
US11436111B2 (en) | Highly-available distributed network address translation (NAT) architecture with failover solutions | |
US8300647B2 (en) | Intelligent load balancing and failover of network traffic | |
US9553805B2 (en) | Method, device, and system for quickly informing CGN exception | |
CN108924272B (en) | Port resource allocation method and device | |
EP2087711A1 (en) | Method and apparatus for ip network interfacing | |
US9401865B2 (en) | Network appliance redundancy system, control apparatus, network appliance redundancy method and program | |
US20160173334A1 (en) | Configuration of forwarding rules using the address resolution protocol | |
US7003581B1 (en) | System and method for improved load balancing and high availability in a data processing system having an IP host with a MARP layer | |
US10237157B1 (en) | Managing host failures in a traffic forwarding system | |
CN111182022B (en) | Data transmission method and device, storage medium and electronic device | |
US20080310319A1 (en) | Server, network system, and network connection method used for the same | |
CN105847143B (en) | Load balancing method and system based on VRRP | |
US7535902B2 (en) | Traffic distribution device, traffic distribution method and packet relay method | |
US9838302B1 (en) | Managing loss of network connectivity in traffic forwarding systems | |
JP4718638B2 (en) | TCP / IP-based address changing method and apparatus | |
KR101356152B1 (en) | Network Address Translation Device | |
US20200274791A1 (en) | Multi-vrf and multi-service insertion on edge gateway virtual machines | |
US10298458B2 (en) | Distributed system partition | |
JP2014195164A (en) | Packet transfer device, delivery system, packet transfer method, program, and recording medium | |
CN117857257A (en) | Method and system for intercommunication between cloud virtual machine and traditional network |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20110908 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120803 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120918 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20121112 |
|
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: 20121204 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20121217 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5169992 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
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 |