簡介
本文檔旨在介紹各種網路服務協調器(NSO)許可證,以及如何使用思科智慧許可證啟用這些許可證。有關NSO如何連線到智慧許可伺服器的方法多種多樣,這取決於NSO的安裝環境。本文檔還介紹了NSO和思科許可伺服器之間的不同整合。
必要條件
需求
思科建議您瞭解以下主題:
- 如何使用NSO CLI
- NSO故障排除
- Linux基礎知識
採用元件
本文中的資訊係根據以下軟體和硬體版本:
- NSO 4.5及更高版本
- NSO 4.4
- NSO 4.1/4.2/4.3
NSO許可證
注意:使用者必須擁有有效的NSO許可證。
NSO使用的許可證如下:
PID |
在SSM上顯示 |
類型 |
說明 |
R-NSO-K 9 |
|
頂級 |
每個NSO例項都需要 |
NSO-P-PAK |
NSO平台生產 |
伺服器 |
活動節點必需 |
NSO-HA-LIC-P |
NSO平台 — 生產 — 備用 |
伺服器 |
備用節點必需 |
NSO-DEV-P-PAK |
NSO-platform-development-test |
伺服器 |
開發環境所需 |
NSO-PNF-() |
NSO-network-element |
網路元素 |
南向如果連線的裝置是物理裝置 |
NSO-VNF-() |
NSO-network-element |
網路元素 |
Southbound連線的裝置是虛擬裝置 |
NED-() |
每個非執行董事不同 範例: Cisco-ios-NED Cisco-iosxr-NED |
NED |
為內德。每種型別的各種裝置都需要使用。 範例: NED-IOS-P:適用於IOS NED NED-IOSX-P:適用於IOS-XR NED |
註:這可能包含在包資料包識別符號(PID)(使用ESC等的捆綁包等)中,因此這些PID可能不會按順序顯示。
在智慧軟體管理器中,許可證狀態顯示如下:
設定
步驟 1.生成令牌
1.要建立新令牌,請使用使用者ID/或CCO ID登入Cisco Smart Software Manager(CSSM)並選擇適當的虛擬帳戶。
2.按一下智慧許可證連結進入CSSM。
3.在CSSM中,按一下New Token。
4.接受條款和責任之前,請按照對話提供說明、到期日和匯出合規性適用性。按一下Create Token以繼續。
5.按一下New Token。
6.將令牌從對話方塊視窗複製到剪貼簿。
步驟 2.令牌註冊準備
以下是註冊方法(直接/代理/衛星)。
如果NSO或任何思科產品需要智慧許可證,請聯絡思科智慧軟體管理器(或思科雲)進行自我註冊。
設定智慧許可證支援的環境有四個主要選項:
選項1.直接雲端存取
使用此方法,NSO伺服器需要能夠使用https直接與cisco cloud通訊。支援使用HTTP,但是出於安全原因,不建議使用。
在這種方法中,無需特殊配置即可啟動註冊過程。
選項2.通過HTTP的代理進行直接雲訪問
如果需要使用HTTP(S)代理伺服器連線到Internet上的Web,則必須使用Proxy伺服器資訊配置NSO中的智慧代理。
使用選項2時,需要指示智慧代理將其註冊請求傳送到代理伺服器,而不是直接傳送到思科。
視版本而定,設定方式不同。
NSO 4.5或更高版本
從NSO 4.5開始,現在可以通過ncs.conf配置智慧許可證配置。如果ncs.conf和NSO CDB中都存在智慧許可證配置,則ncs.conf中的配置將呈現。
這表示諸如「smart-license smart-agent override-url url https://10.1.2.3/」之類的命令在ncs.conf中存在其他配置時不會生效。執行NSO系統安裝時,ncs.conf預設包括以下內容:
<smart-license>
<smart-agent>
<java-executable>DEFAULT</java-executable>
<java-options>DEFAULT</java-options>
<production-url>DEFAULT</production-url>
<alpha-url>DEFAULT</alpha-url>
<override-url>
<url>DEFAULT</url>
</override-url>
<proxy>
<url>DEFAULT</url>
</proxy>
</smart-agent>
</smart-license>
「DEFAULT」表示它將使用$install_dir/src/ncs/yang/tailf-ncs-smart-license.yang中定義的預設值。
要改為在NSO CDB中配置ncs.conf中列出的枝葉,請確保從ncs.conf中刪除相應的條目並執行「/etc/init.d/ncs reload」
NSO 4.4
在此路徑上配置代理URL。
smart-license smart-agent proxy url <proxy url>
admin@ncs(config)# smart-license smart-agent proxy url https://10.10.10.10:8080
admin@ncs(config)#
在預設配置中,NSO連線到 https://tools.cisco.com/its/service/oddce/services/DDCEService,因此需要使用HTTPS代理。
將自動為HTTPS和HTTP設定此代理配置,因此,如果您將目標URL更改為HTTP以使用衛星(如選項3或4所述),則一個配置仍可以處理這兩個情況。
選項3.通過本地收集器連線的媒介訪問
在許多情況下,NSO網路未直接連線到Internet。除選項2.外,還可以引入智慧軟體管理器衛星;因此NSO無需直接將消息交換到思科雲。
在此處可以找到智慧軟體管理器衛星的產品詳細資訊。
有關如何安裝,請在該連結中查詢安裝指南。
當您使用此方法時,NSO將與衛星通訊,而不是與思科雲通訊。
要更改目標,可以修改override-url:
admin@ncs(config)# smart-license smart-agent override-url url https://10.1.2.3/
admin@ncs(config)#
此URL可在智慧軟體管理器衛星的管理網站上找到。
選項4:通過本地收集器進行中介訪問 — 斷開連線
從NSO的角度來看,此方法與上面的方法(3)完全相同。區別僅在於如何從Smart Software Manager Satellite與思科雲同步。
步驟 3.權杖註冊
使用令牌後,使用生成的令牌啟用Cisco伺服器的NSO。
令牌在NSO CLI上用於註冊到CSSM。輸入命令後,將非同步啟動註冊過程。
admin@ncs# smart-license register idtoken YWVlMmQ3ZjEtYT....
result Registration process in progress. Use the 'show license status' command to check the progress and result.
admin@ncs#
驗證
使用本節內容,確認您的組態是否正常運作。
註冊之前:始終啟用智慧許可。輸出表示NSO未註冊,並且處於EVAL模式,該模式將在89天23小時後過期。
admin@ncs# show license status
Smart Licensing is ENABLED
Registration:
Status: UNREGISTERED
Export-Controlled Functionality: Allowed
License Authorization:
Status: EVAL MODE
Evaluation Period Remaining: 89 days, 23 hr, 17 min, 36 sec
Last Communication Attempt: NONE
Next Communication Attempt: NONE
Development mode: enabled
admin@ncs#
可以使用show license status命令檢查註冊狀態。如果註冊仍在進行中,該命令將顯示此輸出並顯示:「REGISTRATION PENDING」。
<仍在註冊……>
admin@ncs# show license status
Smart Licensing is ENABLED
Registration:
Status: UNREGISTERED - REGISTRATION PENDING
Initial Registration: First Attempt Pending
Export-Controlled Functionality: Allowed
License Authorization:
Status: EVAL MODE
Evaluation Period Remaining: 89 days, 23 hr, 16 min, 36 sec
Last Communication Attempt: SUCCEEDED on Aug 3 09:41:56 2016 UTC
Next Communication Attempt: NONE
Development mode: enabled
admin@ncs#
過了一會兒,註冊工作就完成了。當您看到狀態「已註冊」時,系統已註冊到CSSM。
<已註冊!!>
admin@ncs# show license status
Smart Licensing is ENABLED
Registration:
Status: REGISTERED
Smart Account: BU Production Test
Virtual Account: TAC-Japan-Cloudorch
Export-Controlled Functionality: Allowed
Initial Registration: SUCCEEDED on Aug 4 05:29:52 2016 UTC
Last Renewal Attempt: SUCCEEDED on Aug 4 05:30:03 2016 UTC
Next Renewal Attempt: Jan 31 05:30:03 2017 UTC
Registration Expires: Aug 4 05:24:56 2017 UTC
Export-Controlled Functionality: Allowed
License Authorization:
License Authorization:
Status: AUTHORIZED on Aug 4 05:30:05 2016 UTC
Last Communication Attempt: SUCCEEDED on Aug 4 05:25:02 2016 UTC
Next Communication Attempt: Sep 3 05:30:07 2016 UTC
Communication Deadline: Aug 4 05:24:56 2017 UTC
Development mode: enabled
admin@ncs#
使用(授權狀態)
使用show license summary命令可檢視使用的許可證。在本示例中,系統使用NSO-platform-production、NSO-network-element和cisco-ios-NED。請注意,許可證授權狀態為「AUTHORIZED」。這意味著需要許可證的所有元件都在合法狀態下正常工作。
admin@ncs# show license summary
Smart Licensing is ENABLED
Registration:
Status: REGISTERED
Smart Account: COMPANY A
Virtual Account: Network Department
Last Renewal Attempt: None
Next Renewal Attempt: Jan 31 05:33:02 2017 UTC
License Authorization:
Status: AUTHORIZED
Last Communication Attempt: SUCCEEDED
Next Communication Attempt: Sep 3 05:33:06 2016 UTC
License Usage:
License Entitlement Tag Count Status
----------------------------------------------------------------------------------------------------------------------------------------------
348fbb21-7edf-42bb-baa7-198903058a54regid.2016-04.com.cisco.NSO-platform-production,4.2_348fbb21-7edf-42bb-baa7-198903058a54 1 InCompliance
5d641fa0-757d-43b0-a926-166cb6e3cfddregid.2015-10.com.cisco.NSO-network-element,1.0_5d641fa0-757d-43b0-a926-166cb6e3cfdd 3 InCompliance
d9eca34d-1f6a-4595-ad74-9c0c57e03c27regid.2015-10.com.cisco.cisco-ios-NED,1.0_d9eca34d-1f6a-4595-ad74-9c0c57e03c27 1 InCompliance
Development mode: disabled
admin@ncs#
以下是show license usage命令在另一示例中的輸出。在本示例中,還新增了cisco-iosxr-NED,狀態為OutOfCompliance。這表示註冊到CSSM沒問題,但虛擬帳戶中的cisco-iosxr-NED許可證不足。由於cisco-iosxr-NED的合規性狀態,因此整體狀態為OUT_OF_COMPLIANCE。
admin@ncs # show license usage
License Authorization Status : OUT_OF_COMPLIANCE as of Oct 24 06 : 14 : 11 2016 UTC
NSO - platform - production ( regid . 2015 - 10.com . cisco . NSO - platform - production , 1.0 _d1445dab - 9d96 - 4593 - 99f2 - 6f633b8a759c )
Description : API unavailable
Count : 1
Version : 1.0
Status : InCompliance
NSO - network - element ( regid . 2015 - 10.com . cisco . NSO - network - element , 1.0 _5d641fa0 - 757d - 43b0 - a926 - 166cb6e3cfdd )
Description : API unavailable
Count : 3
Version : 1.0
Status : InCompliance
cisco - ios - NED ( regid . 2015 - 10.com . cisco . cisco - ios - NED , 1.0 _d9eca34d - 1f6a - 4595 - ad74 - 9c0c57e03c27 )
Description : API unavailable
Count : 1
Version : 1.0
Status : InCompliance
cisco - iosxr - NED ( regid . 2015 - 10.com . cisco . cisco - iosxr - NED , 1.0 _9956fc34 - cbed - 4d13 - a1ea - 6a36f4e40a99 )
Description : API unavailable
Count : 1
Version : 1.0
Status : OutOfCompliance
疑難排解
嘗試如下所示在智慧許可證功能上啟用調試。
啟用調試後,調試日誌將生成到/smart-license/smart-agent/stdout-capture/file中指定的檔案中。
智慧許可證調試會生成大量日誌,建議在收集資料後禁用調試。
Debug enable
admin@ncs# debug smart_lic all
ok
admin@ncs#
調試禁用
admin@ncs# no debug smart_lic all
ok
admin@ncs#
智慧許可證日誌配置
admin@ncs# show running-config smart-license
smart-license smart-agent stdout-capture disabled
smart-license smart-agent stdout-capture file ./logs/ncs-smart-licensing.log
admin@ncs#
啟用智慧許可證日誌
admin@ncs(config)# smart-license smart-agent stdout-capture enabled
admin@ncs(config)# commit
Commit complete.
admin@ncs(config)#