远程configurationCisco交换机,无需访问控制台

由于在更新的固件中,思科在交换机上设置密码之前禁止访问Web界面,所以我需要另一种远程configuration交换机的方法。

我阅读了思科智能安装stream程: http : //www.cisco.com/en/US/docs/switches/lan/smart_install/release_12.2_55_se/configuration/guide/tasks.html

唯一的问题是它需要一个35xx交换机作为导演,我的大多数networking只有2960年,所以我不能一直这样做,但我总是有一个linuxbox现场,我可以使用DHCP和TFTP。

是否有可能给一个新的交换机configuration从DHCP和TFTP服务?

如果我例如configuration我的DHCP与文件服务器属性,并指向我的TFTP服务器。

然后在tftp上添加一个client_cfg.txt文件,并给它一个login密码。

还是有一个更简单的方法来做到这一点? (没有控制台访问是不可能的)。

编辑:详细说明,我们有50-100个交换机在不同地点的网站,我们不能使用控制台服务器,家伙与笔记本电脑四处奔波我等我开始认为我唯一的select是将MDF交换机升级到所有3560新的网站(我们不幸的是不能访问路由器)

我仍然说控制台访问,谁说你需要在那里身体? 您可以使用控制台服务器,以便您访问和控制远程位置的串行控制台。

例如:

在这里输入图像说明

http://www.opengear.com/product-acm5000.html

所以我find了一种方法来实现几乎所有的思科2950/60,35xx等型号和固件。

你需要一个带有DHCP和TFTP服务器的盒子。

需要拉取configuration的cisco交换机显然需要能够联系DHCP服务器,所以vlan1可能是你想要确保dhcp传出的地方。

我不打算详细介绍DHCP和TFTPconfiguration,只是让你知道你需要注意什么。

对于我的CentOS 6发行版,我需要设置dhcpd选项filenamenext-server

next-server指定TFTP服务器的地址。

filename是指定你希望cisco设备在TFTP服务器上下载的configuration文件。

如果没有指定文件名或者该文件不可用,交换机将开始询问默认configuration,对于每个交换机/ ap /路由器,这将是不同的。 它要求fx的文件之一。 是cisconet.cfg如果它不能获得指定的tftp地址的数据,它也将尝试255.255.255.255,所以它也会要求广播tftp服务器。

如果您具有对设备的控制台访问权限,则可以看到它请求的文件。

以下是在Cisco 2960交换机上启动后的原始输出,其中指定的文件名在TFTP服务器上不可用,因此交换机将开始询问其他文件:

 *Mar 1 00:02:18.621: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up *Mar 1 00:02:28.679: AUTOINSTALL: Vlan1 is assigned 10.10.100.13 *Mar 1 00:02:38.687: AUTOINSTALL: Obtain siaddr 10.10.100.1 (as config server) *Mar 1 00:02:38.687: AUTOINSTALL: Obtain default router (opt 3) 10.10.100.1 %Error opening tftp://10.10.100.1/client_cfg.txt (Timed out) %Error opening tftp://10.10.100.1/client_cfg.txt (Timed out) %Error opening tftp://10.10.100.1/client_cfg.txt (Timed out) %Error opening tftp://255.255.255.255/client_cfg.txt (Timed out) %Error opening tftp://255.255.255.255/client_cfg.txt (Timed out) %Error opening tftp://255.255.255.255/client_cfg.txt (Timed out) %Error opening tftp://10.10.100.1/network-confg (Timed out) %Error opening tftp://10.10.100.1/cisconet.cfg (Timed out) %Error opening tftp://10.10.100.1/router-confg (Timed out) %Error opening tftp://10.10.100.1/ciscortr.cfg (Timed out) %Error opening tftp://10.10.100.1/network-confg (Timed out) %Error opening tftp://10.10.100.1/cisconet.cfg (Timed out) %Error opening tftp://10.10.100.1/router-confg (Timed out) %Error opening tftp://10.10.100.1/ciscortr.cfg (Timed out) %Error opening tftp://10.10.100.1/network-confg (Timed out) %Error opening tftp://10.10.100.1/cisconet.cfg (Timed out) %Error opening tftp://10.10.100.1/router-confg (Timed out) %Error opening tftp://10.10.100.1/ciscortr.cfg (Timed out) %Error opening tftp://255.255.255.255/network-confg (Timed out) %Error opening tftp://255.255.255.255/cisconet.cfg (Timed out) %Error opening tftp://255.255.255.255/router-confg (Timed out) %Error opening tftp://255.255.255.255/ciscortr.cfg (Timed out) %Error opening tftp://255.255.255.255/network-confg (Timed out) %Error opening tftp://255.255.255.255/cisconet.cfg (Timed out) 

以下是从TFTP正确接收文件的交换机的输出:

 *Mar 1 00:01:33.289: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state to up *Mar 1 00:01:43.674: AUTOINSTALL: Vlan1 is assigned 10.10.100.13 *Mar 1 00:01:53.674: AUTOINSTALL: Obtain siaddr 10.10.100.1 (as config server) *Mar 1 00:01:53.674: AUTOINSTALL: Obtain default router (opt 3) 10.10.100.1 Loading client_cfg.txt from 10.10.100.1 (via Vlan1): ! [OK - 121 bytes] *Mar 1 00:03:51.928: %SYS-5-CONFIG_I: Configured from tftp://10.10.100.1/client_cfg.txt by console 

我的configuration文件很简单,基本上允许使用用户名/密码cisco进行telnet / www访问

 enable password cisco ! username cisco secret 0 cisco ! line vty 0 4 password cisco ! end ! 

我可以在结束之前inputcopy running-config startup-config

但是如果你只是希望这个在运行configuration中运行,每次交换机开始你的好去。

如果有人想要,他们可以在3560交换机上做一个telnet“directorip”,看看导演在回应什么。我确信很容易从那里实际创build基于交换机序列号的自定义configuration。

TFTP和DHCP也可以在2960交换机上设置,如果你愿意的话,在这个网页上有这个指南。

不幸的是我没有任何3560和3750的testing,但是如果你只有一个,你可以尝试通过捕获导向器和客户端交换机之间的数据来反向devise智能安装过程。

在分析客户端发出的不同的DHCP选项之后,应该很容易用必要的DHCP和TFTPconfiguration来设置你的Linux服务器。

您的服务器将被用作智能安装主pipe。

在这篇博文之后 ,应该很容易build立一个实验室,然后重现预期的行为。

但是,如果您有一个可以用作智能安装导向器的Cisco路由器,则可能比服务器更容易使用它。