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

Myl*_*ray 3 cisco router ios

我经常使用 Fortigate 设备,在 CLI 中可以导航到一个节点(假设config system global然后输入,show它将显示该块的配置。

在 IOS 中,我不知道如何执行此操作,我知道我可以退出conf term模式并使用,show run但配置可能很长。

是否有可能在说:

router>en
router#conf t
router(config)#interf f0/1
Run Code Online (Sandbox Code Playgroud)

键入一个只显示配置部分的命令,如下所示:

interface FastEthernet0/1
 no ip address
 speed auto
 full-duplex
 pppoe enable group global
 pppoe-client dial-pool-number 1
Run Code Online (Sandbox Code Playgroud)

感谢您的任何建议!

kri*_*sFR 6

我认为你正在寻找的是:

router# show running-config interface FastEthernet0/1
Run Code Online (Sandbox Code Playgroud)

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


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

router(config)# do show running-config interface FastEthernet0/1
Run Code Online (Sandbox Code Playgroud)