Automation and Programmability

200 soru

Soru 141Soru

A network administrator is evaluating configuration management tools to streamline the provisioning of Cisco IOS XE switches across an enterprise network. Which of the following statements correctly describe the operational capabilities and characteristics of Ansible compared to Puppet and Chef? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Ansible operates using an agentless architecture that communicates with network devices via SSH or NETCONF.; Ansible configuration templates and playbooks are authored using human-readable YAML syntax.

Cevap

Ansible uses an agentless push model communicating over SSH or NETCONF and relies on YAML-formatted playbooks.
Ansible features an agentless architecture that communicates with managed network devices using SSH or NETCONF and uses YAML formatting for defining configuration playbooks.

Adım Adım Çözüm

1
Analyze transport and software requirements for Ansible
Ansible is agentless and uses SSH or NETCONF to manage network devices.
Unlike traditional server automation tools, network switches often cannot host custom agent software, making Ansible's agentless approach well-suited for network hardware.
2
Identify the file format and configuration structure used by Ansible
Ansible configurations (playbooks) are written in YAML.
Puppet uses Puppet DSL (Manifests) and Chef uses Ruby DSL (Recipes/Cookbooks), while Ansible standardizes on YAML structure.

Anahtar Kavram

Operational characteristics and capabilities of Ansible vs. Puppet and Chef
Soru 142Soru

A network administrator is evaluating how network operations are partitioned between functional planes in a controller-based architecture. Which task is performed exclusively within the control plane?

Cevabı ve açıklamayı göster

Cevap: Building the routing table and calculating optimal topology paths via dynamic routing protocols

Cevap

Building the routing table and calculating optimal topology paths via dynamic routing protocols is performed exclusively within the control plane.
The control plane is responsible for the network's brain and decision-making processes. This includes running routing protocol daemons, exchanging protocol messages, computing optimal paths, and maintaining the Routing Information Base (RIB). Once computed, these decision tables are pushed down to the data plane.

Adım Adım Çözüm

1
Identify the primary responsibility of the control plane versus the data plane.
The control plane makes decisions about where traffic should be sent, whereas the data plane carries out the actual forwarding of transit traffic.
Control plane processes run protocol engines (like OSPF, BGP, or EIGRP) to construct network intelligence and topology maps.
2
Evaluate each function to determine whether it is intelligent network control or hardware forwarding.
Constructing the Routing Information Base (RIB) requires CPU computation and path calculation (control plane), whereas FIB lookups, packet header modifications, VLAN tagging, and TCAM filtering are performed by data plane ASICs.
Data plane actions are high-speed per-packet handling tasks, while control plane actions involve signaling, routing state compilation, and path determination.

Anahtar Kavram

Separation of Control Plane and Data Plane
Tahmini Süre:1m 0s
Soru 143Soru

An automated Python monitoring script sends a RESTCONF HTTP GET request to a Cisco IOS XE router to inspect BGP peer relationships. The JSON response is parsed into a Python dictionary named `bgp_data` as shown below:

{
"Cisco-IOS-XE-bgp:bgp": {
"bgp": [
{
"asn": 65001,
"neighbor": [
{
"ip": "10.1.1.2",
"remote-as": 65002,
"state": "Established"
},
{
"ip": "10.2.2.2",
"remote-as": 65003,
"state": "Active"
}
]
}
]
}
}

Which Python expression correctly evaluates to the string `"Active"`?

Cevabı ve açıklamayı göster

Cevap: bgp_data["Cisco-IOS-XE-bgp:bgp"]["bgp"][0]["neighbor"][1]["state"]

Cevap

bgp_data["Cisco-IOS-XE-bgp:bgp"]["bgp"][0]["neighbor"][1]["state"]
The correct expression traverses the top-level dictionary key `"Cisco-IOS-XE-bgp:bgp"`, selects the single element in the `"bgp"` array using index `0`, accesses the second object in the `"neighbor"` array using index `1`, and reads the string value associated with the `"state"` key, correctly yielding `"Active"`.

Adım Adım Çözüm

1
Identify the top-level dictionary key
Access `bgp_data["Cisco-IOS-XE-bgp:bgp"]`, which contains a dictionary with the key `"bgp"`.
Top-level object wrapping is used in YANG-modeled RESTCONF JSON payloads.
2
Navigate the outer array
Access `["bgp"][0]` to reference the first BGP process structure in the list.
Square brackets `[]` signify a JSON array, which is zero-indexed in Python.
3
Locate the target neighbor within the inner array
Access `["neighbor"][1]["state"]` to retrieve the second neighbor object (`10.2.2.2`) and extract its state value.
The first neighbor (`10.1.1.2`) is at index 0, so the second neighbor (`10.2.2.2`) with state `"Active"` is at index 1.

Anahtar Kavram

Traversing nested JSON dictionaries and zero-indexed arrays in REST API responses
Tahmini Süre:1m 0s
Soru 144Soru

A network engineer issues a RESTCONF GET request to a Cisco IOS XE router to inspect interface operational state data. The API returns the following JSON payload, which is parsed into a Python dictionary named `payload`:

{
"ietf-interfaces:interfaces-state": {
"interface": [
{
"name": "GigabitEthernet1",
"type": "iana-if-type:ethernetCsmacd",
"oper-status": "up",
"phys-address": "00:50:56:89:a1:b2",
"speed": 1000000000
},
{
"name": "GigabitEthernet2",
"type": "iana-if-type:ethernetCsmacd",
"oper-status": "down",
"phys-address": "00:50:56:89:a1:c3",
"speed": 100000000
}
]
}
}

