Juniper JN0-220 (JNCIA-DEVNET)

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19
At a glance
Powered by AI
The document discusses questions related to networking concepts like Python, YAML, Ansible, NETCONF, REST APIs, and Junos. Key topics include data types, variables, XML, and automation tools.

Ansible Galaxy modules for the Junos OS are developed by Juniper Networks developers. Ansible Galaxy modules for the Junos OS and Ansible core modules for the Junos OS can coexist on the same control machine.

A global variable can be used by any function within the script.

Juniper JN0-220 (JNCIA-DEVNET)

Question #1

You are creating a Python data type that contains a collection of multiple ordered values. As
part of your script, you must make changes to the values that are stored in your data type.
In this scenario, which data type should you use?

 A. list
 B. tuple
 C. dictionary
 D. set

Correct Answer: A

Question #2

Which statement is correct about Ansible? (Choose two.)

 A. Ansible core modules for the Junos OS are developed by Ansible developers
 B. Ansible Galaxy modules for the Junos OS are developed by Juniper Networks
developers
 C. Ansible Galaxy modules for the Junos OS and Ansible core modules for the Junos
OS can coexist on the same control machine
 D. Ansible Galaxy modules for the Junos OS and Ansible core modules for the Junos
OS cannot coexist on the same control machine

Correct Answer: AC

Question #3

Which statement is correct about Python variables once they are created?

 A. A global variable can only be used by functions that are defined later
 B. All variables in Python can be used by any function within the script
 C. A global variable can be used by any function within the script
 D. A global can only be used within the function that created it

Correct Answer: C
Reference: https://stackoverflow.com/questions/423379/using-global-variables-in-a-
function

Question #4

Which two statements are correct about XML? (Choose two.)

 A. XML is used to send an event notification to a client


 B. XML is used to issue Junos operational commands
 C. XML is used to view or modify a Junos configuration
 D. XML is used to create a communications session to a remote device
Correct Answer: BC

Question #5

Which statement is true about YAML?

 A. YAML is a Unicode-based serialization language designed around common data


types
 B. YAML is designed around parsing speed over human readability
 C. YAML is widely used on the Internet as a method to mode data between
webservers and AJAX clients on Web browsers
 D. YAML follows the lowest common denominator data types and requires simple
processing between different programming environments

Correct Answer: A
Reference: http://yaml.org/spec/spec.pdf

Question #6

Which statement is true about using Ansible a Junos device?

 A. The Junos device does not have an Ansible agent installed


 B. SFTP must be used to allow communication between the Ansible control server
and the Junos device
 C. An Ansible playbook is a set of tasks written in XML
 D. Ansible modules are copied and executed on the Junos device

Correct Answer: A

Question #7

According to the Manifesto for Agile Software Development, what is a principle of this
development practice?

 A. Software development cycles should be based on a quarterly time frame


 B. Software development cycles should be scheduled on an annual time frame
 C. After the development cycle has begun, new software requirements should not be
added
 D. After the development cycle has begun, new software requirements can be added
at any point

Correct Answer: D
Reference: https://www.agilealliance.org/agile101/12-principles-behind-the-agile-
manifesto/

Question #8
Click the Exhibit button.
The exhibit demonstrates the output from which type of session?

The exhibit demonstrates the output from which type of session?

 A. REST API
 B. Ansible
 C. PyEZ
 D. NETCONF

Correct Answer: D
Reference: https://www.ietf.org/mail-archive/web/netconf/current/msg05567.html

Question #9

What are two XML elements of the NETCONF Message layer? (Choose two.)

 A. <lock>
 B. <unlock>
 C. <rpc>
 D. <rpc-reply>

Correct Answer: CD

Question #10
Which two statements regarding NETCONF are true? (Choose two.)

 A. NETCONF is a standardized protocol and works with multiple vendors' devices


 B. NETCONF operations are processed by the jsd process
 C. NETCONF is a proprietary protocol and works only with Junos devices
 D. NETCONF operations are processed by the mgd process

Correct Answer: AD

Question #11

Which Python operator tests two variables to see if they contain the same value?

 A. !=
 B. != =
 C. = =
 D. =

