ios_l3_interface Configures IPv4/IPv6 Addresses on Routed Interfaces

300-435 By islever Editorial Last updated

Short answer

A Ios_l3_interface is an Ansible module that configures IPv4 and IPv6 addresses on routed Layer 3 interfaces of Cisco IOS devices.

Question

What is ios_l3_interface?
  1. Configures IP address on routed interfaces Correct Answer
  2. Configures VLAN
  3. Configures trunk
  4. Configures PoE

Key Takeaways

The ios_l3_interface Ansible module manages Layer 3 attributes on Cisco IOS devices, assigning IPv4 and IPv6 addresses to routed interfaces. Option A is correct because the module's parameter set covers IP addressing only — VLAN creation, trunk configuration, and PoE settings belong to sibling modules such as ios_vlans and ios_l2_interfaces. The l3 marker in the module name signals the OSI layer it operates on, making the Layer 2 options easy to eliminate.

Expert Analysis

ios_l3_interface configures IPv4/IPv6 on L3 interfaces.

The name itself is the deciding constraint. ios_l3_interface is a device-level Ansible module from Cisco's IOS module family, and the l3 marker places it at Layer 3 — the layer where IP addressing lives. Its scope is managing IPv4 and IPv6 address attributes on routed interfaces of Cisco IOS devices, which is precisely what option A claims: it configures an IP address on routed interfaces. Option A wins because it is the only choice naming a Layer 3 attribute; the remaining options describe Layer 2 switching or hardware-plane features that sit entirely outside the module's parameter set.

The module confirms this scope mechanically. It exposes an address-only parameter set: name for the target interface such as GigabitEthernet0/1, ipv4 for the IPv4 address (paired with ipv4_subnet_mask, defaulting to 255.255.255.0), ipv6 as a list of address/prefix entries, and state set to present or absent. A task that sets name: GigabitEthernet0/1 with ipv4: 192.168.0.1 renders to the CLI command ip address 192.168.0.1 255.255.255.0 under that interface, and an ipv6: 2001:db8::1/64 entry renders to ipv6 address 2001:db8::1/64. With state: absent, the same module removes those addresses, returning the interface to unaddressed. Like the rest of the IOS module family it is idempotent — it reads the running configuration, compares it with the desired state, and pushes commands only when the interface's current addressing differs. On a Layer 3 switch a port must first be converted with no switchport to become a routed port; the module then manages the addressing on it. In modern releases the same behaviour lives in the cisco.ios.ios_l3_interfaces resource module, while the legacy ios_l3_interface name persists in older Ansible versions — the scope, Layer 3 address management and nothing else, has not changed.

Each distractor maps to a different module in the same collection:

  • B — Configures VLAN. VLAN creation and management belong to the dedicated VLAN modules: ios_vlan in the legacy set and cisco.ios.ios_vlans as its resource-module replacement. No parameter of ios_l3_interface accepts a VLAN ID, so it cannot create, name, or remove VLANs.
  • C — Configures trunk. Trunking is Layer 2 switchport behaviour — switchport mode trunk, allowed VLAN lists, native VLAN — managed by cisco.ios.ios_l2_interfaces (legacy ios_l2_interface). A routed Layer 3 interface is by definition not running in switchport/trunk mode, so trunks are excluded from this module's scope structurally, not incidentally.
  • D — Configures PoE. Inline power settings (power inline) do not appear anywhere in the module's parameter list; PoE is platform hardware behaviour, not IP addressing, and no parameter of this module touches it.

Cisco's Ansible naming convention makes the split predictable: interface modules divide into l2 variants handling access and trunk switchport attributes and l3 variants handling IP addressing, while VLANs and other resources each get dedicated modules. Parsing the module name for its OSI layer before reading the options resolves this class of item immediately. Within the 300-435 blueprint, this technique belongs to device-level Ansible automation — building solutions that manage configurations directly on the device with modules such as this one, rather than through a controller's API.

Official Reference

Exam Strategy

When a task asks what a named Ansible module does, decode the name before reading the options: the resource segment tells you what it manages, and layer markers such as l2 versus l3 tell you the OSI layer. Eliminate distractors that describe attributes owned by sibling modules in the same collection — VLANs, trunks, and hardware settings each have their own module in Cisco's IOS collection. Finally, map the module to the CLI it renders; if you can connect it to a command such as ip address under an interface, the answer confirms itself.

Practice All 300-435 Questions

Access 150 questions with complete answers and detailed explanations.

View Full 300-435 Practice Test →

← Back to 300-435 Study Guide