FutureNet

NXR,VXRシリーズ

REST-API編

8. 各種サービス設定

8-17. DHCPリレー設定(dhcp-relay)

 処理概要

DHCPリレー設定に関する処理を実行します。

 

URIおよびメソッド

機能 Version URI メソッド
POST PUT GET DELETE
DHCP
Relay
v2 /api/v2/dhcp-relay

凡例:〇対応、-未対応

  • api/v1は対応していません。

 

実行例

DHCPリレー設定の作成

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

POST /api/v2/dhcp-relay
Content-Type: application/json

 

{
"address": "192.168.0.1"
}

 

レスポンス

201 Created

 

XML
リクエスト

POST /api/v2/dhcp-relay
Content-Type: application/xml

 

<dhcp-relay>
<address>192.168.0.1</address>
</dhcp-relay>

 

レスポンス

201 Created

 

DHCPリレー設定の更新

メソッド URI
PUT /api/v2/dhcp-relay
JSON
リクエスト

PUT /api/v2/dhcp-relay
Content-Type: application/json

 

{
"address": "192.168.0.1",
"accept": "ethernet0"
}

 

レスポンス

204 No content

 

XML
リクエスト

PUT /api/v2/dhcp-relay
Content-Type: application/xml

 

<dhcp-relay>
<address>192.168.0.1</address>
<accept>ethernet0</accept>
</dhcp-relay>

 

レスポンス

204 No content

 

DHCPリレー設定の取得

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

GET /api/v2/dhcp-relay
Accept: application/json

 

レスポンス

200 OK
Content-Type: application/json

 

{
"address": "192.168.0.1",
"accept": "ethernet0"
}

 

XML
リクエスト

GET /api/v2/dhcp-relay
Accept: application/xml

 

レスポンス

200 OK
Content-Type: application/xml


<dhcp-relay>
<address>192.168.0.1</address>
<accept>ethernet0</accept>
</dhcp-relay>

 

TEXT/PLAIN
リクエスト

GET /api/v2/dhcp-relay
Accept: text/plain

 

レスポンス

200 OK
Content-Type: text/plain

 

dhcp-relay
address 192.168.0.1
accept ethernet 0

 

DHCPリレー設定の削除

メソッド URI
DELETE /api/v2/dhcp-relay
リクエスト

DELETE /api/v2/dhcp-relay

 

レスポンス

204 No content

 

パラメータ

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

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

  • パラメータ表の説明文中のデータタイプについて
    A.B.C.D … IPv4アドレス

 

パラメータおよびレベル 説明
Lv.1 Lv.2
dhcp-relay address DHCPサーバアドレス … A.B.C.D
accept 受信インタフェース