Skip to content

mac_address not being configured by ios_l3_interfaces #1220

@suffieldacademy

Description

@suffieldacademy
SUMMARY

I have configured mac_address for an L3 interface. The module shows it being parsed as a module_arg, but the mac address is not rendered as a config change, nor sent to the device.

ISSUE TYPE
  • Bug Report
COMPONENT NAME

cisco.ios.ios_l3_interfaces

ANSIBLE VERSION
ansible [core 2.18.6]
  config file = None
  configured module search path = ['/Users/jhealy/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /opt/homebrew/Cellar/ansible/11.6.0/libexec/lib/python3.13/site-packages/ansible
  ansible collection location = /Users/jhealy/.ansible/collections:/usr/share/ansible/collections
  executable location = /opt/homebrew/bin/ansible
  python version = 3.13.5 (main, Jun 11 2025, 15:36:57) [Clang 17.0.0 (clang-1700.0.13.3)] (/opt/homebrew/Cellar/ansible/11.6.0/libexec/bin/python)
  jinja version = 3.1.6
  libyaml = True
COLLECTION VERSION
# /Users/jhealy/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.ios  10.1.1 

# /opt/homebrew/Cellar/ansible/11.6.0/libexec/lib/python3.13/site-packages/ansible_collections
Collection Version
---------- -------
cisco.ios  9.2.0  
CONFIGURATION
CONFIG_FILE() = None
EDITOR(env: EDITOR) = emacs
PAGER(env: PAGER) = less

GALAXY_SERVERS:
OS / ENVIRONMENT

Testing against Cisco IOS XE Software, Version 17.15.03.

STEPS TO REPRODUCE

Configure the "mac_address" module param for an interface. I am including IP addresses to confirm that module is generating at least some configuration for the interface (it does).

- name: "Test L3 mac_address"
  cisco.ios.ios_l3_interfaces:
    state: "rendered"
    config:
      - name: "Vlan101"
        mac_address: "dead.beef.f00d"
        ipv6:
          - address: "2001:db8::1/64"
        ipv4:
          - address: "203.0.113.1/24"
EXPECTED RESULTS

Expecting "rendered" command output to include "mac-address dead.beef.f00d", e.g.:

    "rendered": [
        "interface Vlan101",
        "mac-address dead.beef.f00d",
        "ip address 203.0.113.1 255.255.255.0",
        "ipv6 address 2001:db8::1/64"
    ]
ACTUAL RESULTS

Other configuration items are rendered, but not "mac-address". Verbose outputs show that the param is being read by the module.

TASK [cisco : Test L3 mac_address] *********************************************
ok: [lab-cisco-a] => {
    "changed": false,
    "invocation": {
        "module_args": {
            "config": [
                {
                    "autostate": null,
                    "helper_addresses": null,
                    "ipv4": [
                        {
                            "address": "203.0.113.1/24",
                            "dhcp": null,
                            "dhcp_client": null,
                            "dhcp_hostname": null,
                            "mtu": null,
                            "pool": null,
                            "proxy_arp": null,
                            "redirects": null,
                            "secondary": null,
                            "source_interface": null,
                            "unreachables": null
                        }
                    ],
                    "ipv6": [
                        {
                            "address": "2001:db8::1/64",
                            "anycast": null,
                            "autoconfig": null,
                            "cga": null,
                            "dhcp": null,
                            "enable": null,
                            "eui": null,
                            "link_local": null,
                            "segment_routing": null
                        }
                    ],
                    "mac_address": "dead.beef.f00d",
                    "name": "Vlan101"
                }
            ],
            "running_config": null,
            "state": "rendered"
        }
    },
    "rendered": [
        "interface Vlan101",
        "ip address 203.0.113.1 255.255.255.0",
        "ipv6 address 2001:db8::1/64"
    ]
}

When applied to a device (not rendered), output is the same; no 'mac-address' config command is sent to the device.

Changed state does not vary, regardless of whether mac-address is present on the configured device. So perhaps it's not being checked when querying the device?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions