300-420 · Question #177
An engineer must use YANG with an XML representation to configure a Cisco IOS XE switch with these specifications: - IP address 10.10.10.10/27 configured on the interface GigabitEthernet2/1/0…
The correct answer is D. <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet2/1/0</name> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> <address> <ip>10.10.10.10</ip> <netmask>255.255.255.224</netmask> </address> </ipv4> </interface> </interfaces>. This question requires identifying the correct XML representation using YANG for configuring an IP address on a Cisco IOS XE interface, adhering to standard IETF YANG models and proper XML syntax.
Question
An engineer must use YANG with an XML representation to configure a Cisco IOS XE switch with these specifications:
- IP address 10.10.10.10/27 configured on the interface
GigabitEthernet2/1/0
- connectivity from a directly connected host 10.10.10.1/27
Which YANG data model set must the engineer choose? A. B. C. D.
Exhibits
Options
- A<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet2/1/0</name> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>false</enabled> <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> <address> <ip>10.10.10.10</ip> <netmask>255.255.255.224</netmask> </address> </ipv4> </interface> </interfaces>
- B<interfaces YANG="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet2/1/0</name> <type YANG:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <ipv4 YANG="urn:ietf:params:xml:ns:yang:ietf-ip"> <address> <ip>10.10.10.10</ip> <netmask>255.255.255.224</netmask> </address> </ipv4> </interface> </interfaces>
- C<interfaces json="urn:ietf:params:json:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet2/1/0</name> <type json:ianaift="urn:ietf:params:json:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <ipv4 json="urn:ietf:params:json:ns:yang:ietf-ip"> <address> <ip>10.10.10.10</ip> <netmask>255.255.255.224</netmask> </address> </ipv4> </interface> </interfaces>
- D<interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"> <interface> <name>GigabitEthernet2/1/0</name> <type xmlns:ianaift="urn:ietf:params:xml:ns:yang:iana-if-type">ianaift:ethernetCsmacd</type> <enabled>true</enabled> <ipv4 xmlns="urn:ietf:params:xml:ns:yang:ietf-ip"> <address> <ip>10.10.10.10</ip> <netmask>255.255.255.224</netmask> </address> </ipv4> </interface> </interfaces>
How the community answered
(33 responses)- A15% (5)
- B6% (2)
- C3% (1)
- D76% (25)
Why each option
This question requires identifying the correct XML representation using YANG for configuring an IP address on a Cisco IOS XE interface, adhering to standard IETF YANG models and proper XML syntax.
Option A sets `<enabled>false</enabled>`, which would administratively shut down the interface and prevent it from providing connectivity.
Option B incorrectly uses `YANG=` instead of `xmlns=` for declaring XML namespaces, which is syntactically invalid for standard XML.
Option C incorrectly uses `json=` and `json:ianaift` attributes, suggesting a JSON format, whereas the question explicitly specifies an XML representation.
Option D correctly configures the `GigabitEthernet2/1/0` interface with the IP address `10.10.10.10` and the corresponding `/27` subnet mask `255.255.255.224`. Crucially, it sets `<enabled>true</enabled>` to activate the interface for connectivity and uses the proper `xmlns` attribute for XML namespace declarations.
Concept tested: IETF interface and IP configuration via YANG XML
Source: https://datatracker.ietf.org/doc/html/rfc8343
Topics
Community Discussion
No community discussion yet for this question.



