10-19-2024 09:22 AM
Hi community,
i would like to ask when i run show running command in either switch or router, what are all the sections that i can search for it?
10-19-2024 09:36 AM
10-19-2024 09:46 AM
Show running-config | section …….
10-19-2024 09:59 AM - edited 10-19-2024 10:01 AM
Got It.
This is a filter to parcing inside the device output. There Will be no fix value for Section. It Will depend on How you use It. For example
Router# show running-config | section include interface
Like any filter It Will depend on what you are looking for.
10-19-2024 03:57 PM
I believe the section command will match against any config statement that matches its argument and then include anything indented under it.
10-21-2024 02:41 PM
@Joseph W. Doherty wrote:
I believe the section command will match against any config statement that matches its argument and then include anything indented under it.
From a couple of recent replies, possibly my prior reply wasn't understood.
The "section" option only appears to "care" about what I mentioned previously, i.e. it matches its argument line, and includes any configuration lines indented underneath it. To make it clear, in CML, for an IOS router, I added to the config the following:
policy-map x
class class-default
fair-queue
random-detect
policy-map y
class class-default
service-policy x
I chose to use policy map, as they have two indentation levels.
nserthostname-here#sh run | section map
policy-map x
class class-default
fair-queue
random-detect
policy-map y
class class-default
service-policy x
inserthostname-here#sh run | section default
class class-default
fair-queue
random-detect
class class-default
service-policy x
inserthostname-here#sh run | section x
policy-map x
class class-default
fair-queue
random-detect
service-policy x
duplex auto
duplex auto
duplex auto
duplex auto
banner exec ^C
* purposes is expressly prohibited except as otherwise authorized by *
* purposes is expressly prohibited except as otherwise authorized by *
* purposes is expressly prohibited except as otherwise authorized by *
line aux 0
inserthostname-here#sh run | section queue
fair-queue
So, as far as the "section" option is concerned, it matches configuration lines with the text, and includes any immediately indented configuration lines underneath the matched line.
10-19-2024 09:45 AM
- A running configuration of a switch or a router , is not considered to contain sections as such ; what is done that usually directives with a targeted functionality or goal are grouped together , but there is no concept of sections ,
M.
10-19-2024 07:38 PM
I cannot appreciate the "section" filter option in switches because the "use case" is fairly limited. However, I use the "sections" filter option with routers and on 9800.
10-20-2024 10:31 PM - edited 10-21-2024 12:34 PM
there are section of code reserved for specific commands to configure things; like place holders, that u could call "sections"; i.e. login section for console and vty exists in every Cisco device. Each interface has its own section; Routing has its own placed; One way to spot section is to look for code /commands indentications (indent). You can use "section" keyword like show running-config | section <name like router or line con 0>
here are examples:
line con 0
exec-timeout 5 0
privilege level 1
no login
line aux 0
transport input all
line vty 0 4
exec-timeout 5 0
privilege level 0
no login
!
router rip
version 2
no auto-summary
!
vtp domain cisco
vlan 5,7,8,9,10,146
interface FastEthernet0/1
no shutdown
switchport host
switchport access vlan 146
interface Loopback0
ip address 28.119.16.1 255.255.255.0
ipv6 address 2001:28:119:16::1/64
Regards, ML
**Please Rate All Helpful Responses **
10-21-2024 05:45 AM
How about this?
EBD-3850#sh run | i ^[a-z]
version 16.6
no service pad
service timestamps debug datetime localtime show-timezone
service timestamps log datetime localtime show-timezone
service password-encryption
no service dhcp
platform punt-keepalive disable-kernel-core
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide