nerdexam
CiscoCisco

200-901 · Question #497

200-901 Question #497: Real Exam Question with Answer & Explanation

This question tests the ability to configure a network interface's primary IP address and mask using the YDK library in Python, based on understanding YANG data models and CRUD operations.

Network Fundamentals

Question

Drag and Drop Question Refer to the exhibit. Drag and drop the code from the bottom onto the box where the code is missing to configure the GigabitEthernet 3 interface. Not all options are used. Answer:

Explanation

This question tests the ability to configure a network interface's primary IP address and mask using the YDK library in Python, based on understanding YANG data models and CRUD operations.

Approach. To correctly configure the GigabitEthernet 3 interface, the following interactions are required:

  1. First blank: The script needs to instantiate the interface object. Based on the name and description attributes that follow, it's clear we're dealing with a GigabitEthernet interface. The YDK class for this is model.Native.Interface.GigabitEthernet(). Drag model.Native.Interface.GigabitEthernet() to this blank.
  2. Second blank: This line assigns the IP address '172.16.10.10'. Referring to the YDK documentation (Image 1), IP addresses are configured under interface.ip.address. For a static, main IP, it falls under primary.address. So, drag interface.ip.address.primary.address to this blank.
  3. Third blank: This line assigns the subnet mask '255.255.255.0'. Following the pattern for the primary IP address, the mask attribute would be primary.mask. So, drag interface.ip.address.primary.mask to this blank.
  4. Fourth blank: After defining the interface object with its details, the configuration needs to be applied to the device. Since this is the initial configuration for this specific interface and address, a 'create' operation is used with the CRUDService. So, drag crud.create(provider, interface) to this blank.

This sequence correctly initializes the interface object, assigns its primary IP address and mask using the YDK model structure, and then applies the configuration to the device.

Common mistakes.

  • common_mistake. Using crud.update(provider, interface) instead of crud.create(provider, interface) is incorrect because update is used to modify an existing configuration, while create is for establishing a new configuration, which is the scenario presented here. Placing interface.ip.mask or interface.ip.address.virtual.mask for the IP address or subnet mask would be wrong because the YDK data model (as shown in the documentation) specifies the path as interface.ip.address.primary.address and interface.ip.address.primary.mask for a primary static IP configuration. Other options like interface.ip.address.secondary.address are incorrect because the scenario implicitly asks for the primary IP configuration.

Concept tested. Network automation using Python and YDK (YANG Development Kit), understanding of YANG data models for network interface configuration (specifically IP address and subnet mask assignment), and knowledge of YDK's CRUD (Create, Read, Update, Delete) operations.

Topics

#Cisco CLI#Interface configuration#IP addressing#Network device configuration

Community Discussion

No community discussion yet for this question.

Full 200-901 PracticeBrowse All 200-901 Questions