広告
広告
https://www.7key.jp/rfc/1883/rfc1883_44.html#source
https://www.7key.jp/rfc/1883/rfc1883_44.html#translation
The Routing header is used by an IPv6 source to list one or more intermediate nodes to be "visited" on the way to a packet's destination. This function is very similar to IPv4's Source Route options. The Routing header is identified by a Next Header value of 43 in the immediately preceding header, and has the following format:
ルーティングヘッダは、パケットが宛先に届くまでの経路で"訪れる"1つ以上の中間ノードの一覧を作成するために、IPv6発信元によって用いられるヘッダである。この機能は、IPv4の発信経路オプションに酷似している。ルーティングヘッダはすぐ前のヘッダのネクストヘッダ値"43"によって識別され、下記のフォーマットである:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type | Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | . . . type-specific data . . . | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Next Header 8-bit selector. Identifies the type of header immediately following the Routing header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.]. Hdr Ext Len 8-bit unsigned integer. Length of the Routing header in 8-octet units, not including the first 8 octets. Routing Type 8-bit identifier of a particular Routing header variant. Segments Left 8-bit unsigned integer. Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination. type-specific data Variable-length field, of format determined by the Routing Type, and of length such that the complete Routing header is an integer multiple of 8 octets long.
If, while processing a received packet, a node encounters a Routing header with an unrecognized Routing Type value, the required behavior of the node depends on the value of the Segments Left field, as follows:
受信パケットの処理中に、認められないルーティングタイプの値を採るルーティングヘッダをノードが受け取ったのであれば、ノードに求められる処理動作は残りのセグメント数フィールドの値に以下のように依存する。
If Segments Left is zero, the node must ignore the Routing header and proceed to process the next header in the packet, whose type is identified by the Next Header field in the Routing header.
残りのセグメント数フィールドの値がゼロであれば、ノードはそのルーティングヘッダを無視し、ルーティングヘッダのネクストヘッダフィールドによって明示される次のヘッダの処理を続けなければならない。
If Segments Left is non-zero, the node must discard the packet and send an ICMP Parameter Problem, Code 0, message to the packet's Source Address, pointing to the unrecognized Routing Type.
残りのセグメント数フィールドの値がゼロでなければ、ノードはそのパケットを破棄し、認められないルーティングタイプを含む、コード"0"を示すICMP不正パラメータメッセージがパケットの発信元アドレスに送信されなければならない。
The Type 0 Routing header has the following format:
タイプが"0"のルーティングヘッダは以下のフォーマットである:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Next Header | Hdr Ext Len | Routing Type=0| Segments Left | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Reserved | Strict/Loose Bit Map | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[1] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[2] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ . . . . . . . . . +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | | + + | | + Address[n] + | | + + | | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Next Header 8-bit selector. Identifies the type of header immediately following the Routing header. Uses the same values as the IPv4 Protocol field [RFC-1700 et seq.]. Hdr Ext Len 8-bit unsigned integer. Length of the Routing header in 8-octet units, not including the first 8 octets. For the Type 0 Routing header, Hdr Ext Len is equal to two times the number of addresses in the header, and must be an even number less than or equal to 46. Routing Type 0. Segments Left 8-bit unsigned integer. Number of route segments remaining, i.e., number of explicitly listed intermediate nodes still to be visited before reaching the final destination. Maximum legal value = 23. Reserved 8-bit reserved field. Initialized to zero for transmission; ignored on reception. Strict/Loose Bit Map 24-bit bit-map, numbered 0 to 23, left-to-right. Indicates, for each segment of the route, whether or not the next destination address must be a neighbor of the preceding address: 1 means strict (must be a neighbor), 0 means loose (need not be a neighbor). Address[1..n] Vector of 128-bit addresses, numbered 1 to n.
0
Multicast addresses must not appear in a Routing header of Type 0, or in the IPv6 Destination Address field of a packet carrying a Routing header of Type 0.
タイプ"0"のルーティングヘッダ内もしくはタイプ"0"のルーティングヘッダを持つパケットのIPv6宛先アドレスフィールドに、マルチキャストアドレスを用いてはならない。
If bit number 0 of the Strict/Loose Bit Map has value 1, the Destination Address field of the IPv6 header in the original packet must identify a neighbor of the originating node. If bit number 0 has value 0, the originator may use any legal, non-multicast address as the initial Destination Address.
厳密/自由のビットマップフィールドの先頭ビットが1であれば、元のパケット内のIPv6ヘッダの宛先アドレスフィールドは発信元ノードの隣接ノードを示さなければならない。先頭ビットが0であれば、発信元ノードは正当でありマルチキャストではないアドレスを宛先アドレスとして用いることができる。
Bits numbered greater than n, where n is the number of addresses in the Routing header, must be set to 0 by the originator and ignored by receivers.
ルーティングヘッダ内のアドレスフィールド数を示す"n"がビット数よりも大きい場合、そのビットは発信元によって"0"がセットされなければならないし、受信側はこれを無視しなければならない。
A Routing header is not examined or processed until it reaches the node identified in the Destination Address field of the IPv6 header. In that node, dispatching on the Next Header field of the immediately preceding header causes the Routing header module to be invoked, which, in the case of Routing Type 0, performs the following algorithm:
ルーティングヘッダは、IPv6ヘッダの宛先アドレスフィールドとして識別されるノードに達するまで調べられず処理されない。ネクストヘッダの直前のヘッダのフィールドを処理すると、そのノードではルーティングヘッダモジュールが起動される。その場合、ルーティングタイプが"0"の例を下記のアルゴリズムで示す:
if Segments Left = 0 { proceed to process the next header in the packet, whose type is identified by the Next Header field in the Routing header } else if Hdr Ext Len is odd or greater than 46 { send an ICMP Parameter Problem, Code 0, message to the Source Address, pointing to the Hdr Ext Len field, and discard the packet } else { compute n, the number of addresses in the Routing header, by dividing Hdr Ext Len by 2 if Segments Left is greater than n { send an ICMP Parameter Problem, Code 0, message to the Source Address, pointing to the Segments Left field, and discard the packet } else { decrement Segments Left by 1; compute i, the index of the next address to be visited in the address vector, by subtracting Segments Left from n if Address [i] or the IPv6 Destination Address is multicast { discard the packet } else { swap the IPv6 Destination Address and Address[i] if bit i of the Strict/Loose Bit map has value 1 and the new Destination Address is not the address of a neighbor of this node { send an ICMP Destination Unreachable -- Not a Neighbor message to the Source Address and discard the packet } else if the IPv6 Hop Limit is less than or equal to 1 { send an ICMP Time Exceeded -- Hop Limit Exceeded in Transit message to the Source Address and discard the packet } else { decrement the Hop Limit by 1 resubmit the packet to the IPv6 module for transmission to the new destination } } } }
if 残りのセグメント数が"0"であれば { タイプがルーティングヘッダ内のネクストヘッダで識別されるパケ ットの次のヘッダの処理を始めよ } else if 拡張ヘッダ長が奇数か46より大きければ { 拡張ヘッダ長フィールドを示し、ICMP不正パラメータを表すコード "0"メッセージを発信元アドレスに送信し、そしてそのパケットを 破棄せよ } else { 拡張ヘッダ長を2で除算し、ルーティングヘッダ内のアドレスフィ ールド数を表す変数 n を算出せよ if 残りのセグメント数が n よりも大きければ { 残りのセグメント数フィールドを示し、ICMP不正パラメータを 表すコード"0"メッセージを発信元アドレスに送信し、そして そのパケットを破棄せよ } else { 残りのセグメント数から1引きなさい; n から残りのセグメント数を引くことにより、アドレスベクト ルで訪れられる次のアドレスインデックス i を算出せよ if アドレス[i] 又はIPv6宛先アドレスがマルチキャストなら ば { そのパケットを破棄せよ } else { IPv6宛先アドレスとアドレス[i]を交換せよ if 厳密/自由ビットマップの i ビットが"1"であり、新し 宛先アドレスがこのノードの隣接ノードのアドレスで ないのであれば { 隣接ノードではなく、宛先まで到達不可能な旨を示す ICMPメッセージを発信元アドレスに送信し、そのパケ ットを破棄せよ } else if IPv6 Hop Limitが1以下であれば { 転送中にホップ限界を超えた旨を示すICMP時間超過メ ッセージを発信元アドレスに送信し、そのパケットを 破棄せよ。 else { Hop Limit から1を引きなさい 新しい宛先に送信するため、IPv6モジュールにパケットを渡せ } } } }
As an example of the effects of the above algorithm, consider the case of a source node S sending a packet to destination node D, using a Routing header to cause the packet to be routed via intermediate nodes I1, I2, and I3. The values of the relevant IPv6 header and Routing header fields on each segment of the delivery path would be as follows:
上記アルゴリズムの実例として、発信元ノード"S"がパケットを宛先ノード"D"に送り、中間ノード"I1"、"I2"、"I3"を経由するためにルーティングヘッダを用いている例について考察する。配送経路上のそれぞれのセグメントで適切なIPv6ヘッダとルーティングヘッダフィールドの値は下記となる:
As the packet travels from S to I1: Source Address = S Hdr Ext Len = 6 Destination Address = I1 Segments Left = 3 Address[1] = I2 (if bit 0 of the Bit Map is 1, Address[2] = I3 S and I1 must be neighbors; Address[3] = D this is checked by S)
(ビットマップの先頭ビットが1の場合、"S"と"I1"は隣接ノードであり、これは"S"によって確認される)
As the packet travels from I1 to I2: Source Address = S Hdr Ext Len = 6 Destination Address = I2 Segments Left = 2 Address[1] = I1 (if bit 1 of the Bit Map is 1, Address[2] = I3 I1 and I2 must be neighbors; Address[3] = D this is checked by I1)
(ビットマップのビット1が1の場合、"I1"と"I2"は隣接ノードであり、これは"I1"によって確認される)
As the packet travels from I2 to I3: Source Address = S Hdr Ext Len = 6 Destination Address = I3 Segments Left = 1 Address[1] = I1 (if bit 2 of the Bit Map is 1, Address[2] = I2 I2 and I3 must be neighbors; Address[3] = D this is checked by I2)
(ビットマップのビット2が1の場合、"I2"と"I3"は隣接ノードであり、これは"I2"によって確認される)
As the packet travels from I3 to D: Source Address = S Hdr Ext Len = 6 Destination Address = D Segments Left = 0 Address[1] = I1 (if bit 3 of the Bit Map is 1, Address[2] = I2 I3 and D must be neighbors; Address[3] = I3 this is checked by I3)
(ビットマップのビット3が1の場合、"I3"と"D"は隣接ノードであり、これは"I3"によって確認される)
広告