Match each Python dictionary lookup expression on the left with its evaluated value on the right.

Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın

Öğeler

payload["ietf-interfaces:interfaces-state"]["interface"][0]["oper-status"]
payload["ietf-interfaces:interfaces-state"]["interface"][1]["speed"]
payload["ietf-interfaces:interfaces-state"]["interface"][1]["oper-status"]
payload["ietf-interfaces:interfaces-state"]["interface"][0]["speed"]

Eşleşmeler

Cevabı ve açıklamayı göster

Cevap

The correct pairings match expression index [0] to GigabitEthernet1 values ('up' and 1000000000) and index [1] to GigabitEthernet2 values ('down' and 100000000).
In Python, JSON arrays are represented as lists, which use zero-based indexing. The expression referencing index [0] targets the first interface entry ('GigabitEthernet1'), where 'oper-status' is 'up' and 'speed' is 1000000000. The expression referencing index [1] targets the second interface entry ('GigabitEthernet2'), where 'oper-status' is 'down' and 'speed' is 100000000.

Adım Adım Çözüm

1
Locate the outer key path
Accessing payload['ietf-interfaces:interfaces-state']['interface'] retrieves a JSON array containing two interface dictionary objects.
JSON arrays are zero-indexed list structures in Python.
2
Evaluate index [0] dictionary key queries
Index [0] corresponds to GigabitEthernet1. Fetching 'oper-status' yields 'up' and fetching 'speed' yields 1000000000.
Array position 0 accesses the first element in the interface array.
3
Evaluate index [1] dictionary key queries
Index [1] corresponds to GigabitEthernet2. Fetching 'speed' yields 100000000 and fetching 'oper-status' yields 'down'.
Array position 1 accesses the second element in the interface array.

Anahtar Kavram

Interpreting JSON Encoded Data and Indexing Nested Structures in Automation Scripts
Soru 145Soru

A network technician parses telemetry data returned by a Cisco vManage REST API call stored in a Python dictionary variable named `telemetry_data`:

{
"header": {
"generated_at": 1690000000,
"status": "success"
},
"data": [
{
"device_id": "10.10.10.1",
"interfaces": [
{
"name": "GigabitEthernet1",
"rx_errors": 0,
"tx_errors": 12,
"status": "up"
},
{
"name": "GigabitEthernet2",
"rx_errors": 45,
"tx_errors": 3,
"status": "up"
}
]
},
{
"device_id": "10.10.10.2",
"interfaces": [
{
"name": "GigabitEthernet1",
"rx_errors": 108,
"tx_errors": 0,
"status": "down"
}
]
}
]
}

What specific value is extracted when referencing `telemetry_data["data"][1]["interfaces"][0]["rx_errors"]`?

Cevabı ve açıklamayı göster

Cevap: 108

Cevap

108
JSON arrays use 0-based indexing. Traversing `telemetry_data["data"][1]` selects the second device entry (`device_id: "10.10.10.2"`). Navigating into its `"interfaces"` array at index `[0]` selects the dictionary for `GigabitEthernet1`. Evaluating the key `"rx_errors"` yields the value `108`.

Adım Adım Çözüm

1
Locate the top-level key "data" in the JSON object.
Returns an array containing two device objects.
The key "data" maps directly to an array of objects.
2
Access index 1 of the "data" array.
Selects the second device object with device_id "10.10.10.2".
JSON arrays are 0-indexed; index 1 specifies the second item.
3
Locate the key "interfaces" within the second device object.
Returns an array containing one interface object for GigabitEthernet1.
The key "interfaces" maps to a list of interface dictionaries for this device.
4
Access index 0 of the "interfaces" array and retrieve the value of key "rx_errors".
Retrieves the value 108.
Index 0 refers to the first interface object, where the key "rx_errors" holds the numeric value 108.

Anahtar Kavram

JSON Data Traversal and Array Indexing
Tahmini Süre:1m 0s
Soru 146Soru

A network engineer is analyzing packet processing behavior on a router to differentiate between tasks executed by the general-purpose CPU and tasks handled by specialized forwarding hardware. Which two operational tasks are executed exclusively within the control plane? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Exchanging OSPF hello and link-state messages with neighboring devices to construct the Routing Information Base (RIB); Processing incoming ARP request packets to resolve Layer 3 to Layer 2 address mappings and maintain the ARP cache

Cevap

The control plane is responsible for exchanging OSPF routing updates to build the RIB and processing ARP requests to manage Layer 2 to Layer 3 address resolution.
The control plane is responsible for generating, receiving, and processing intelligence-building network protocols. Exchanging OSPF messages to calculate routes and populate the Routing Information Base (RIB), as well as processing ARP requests to populate the ARP table, are CPU-bound tasks managed exclusively by the control plane.

Adım Adım Çözüm

1
Identify the primary functions of the Control Plane.
The control plane makes intelligent routing decisions, manages neighbor relationships, runs control protocols (OSPF, BGP, ARP), and builds control tables (RIB, ARP table) using the device CPU.
Control plane protocols require complex logic and state management that cannot be hardcoded into hardware ASICs.
2
Identify the primary functions of the Data Plane.
The data plane (forwarding plane) handles high-speed transit traffic forwarding, MAC/FIB lookups in TCAM/ASIC hardware, frame encapsulation/decapsulation, and hardware ACL filtering.
Data plane tasks must occur at wire speed without involving the main CPU for every transit packet.
3
Evaluate each provided operational task against plane responsibilities.
OSPF message exchange and ARP request processing are control plane operations. FIB hardware lookups and TCAM ACL evaluation are data plane operations.
Matching control protocols to CPU processing confirms the two correct control plane tasks.

Anahtar Kavram

Separation of Control Plane and Data Plane Responsibilities
Soru 147Soru

A netops team is deploying a controller-based network architecture to maintain network topology intelligence centrally while retaining local packet switching on individual infrastructure nodes. Which operational behavior correctly distinguishes the responsibility of the centralized control plane from that of the local data plane?

Cevabı ve açıklamayı göster

Cevap: The centralized control plane constructs topology intelligence and programs forwarding tables, whereas the local data plane inspects packet headers and switches transit traffic using hardware ASICs.

Cevap

The centralized control plane constructs topology intelligence and programs forwarding tables, whereas the local data plane inspects packet headers and switches transit traffic using hardware ASICs.
The correct answer accurately distinguishes between the two operational planes. The control plane is responsible for intelligence-gathering operations such as path calculation, building the routing table (RIB), and deriving forwarding tables (FIB). The data plane is dedicated to fast, local handling of transit data packets—reading packet headers and executing switching or routing actions directly in hardware via ASICs.

Adım Adım Çözüm

1
Identify the primary function of the control plane.
The control plane handles protocol intelligence, routing table computation, path selection, and table generation (such as the RIB and FIB).
Control plane operations dictate how traffic should be routed across the network network-wide.
2
Identify the primary function of the data plane.
The data plane (also known as the forwarding plane) handles direct packet handling, header inspection, MAC/FIB lookups, TTL decrements, and frame encapsulation.
Data plane tasks must occur at line rate and are handled locally by specialized hardware (ASICs/TCAM).
3
Compare the centralized SDN controller paradigm to local network node forwarding.
In SDN architectures, the controller offloads control plane logic centrally and programs the local data plane on switches/routers to execute rapid local forwarding.
Decoupling control logic from local hardware enables centralized network automation while preserving low-latency data plane forwarding performance.

Anahtar Kavram

Control Plane vs. Data Plane Functional Separation
Soru 148Soru

During a performance audit of an enterprise router, traffic containing specialized IP options is punted to the main Route Processor CPU for intensive processing, raising local CPU usage to nearly 100%. Despite this high CPU utilization on the Route Processor, standard transit data packets matching pre-calculated forwarding entries continue flowing through the router without any measurable latency or throughput impact. Which operational mechanism explains why standard transit traffic performance remains unaffected?

Cevabı ve açıklamayı göster

Cevap: Data plane transit traffic is switched in hardware by specialized ASICs using the Forwarding Information Base (FIB), bypassing the general control plane CPU.

Cevap

Data plane transit traffic is switched in hardware by specialized ASICs using the Forwarding Information Base (FIB), bypassing the general control plane CPU.
The correct option highlights the fundamental distinction between the control plane and data plane. The control plane CPU computes routing paths and populates the Routing Information Base (RIB). This information is compiled into the Forwarding Information Base (FIB) and programmed into dedicated hardware ASICs on the data plane. Consequently, standard transit traffic matching FIB entries is handled entirely in hardware, remaining completely immune to general CPU utilization spikes caused by exception packets (such as those with IP options).

Adım Adım Çözüm

1
Analyze the functional responsibilities of network planes.
The control plane CPU builds routing topology structures (RIB/ARP), while the data (forwarding) plane handles packet throughput.
Control plane and data plane architecture separates topology decision-making from packet-by-packet forwarding.
2
Evaluate packet processing hardware separation.
Pre-calculated forwarding structures (FIB and Adjacency Table) are downloaded from the CPU to dedicated hardware ASICs on line cards.
Hardware ASICs operate independently of the general-purpose CPU, allowing transit packets to be forwarded at wire speed.
3
Differentiate punted exception packets from normal transit packets.
Packets requiring IP options or complex handling are punted to the CPU, causing high CPU load, but normal FIB-matched transit packets continue to process in hardware.
Data plane hardware forwarding remains unaffected by control plane CPU load spikes.

Anahtar Kavram

Separation of Control Plane CPU decisions and Data Plane ASIC forwarding
Soru 149Soru

Match each network operation or component to its correct functional plane or architectural interface.

Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın

Öğeler

Exchanging BGP routing updates and building the Routing Information Base (RIB)
Performing Layer 3 destination IP lookups in TCAM for line-rate packet forwarding
Establishing an encrypted SSH session to configure device hostnames and interfaces
Centralized controller pushing network flow policies down to switches using OpenFlow

Eşleşmeler

Cevabı ve açıklamayı göster

Cevap

Exchanging BGP updates and building the RIB matches Distributed Control Plane. Performing Layer 3 IP lookups in TCAM matches Data Plane. Establishing an encrypted SSH session for device configuration matches Management Plane. Pushing flow policies down via OpenFlow matches Southbound API / Centralized Control Plane.
The pairings correctly delineate network plane boundaries: dynamic routing intelligence operates in the distributed control plane, hardware-based packet forwarding resides in the data plane, administrative device access belongs to the management plane, and controller-driven flow programming utilizes Southbound APIs from the centralized control plane.