Correct Answer: C
Reference: https://www.programiz.com/python-programming/operators

Question #12

Click the Exhibit button.


Which two actions are performed by the PyEZ Python script shown in the exhibit? (Choose
two.)

 A. It saves the current configuration as a rescue configuration only if one does not
exist
 B. It prints the rescue configuration if one already exists
 C. It prints the rescue configuration after it has been replaced
 D. It always saves the current configuration as a rescue

Correct Answer: AB

Question #13

You are enabling HTTPS for the REST API on a Junos device. You are using a self-signed SSL
certificate and must ensure that the commit does not fail.
In this scenario, which certificate must be provided for HTTPS?
 A. client certificate
 B. server certificate
 C. PKI certificate
 D. SSH certificate

Correct Answer: B
Reference:
https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-
statement/server-certificate-edit-system-services-rest-https.html

Question #14

You have enabled REST API traceoptions on your Junos device.


Where does Junos store the associated log files in this scenario?

 A. /var/chroot/rest-api/var/log
 B. /var/home
 C. /var/tmp
 D. /var/log

Correct Answer: A
Reference:
https://www.juniper.net/documentation/en_US/junos/information-products/pathway-
pages/rest-api/rest-api.pdf
(50)

Question #15

Which feature of Ansible provides encrypted files to house sensitive data such as login
credentials and keys?

 A. Ansible default feature


 B. Ansible Vault
 C. Ansible Galaxy
 D. Ansible Tower

Correct Answer: B
Reference: https://docs.ansible.com/ansible/2.4/vault.html

Question #16

Which two statements are true regarding JSON? (Choose two.)

 A. JSON can be used to evaluate conditional statements


 B. JSON can be used to perform programming loops
 C. JSON can be used to structure data
 D. JSON can be used to format data between a client and a server

Correct Answer: CD
Reference:
https://www.juniper.net/documentation/en_US/junos/topics/reference/general/junos-xml-
protocol-configuration-mapping-to-json.html

Question #17

What is the default REST HTTPS port used on a Junos device?

 A. 3000
 B. 8443
 C. 3443
 D. 443

Correct Answer: C
Reference:
https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-
statement/port-edit-system-services-rest.html

Question #18

Which statement is correct about Python? (Choose two.)

 A. Python automatically deletes unused objects from memory


 B. The Python interpreter is written in Java
 C. Python behavior is influenced by the host OS
 D. Python code must be compiled on a Junos device

Correct Answer: AC

Question #19

What are two benefits of a DevOps approach? (Choose two.)

 A. to reduce deployment anxiety


 B. to reduce the number of managed objects
 C. to quickly integrate software updates
 D. to reduce the number of configuration releases

Correct Answer: AC

Question #20

What does the statement "Ansible provides idempotent operations." mean?

 A. The result of performing the operation once is exactly the same as the result of
performing it repeatedly without any intervening actions.
 B. The result of performing the operation once is not exactly the same as the result
of performing it repeatedly without any intervening actions.
 C. The result of performing the operation once will not allow the operation to be run
again without any intervening actions to correct the failure.
 D. The result of performing the operation once will not allow the operation to be run
again without any intervening actions.
Correct Answer: A
Reference: https://docs.ansible.com/ansible/latest/reference_appendices/glossary.html

Question #21

What are two characteristics found in a modern DevOps environment? (Choose two.)

 A. The development and operations environments are identical


 B. The development and operations environments are different
 C. The DevOps practice relies heavily on the use of physical hardware
 D. The DevOps practice relies heavily on the use of virtualization

Correct Answer: BD

Question #22

Which two Junos platforms support the REST API? (Choose two.)

 A. SRX Series
 B. ACX Series
 C. EX Series
 D. MX Series

Correct Answer: AD

Question #23

Which Junos process handles automation requests involving the XML API, YANG, the REST
API, and SNMP functions?

 A. chassisd
 B. rpd
 C. jsd
 D. mgd

Correct Answer: D
Reference: http://overloadedbits.eu/jnics_devops_01_overview/

Question #24

Click the Exhibit button.


Which YAML form is represented in the exhibit?

 A. a mapping
 B. a set
 C. a tuple
 D. a sequence

Correct Answer: B

