簡介
本文檔介紹在vPC設定中,未定義使用者名稱出現在Nexus交換機日誌中的原因。
必要條件
需求
本文件沒有特定需求。
採用元件
本文中的資訊係根據以下軟體和硬體版本:
本文中的資訊是根據特定實驗室環境內的裝置所建立。文中使用到的所有裝置皆從已清除(預設)的組態來啟動。如果您的網路正在作用,請確保您已瞭解任何指令可能造成的影響。
背景資訊
在Nexus 5000和Nexus 7000平台上運行NX-OS時,在記帳日誌中可以觀察到「root」、「_emuser」、「svc-isan」和「admin」等使用者名稱,即使這些使用者名稱不是由使用者顯式定義的。這些使用者名稱在交換機中預先定義,並且本文檔說明了在哪些情況下可以在記帳日誌中觀察到上述使用者名稱。
使用者名稱 |
說明和日誌 |
根 |
此測試在Nexus 5000交換機上執行。
===========================================
在Nexus 5000上,當運行copy run start命令以及在其上執行配置儲存(複製運行啟動)時,使用者root顯示在日誌中。請參閱以下範例:
Tue May 6 05:25:28 2014:type=update:id=10.10.10.10@pts/0:user=admin:cmd= Performing configuration copy. Tue May 6 05:25:30 2014:type=start:id=vsh.20707:user=root:cmd= Tue May 6 05:25:31 2014:type=stop:id=vsh.20707:user=root:cmd= Tue May 6 05:25:35 2014:type=update:id=10.10.10.10@pts/0:user=admin:cmd= copy running-config startup-config (SUCCESS) |
__emuser |
此測試在支援EEM(嵌入式事件管理器)功能的Nexus 5000交換機上執行。
============================================
在Nexus 5000交換機上配置EEM指令碼,並且檢測到埠關閉事件時,EEM指令碼將進入介面配置模式(在此情況下專門用於交換矩陣擴展器(FEX)埠乙太網114/1/1以進行測試),然後將其重新啟動。請參閱以下示例:
Nexus5K# sh run eem !Command: show running-config eem !Time: Sun Apr 27 04:56:04 2014 version 6.0(2)N2(4) event manager applet test event syslog pattern "ETHPORT-5-IF_DOWN_NONE" action 1.0 cli enable action 2.0 cli conf t action 3.0 cli interface ether 114/1/1 action 4.0 cli no shut action 5.0 cli end
使用使用者名稱「admin1」登入到Nexus 5000,該使用者名稱在本地配置。請參閱以下登入作業階段範例:
Nexus1# show users NAME LINE TIME IDLE PID COMMENT admin1 pts/2 Apr 27 04:31 . 31579 (10.137.76.223) *
手動關閉連線到Nexus 5000的一個FEX模組上的埠E114/1/1。此日誌中的埠被退回:
2014 Apr 27 04:56:26 N5K-C5548UP %ETHPORT-5-IF_DOWN_NONE: Interface Ethernet114/1/32 is down (Transceiver Absent) 2014 Apr 27 04:56:27 N5K-C5548UP %ETHPORT-5-IF_ADMIN_UP: Interface Ethernet114/1/32 is admin up.
在記帳日誌中,「admin1」使用者手動關閉埠後,使用者「eem_user」帳戶未執行關閉。請參閱以下範例:
Sun Apr 27 04:56:25 2014:type=update:id=10.10.10.10@pts/2:user=admin1: cmd=configure terminal ; interface Ethernet114/1/1 (SUCCESS) Sun Apr 27 04:56:25 2014:type=update:id=10.10.10.10@pts/2:user=admin1: cmd=configure terminal ; interface Ethernet114/1/1 ; shutdown (REDIRECT) Sun Apr 27 04:56:26 2014:type=update:id=10.10.10.10@pts/2:user=admin1: cmd=configure terminal ; interface Ethernet114/1/1 ; shutdown (SUCCESS) Sun Apr 27 04:56:26 2014:type=start:id=vsh.32539:user=__eemuser:cmd= Sun Apr 27 04:56:27 2014:type=update:id=vsh.32539:user=__eemuser:cmd=configure terminal ; interface Ethernet114/1/1 (SUCCESS) Sun Apr 27 04:56:27 2014:type=update:id=vsh.32539:user=__eemuser:cmd=configure terminal ; interface Ethernet114/1/1 ; no shutdown (REDIRECT) Sun Apr 27 04:56:27 2014:type=update:id=vsh.32539:user=__eemuser:cmd=configure terminal ; interface Ethernet114/1/1 ; no shutdown (SUCCESS)
根據上述時間戳並觸發EEM指令碼時,使用者「eem_user」會記錄「no shut」的操作。 |
svc-isan |
此測試在Nexus 7000上執行。
=====================================
在Nexus 7000上配置了EEM指令碼,並且檢測到埠管理關閉事件時,EEM指令碼將進入介面配置模式(在本例中專門用於FEX介面乙太網101/1/10進行測試),然後將其重新啟用。請參閱以下範例:
event manager applet TEST event syslog pattern ".*ETHPORT-5-IF_DOWN_ADMIN_DOWN.*" action 1.0 cli enable action 2.0 cli conf t action 3.0 cli int e101/1/10 action 4.0 cli no shut action 5.0 cli end action 6.0 syslog msg INTERFACE CHANGED TO ADMIN NO SHUT \ action 7.0 syslog priority critical msg INTERFACE HAS BEEN CHANGED TO ADMIN UP
如果E101/1/10關閉,則EEM指令碼將觸發且不會關閉埠。在日誌中觀察到以下消息:
2014 Mar 12 07:12:37 Nexus_7000 %ETHPORT-5-IF_DOWN_ADMIN_DOWN: Interface Ethernet101/1/10 is down (Administratively down) 2014 Mar 12 07:12:38 Nexus_7000 %ETHPORT-5-IF_ADMIN_UP: Interface Ethernet101/1/10 is admin up . 2014 Mar 12 07:12:38 Nexus_7000 %VSHD-5-VSHD_SYSLOG_CONFIG_I: Configured from vty by admin on vsh.23673 2014 Mar 12 07:12:38 Nexus_7000 %EEM_ACTION-2-CRIT: INTERFACE HAS BEEN CHANGED TO ADMIN UP
在記帳日誌和相同的時間戳中,您會看到admin(用於登入Nexus 7000的帳戶)執行關閉操作。您會看到EEM已觸發,EEM對配置所做的更改記錄為svc-isan。請參閱Nexus 7000中的以下記帳日誌:
Wed Mar 12 07:12:37 2014:type=update:id=10.10.10.10@pts/0:user=admin: cmd=switchto ; configure terminal ; interface Ethernet101/1/10 ; shutdown (REDIRECT) Wed Mar 12 07:12:37 2014:type=update:id=10.10.10.10@pts/0:user=admin: cmd=switchto ; configure terminal ; interface Ethernet101/1/10 ; shutdown (SUCCESS) Wed Mar 12 07:12:38 2014:type=start:id=vsh.23673:user=svc-isan:cmd= Wed Mar 12 07:12:38 2014:type=update:id=vsh.23673:user=svc-isan: cmd=configure terminal ; interface Ethernet101/1/10 (SUCCESS) Wed Mar 12 07:12:38 2014:type=update:id=vsh.23673:user=svc-isan: cmd=configure terminal ; interface Ethernet101/1/10 ; no shutdown (REDIRECT) Wed Mar 12 07:12:38 2014:type=update:id=vsh.23673:user=svc-isan: cmd=configure terminal ; interface Ethernet101/1/10 ; no shutdown (SUCCESS) Wed Mar 12 07:12:38 2014:type=update:id=vsh.23673:user=svc-isan: cmd=syslog msg INTERFACE CHANGED TO ADMIN NO SHUT (SUCCESS) Wed Mar 12 07:12:38 2014:type=update:id=vsh.23673:user=svc-isan: cmd=syslog priority critical msg INTERFACE HAS BEEN CHANGED TO ADMIN UP (SUCCESS) |
admin |
此測試是在具有config-sync的一對Nexus 5000上執行的。
==============================================
一對Nexus 5000上的config-sync預配置可在以下位置找到:配置同步操作。
此組態已用於交換器設定檔中:
N5K1(config-sync-sp-if)# sh switch-profile buffer
switch-profile : Test ---------------------------------------------------------- Seq-no Command ---------------------------------------------------------- 2 interface Ethernet1/8 2.1 switchport 2.2 switchport mode trunk 2.3 switchport trunk allowed vlan 1-100 2.4 shutdown
提交更改並將其推送到對等交換機。然後確認已成功應用:
N5K1(config-sync-sp-if)# commit Verification successful... Proceeding to apply configuration. This might take a while depending on amount of configuration in buffer. Please avoid other configuration changes during this time. Commit Successful
現在檢查N5K1上的記帳日誌,「test_user」(即登入到N5K1的使用者名稱)的配置更改記錄在這裡:
Thu Mar 6 08:19:22 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport mode trunk (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport mode trunk (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742(sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport trunk allowed vlan 1-100 (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; switchport trunk allowed vlan 1-100 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; shutdown (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.23742 (sp-commit): user=test_user:cmd= configure terminal ; interface Ethernet1/8 ; shutdown (SUCCESS) Thu Mar 6 08:19:23 2014:type=stop:id=ppm.23742:user=test_user: cmd=Thu Mar 6 08:19:23 2014:type=update:id=10.10.10.10@pts/1: user=test_user:cmd= configure sync ; switch-profile Test ; commit (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=10.10.10.10@pts/1: user=test_user:cmd= configure sync ; commit (SUCCESS)
檢視此對等Nexus 5000交換機,該交換機的配置更改從N5K1推轉。記帳日誌報告的時間戳相同,並表示「admin」進行了相同的配置更改:
Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit) :user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport mode trunk (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport mode trunk (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport trunk allowed vlan 1-100 (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; switchport trunk allowed vlan 1-100 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 (SUCCESS) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; shutdown (REDIRECT) Thu Mar 6 08:19:23 2014:type=update:id=ppm.21880 (sp-commit): user=admin:cmd= configure terminal ; interface Ethernet1/8 ; shutdown (SUCCESS) |