Adım Adım Çözüm

1
Identify the functional role of dynamic routing protocols like BGP.
Determined that building routing tables (RIB) and maintaining neighbor adjacencies requires control plane intelligence.
The control plane makes routing decisions and constructs the logical topology before programming hardware tables.
2
Analyze high-speed packet lookup mechanisms using TCAM.
Mapped TCAM IP lookups to the Data Plane.
The data plane uses specialized hardware (ASICs and TCAM/FIB tables) to forward transit traffic without CPU intervention.
3
Determine the operational classification of administrative SSH configuration access.
Mapped interactive CLI configuration via SSH to the Management Plane.
Protocols used for administration, monitoring, and direct management (SSH, SNMP, HTTPS) operate in the management plane.
4
Categorize controller-to-device communication mechanisms in SDN architectures.
Mapped OpenFlow policy provisioning from a centralized controller to Southbound API / Centralized Control Plane.
Southbound APIs sit between the centralized SDN control plane and the underlying physical or virtual data plane devices.

Anahtar Kavram

Distinguishing functional plane boundaries (Control, Data, Management) and SDN architecture interfaces
Soru 150Soru

A network administrator issues a RESTCONF HTTP GET request to retrieve OSPF interface parameters from a Cisco IOS XE router. The API returns the following JSON payload:

{
"Cisco-IOS-XE-ospf:ospf": {
"process": [
{
"id": 1,
"area": [
{
"area-id": 0,
"interface": [
{
"name": "GigabitEthernet1",
"cost": 10,
"passive": false
},
{
"name": "GigabitEthernet2",
"cost": 100,
"passive": true
}
]
}
]
}
]
}
}

Based on the JSON payload provided, which two statements correctly interpret the structural data and values? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: The key "process" maps to a JSON array containing objects that represent OSPF process configurations.; The data path Cisco-IOS-XE-ospf:ospf -> process[0] -> area[0] -> interface[1] -> passive evaluates to the boolean value true.

Cevap

The statement identifying that the key 'process' maps to a JSON array of process objects, and the statement evaluating the path to interface[1] -> passive as the boolean literal true are both correct.
The key 'process' uses square brackets `[]` which denotes a JSON array containing configuration objects. The path leading to `interface[1]` correctly targets the second interface object (`GigabitEthernet2`) due to 0-based array indexing, where the `passive` field holds the unquoted boolean value `true`.

Adım Adım Çözüm

1
Analyze JSON structural symbols for the key 'process'
The value following "process": is enclosed in square brackets `[...]`, indicating a JSON array.
Square brackets define an ordered list/array of values or objects in JSON syntax.
2
Evaluate array indexing for the 'interface' element list
Index 0 points to GigabitEthernet1 (first element) and Index 1 points to GigabitEthernet2 (second element).
JSON arrays use 0-based indexing where array[0] represents the first element.
3
Inspect data types for 'cost' and 'passive'
The cost value 10 is numeric (no double quotes), while passive values `false` and `true` are unquoted booleans.
JSON string data types require surrounding double quotes, whereas numbers and booleans are written without quotes.

Anahtar Kavram

JSON Structure and Data Types (Arrays vs. Objects, 0-based Indexing, and Value Types)
Tahmini Süre:1m 30s
Soru 151Soru

A network automation script issues a RESTCONF HTTP GET request to a Cisco IOS XE router to inspect interface configurations. The API returns the following JSON response payload stored in a Python dictionary variable named `result`:

{
"ietf-interfaces:interfaces": {
"interface": [
{
"name": "Loopback0",
"description": "Router ID Interface",
"enabled": true,
"ietf-ip:ipv4": {
"address": [
{
"ip": "192.168.255.1",
"netmask": "255.255.255.255"
}
]
}
},
{
"name": "GigabitEthernet0/0/0",
"description": "WAN Link",
"enabled": false,
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.0.12.1",
"netmask": "255.255.255.252"
}
]
}
}
]
}
}

Which Python expression correctly retrieves the IP address string `"10.0.12.1"` from the `result` dictionary?

Cevabı ve açıklamayı göster

Cevap: result["ietf-interfaces:interfaces"]["interface"][1]["ietf-ip:ipv4"]["address"][0]["ip"]

Cevap

The expression result["ietf-interfaces:interfaces"]["interface"][1]["ietf-ip:ipv4"]["address"][0]["ip"] correctly accesses the IPv4 address string.
The JSON structure contains nested dictionaries and lists. The key 'ietf-interfaces:interfaces' points to an object, whose 'interface' key points to a list of interface objects. 'GigabitEthernet0/0/0' is the second element in this list, which corresponds to index 1. Inside that interface dictionary, 'ietf-ip:ipv4' maps to another dictionary containing the key 'address'. The value of 'address' is a single-element list containing an IP configuration object, so index 0 is required before accessing the 'ip' string key.

Adım Adım Çözüm