Question #25

Which Junos process is responsible for handling automation requests involving the JET API?

 A. mgd
 B. dcd
 C. rpd
 D. jsd

Correct Answer: D
Reference: https://www.juniper.net/documentation/en_US/junos/topics/concept/jet-
application-interaction-with-junos.html

Question #26

Which automation tool provides closed-loop automation and event-driven infrastructure?

 A. Ansible
 B. Salt
 C. Chef
 D. Puppet

Correct Answer: B

Question #27

Your manager wants you to use Ansible to upgrade your Junos devices to the current JTAC
supported release.
Which two modules would you use to accomplish this task? (Choose two.)

 A. junos_package
 B. junos_config
 C. juniper_junos_system
 D. juniper_junos_software

Correct Answer: AD

Question #28

Click the Exhibit button.


Referring to the exhibit, what is printed when you execute the python print (a[3])
command?

 A. 2
 B. 8
 C. 0
 D. 5

Correct Answer: A
Reference: https://swcarpentry.github.io/python-novice-inflammation/02-loop/

Question #29

You want to restrict access to the REST API on a Junos device?


What are two ways to accomplish this task? (Choose two.)

 A. Enable a maximum number of connections


 B. Restrict access by the source MAC address
 C. Restrict access by the source IP address
 D. Enable a schedule of specific access times

Correct Answer: AC

Question #30

What are two components of continuous integration and continuous delivery? (Choose two.)

 A. to use a version control system


 B. to have a large consolidated code delivery
 C. to allocate time at the end of the project for testing
 D. to have the ability to fork or merge code branches

Correct Answer: AB

Question #31

Which protocol supports the GET and POST methods?

 A. HTTP
 B. XML
 C. JSON
 D. YAML

Correct Answer: A
Reference: https://www.juniper.net/documentation/en_US/junos/information-
products/pathway-pages/rest-api/rest-api.pdf

Question #32

Which two commands would be used to view the interface configuration on a Junos device
in JSON format? (Choose two.)

 A. user@router> show configuration interfaces | match json


 B. user@router> show configuration interfaces | display json
 C. [edit] user@router# show interfaces | display json
 D. [edit] user@router# show interfaces | match json

Correct Answer: BC
Reference:
https://www.juniper.net/documentation/en_US/junos/topics/reference/general/junos-xml-
protocol-configuration-mapping-to-json.html

Question #33

The Junos CLI communicates directly with which API?

 A. REST API
 B. JET API
 C. SNMP API
 D. XML API

Correct Answer: D
Reference: https://books.google.com.pk/books?id=tICPHiJG-
RYC&pg=PA46&lpg=PA46&dq=Junos+CLI+communicates+directly+with
+API&source=bl&ots=s3TzxrCmwx&sig=DivGQx_t9S487sz8ncOuEj8wc4c&hl=en&sa=X&ved
=2ahUKEwij3a-
I7areAhULzYUKHQ_ACEIQ6AEwBHoECAYQAQ#v=onepage&q=Junos%20CLI%20communica
tes%20directly%20with%20API&f=false

Question #34

You are asked to securely copy a software image to a remote device using a Python script.
Which PyEZ module would you use to perform these changes?

 A. utils
 B. config
 C. ftp
 D. scp

Correct Answer: D
Reference: https://media.readthedocs.org/pdf/junos-pyez/latest/junos-pyez.pdf

Question #35

What is considered the foundation for DevOps success?

 A. sharing
 B. automation
 C. culture
 D. measurement

Correct Answer: C

Question #36
Which two statements are true for Network Reliability Engineering (NRE)? (Choose two.)

 A. NRE is a proactive process against network failures and monitors every


meaningful performance indicator
 B. NRE focuses on customer satisfaction instead of service functionality
 C. NRE embraces failure and ensures that the same failure does not happen again
 D. NRE provides an understanding that the network is separate from its connected
systems and applications

Correct Answer: AC

Question #37

The REST API retrieves data from a connected device in which two formats? (Choose two.)

 A. XML
 B. YAML
 C. binary
 D. JSON

Correct Answer: AD
Reference:
https://www.juniper.net/documentation/en_US/junos/information-products/pathway-
pages/rest-api/rest-api.pdf
(13)

