このコマンドは、ネットワーク設定を行うか、Cisco DNA Spaces:コネクタ 上で行われたネットワーク設定を表示します。このコマンドはデュアルインターフェイス展開でのみ機能します。シングルインターフェイス展開でこのコマンドを実行すると、エラーがスローされます。
(注) |
このコマンドを使用してホスト名または IP アドレスを変更する場合は、自己署名証明書を確実に再生成してください。システムを再起動した後に connectorctl generatecert コマンドを使用します。
|
パラメータ
表 3. パラメータ
パラメータ
|
説明
|
device
|
デュアルインターフェイス展開で、デバイスが存在するインターフェイス(デバイスインターフェイス)を設定します。
|
devicestatus
|
デュアルインターフェイス展開でのデバイスインターフェイスのステータスを表示します。
|
connectorctl networkconfig { device | devicestatus }
使用上のガイドライン
dnasadmin@conn171 ~]$ connectorctl networkconfig device
Do you want to (C)onfigure or (D)elete the Device Interface or (E)xit? (c/d/e): d
Are you sure you want to delete the Device Interface? (y/n) [n]: y
Deleting Device Interface ...
Device Interface deleted successfully.
System will reboot in 5 seconds...
Connection to 10.22.x.x closed by remote host.
Connection to 10.22.x.x closed.
rmadira@RMADIRA-M-L2BK Downloads % ssh dnasadmin@10.22.x.x
ssh: connect to host 10.22.x.x port 22: Operation timed out
rmadira@RMADIRA-M-L2BK Downloads % ssh dnasadmin@10.22.x.x
Password:
Password:
Last failed login: Mon Aug 9 13:35:57 PDT 2021 from 10.24.127.162 on ssh:notty
There was 1 failed login attempt since the last successful login.
Last login: Mon Aug 9 13:32:12 2021 from 10.24.x.x
[dnasadmin@conn171 ~]$ connectorctl networkconfig device
Configuring the Device Interface ...
Please enter IP []: 2.1.0.x
Please enter Netmask []: 255.255.255.0
Please enter Gateway []: 2.1.0.x
Please enter Domain []: cisco.com
====================================================================================
DNS Server Configuration
====================================================================================
DNS Servers can be added, edited, or removed
1. Add DNS Server Press 1
2. Edit DNS Server Press 2
3. Remove DNS Server Press 3
4. Exit Press 4
Please select an option from the list above [4]: 4
====================================================================================
Subnet Configuration
====================================================================================
Current Subnet List:
2.1.x.x/24 (Auto-populated)
------------------------------------------------------------------------------------
Subnets can be added, edited, or removed
1. Add Subnet Press 1
2. Edit Subnet Press 2
3. Remove Subnet Press 3
4. Exit Press 4
Please select an option from the list above [4]: 4
====================================================================================
Do you want to block ports (8000, 8004 and 2003) on Cloud Interface? [y/n] [n]: n
====================================================================================
Following configuration will be saved:
IPADDR=2.1.x.x
NETMASK=255.255.255.0
GATEWAY=2.1.0.x
DOMAIN=cisco.com
SUBNET1=2.1.0.0/24
CLOUD_PORTS_BLOCKED = No
Confirm the above details? [yes/no]: yes
Saving configutation...
Configuring Device Interface ...
Device Interface configured successfully.
System will reboot in 5 seconds...
Connection to 10.22.212.171 closed by remote host.
Connection to 10.22.212.171 closed.
(注) |
[Add Subnet] オプションを使用して、さらにサブネットを追加できます。Cisco DNA Spaces:コネクタ では、デバイスインターフェイスを使用してこれらのサブネットに到達できます。
|
[dnasadmin@conn170 ~]$ connectorctl networkconfig devicestatus
Interface Name = ens160
IP = 2.1.0.x
NETMASK = 255.255.255.0
DOMAIN = cisco.com
DNS =
SUBNET(s) configured:
---------------------
SUBNET1 = 2.1.0.0/24
Routing Table
=============
Destination Gateway Genmask Flags Metric Ref Use Iface MSS Window irtt
2.1.0.0 2.1.0.x 255.255.255.0 UG 0 0 0 ens160 0 0 0
2.1.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ens160 0 0 0
Firewall rules
==============
Subnets allowed port/protocols allowed
--------------- ----------------------
2.1.0.0/24 2003/udp, 443/tcp, 8000/tcp, 8004/tcp
CLOUD_PORTS_BLOCKED = No
[dnasadmin@conn170 ~]$