1
Locate the top-level object key and the nested interface array.
Accessing result["ietf-interfaces:interfaces"]["interface"] yields a Python list containing two interface dictionary objects.
Brackets [...] in JSON denote arrays, which map to lists in Python.
2
Identify the index of GigabitEthernet0/0/0 within the interface array.
Loopback0 is at index 0, and GigabitEthernet0/0/0 is at index 1.
Python uses zero-based indexing for list items.
3
Traverse the nested dictionary keys and the address array.
Accessing ["ietf-ip:ipv4"]["address"] yields a list with one dictionary entry, accessed via index [0], followed by key ["ip"] to retrieve "10.0.12.1".
Since 'address' is enclosed in square brackets in the JSON structure, it must be indexed as a list before selecting the 'ip' key.

Anahtar Kavram

Interpreting nested JSON data structures (objects vs. arrays) and using zero-based Python indexing to extract key values.
Soru 152Soru

A network automation engineer issues a REST API call to a Cisco Catalyst 9800 Wireless LAN Controller to inspect access point operational telemetry. The controller returns the following JSON encoded response:

{
"response": {
"access_points": [
{
"name": "AP-Lobby-01",
"ip_address": "10.20.40.15",
"radios": [
{ "radio_id": 0, "band": "2.4GHz", "channel": 6, "admin_state": true },
{ "radio_id": 1, "band": "5GHz", "channel": 36, "admin_state": true }
]
},
{
"name": "AP-Conf-02",
"ip_address": "10.20.40.16",
"radios": [
{ "radio_id": 0, "band": "2.4GHz", "channel": 11, "admin_state": false },
{ "radio_id": 1, "band": "5GHz", "channel": 149, "admin_state": true }
]
}
]
}
}

Match each JSON data path expression on the left to its corresponding value on the right based on the returned JSON payload.

Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın

Öğeler

response.access_points[0].radios[1].channel
response.access_points[1].ip_address
response.access_points[1].radios[0].admin_state
response.access_points[0].name

Eşleşmeler

Cevabı ve açıklamayı göster

Cevap

Path response.access_points[0].radios[1].channel maps to 36; response.access_points[1].ip_address maps to "10.20.40.16"; response.access_points[1].radios[0].admin_state maps to false; response.access_points[0].name maps to "AP-Lobby-01".
JSON arrays utilize 0-based indexing. Navigating response.access_points[0] accesses the first access point ('AP-Lobby-01'), and navigating inside its radios array with [1] accesses the second radio (5GHz), yielding channel 36. Similarly, access_points[1] selects the second access point ('AP-Conf-02'), yielding an ip_address of "10.20.40.16" and radios[0].admin_state of false. Finally, access_points[0].name yields "AP-Lobby-01".

Adım Adım Çözüm

1
Understand zero-based list indexing in JSON structures
Index 0 refers to the first element in an array, while index 1 refers to the second element.
JSON arrays are 0-indexed sequences of items.
2
Trace response.access_points[0].radios[1].channel
Under 'response', enter 'access_points[0]' (first AP: AP-Lobby-01), then enter 'radios[1]' (second radio: 5GHz radio object), then read key 'channel' which equals 36.
Navigating nested object keys and array indices retrieves the specific scalar value.
3
Trace response.access_points[1].ip_address
Under 'response', enter 'access_points[1]' (second AP: AP-Conf-02), and read key 'ip_address' which equals "10.20.40.16".
Index 1 targets the second item in the access_points array.
4
Trace response.access_points[1].radios[0].admin_state
Under 'response', enter 'access_points[1]' (second AP: AP-Conf-02), enter 'radios[0]' (first radio: 2.4GHz radio object), and read key 'admin_state' which equals false.
Index 0 targets the first element of the radios array inside the second access point.
5
Trace response.access_points[0].name
Under 'response', enter 'access_points[0]' (first AP: AP-Lobby-01), and read key 'name' which equals "AP-Lobby-01".
Index 0 targets the top-level array's first dictionary element.

Anahtar Kavram

Interpreting JSON Encoded Data
Soru 153Soru

An automation script retrieves the following JSON response payload from a Cisco Catalyst Center system health API endpoint and stores it in a Python dictionary variable named `health_data`:

{
"response": {
"overallHealth": 85,
"issueList": [
{
"issueId": "ISSUE-101",
"severity": "HIGH",
"impactedEntities": [
{"name": "GigabitEthernet1/0/1", "type": "Interface"},
{"name": "GigabitEthernet1/0/2", "type": "Interface"}
]
},
{
"issueId": "ISSUE-102",
"severity": "LOW",
"impactedEntities": [
{"name": "PowerSupply1", "type": "Power"}
]
}
]
}
}

Which two of the following statements regarding the structure and extraction of data from this JSON payload are correct?

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: The expression health_data["response"]["issueList"][0]["impactedEntities"][1]["name"] evaluates to the string "GigabitEthernet1/0/2".; The value corresponding to the key "overallHealth" is an integer data type, whereas the value of "severity" is a string data type.

Cevap

The correct statements are that the path health_data["response"]["issueList"][0]["impactedEntities"][1]["name"] evaluates to "GigabitEthernet1/0/2", and that "overallHealth" contains an integer value while "severity" contains a string value.
The expression health_data["response"]["issueList"][0]["impactedEntities"][1]["name"] correctly navigates through zero-indexed lists and key-value dictionaries to reach "GigabitEthernet1/0/2". Furthermore, 85 is an unquoted integer literal whereas "HIGH" is enclosed in double quotes, confirming integer and string data types respectively.

Adım Adım Çözüm