Question #38

Which statement is correct about automation?

 A. Automation increases the amount of time it takes to retrieve information from a


large number of devices
 B. Automation reduces the costs of managing a large number of devices
 C. Automation increases the number of commands in the CLI
 D. Automation increases the amount of time needed to make changes to large
numbers of devices

Correct Answer: B

Question #39

What is Python?

 A. Python is a product developed by Juniper to facilitate automation


 B. Python is the name of a switch that Juniper sells
 C. Python is the name of a router that Juniper sells
 D. Python is a programming language

Correct Answer: D

Question #40
Which statement is correct about Python?

 A. The Python interpreter is written using the Visual Basic programming language
 B. Python strictly enforces the use of indentation and white space
 C. Python requires that you manually delete unused objects from memory
 D. Python behavior is influenced by the host OS

Correct Answer: D

Question #41

The REST API uses which two protocols for transport? (Choose two.)

 A. HTTPS
 B. HTTP
 C. TELNET
 D. SSH

Correct Answer: AB

Question #42

YAML was designed as a superset of which format?

 A. XML
 B. XSD
 C. Ansible
 D. JSON

Correct Answer: D
Reference: https://medium.com/@williamhayes/yaml-is-a-superset-of-json-it-is-explained-
in-more-detail-here-1d758a069508

Question #43

Given the <name> username </name> XML code, what is the entire string, including the
opening and closing tags, called?

 A. element node
 B. name node
 C. text node
 D. data node

Correct Answer: A

Question #44

Ansible code modules are typically written in which language?

 A. SLAX
 B. Python
 C. YAML
 D. XML

Correct Answer: B

Question #45

PyEZ is an extension library for which programming tool?

 A. Ruby
 B. Puppet
 C. Chef
 D. Python

Correct Answer: D
Reference: https://github.com/Juniper/py-junos-eznc

Question #46

Click the Exhibit button.


What is the final output produced by the Python commands shown in the exhibit?

 A. [5]
 B. [5,4,6]
 C. [5,2,4,6]
 D. [2,4,6]

Correct Answer: B

Question #47

What are two data structures in JSON? (Choose two.)

 A. objects
 B. array
 C. string
 D. number
Correct Answer: AB
Reference: https://javaee.github.io/tutorial/jsonp001.html

Question #48

Which two commands belong to the NETCONF Operation layer? (Choose two.)

 A. <commit>
 B. <rpc>
 C. <rpc-reply>
 D. <get>

Correct Answer: AD

Question #49

You need to retrieve the last_reboot_reason value from a Junos device.


Which Ansible Galaxy library module is used to accomplish this task?

 A. juniper_junos_rpc
 B. juniper_junos_config
 C. juniper_junos_command
 D. juniper_junos_facts

Correct Answer: D

Question #50

Which two statements are true about data structures? (Choose two.)

 A. YAML is human readable and supports serializing arbitrary native data structures
 B. YAML follows the lowest common denominator data types and requires simple
processing between different programming environments
 C. JSON is language dependent, which uses conventions that are familiar to
programmers of languages like C, C++, Java, Perl, and Python
 D. JSON is simple to generate and parse, though human readability is sacrificed

Correct Answer: AD

Question #51

Which statement is correct about Ansible playbooks?

 A. A playbook is a collection of tasks to be performed on the host.


 B. A playbook is called by multiple Python modules.
 C. A playbook is a specific Python module that is executed on a host.
 D. A playbook is a collection of host files?

Correct Answer: A
Reference: https://www.tutorialspoint.com/ansible/ansible_playbooks.htm
Question #52

Click the Exhibit button.


Referring to the exhibit, what is being represented?

 A. XML document
 B. JSON document
 C. Python coding
 D. Ruby coding

Correct Answer: A

Question #53

An XML schema definition file uses which extension?

 A. .tar
 B. .xml
 C. .xls
 D. .xsd

Correct Answer: D
Reference: https://fileinfo.com/extension/xsd

Question #54

How does YAML differ from JSON in data interchange formats?

 A. YAML supports comments


 B. JSON is language specific
 C. JSON is a superset of YAML
 D. YAML is not indentation aware

