VMware Global Community
fragment_design
Contributor
Contributor

vCSA6.5 スタティックルートについて

vCSA6.5 にスタティックルートを追加したいのですがうまくいきません。(APIを使用)

コマンド実行後、エラーが返されてしまいます。

ご検討のつく方おられましたら教授願います。

API:com.vmware.appliance.version1.networking.routes.add

<以下、コマンド結果>

--------

Command> com.vmware.appliance.version1.networking.routes.add -h

Usage:

      com.vmware.appliance.version1.networking.routes.add

      [--help/-h] --destination STR --gateway STR --prefix INT

      --interface STR

Description:

      Set static routing rules. A destination of 0.0.0.0 and

      prefix 0 (for IPv4) or destination of :: and prefix 0 (for

      IPv6) refers to the default gateway.

Input Arguments:

  --destination STR

      Destination address that defines this route.

  --gateway STR

      Gateway address.

  --prefix INT

      Destination CIDR prefix that defines this route. See

      http://www.oav.net/mirrors/cidr.html for netmask-to-prefix

      conversion.

  --interface STR

      Output device interface, for example, "nic0".

Command>

Command> com.vmware.appliance.version1.networking.routes.list

Routes:

   1:

       Interface: nic0

       Prefix: 0

       Destination: 0.0.0.0

       Static: False

       Gateway: 192.168.1.254

   2:

       Interface: nic0

       Prefix: 24

       Destination: 192.168.1.0

       Static: False

       Gateway: 0.0.0.0

Command> com.vmware.appliance.version1.networking.routes.add

--destination 192.168.2.0 --gateway 192.168.2.254 --prefix 24

--interface nic0

    Error in method: Operation Failed. (code

    com.vmware.applmgmt.err_operation_failed)

Command>

--------

0 Kudos
1 Reply
gowatana
Leadership
Leadership

こんにちは。

手元のVCSAで試してみたのですが、スタティックルートの宛先ネットワークとVCSAが、同じネットワーク サブネット(スタティックルート不要なアドレス)になっていませんでしょうか?

Command> com.vmware.appliance.version1.networking.ipv4.list

Config:

  1:

      Defaultgateway: 192.168.1.252

      Updateable: True

      Prefix: 24

      Mode: static

      Address: 192.168.1.95

      Interface: nic0

Command> com.vmware.appliance.version1.networking.routes.add --destination 192.168.1.0 --prefix 24 --gateway 192.168.1.251 --interface nic0

   Error in method: Operation Failed. (code

   com.vmware.applmgmt.err_operation_failed)

Command>

別のネットワーク宛の経路は追加可能でした。

Command> com.vmware.appliance.version1.networking.routes.add --destination 192.168.13.0 --prefix 24 --gateway 192.168.1.251 --interface nic0

Command> com.vmware.appliance.version1.networking.routes.list

Routes:

  1:

      Interface: nic0

      Prefix: 0

      Destination: 0.0.0.0

      Static: False

      Gateway: 192.168.1.252

  2:

      Interface: nic0

      Prefix: 24

      Destination: 192.168.1.0

      Static: False

      Gateway: 0.0.0.0

  3:

      Interface: nic0

      Prefix: 24

      Destination: 192.168.13.0

      Static: True

      Gateway: 192.168.1.251

Command>

一方、デフォルトゲートウェイは 0.0.0.0/0 を指定することで変更できました。

Command> com.vmware.appliance.version1.networking.routes.add --destination 0.0.0.0 --prefix 0 --gateway 192.168.1.251 --interface nic0

Command> com.vmware.appliance.version1.networking.routes.list

Routes:

  1:

      Interface: nic0

      Prefix: 0

      Destination: 0.0.0.0

      Static: False

      Gateway: 192.168.1.251

  2:

      Interface: nic0

      Prefix: 24

      Destination: 192.168.1.0

      Static: False

      Gateway: 0.0.0.0

  3:

      Interface: nic0

      Prefix: 24

      Destination: 192.168.13.0

      Static: True

      Gateway: 192.168.1.251

Command>

Command> com.vmware.appliance.version1.networking.ipv4.list

Config:

  1:

      Defaultgateway: 192.168.1.251

      Updateable: True

      Prefix: 24

      Mode: static

      Address: 192.168.1.95

      Interface: nic0

Command>

ためしたVCSAのバージョンは下記でした。

Command> version.get

Version:

   Product: VMware vCenter Server Appliance

   Installtime: 2017-02-14T12:54:46 UTC

   Summary: Update for VMware vCenter Server Appliance 6.5.0

   Releasedate: July 27, 2017

   Version: 6.5.0.10000

   Build: 5973321

   Type: vCenter Server with an external Platform Services Controller

以上です。参考になりますでしょうか。

0 Kudos