在cisco IOS conf模式中显示特定块的代码?

我使用Fortigate齿轮很多,并在CLI中可以导航到一个节点(比如说config system global然后inputshow ,它会显示该块的configuration。

在IOS我不知道如何做到这一点,我知道我可以退出conf term模式,并使用show run但configuration可以很长。

是否有可能在说:

 router>en router#conf t router(config)#interf f0/1 

要input一个只显示configuration部分的命令:

 interface FastEthernet0/1 no ip address speed auto full-duplex pppoe enable group global pppoe-client dial-pool-number 1 

感谢您的任何build议!

我想你正在寻找的是:

 router# show running-config interface FastEthernet0/1 

这将只显示端口Fa0 / 1的configuration。


当您处于configuration模式时,您可以使用do关键字来调用show命令:

 router(config)# do show running-config interface FastEthernet0/1 

尝试

 show running-config | section ? 

例如

 show running-config | section router bgp 

它与include语句类似,但也列出了所有的子命令。

另一个有用的工具是pipe道命令|include ,所以:

 router# show running-config | include interface 

会显示包含word界面的running-config中的所有行