Correct Answer: A

Question #55

Which type of command is show interfaces | display xml?

 A. an XML command
 B. a CLI command
 C. a SLAX command
 D. an XLST command

Correct Answer: B
Reference: https://www.juniper.net/documentation/en_US/junos/topics/topic-map/junos-
configuartion-viewing.html

Question #56

You are asked to gather interface information from a Junos device. Your environment
supports the JSON format. To determine how interface information is represented, you
decide to view all of the configured interface key-value pairs in the current Junos candidate
configuration.
In this scenario, which command will provide the information that you need?

 A. user@router# show interfaces | find json


 B. user@router# show interfaces | display json
 C. user@router# show interfaces | except json
 D. user@router# show interfaces | match json

Correct Answer: B

Question #57

Which two statements about the XML API are true? (Choose two.)

 A. The XML API can only be used by off-box automation tools


 B. The XML API on-box solutions leverage the NETCONF protocol
 C. The XML API can be used by on-box and off-box automation tools
 D. The XML API off-box solutions leverage the NETCONF protocol

Correct Answer: CD

Question #58

You are asked to update a PyEZ script that will check for errors when connecting or loading
configurations on a Junos device.
Which two command statements should be added to the script to accomplish this task?
(Choose two.)

 A. elseif statement
 B. try statement
 C. else statement
 D. except statement

Correct Answer: BD
Reference: https://www.juniper.net/documentation/en_US/junos-
pyez/topics/example/junos-pyez-program-configuration-data-loading-from-file.html

Question #59

Which pipe command is used to show the XML response to a Junos CLI command?
 A. | display xml
 B. | match xml
 C. | compare xml
 D. | find xml

Correct Answer: A
Reference:
https://books.google.com.pk/books?id=f1oPDAAAQBAJ&pg=PA68&lpg=PA68&dq=pipe+com
mand+is+used+to+show+the+XML+response+to+a
+Junos+CLI+command&source=bl&ots=XouEscoYg2&sig=1VNyda1sh5Pt_15QrCZwv6CSv3
w&hl=en&sa=X&ved=2ahUKEwih9rvC-
KreAhVShxoKHanDCZAQ6AEwBHoECAEQAQ#v=onepage&q=pipe%20command%20is%20u
sed%20to%20show%20the%20XML%20response%20to%20a%
20Junos%20CLI%20command&f=false

Question #60

Which statement is true regarding Python?

 A. To obtain functionality from a package, it must be imported using the Python


keyword module
 B. A Python set is an ordered collection of unique elements
 C. Python 3.x is not fully backwards compatible with Python 2.x
 D. An object within a Python tuple can be modified

Correct Answer: C

Question #61

Which service is needed for Ansible to function on a Junos device?

 A. FTP
 B. NETCONF
 C. HTTPS
 D. Telnet

Correct Answer: B
Reference: https://www.juniper.net/documentation/en_US/junos-
ansible/topics/example/junos-ansible-playbooks-device-os-installing.html

Question #62

You are automating your Junos devices using NETCONF.


Which two actions will help to accomplish this task? (Choose two.)

 A. Enable the NETCONF service


 B. Specify the YAML version
 C. Specify the transport protocol for NETCONF
 D. Enable SSH access for the root user

Correct Answer: AC
Question #63

What is the correct command to enable the REST API Explorer on a Junos device?

 A. set system services rest http


 B. set system services web-management http
 C. set system services web-management webapi https default-certificate
 D. set system services rest enable-explorer

Correct Answer: D
Reference: https://www.juniper.net/documentation/en_US/junos/topics/example/rest-api-
explorer-example.html

Question #64

Which statement is correct about Ansible playbooks?

 A. A playbook is a configuration file that defines the Ansible related parameters


 B. A playbook contains one or more tasks written in XML
 C. A playbook can contain multiple tasks and execute multiple Python modules
 D. A playbook is a specific Python module that is executed on a host

Correct Answer: C

Question #65

Which development model is the classic approach to software development?

 A. Waterfall
 B. Scrum
 C. Kanban
 D. Lean

Correct Answer: A
Reference: https://searchsoftwarequality.techtarget.com/definition/waterfall-model

You might also like