簡介
本文說明如何在Cisco IOS-XE®平台上配置ThousandEyes。
必要條件
需求
思科建議在ThousandEyes文檔門戶驗證這些要求:
支援清單Thousand Eyes
採用元件
本檔案中的資訊是根據使用Cisco IOS-XE的路由器。
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路運作中,請確保您瞭解任何指令可能造成的影響。
ISR4Ks Docker安裝
步驟 1.
從Cloud & Enterprise Agents > Agent settings > Add New Enterprise Agent > Cisco Application Hosting選單下的https://app.thousandeyes.com下載ThousandEyes代理:
步驟 2.
將.tar檔案複製到路由器的bootflash中。這可透過TFTP完成。或者,將檔案下載到USB快閃記憶體驅動器並將其複製到路由器引導快閃記憶體中。
Router#dir bootflash: | sec .tar
24577 -rw- 186705920 May 19 2022 16:26:31 +00:00 thousandeyes-enterprise-agent-4.2.2.cisco.tar
步驟 3.
使用iox命令在路由器上啟用IOx守護程式並驗證服務狀態。
Router(config)#iox
*May 19 16:40:48.485: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to start
Router#show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Not Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Not Running
IOx service (Sec storage) : Not Supported
Libvirtd 5.5.0 : Running
步驟 4.
使用app-hosting install appid <agent_name> package bootflash:<file.tar>命令安裝以前儲存在bootflash中的代理。
Router#app-hosting install appid ISR4k_Agent package bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Installing package 'bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar' for 'ISR4k_Agent'. Use 'show app-hosting list' for progress.
步驟 5.
使用show app-hosting list命令驗證代理是否已正確安裝。
Router#show app-hosting list
App id State
---------------------------------------------------------
ISR4k_Agent DEPLOYED
步驟 6.
配置虛擬埠介面。
interface VirtualPortGroup1
ip address 192.168.2.254 255.255.255.0
no mop enabled
no mop sysid
end
步驟 8.
為應用託管配置VNIC。
Router(config)#app-hosting appid ISR4k_Agent
Router(config-app-hosting)#app-vnic gateway1 virtualportgroup 1 guest-interface 1
Router(config-app-hosting-gateway1)#guest-ipaddress 192.168.2.10 netmask 255.255.255.0
Router(config-app-hosting-gateway#)#exit
Router(config-app-hosting)#app-default-gateway 192.168.2.254 guest-interface 1
Router(config-app-hosting)#name-server1 8.8.8.8
Router(config-app-hosting)#end
注意: name-server命令的IP地址可以是內部或外部DNS伺服器。 |
步驟 7.
設定Docker。所需令牌可在https://app.thousandeyes.com的選單Cloud & Enterprise Agents > Agent settings > Add a New Enterprise Agent > Cisco Application Hosting下獲得。
按一下小眼圖示。這將顯示未加密的令牌編號。複製該字串並繼續路由器上的安裝。
Docker安裝命令:
Router(config-app-hosting)#app-resource docker
Router(config-app-hosting-docker)#prepend-pkg-opts
Router(config-app-hosting-docker)#run-opts 1 "-e TEAGENT_ACCOUNT_TOKEN= EAGENT_ACCOUNT_TOKEN= xxxxxxxxxxxxxxxxxxxx"
Router(config-app-hosting-docker)#run-opts 2 "--hostname ISR_Agent"
Router(config-app-hosting)#start
Router(config-app-hosting)#end
Router#
*May 30 20:10:00.282: %SYS-5-CONFIG_I: Configured from console by console
*May 30 20:10:06.980: %IM-6-START_MSG: R0/0: ioxman: app-hosting: Start succeeded: ISR_Agent started successfully Current state is RUNNING
步驟 9.
使用show app-hosting list命令驗證代理是否處於活動狀態。
Router#show app-hosting list
App id State
---------------------------------------------------------
ISR_Agent RUNNING
ASR1K Docker安裝
步驟 1.
從Thousand Eyes網站下載agent .tar archive。
步驟 2.
將.tar檔案複製到路由器的bootflash中。這可透過TFTP完成。或者,將檔案下載到USB快閃記憶體驅動器並將其複製到路由器引導快閃記憶體中。
Router#dir bootflash: | sec .tar
16 -rw- 186705920 Sep 21 2022 15:02:21 +00:00 thousandeyes-enterprise-agent-4.2.2.cisco.tar
步驟 3.
使用命令iox在路由器上啟用IOx守護程式並驗證服務狀態。
Router(config)#iox
Router#show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Running
IOx service (Sec storage) : Not Supported
Libvirtd 5.5.0 : Running
步驟 4.
使用app-hosting install appid <agent_name> package bootflash:<file.tar>命令安裝以前儲存在bootflash中的代理。
Router#app-hosting install appid ASR_TE package bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Installing package 'bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar' for 'ASR_TE'. Use 'show app-hosting list' for progress.
*Sep 21 16:10:12.900: %IOXCAF-6-INSTALL_MSG: R0/0: ioxman: app-hosting: ASR_TE installed successfully Current state is DEPLOYED
Router#show app-hosting list
App id State
---------------------------------------------------------
ASR1k_TE DEPLOYED
步驟 5.
使用私有IP地址配置虛擬埠介面。
interface VirtualPortGroup0
ip address 192.168.2.254 255.255.255.0
no mop enabled
no mop sysid
end
步驟 6.
為應用託管配置VNIC。
Router(config)#app-hosting appid ASR1k_TE
Router(config-app-hosting)#app-vnic gateway1 virtualportgroup 0 guest-interface 0
Router(config-app-hosting-gateway0)#guest-ipaddress 192.168.2.1 netmask 255.255.255.0
Router(config-app-hosting-gateway0)#exit
Router(config-app-hosting)#app-default-gateway 192.168.2.254 guest-interface 0
Router(config-app-hosting)#name-server0 8.8.8.8
Router(config-app-hosting)#app-resource docker
Router(config-app-hosting-docker)#prepend-pkg-opts
Router(config-app-hosting-docker)#run-opts 1 "--hostname ASR1kTE"
Router(config-app-hosting-docker)#run-opts 1 "-e TEAGENT_ACCOUNT_TOKEN=XXXXXXXXXXXXXXXXX"
Router(config-app-hosting-docker)#exit
步驟 7.
為引用的應用ID啟用應用託管。
Router(config)#app-hosting appid ASR1k_TE
Router(config-app-hosting)#start
步驟 8.
安裝ThousandEyes代理,並使用show app-hosting list命令驗證其處於活動狀態。
Router#app-hosting install appid ASR1k_TE package bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Installing package 'bootflash:thousandeyes-enterprise-agent-4.2.2.cisco.tar' for 'ASR1k_TE'. Use 'show app-hosting list' for progress.
Router#show app-hosting list
App id State
---------------------------------------------------------
ASR1k_TE RUNNING
Catalyst 8K Docker安裝
Catalyst 8200組態
步驟 1.
從ThousandEyes-enterprise-agent-x.x.cisco.tar網站下載代理.tar檔案
步驟 2.
將.tar檔案複製到裝置的硬碟上。
C8200k#dir harddisk:thousandeyes-enterprise-agent-4.3.0.cisco.tar
Directory of harddisk:/thousandeyes-enterprise-agent-4.3.0.cisco.tar
12 -rw- 123064320 Nov 12 2022 21:35:06 +00:00 thousandeyes-enterprise-agent-4.3.0.cisco.tar
15239921664 bytes total (14280880128 bytes free)
C8200k#
步驟 3.
使用命令iox在路由器上啟用IOx守護程式並驗證服務狀態。
C8200k(config)#iox
*Nov 12 21:46:51.539: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to start
*Nov 12 21:46:52.443: %SYS-5-CONFIG_I: Configured from console by console
*Nov 12 21:47:13.866: %IM-6-IOX_ENABLEMENT: R0/0: ioxman: IOX is ready.
C8200k#show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Running
IOx service (Sec storage) : Not Supported
Libvirtd 5.5.0 : Running
步驟 4.
配置平台資源應用程式負載。 儲存配置更改並重新載入機箱。
C8200k(config)#platform resource service-plane-heavy
C8200k(config)#end
C8200k#wr
C8200k#reload
步驟 5.
配置虛擬埠介面。
interface virtualportgroup 0
ip address 192.168.2.254 255.255.255.0
exit
步驟 6.
為應用託管配置VNIC。
C8200k(config)#app-hosting appid TEcat8k
C8200k(config-app-hosting)#app-vnic gateway1 virtualportgroup 0 guest-interface 0
C8200k(config-app-hosting-gateway1)#guest-ipaddress 192.168.2.10 netmask 255.255.255.0
C8200k(config-app-hosting-gateway1)#exit
C8200k(config-app-hosting)#app-default-gateway 192.168.2.254 guest-interface 0
C8200k(config)#app-hosting appid TEcat8k
C8200k(config-app-hosting)#app-resource docker
C8200k(config-app-hosting-docker)#prepend-pkg-opts
C8200k(config-app-hosting-docker)#run-opts 1 "-e TEAGENT_ACCOUNT_TOKEN=xxxxxxxxxxxxxxxxxxxx"
C8200k(config-app-hosting-docker)#run-opts 2 "--hostname TEcat8k"
C8200k(config-app-hosting)#name-server0 8.8.8.8
C8200k(config-app-hosting)#end
步驟 7.
為引用的應用ID啟用應用託管。
C8200k(config)#app-hosting appid TEcat8k
C8200k(config-app-hosting)#start
步驟 8.
安裝ThousandEyes代理並驗證其正在運行。
C8200k#app-hosting install appid TEcat8k package harddisk:thousandeyes-enterprise-agent-4.3.0.cisco.tar
Installing package 'harddisk:thousandeyes-enterprise-agent-4.3.0.cisco.tar' for 'TEcat8k'. Use 'show app-hosting list' for progress.
*Jan 21 21:30:17.194: %IM-6-INSTALL_MSG: R0/0: ioxman: app-hosting: Install succeeded: TEcat8k installed successfully Current state is DEPLOYED
*Jan 21 21:30:41.019: %IM-6-START_MSG: R0/0: ioxman: app-hosting: Start succeeded: TEcat8k started successfully Current state is RUNNING
C8200k#show app-hosting list
App id State
---------------------------------------------------------
TEcat8k RUNNING
Catalyst 8300組態
步驟 1.
從Thousand Eyes-enterprise-agent-x.x.cisco.tar網站下載代理.tar檔案
步驟 2.
將.tar檔案複製到裝置的硬碟上。
Router#dir harddisk:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Directory of harddisk:/thousandeyes-enterprise-agent-4.2.2.cisco.tar
12 -rw- 186705920 Sep 14 2022 19:02:02 +00:00 thousandeyes-enterprise-agent-4.2.2.cisco.tar
步驟 3.
使用命令iox在路由器上啟用IOx守護程式並驗證服務狀態。
Router(config)#iox
*Sep 5 17:48:31.952: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to start
*Sep 5 17:48:40.953: %IM-6-IOX_ENABLEMENT: R0/0: ioxman: IOX is ready.
Router#show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Running
IOx service (Sec storage) : Not Supported
Libvirtd 5.5.0 : Running
步驟 4.
配置虛擬埠介面。
interface VirtualPortGroup1
ip address 192.168.2.254 255.255.255.0
no mop enabled
no mop sysid
end
步驟 5.
為應用託管配置VNIC。
Router(config)#app-hosting appid Cat8k_TE
Router(config-app-hosting)#app-vnic gateway1 virtualportgroup 1 guest-interface 1
Router(config-app-hosting-gateway1)#guest-ipaddress 192.168.2.1 netmask 255.255.255.0
Router(config-app-hosting)#app-default-gateway 192.168.2.254 guest-interface 1
Router(config-app-hosting)#app-resource docker
Router(config-app-hosting-docker)#prepend-pkg-opts
Router(config-app-hosting-docker)#run-opts 1 "--hostname C8k_TE"
Router(config-app-hosting-docker)#run-opts 2 "-e TEAGENT_ACCOUNT_TOKEN=xxxxxxxxxxxxxxxxxxxx"
Router(config-app-hosting)#name-server1 8.8.8.8
Router(config-app-hosting)#start
步驟 6.
配置start命令以啟動應用程式。
Router(config)#app-hosting appid Cat8k_TE
Router(config-app-hosting)#start
步驟 7.
安裝ThousandEyes代理並驗證是否已部署該代理。
Router#app-hosting install appid TEcat8k package harddisk:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Router#show app-hosting list
App id State
---------------------------------------------------------
Cat8k_TE DEPLOYED
Catalyst 8500L組態
步驟 1.
從ThousandEyes-enterprise-agent-x.x.cisco.tar網站下載代理.tar檔案
步驟 2.
在裝置的硬碟上複製.tar檔案。
Router#dir harddisk:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Directory of harddisk:/thousandeyes-enterprise-agent-4.2.2.cisco.tar
12 -rw- 186705920 Sep 14 2022 19:02:02 +00:00 thousandeyes-enterprise-agent-4.2.2.cisco.tar
步驟 3.
使用命令iox在路由器上啟用IOx守護程式並驗證服務狀態。
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#iox
Router(config)#end
*Sep 15 15:41:23.992: %UICFGEXP-6-SERVER_NOTIFIED_START: R0/0: psd: Server iox has been notified to startsh
*Sep 15 15:41:25.006: %SYS-5-CONFIG_I: Configured from console by console
*Sep 15 15:41:32.914: %IM-6-IOX_ENABLEMENT: R0/0: ioxman: IOX is ready.
Router#show iox-service
IOx Infrastructure Summary:
---------------------------
IOx service (CAF) : Not Running
IOx service (HA) : Not Supported
IOx service (IOxman) : Not Running
IOx service (Sec storage) : Not Supported
Libvirtd 5.5.0 : Running
步驟 4.
配置虛擬埠介面。
interface VirtualPortGroup1
ip address 192.168.2.254 255.255.255.0
no mop enabled
no mop sysid
end
步驟 5.
為應用託管配置VNIC。
Router(config)#app-hosting appid Cat8500L_TE
Router(config-app-hosting)#app-vnic gateway0 virtualportgroup 0 guest-interface 0
Router(config-app-hosting-gateway0)#guest-ipaddress 192.168.2.1 netmask 255.255.255.0
Router(config-app-hosting-gateway0)#exit
Router(config-app-hosting)#guest-gateway 192.168.2.254 guest-interface 0
Router(config-app-hosting)#app-resource docker
Router(config-app-hosting-docker)#prepend-pkg-opts
Router(config-app-hosting-docker)#run-opts 1 "--hostname Cat8500L_TE"
Router(config-app-hosting-docker)#run-opts 2 "-e TEAGENT_ACCOUNT_TOKEN=TEAGENT_ACCOUNT_TOKEN=xxxxxxxxxxxxxxxxxxxx"
Router(config-app-hosting)#name-server1 8.8.8.8
Router(config-app-hosting)#start
步驟 6.
配置平台資源應用程式負載。接下來,儲存配置更改並重新載入機箱。
Router(config)#platform resource app-heavy
Please reboot to activate this template
Router(config)#exit
Router#wr
Router#reload
步驟 7.
安裝ThousandEyes代理並驗證是否已部署該代理。
Router#app-hosting install appid Cat8500L_TE package harddisk:thousandeyes-enterprise-agent-4.2.2.cisco.tar
Installing package 'harddisk:thousandeyes-enterprise-agent-4.2.2.cisco.tar' for 'Cat8500L_TE'. Use 'show app-hosting list' for progress.
Router#show app-hosting list
App id State
---------------------------------------------------------
Cat8500L_TE DEPLOYED
注意:NAT可以與ThousandEyes一起使用。
|
虛擬埠介面可用作NAT的內部介面。
範例:
Router(config)#ip nat inside source list NAT interface gi0/0/0 overload
Router(config)#ip access-list extended NAT
Router(config-ext-nacl)#permit ip 192.168.2.0 0.0.0.255 any
interface VirtualPortGroup1
description ThousandEyes
192.168.2.254 255.255.255.0
ip nat inside
interface GigabitEthernet0/0/0
description WAN interface
192.168.114.10 255.255.255.252
ip nat outside