FutureNet

NXR,VXRシリーズ

REST-API編

8. 各種サービス設定

8-29. QoS設定(qos)

処理概要

QoS設定に関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
QoS v2 /api/v2/qos
/api/v2/qos/priority-map
/api/v2/qos/priority-map/map-list
/api/v2/qos/priority-map/map-list/{NUM}
/api/v2/qos/class-policy
/api/v2/qos/class-policy/policy-list
/api/v2/qos/class-policy/policy-list/{NAME}
/api/v2/qos/class-filter
/api/v2/qos/class-filter/filter-list
/api/v2/qos/class-filter/filter-list/{NUM}

凡例:

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

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

- : 未対応

 

実行例

プライオリティマップ設定の作成

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

POST /api/v2/qos/priority-map/map-list
Content-Type: application/json

 

{
"map-list": {
"number": 1,
"rule": {
"priority": "high",
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/qos/priority-map/map-list
Content-Type: application/xml

 

<priority-map>
<map-list>
<number>1</number>
<rule>
<priority>high</priority>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</rule>
</map-list>
</priority-map>

 

レスポンス

201 Created

 

全プライオリティマップ設定の取得

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

GET /api/v2/qos/priority-map/map-list
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"map-list": [
{
"number": 1,
"rule": {
"priority": "high",
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
}
},
{
"number": 2,
"rule": {
"priority": "low",
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 20
}
}
}
}
]
}

 

XML
リクエスト

GET /api/v2/qos/priority-map/map-list
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<priority-map>
<map-list>
<number>1</number>
<rule>
<priority>high</priority>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</rule>
</map-list>
<map-list>
<number>2</number>
<rule>
<priority>low</priority>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>20</value>
</match-list>
</match>
</rule>
</map-list>
</priority-map>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/priority-map/map-list
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

priority-map 1 high ip mark 10
priority-map 2 low ip mark 20

 

プライオリティマップ設定の更新

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

PUT /api/v2/qos/priority-map/map-list/1
Content-Type: application/json

 

{
"number": 1,
"rule": {
"priority": "low",
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/qos/priority-map/map-list/1
Content-Type: application/xml

 

<map-list>
<number>1</number>
<rule>
<priority>low</priority>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</rule>
</map-list>

 

レスポンス

204 No content

 

プライオリティマップ設定の取得

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

GET /api/v2/qos/priority-map/map-list/1
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"number": 1,
"rule": {
"priority": "low",
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
}
}

 

XML
リクエスト

GET /api/v2/qos/priority-map/map-list/1
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<map-list>
<number>1</number>
<rule>
<priority>low</priority>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</rule>
</map-list>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/priority-map/map-list/1
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

priority-map 1 low ip mark 10

 

プライオリティマップ設定の削除

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

DELETE /api/v2/qos/priority-map/map-list/1

 

レスポンス

204 No content

 

クラスポリシー設定の作成

メソッド URI
POST /api/v2/qos/class-policy/policy-list
JSON
リクエスト

POST /api/v2/qos/class-policy/policy-list
Content-Type: application/json

 

{
"policy-list": {
"name": "eth1QoS",
"class": [
{
"number": 10,
"bandwidth": "40%"
},
{
"number": "default",
"bandwidth": "60%"
}
]
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/qos/class-policy/policy-list
Content-Type: application/xml

 

<class-policy>
<policy-list>
<name>eth1QoS</name>
<class>
<number>10</number>
<bandwidth>40%</bandwidth>
</class>
<class>
<number>default</number>
<bandwidth>60%</bandwidth>
</class>
</policy-list>
</class-policy>

 

レスポンス

201 Created

 

全クラスポリシー設定の取得

メソッド URI
GET /api/v2/qos/class-policy/policy-list
JSON
リクエスト

GET /api/v2/qos/class-policy/policy-list
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"policy-list": [
{
"name": "eth1QoS",
"class": [
{
"number": 10,
"bandwidth": "40%"
},
{
"number": "default",
"bandwidth": "60%"
}
]
},
{
"name": "eth2QoS",
"class": {
"number": "default",
"bandwidth": "100%"
}
}
]
}

 

XML
リクエスト

GET /api/v2/qos/class-policy/policy-list
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<class-policy>
<policy-list>
<name>eth1QoS</name>
<class>
<number>10</number>
<bandwidth>40%</bandwidth>
</class>
<class>
<number>default</number>
<bandwidth>60%</bandwidth>
</class>
</policy-list>
<policy-list>
<name>eth2QoS</name>
<class>
<number>default</number>
<bandwidth>100%</bandwidth>
</class>
</policy-list>
</class-policy>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/class-policy/policy-list
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

class policy eth1QoS
class 10 bandwidth percent 40
class default bandwidth percent 60
class policy eth2QoS
class default bandwidth percent 100

 

クラスポリシー設定の更新

メソッド URI
PUT /api/v2/qos/class-policy/policy-list/{NAME}
JSON
リクエスト

PUT /api/v2/qos/class-policy/policy-list/eth1QoS
Content-Type: application/json

 

{
"name": "eth1QoS",
"class": [
{
"number": 10,
"bandwidth": "20%"
},
{
"number": "default",
"bandwidth": "80%"
}
]
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/qos/class-policy/policy-list/eth1QoS
Content-Type: application/xml

 

<policy-list>
<name>eth1QoS</name>
<class>
<number>10</number>
<bandwidth>20%</bandwidth>
</class>
<class>
<number>default</number>
<bandwidth>80%</bandwidth>
</class>
</policy-list>

 

レスポンス

204 No content

 

クラスポリシー設定の取得

メソッド URI
GET /api/v2/qos/class-policy/policy-list/{NAME}
JSON
リクエスト

GET /api/v2/qos/class-policy/policy-list/eth1QoS
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"name": "eth1QoS",
"class": [
{
"number": 10,
"bandwidth": "20%"
},
{
"number": "default",
"bandwidth": "80%"
}
]
}

 

XML
リクエスト

GET /api/v2/qos/class-policy/policy-list/eth1QoS
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<policy-list>
<name>eth1QoS</name>
<class>
<number>10</number>
<bandwidth>20%</bandwidth>
</class>
<class>
<number>default</number>
<bandwidth>80%</bandwidth>
</class>
</policy-list>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/class-policy/policy-list/eth1QoS
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

class policy eth1QoS
class 10 bandwidth percent 20
class default bandwidth percent 80

 

クラスポリシー設定の削除

メソッド URI
DELETE /api/v2/qos/class-policy/policy-list/{NAME}
リクエスト

DELETE /api/v2/qos/class-policy/policy-list/eth1QoS

 

レスポンス

204 No content

 

クラスフィルタ設定の作成

メソッド URI
POST /api/v2/qos/class-filter/filter-list
JSON
リクエスト

POST /api/v2/qos/class-filter/filter-list
Content-Type: application/json

 

{
"filter-list": {
"number": 10,
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
}
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/qos/class-filter/filter-list
Content-Type: application/xml

 

<class-filter>
<filter-list>
<number>10</number>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</filter-list>
</class-filter>

 

レスポンス

201 Created

 

全クラスフィルタ設定の取得

メソッド URI
GET /api/v2/qos/class-filter/filter-list
JSON
リクエスト

GET /api/v2/qos/class-filter/filter-list
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"filter-list": [
{
"number": 10,
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 10
}
}
},
{
"number": 20,
"match": {
"match-list": {
"protocol": "ip",
"type": "tos",
"value": 255
}
}
}
]
}

 

