在网络部署或者实验中经常需要测试连通性,我们可以利用设备本身的一些服务例如 Telnet, SSH, FTP, TFTP 的端口进行测试。在 Cisco 的设备上我们还可以架设 HTTP 服务器并利用 80 或者 443 端口进行测试。

将 R2 配置成为 HTTP Server
R2(config)#ip http server R2(config)#ip http authentication local R2(config)#do dir Directory of flash0:/ 1 drw- 0 Jan 30 2013 00:00:00 +00:00 boot 264 drw- 0 Oct 14 2013 00:00:00 +00:00 config 267 -rw- 142426128 Jul 22 2015 00:00:00 +00:00 vios-adventerprisek9-m 270 -rw- 524288 Dec 31 2017 23:42:54 +00:00 nvram 271 -rw- 79 Dec 31 2017 22:24:00 +00:00 e1000_bia.txt 2142715904 bytes total (1995153408 bytes free) R2(config)#ip http path flash0:/ R2(config)#username abc privilege 15 password cisco !--- 这里配置privilege很重要 ---!
用 R1 进行 HTTP 下载测试
R1#copy http://abc:cisco@1.1.1.2/e1000_bia.txt flash0: Destination filename [e1000_bia.txt]? test.txt %Warning:There is a file already existing with this name Do you want to over write? [confirm] Accessing http://:@1.1.1.2/e1000_bia.txt… Loading http://:@1.1.1.2/e1000_bia.txt 79 bytes copied in 0.537 secs (147 bytes/sec)