To display the current configuration, use the show configuration mode command. This command displays the configuration at the current hierarchy level or at the specified level.
- user@host# show <statement-path>
The configuration statements appear in a fixed order, and interfaces appear alphabetically by type, and then in numerical order by slot number, PIC number, and port number. Note that when you configure the router, you can enter statements in any order.
You also can use the CLI operational mode show configuration command to display the last committed current configuration, which is the configuration currently running on the router:
- user@host> show configuration
When you show a configuration, a timestamp at the top of the configuration indicates when the configuration was last changed:
- ## Last commit: 2006-07-18 11:21:58 PDT by echen
- version 8.3
If you have omitted a required statement at a particular hierarchy level, when you issue the show command in configuration mode, a message indicates which statement is missing. As long as a mandatory statement is missing, the CLI continues to display this message each time you issue a show command. For example:
- [edit]
- user@host# show
- protocols {
-
- pim {
-
- interface so-0/0/0 {
- priority 4;
- version 2;
- # Warning: missing mandatory statement(s): 'mode'
- }
- }
- }
Display the entire configuration:
- [edit]
- user@host# set protocols ospf area 0.0.0.0
interface so-0/0/0 hello-interval 5
- [edit]
- user@host# show
- protocols {
-
- ospf {
-
- area 0.0.0.0 {
-
- interface so-0/0/0 {
- hello-interval 5;
- }
- }
- }
- }
Display a particular hierarchy in the configuration:
- [edit]
- user@host# show protocols ospf area 0.0.0.0
- interface so-0/0/0 {
- hello-interval 5;
- }
Move down to a level and display the configuration at that level:
- [edit]
- user@host# edit protocols ospf area 0.0.0.0
- [edit protocols ospf area 0.0.0.0]
- user@host# show
- interface so-0/0/0 {
- hello-interval 5;
- }
Display all of the last committed configuration:
- [edit]
- user@host# set protocols ospf area 0.0.0.0
interface so-0/0/0 hello-interval 5
- [edit]
- user@host# commit
- commit complete
- [edit]
- user@host# quit
- exiting configuration mode
- user@host> show configuration
- ## Last commit: 2006-08-10 11:21:58 PDT by user
- version 8.3
- protocols {
-
- ospf {
-
- area 0.0.0.0 {
-
- interface so-0/0/0 {
- hello-interval 5;
- }
- }
- }
- }