1
Trace the nested JSON array and dictionary key indices for element extraction.
`health_data["response"]["issueList"][0]` references the first issue dictionary ("ISSUE-101"). Inside this dictionary, `["impactedEntities"]` is a list containing two elements. Index `[1]` points to the second element `{"name": "GigabitEthernet1/0/2", "type": "Interface"}`. Accessing key `["name"]` extracts `"GigabitEthernet1/0/2"`.
Lists in JSON map to Python zero-indexed lists, where index 0 is the first element and index 1 is the second element.
2
Analyze JSON primitive data types based on syntax representation.
The value `85` is written without quotes and represents a JSON number (parsed as a Python `int`). The value `"HIGH"` is wrapped in double quotes, representing a JSON string.
JSON distinguishes primitive types such as numbers, strings, booleans, arrays, and objects based on literal formatting.
3
Evaluate the incorrect choices to identify structural and indexing errors.
Accessing `health_data["response"]["issueList"][1]["impactedEntities"][0]` returns the entire dictionary object `{"name": "PowerSupply1", "type": "Power"}`, not just the string value. Accessing index `[1]` on `impactedEntities` of issue `ISSUE-102` attempts to access a non-existent second element, raising an out-of-bounds `IndexError`.
Misinterpreting dictionary objects as raw values or exceeding zero-indexed list bounds causes structural extraction errors.

Anahtar Kavram

Interpreting JSON data structures (objects vs arrays), zero-based indexing, and primitive data types in REST API payloads.
Soru 154Soru

A network administrator parses a JSON response payload from a Cisco Catalyst Center API call stored in a Python dictionary variable named `inventory_data`:

{
"response": [
{
"hostname": "Core-SW-01",
"platformId": "C9300-48U",
"upTimeMinutes": 21600,
"stackMembers": ["Core-SW-01A", "Core-SW-01B"]
},
{
"hostname": "Dist-SW-01",
"platformId": "C9200-24P",
"upTimeMinutes": 61200,
"stackMembers": ["Dist-SW-01A"]
}
],
"version": "1.0"
}

Which Python expression correctly extracts the string value `'Core-SW-01B'` from the payload?

Cevabı ve açıklamayı göster

Cevap: inventory_data["response"][0]["stackMembers"][1]

Cevap

inventory_data["response"][0]["stackMembers"][1]
The key 'response' maps to a JSON array (list). The first element at index 0 is the object representing the device 'Core-SW-01'. Within this object, the key 'stackMembers' holds another array of strings. Because Python lists use zero-based indexing, the second item 'Core-SW-01B' is located at index 1. Therefore, `inventory_data["response"][0]["stackMembers"][1]` correctly extracts the target value.

Adım Adım Çözüm

1
Locate the outer key pointing to the target array
`inventory_data["response"]` yields a list of dictionary objects representing switches.
The root object contains a top-level key named 'response'.
2
Select the correct switch object from the list using 0-based indexing
`inventory_data["response"][0]` selects the first dictionary object containing 'Core-SW-01'.
Python list indices start at 0, making index 0 the target for the first switch in the response array.
3
Navigate to the nested array and select the target element
`inventory_data["response"][0]["stackMembers"][1]` evaluates to 'Core-SW-01B'.
Accessing key 'stackMembers' returns a list, and index 1 retrieves the second element within that list.

Anahtar Kavram

JSON Array and Object Traversal using Python Indexing
Tahmini Süre:1m 15s
Soru 155Soru

