我正在研究Cisco IOS的“良好实践”文档,其中一个控件告诉我要在路由器中禁用ICMPredirect数据包。 听起来很合理。 所以我在Cisco Packet Tracker(一个漂亮的小networking模拟器程序)中进行testing。 在我的虚拟路由器的IOS CLI中,input以下内容:
jcios01#config term Enter configuration commands, one per line. End with CNTL/Z. jcios01(config)#interface GigabitEthernet9/0 jcios01(config-if)#no ip mask-reply ^ % Invalid input detected at '^' marker.
我感到困惑。 这就是文件要做的事情。 启用“config term”,“interface”,然后是“no ip mask-reply”。 我忘了什么吗?
是的,我是思科新手。
在真实的IOS上,禁用icmpredirect的命令在“ip”子菜单下有些误导,但有助于澄清问题:
router#conf t Enter configuration commands, one per line. End with CNTL/Z. router(config)#int f1/0 router(config-if)#no ip ? Interface IP configuration subcommands: <snip> redirects Enable sending ICMP Redirect messages router(config-if)#no ip redirects router#sh run int f1/0 ! interface FastEthernet1/0 description --- WAN ip address dhcp no ip redirects <<< no ip proxy-arp ip nat outside ip virtual-reassembly duplex auto speed auto no cdp enable end
这里的界面configuration显示了一些其他有用的选项,用于“不安全”的界面。
顺便说一下,PacketTracer非常适合学习IOS命令行,但是我发现它的行为方式与真正的IOS有很大的不同。
你可以看看dynamips / dynagen / gns3,甚至是quagga。 Dynamips及其前端gns3用于逼真的实验室,因为它们使用真实的IOS映像,而quagga是unixes的类IOS路由守护程序。