FutureNet

NXR,VXRシリーズ

REST-API編

3. インタフェース設定

3-8. MAPインタフェース設定(map-interface)

 処理概要

MAPインタフェース設定に関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
map interface v2 /api/v2/map-interface
/api/v2/map-interface/map
/api/v2/map-interface/map/{NUM}
/api/v2/map-interface/rule-list
/api/v2/map-interface/rule-list/rule
/api/v2/map-interface/rule-list/rule/{NAME}

凡例:

● : 読み取り専用ユーザも含めアクセス可

〇 : 読み取り専用ユーザはアクセス不可

- : 未対応

 

実行例

MAPインタフェース設定の作成

メソッド URI
POST /api/v2/map-interface/map
JSON
リクエスト

POST /api/v2/map-interface/map
Content-Type: application/json

 

{
"map": {
"number": 0,
"ipv4": {
"tcp": {
"adjust-mss": "enable",
"mss": "auto"
},
"spi": "enable"
},
"tunnel-parameter": {
"mode": "ipipv6",
"map": "v6plus",
"encap-limit": "none"
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/map-interface/map
Content-Type: application/xml

 

<map-interface>
<map>
<number>0</number>
<ipv4>
<tcp>
<adjust-mss>enable</adjust-mss>
<mss>auto</mss>
</tcp>
<spi>enable</spi>
</ipv4>
<tunnel-parameter>
<mode>ipipv6</mode>
<map>v6plus</map>
<encap-limit>none</encap-limit>
</tunnel-parameter>
</map>
</map-interface>

 

レスポンス

201 Created

 

全MAPインタフェース設定の取得

メソッド URI
GET /api/v2/map-interface/map
JSON
リクエスト

GET /api/v2/map-interface/map
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"map": [
{
"number": 0,
"ipv4": {
"tcp": {
"adjust-mss": "enable",
"mss": "auto"
},
"spi": "enable"
},
"tunnel-parameter": {
"mode": "ipipv6",
"map": "v6plus",
"encap-limit": "none"
}
},
{
"number": 1,
・・・・・

 

XML
リクエスト

GET /api/v2/map-interface/map
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<map-interface>
<map>
<number>0</number>
<ipv4>
<tcp>
<adjust-mss>enable</adjust-mss>
<mss>auto</mss>
</tcp>
<spi>enable</spi>
</ipv4>
<tunnel-parameter>
<mode>ipipv6</mode>
<map>v6plus</map>
<encap-limit>none</encap-limit>
</tunnel-parameter>
</map>
<map>
<number>1</number>
・・・・・

 

TEXT/PLAIN
リクエスト

GET /api/v2/map-interface/map
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

interface map 0
no ip address
ip tcp adjust-mss auto
ip spi-filter
tunnel mode ipipv6 mape-rule v6plus
no tunnel encap-limit
interface map 1
・・・・・

 

MAPインタフェース設定の更新

メソッド URI
PUT /api/v2/map-interface/map/{NUM}
JSON
リクエスト

PUT /api/v2/map-interface/map/0
Content-Type: application/json

 

{
"number": 0,
"ipv4": {
"ipv4-address": {
"address": "mape-rule"
},
"tcp": {
"adjust-mss": "enable",
"mss": "auto"
},
"spi": "enable"
},
"tunnel-parameter": {
"mode": "ipipv6",
"map": "v6plus",
"encap-limit": "none"
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/map-interface/map/0
Content-Type: application/xml

 

<map>
<number>0</number>
<ipv4>
<ipv4-address>
<address>mape-rule</address>
</ipv4-address>
<tcp>
<adjust-mss>enable</adjust-mss>
<mss>auto</mss>
</tcp>
<spi>enable</spi>
</ipv4>
<tunnel-parameter>
<mode>ipipv6</mode>
<map>v6plus</map>
<encap-limit>none</encap-limit>
</tunnel-parameter>
</map>

 

レスポンス

204 No content

 

MAPインタフェース設定の取得

メソッド URI
GET /api/v2/map-interface/map/{NUM}
JSON
リクエスト

GET /api/v2/map-interface/map/0
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"number": 0,
"ipv4": {
"ipv4-address": {
"address": "mape-rule"
},
"tcp": {
"adjust-mss": "enable",
"mss": "auto"
},
"spi": "enable"
},
"tunnel-parameter": {
"mode": "ipipv6",
"map": "v6plus",
"encap-limit": "none"
}
}

 

XML
リクエスト

GET /api/v2/map-interface/map/0
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<map>
<number>0</number>
<ipv4>
<ipv4-address>
<address>mape-rule</address>
</ipv4-address>
<tcp>
<adjust-mss>enable</adjust-mss>
<mss>auto</mss>
</tcp>
<spi>enable</spi>
</ipv4>
<tunnel-parameter>
<mode>ipipv6</mode>
<map>v6plus</map>
<encap-limit>none</encap-limit>
</tunnel-parameter>
</map>

 

TEXT/PLAIN
リクエスト

GET /api/v2/map-interface/map/0
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

interface map 0
ip address mape-rule
ip tcp adjust-mss auto
ip spi-filter
tunnel mode ipipv6 mape-rule v6plus
no tunnel encap-limit

 

MAPインタフェース設定の削除

メソッド URI
DELETE /api/v2/map-interface/map/{NUM}
リクエスト

DELETE /api/v2/map-interface/map/0

 

レスポンス

204 No content

 

MAPルール設定の作成

メソッド URI
POST /api/v2/map-interface/rule-list/rule
JSON
リクエスト

POST /api/v2/map-interface/rule-list/rule
Content-Type: application/json

 

{
"rule": {
"name": "v6plus",
"type": "jpne",
"method": "auto"
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/map-interface/rule-list/rule
Content-Type: application/xml

 

<rule-list>
<rule>
<name>v6plus</name>
<type>jpne</type>
<method>auto</method>
</rule>
</rule-list>

 

レスポンス

201 Created

 

全MAPルール設定の取得

メソッド URI
GET /api/v2/map-interface/rule-list/rule
JSON
リクエスト

GET /api/v2/map-interface/rule-list/rule
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"rule": [
{
"name": "v6plus",
"type": "jpne",
"method": "auto"
},
{
"name": "virtualconnect",
"type": "ocn",
"method": "auto"
}
]
}

 

XML
リクエスト

GET /api/v2/map-interface/rule-list/rule
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<rule-list>
<rule>
<name>v6plus</name>
<type>jpne</type>
<method>auto</method>
</rule>
<rule>
<name>virtualconnect</name>
<type>ocn</type>
<method>auto</method>
</rule>
</rule-list>

 

TEXT/PLAIN
リクエスト

GET /api/v2/map-interface/rule-list/rule
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

mape-rule v6plus type jpne auto
mape-rule virtualconnect type ocn auto

 

MAPルール設定の更新

メソッド URI
PUT /api/v2/map-interface/rule-list/rule/{NAME}
JSON
リクエスト

PUT /api/v2/map-interface/rule-list/rule/virtualconnect
Content-Type: application/json

 

{
"name": "virtualconnect",
"type": "ocn",
"method": "auto",
"hostname": "test"
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/map-interface/rule-list/rule/virtualconnect
Content-Type: application/xml

 

<rule>
<name>virtualconnect</name>
<type>ocn</type>
<method>auto</method>
<hostname>test</hostname>
</rule>

 

レスポンス

204 No content

 

MAPルール設定の取得

メソッド URI
GET /api/v2/map-interface/rule-list/rule/{NAME}
JSON
リクエスト

GET /api/v2/map-interface/rule-list/rule/virtualconnect
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"name": "virtualconnect",
"type": "ocn",
"method": "auto",
"hostname": "test"
}

 

XML
リクエスト

GET /api/v2/map-interface/rule-list/rule/virtualconnect
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<rule>
<name>virtualconnect</name>
<type>ocn</type>
<method>auto</method>
<hostname>test</hostname>
</rule>

 

TEXT/PLAIN
リクエスト

GET /api/v2/map-interface/rule-list/rule/virtualconnect
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

mape-rule virtualconnect type ocn auto
ddns hostname test

 

MAPルール設定の削除

メソッド URI
DELETE /api/v2/map-interface/rule-list/rule/{NAME}
リクエスト

DELETE /api/v2/map-interface/rule-list/rule/virtualconnect

 

レスポンス

204 No content

 

パラメータ

指定可能なパラメータは下記の通りです。

なお、指定可能なパラメータは製品およびファームウェアのバージョンにより異なりますので、各パラメータの詳細については各製品のユーザーズガイド(CLI版)も合わせてご参照ください。

  • パラメータ表の説明文中の表記について
    < > … 括弧内の値の範囲から選択することを示しています。
    [ ] … 括弧内の値のどれかを選択することを示しています。
    数字,文字列 … 初期値
  • パラメータ表の説明文中のデータタイプについて
    A.B.C.D/M … IPv4プレフィックスおよびマスク長

 

map-interface

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3
map-interface map number インタフェース番号
description インタフェース名
ipv4 IPv4設定
tunnel-parameter トンネルパラメータ設定
mtu MTU値 … <68-1500>(bytes)
bandwidth 帯域幅 … <1-10000000000>(bits)
netevent ネットイベント設定
ipsec-policy IPsecローカルポリシ番号
ipsec-policy-ignore ipsec-policy-ignore設定
queue キュー設定
route-map ルートマップ設定
invalid-status-drop session invalid-status-drop … [ enable | disable ]
event-notify event notify設定
cms CMS設定
rule-list rule ルール設定

 

ipv4

パラメータおよびレベル 説明
Lv.3 Lv.4 Lv.5 Lv.6
ipv4 ipv4-address address  IPv4アドレス …

  • A.B.C.D/M
  • mape-rule
icmp-redirects ICMPリダイレクト … [ enable | disable ]
icmp-mask-reply ICMPマスク応答 … [ enable | disable ]
send-source IP send-source … [ enable | local | disable ]
tcp adjust-mss IPv4 TCP MSS調整 … [ enable | disable ]
mss IPv4 TCP MSS値 …  [ auto | <500-1460> ](bytes)
strip-options IPv4 TCP ストリップオプション …
[ all | md5 | mss | sack | sack-permitted | timestamp | wscale ]
※all以外は複数選択可
filter in IPv4入力フィルタ … ACL名
out IPv4出力フィルタ … ACL名
forward-in IPv4転送フィルタ(forward-in) … ACL名
forward-out IPv4転送フィルタ(forward-out) … ACL名
spi IPv4 SPIフィルタ … [ enable | disable ]
spi-log log IPv4 SPIフィルタログ … [ enable | disable ]
limit IPv4 SPIフィルタログ出力数制限 … <0-100(10)>
※デフォルト値はIPv4 SPIフィルタログ有効時の値
nat-loopback NATループバック … [ enable | disable ]
rebound IPv4リバウンド … [ enable | disable ]
reassemble-output reassemble-output … [ enable | disable ]
mcast-to-ucast-forward multicast to unicast packet forwarding … [ enable | disable ]
nat masquerade IPマスカレード … [ enable | disable ]
snat 送信元NAT … SNAT名
dnat 宛先NAT … DNAT名

 

tunnel-parameter

パラメータおよびレベル 説明
Lv.3 Lv.4 Lv.5
tunnel-parameter mode カプセル化モード … ipipv6
map MAP-Eルール名
hop-limit ホップリミット … <1-255(64)>
traffic-class トラフィッククラス … [ <0-252> | inherit ]
encap-limit  encap-limit … [ <0-255(4)> | none ]

 

netevent

パラメータおよびレベル 説明
Lv.3 Lv.4
netevent track-id トラックID
action ネットイベントアクション … [ connect | disconnect ]

 

ipsec-policy-ignore

パラメータおよびレベル 説明
Lv.3 Lv.4
ipsec-policy-ignore input ipsec-policy-ignore(in) … [ enable | disable ]
output ipsec-policy-ignore(out) … [ enable | disable ]

 

queue

パラメータおよびレベル 説明
Lv.3 Lv.4 Lv.5
queue type キューイング方式 … [ fair-queue | fifo | policy | priority-group | shape ]
priority-group プライオリティマップ番号
fifo-limit FIFOキュー長 … <1-16384(100)>(pks)
policy bandwidth 帯域幅 … <1-1000000>(Kbps)
name ポリシー名
shape rate shape rate … <1-1000000>(Kbps)
buffer バケット … <8-1000000>(bytes)
limit キュー長 … <1-1000000>(bytes)

 

route-map

パラメータおよびレベル 説明
Lv.3 Lv.4
route-map input classify input ルートマップ名
output classify output ルートマップ名
policy ip policy ルートマップ名

 

event-notify

パラメータおよびレベル 説明
Lv.3 Lv.4
event-notify number event notify番号

 

cms

パラメータおよびレベル 説明
Lv.3 Lv.4
cms watch CMS Watch Status … [ enable | disable ]

 

rule

パラメータおよびレベル 説明
Lv.3 Lv.4
rule name MAP-Eルール名
type MAP-Eルールタイプ … [ jpne  | ocn ]
method 設定方法 … auto
hostname DDNS用ホスト名