In network architectures, router and switch operations are divided between distinct functional planes. Which of the following network functions are executed directly by the data (forwarding) plane? (Select TWO.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: Decrementing the IP Time to Live (TTL) field and updating the header checksum for transit packets; Matching incoming packet headers against the Forwarding Information Base (FIB) in TCAM hardware

Cevap

The data plane is responsible for decrementing the IP TTL field (and updating the checksum) for transit packets and performing destination address lookups against the Forwarding Information Base (FIB) using specialized hardware ASICs and TCAM.
The data plane (also known as the forwarding plane) handles user traffic passing through the network device. It operates at line rate using specialized hardware such as Application-Specific Integrated Circuits (ASICs) and Ternary Content-Addressable Memory (TCAM). Standard data plane duties include looking up destination addresses in the Forwarding Information Base (FIB), rewriting Ethernet MAC addresses, decrementing the IPv4 Time to Live (TTL) or IPv6 Hop Limit, and updating header checksums. In contrast, dynamic routing protocols (OSPF/BGP) and Layer 2 discovery mechanisms (CDP/LLDP) reside in the control plane, while administrative access protocols (SSH, TACACS+, RADIUS) belong to the management plane.

Adım Adım Çözüm

1
Differentiate plane responsibilities
Control plane creates routing rules and topology information (RIB, OSPF, CDP); data plane forwards customer transit traffic at line rate based on pre-computed hardware tables (FIB, TCAM). Management plane handles device access.
Clear separation of duties ensures high-speed forwarding without overloading the central CPU.
2
Evaluate packet header modification and FIB lookup
Decrementing TTL, recalculating checksums, frame rewriting, and TCAM FIB matching occur per-packet in hardware, placing them in the data plane.
These actions must occur on every single packet passing through the switch or router.
3
Identify non-data plane functions
OSPF LSA processing and CDP/LLDP messaging belong to the control plane, while TACACS+/SSH access belongs to the management plane.
Control plane protocols update internal topology tables, whereas management plane services handle administrative oversight.

Anahtar Kavram

Data Plane Responsibilities vs. Control/Management Planes
Soru 156Soru

A Python script queries a Cisco Catalyst Center API endpoint for network device inventory and stores the resulting data structure in a variable named `data`. The JSON payload structure is shown below:

{
"response": {
"devices": [
{
"id": "dev-101",
"role": "DISTRIBUTION",
"mgmt_ip": "10.1.10.1"
},
{
"id": "dev-102",
"role": "ACCESS",
"mgmt_ip": "10.1.20.1"
}
],
"totalCount": 2
}
}

Which Python expression correctly extracts the management IP address of the ACCESS role device?

Cevabı ve açıklamayı göster

Cevap: data["response"]["devices"][1]["mgmt_ip"]

Cevap

data["response"]["devices"][1]["mgmt_ip"] correctly extracts the management IP address "10.1.20.1".
The JSON structure consists of a outer dictionary with a key named "response", which contains another dictionary with a key named "devices". The value of "devices" is a list (array) of dictionaries. In Python, list indexing begins at 0. Therefore, the first element (DISTRIBUTION device) is at index 0, and the second element (ACCESS device) is at index 1. Accessing the "mgmt_ip" key on list element index 1 yields "10.1.20.1".

Adım Adım Çözüm

1
Analyze the top-level structure of the JSON payload.
The root is a dictionary/object containing the top-level key "response". Accessing `data["response"]` yields an inner dictionary.
Top-level keys must be referenced first.
2
Locate the nested key containing the list of devices.
Inside `data["response"]`, the key "devices" holds a JSON array (Python list) of device dictionary objects.
The array is stored under the "devices" key within the response object.
3
Determine the zero-based list index for the ACCESS device object.
The DISTRIBUTION device is at index 0, and the ACCESS device is at index 1.
JSON arrays correspond to Python zero-indexed lists.
4
Extract the target key value from the selected device dictionary.
Accessing `["mgmt_ip"]` on index 1 yields "10.1.20.1".
The dictionary key storing the IP address is "mgmt_ip".

Anahtar Kavram

Traversing nested JSON structures and combining dictionary key references with zero-based list array indexing in Python.
Soru 157Soru

A network administrator executes a RESTCONF GET request to retrieve interface and OSPF routing configuration details from a Cisco router. The response payload is stored in a Python dictionary named `data` as shown below:

{
"ietf-interfaces:interface": {
"name": "GigabitEthernet0/0/1",
"description": "Uplink to Core",
"ietf-ip:ipv4": {
"address": [
{
"ip": "10.10.20.1",
"netmask": "255.255.255.0"
}
]
},
"Cisco-IOS-XE-ospf:ospf": {
"process-id": [
{
"id": 100,
"area": [
{
"area-id": "0.0.0.0",
"cost": 20
}
]
}
]
}
}
}

Match each Python expression on the left to the corresponding value extracted from the JSON structure on the right.

Soldaki öğeye tıklayın, sonra eşleşen sağdaki öğeye tıklayın

Öğeler

data["ietf-interfaces:interface"]["name"]
data["ietf-interfaces:interface"]["ietf-ip:ipv4"]["address"][0]["ip"]
data["ietf-interfaces:interface"]["Cisco-IOS-XE-ospf:ospf"]["process-id"][0]["id"]
data["ietf-interfaces:interface"]["Cisco-IOS-XE-ospf:ospf"]["process-id"][0]["area"][0]["cost"]

Eşleşmeler

Cevabı ve açıklamayı göster

Cevap

Matching pairs: data["ietf-interfaces:interface"]["name"] maps to "GigabitEthernet0/0/1"; data["ietf-interfaces:interface"]["ietf-ip:ipv4"]["address"][0]["ip"] maps to "10.10.20.1"; data["ietf-interfaces:interface"]["Cisco-IOS-XE-ospf:ospf"]["process-id"][0]["id"] maps to 100; data["ietf-interfaces:interface"]["Cisco-IOS-XE-ospf:ospf"]["process-id"][0]["area"][0]["cost"] maps to 20.
In Python, JSON objects deserialize into dictionaries accessed via string keys in square brackets, while JSON arrays deserialize into lists accessed using 0-based integer indices. Traversal through keys and list indices accurately extracts specified values.

Adım Adım Çözüm

1
Identify JSON data types (objects vs. arrays)
Curly braces {} indicate dictionaries requiring key strings, while square brackets [] indicate lists requiring 0-based integer indexing.
Correctly distinguishing objects from arrays is necessary to apply the proper syntax when parsing Python data structures.
2
Traverse the data path for each expression
Evaluate index positions (0 for the first item in arrays) and dictionary key names sequentially to reach targeted leaf nodes.
Ensures accurate extraction of both string and numeric data values from deeply nested structures.

Anahtar Kavram

Interpreting JSON Encoded Data Structures in Python
Soru 158Soru

A network engineer issues an API call to a Cisco Catalyst Center endpoint to query site health metrics. The API returns the following JSON response payload stored in a Python dictionary named `site_data`:

{
"response": [
{
"siteHierarchy": "Global/USA/SanJose/Building1",
"clientCount": 150,
"healthScore": [
{
"healthType": "OVERALL",
"score": 88
},
{
"healthType": "WIRELESS",
"score": 92
}
]
}
]
}

Which Python expression correctly extracts the numerical score for the WIRELESS health type from `site_data`?

Cevabı ve açıklamayı göster

Cevap: site_data["response"][0]["healthScore"][1]["score"]

Cevap

site_data["response"][0]["healthScore"][1]["score"]
The expression `site_data["response"][0]["healthScore"][1]["score"]` correctly traverses the data structure step by step: accessing the outer dictionary key "response", selecting the first element (index 0) of the response list, accessing the dictionary key "healthScore", selecting the second element (index 1) of the healthScore list which corresponds to WIRELESS, and finally retrieving the value for the key "score".

Adım Adım Çözüm

1
Inspect the root element structure of the JSON payload.
The top-level object is a dictionary with a single key "response", whose value is enclosed in square brackets `[]`, indicating a JSON array (Python list).
Array elements must be accessed using zero-based integer indexing.
2
Navigate into the first element of the "response" list and locate the target array.
`site_data["response"][0]` returns the site dictionary object containing keys like "siteHierarchy", "clientCount", and "healthScore".
Zero-based indexing places the first site dictionary at position [0].
3
Index into the "healthScore" array to access the WIRELESS health object.
The "healthScore" key contains a list of two objects: index [0] is OVERALL and index [1] is WIRELESS.
Accessing `["healthScore"][1]` selects the dictionary `{"healthType": "WIRELESS", "score": 92}`.
4
Extract the target key value from the selected dictionary.
Appending `["score"]` retrieves the integer value 92.
Standard dictionary key access retrieves the value paired with the specified string key.

Anahtar Kavram

Data extraction from nested JSON structures containing combinations of objects and arrays
Soru 159Soru

A network administrator queries a Cisco vManage REST API endpoint to retrieve device interface operational details. The API returns the following JSON payload, which is parsed into a Python dictionary variable named `response_data`:

{
"header": {
"generated_at": 1774137600,
"status": 200
},
"data": [
{
"device_id": "10.10.10.1",
"host_name": "Edge-Router-1",
"interfaces": [
{
"name": "GigabitEthernet1",
"admin_status": "up",
"oper_status": "up",
"ip_address": "192.168.10.1",
"mtu": 1500
},
{
"name": "GigabitEthernet2",
"admin_status": "up",
"oper_status": "down",
"ip_address": "10.0.0.2",
"mtu": 1500
}
]
}
]
}

Which two statements regarding data extraction from this JSON payload are correct? (Select two.)

Geçerli olan tümünü seçin

Cevabı ve açıklamayı göster

Cevap: The expression `response_data["data"][0]["host_name"]` evaluates to the string `"Edge-Router-1"`.; The expression `response_data["data"][0]["interfaces"][1]["name"]` evaluates to the string `"GigabitEthernet2"`.

Cevap

The two correct statements are: 1) `response_data["data"][0]["host_name"]` evaluates to `"Edge-Router-1"`, and 2) `response_data["data"][0]["interfaces"][1]["name"]` evaluates to `"GigabitEthernet2"`.
The top-level structure is a dictionary containing the key 'data', which holds a list of device objects. Index 0 retrieves the first device object, where key 'host_name' yields 'Edge-Router-1'. Within that device object, key 'interfaces' yields a list of interfaces where index 1 selects the second interface object, yielding the name 'GigabitEthernet2'.