XML
リクエスト

GET /api/v2/qos/class-filter/filter-list
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<class-filter>
<filter-list>
<number>10</number>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>10</value>
</match-list>
</match>
</filter-list>
<filter-list>
<number>20</number>
<match>
<match-list>
<protocol>ip</protocol>
<type>tos</type>
<value>255</value>
</match-list>
</match>
</filter-list>
</class-filter>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/class-filter/filter-list
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

class filter 10
match ip mark 10
class filter 20
match ip tos 255

 

クラスフィルタ設定の更新

メソッド URI
PUT /api/v2/qos/class-filter/filter-list/{NUM}
JSON
リクエスト

PUT /api/v2/qos/class-filter/filter-list/10
Content-Type: application/json

 

{
"number": 10,
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 100
}
}
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/qos/class-filter/filter-list/10
Content-Type: application/xml

 

<filter-list>
<number>10</number>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>100</value>
</match-list>
</match>
</filter-list>

 

レスポンス

204 No content

 

クラスフィルタ設定の取得

メソッド URI
GET /api/v2/qos/class-filter/filter-list/{NUM}
JSON
リクエスト

GET /api/v2/qos/class-filter/filter-list/10
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"number": 10,
"match": {
"match-list": {
"protocol": "ip",
"type": "mark",
"value": 100
}
}
}

 

XML
リクエスト

GET /api/v2/qos/class-filter/filter-list/10
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml

 

<filter-list>
<number>10</number>
<match>
<match-list>
<protocol>ip</protocol>
<type>mark</type>
<value>100</value>
</match-list>
</match>
</filter-list>

 

TEXT/PLAIN
リクエスト

GET /api/v2/qos/class-filter/filter-list/10
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

class filter 10
match ip mark 100

 

クラスフィルタ設定の削除

メソッド URI
DELETE /api/v2/qos/class-filter/filter-list/{NUM}
リクエスト

DELETE /api/v2/qos/class-filter/filter-list/10

 

レスポンス

204 No content

 

パラメータ

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

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

  • パラメータ表の説明文中の記号について
    < > … 括弧内の値の範囲から選択することを示しています。
    [ ] … 括弧内の値のどれかを選択することを示しています。

 

パラメータおよびレベル 説明
Lv.1 Lv.2 Lv.3 Lv.4 Lv.5 Lv.6 Lv.7
qos priority-map map-list number プライオリティマップ設定番号
default-policy デフォルトクラスプライオリティ …
[ high | low | middle | normal ]
rule priority プライオリティ … [ high | low | middle | normal ]
match match-list protocol プロトコル … ip
type タイプ … mark
value 値 … <1-4095>
queue type キューイング方式 … [ fair-queue | fifo | shape ]
fifo-limit FIFOキュー長 … <1-16384>(pks)
shape rate shape rate … <1-1000000>(Kbps)
buffer バケット … <8-1000000>(bytes)
limit キュー長 … <1-1000000>(bytes)
class-policy policy-list name クラスポリシー名
class number クラス番号 … [ <2-254> | default ]
bandwidth 帯域幅 … [ <1-1000000>(Kbps) | <1%-100%> ]
ceil ceil … <1-100>(%)
priority クラスプライオリティ … <0-7>
queue type キューイング方式 … [ fair-queue | fifo | policy | priority-group | shape ]
priority-group プライオリティマップ番号
fifo-limit FIFOキュー長 … <1-16384>(pks)
policy name ポリシ名
shape rate shape rate … <1-1000000>(Kbps)
buffer バケット … <8-1000000>(bytes)
limit キュー長 … <1-1000000>(bytes)
class-filter filter-list number クラス番号
match match-list protocol プロトコル … ip
type タイプ … [ mark | precedence | tos ]
value 値 …

  • mark … <1-4095>
  • precedence … <0-7>
  • tos … <0-255>