Connectrix MDS:如何在 MDS NX-API 交换机上启用 REST-API

Summary: 如何在 Connectrix MDS 交换机上配置 REST-API。 Connectrix MDS 9000 NX-API 是用于获取和运行 CLI 命令的 RPC 样式 API。它基于 HTTP 或 HTTPS 协议(与其他表述性状态转移 (REST) API 框架一样),允许以编程方式访问 MDS 交换机。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

以下是在 Connectrix MDS 交换机上启用 REST-API 的过程:
  1. 确保可通过管理界面访问交换机 。请参阅 《Cisco MDS 9000 系列基础配置指南本超链接将引导您访问非 Dell Technologies 运营的网站。 》中的“配置管理接口”部分,以启用管理接口。
  2. 启用 NX-API 功能,进入配置模式,然后启用 NX-API:
switch# configure terminal
switch(config)# feature nxapi
  1. 为 NX-API 配置 HTTP 和 HTTPS 端口 (可选):
要配置 HTTP 端口,请执行以下作:
switch(config)# nxapi http port 8080
 要配置 HTTPS 端口,请执行以下作:
switch(config)# nxapi https port 8443
  1. 为 NX-API HTTPS 连接安装身份证书(可选): 
使用未加密的私钥安装证书:
switch(config)# nxapi certificate certfile key keyfile

使用加密私钥安装证书:

switch(config)# nxapi certificate certfile key keyfile password passphrase

使用已安装的证书,网址为 trustpoint 存储 库:

switch(config)# nxapi trustpoint label
  1. 验证 NX-API 设置

switch# show nxapi
switch# show feature


要禁用NX-API: 

Switch# conf t 
switch(config)# no feature nxapi

在 MDS 交换机上配置 NX-API 后,可以通过以下 URL 访问 NX-API:

HTTP: http://switch_ip_address:port-number/ins

HTTPs: https://switch_ip_address:port-number/ins

Additional Information

Affected Products

Connectrix MDS-Series Firmware
Article Properties
Article Number: 000224000
Article Type: How To
Last Modified: 04 Jun 2025
Version:  3
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.