Skip to Content
Arista Warrior,第二版
book

Arista Warrior,第二版

by Gary A. Donahue
May 2025
Intermediate to advanced
572 pages
8h 39m
Chinese
O'Reilly Media, Inc.
Book available
Content preview from Arista Warrior,第二版

第 13 章 零接触调配 零接触调配

本作品已使用人工智能进行翻译。欢迎您提供反馈和意见:translation-feedback@oreilly.com

当固定配置的 Arista 交换机启动且未找到启动配置时,交换机默认为零接触配置 (ZTP) 模式。你对 ZTP 的第一反应可能是它很麻烦,但我向你保证它并不麻烦,我希望在本章结束时,你会同意我的说法。事实上,这是一个非常酷的功能,你可以将它用得出神入化。

备注

从技术上讲,触发 ZTP(启用时)的原因是启动配置文件丢失或大小为零字节。

您是否安装过开箱即用的新交换机?很可能你安装好交换机后,坐在数据中心里用控制台电缆接线,或者你把交换机放在办公桌上,而你的同事却因为风扇的噪音和你对着干。或者考虑一下远程安装。我的许多客户都购买了远程 "智能 "手服务,但最后却发现这些远程手并不那么智能。ZTP 通过使用基于标准的动态主机配置协议 (DHCP),可以消除这两种情况。

我之所以说这会很麻烦,是因为当新交换机通电后,如果没有采取使用 ZTP 的措施,配置交换机几乎是不可能的。如果你不知道 Arista 交换机是如何工作的,那么第一个迹象就是你将会度过漫长的一天。在新交换机的登录提示符下按 Enter 时,会出现以下警告:

localhost login:

No startup-config was found.

The device is in Zero Touch Provisioning mode and is attempting to
download the startup-config from a remote system. The device will not
be fully functional until either a valid startup-config is downloaded
from a remote system or Zero Touch Provisioning is cancelled.

To cancel Zero Touch Provisioning, login as admin and type
'zerotouch cancel' at the CLI. Alternatively, to disable Zero Touch
Provisioning permanently, type 'zerotouch disable' at the CLI.
Note: The device will reload when these commands are issued.

现在,如果你像我一样是一个高级的万事通网络人,你就会因为字数太多而忽略这一点。请允许我用斜体指出重要的部分:

在从远程系统下载有效的启动配置或取消零接触调配之前,设备将无法完全运行。是的,这看起来很重要,尤其是关于设备无法完全运行的部分。还没读懂?请允许我演示一下。无视所有关于交换机无能的可怕警告,我登录并开始配置。首先是主机名,它必须与众不同:

localhost#conf
localhost(config)#hostname Arista
Arista(config)#

真酷!现在我的交换机有了一个聪明的主机名,我保存了配置--因为 30 年的坏习惯很难改掉:

Arista(config)#wri
备注

从 EOS 4.21.1F 版本开始,当您尝试执行此操作时,EOS 会抛出一个错误,提示 "当启用 ZeroTouch 时,无法复制到启动配置文件"。在这种情况下,我必须为他们点赞,因为我认为这是一个伟大的改变。 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

A Practical Guide to Fedora™ and Red Hat® Enterprise Linux®, Seventh Edition

A Practical Guide to Fedora™ and Red Hat® Enterprise Linux®, Seventh Edition

Mark G. Sobell

Publisher Resources

ISBN: 9798341658967