Adım Adım Çözüm

1
Examine the outer JSON structure
The root structure is a JSON object (Python dictionary). The top-level key `"data"` maps to a JSON array (Python list) containing a single device dictionary at index 0.
Top-level keys are accessed via dictionary keys, while array values require integer indexing.
2
Evaluate host_name extraction
`response_data["data"][0]["host_name"]` accesses index 0 of `"data"` and retrieves `"Edge-Router-1"`.
Arrays in Python are 0-indexed; therefore index 0 accesses the first element.
3
Evaluate interfaces extraction
`response_data["data"][0]["interfaces"]` is an array of interface objects. Index 0 corresponds to `GigabitEthernet1` and index 1 corresponds to `GigabitEthernet2`.
Index 1 correctly references the second interface element in the list.

Anahtar Kavram

JSON Array Indexing and Nested Dictionary Key Lookup
Soru 160Soru

An enterprise network administration team is transitioning from manually entering configuration commands on individual switches via SSH to using centralized automation playbooks. Which primary operational benefit does this shift to automated management provide?

Cevabı ve açıklamayı göster

Cevap: It enforces configuration consistency across all network devices, significantly reducing human error and configuration drift.

Cevap

Automating device management enforces configuration consistency across all network devices, significantly reducing human error and configuration drift.
The correct answer highlights that automated network management uses structured templates to deploy changes across devices simultaneously. This eliminates manual per-device CLI entry, drastically reducing human error and configuration drift across the network infrastructure.

Adım Adım Çözüm

1
Identify the primary operational challenge of manual per-device CLI management.
Manual CLI changes lead to human error, typos, and inconsistent settings across devices over time (configuration drift).
Each switch must be accessed and configured individually by hand.
2
Analyze how centralized network automation addresses this challenge.
Centralized templates and playbooks push identical configurations across all target devices systematically.
Defining intent in software ensures predictable, repeatable change execution across the enterprise.

Anahtar Kavram

Impact of Network Automation on Operational Consistency and Efficiency
Tahmini Süre:45s
ÖncekiSayfa 8 / 10Sonraki