JN0-102 · Question #76
Which command displays only the interfaces that are operationally and administratively up?
The correct answer is D. show interfaces terse | except down. To display only interfaces that are both administratively and operationally up, the show interfaces terse command should be piped with except down to filter out any interfaces whose status contains the word 'down'.
Question
Which command displays only the interfaces that are operationally and administratively up?
Options
- Ashow interfaces terse | match up
- Bshow interfaces terse | match down
- Cshow interfaces terse | except up
- Dshow interfaces terse | except down
How the community answered
(27 responses)- A4% (1)
- B4% (1)
- C11% (3)
- D81% (22)
Why each option
To display only interfaces that are both administratively and operationally up, the `show interfaces terse` command should be piped with `except down` to filter out any interfaces whose status contains the word 'down'.
`| match up` would show lines containing 'up', but some interfaces might be 'administratively up, operationally down' and still contain 'up' in the output, which is not what the question asks for (both up).
`| match down` would show interfaces that are down, which is the opposite of the desired outcome.
`| except up` would exclude interfaces that are up, which is the opposite of the desired outcome.
The `show interfaces terse` command provides a concise summary of interface states. Piped with `| except down`, it filters out any lines that contain the string 'down', effectively showing only interfaces that are in an 'up' state for both administrative and operational status.
Concept tested: Junos CLI output filtering for interface status
Source: https://www.juniper.net/documentation/us/en/software/junos/cli/topics/reference/command-reference/cli-pipes-operators-and-filters.html
Topics
Community Discussion
No community discussion yet for this question.