.. _cisco.ios.ios_l3_interfaces_module:
***************************
cisco.ios.ios_l3_interfaces
***************************
**Resource module to configure L3 interfaces.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module provides declarative management of Layer-3 interface on Cisco IOS devices.
Parameters
----------
.. raw:: html
Parameter |
Choices/Defaults |
Comments |
config
list
/ elements=dictionary
|
|
A dictionary of Layer-3 interface options
|
|
autostate
boolean
|
|
Enable autostate determination for VLAN.
|
|
ipv4
list
/ elements=dictionary
|
|
IPv4 address to be set for the Layer-3 interface mentioned in name option. The address format is <ipv4 address>/<mask>, the mask is number in range 0-32 eg. 192.168.0.1/24.
|
|
|
address
string
|
|
Configures the IPv4 address for Interface.
|
|
|
dhcp
dictionary
|
|
IP Address negotiated via DHCP.
|
|
|
|
client_id
string
|
|
Specify client-id to use.
|
|
|
|
enable
boolean
|
|
Enable dhcp.
|
|
|
|
hostname
string
|
|
Specify value for hostname option.
|
|
|
dhcp_client
string
|
|
Configures and specifies client-id to use over DHCP ip. Note, This option shall work only when dhcp is configured as IP.
GigabitEthernet interface number
This option is DEPRECATED and is replaced with dhcp which accepts dict as input this attribute will be removed after 2023-08-01.
|
|
|
dhcp_hostname
string
|
|
Configures and specifies value for hostname option over DHCP ip. Note, This option shall work only when dhcp is configured as IP.
This option is DEPRECATED and is replaced with dhcp which accepts dict as input this attribute will be removed after 2023-08-01.
|
|
|
pool
string
|
|
IP Address auto-configured from a local DHCP pool.
|
|
|
secondary
boolean
|
|
Configures the IP address as a secondary address.
|
|
|
source_interface
dictionary
|
|
Enable IP processing without an explicit address
|
|
|
|
name
string
|
|
Interface name
|
|
|
|
point_to_point
boolean
|
|
Enable point-to-point connection
|
|
|
|
poll
boolean
|
|
Enable IP connected host polling
|
|
ipv6
list
/ elements=dictionary
|
|
IPv6 address to be set for the Layer-3 interface mentioned in name option.
The address format is <ipv6 address>/<mask>, the mask is number in range 0-128 eg. fd5d:12c9:2201:1::1/64
|
|
|
address
string
|
|
Configures the IPv6 address for Interface.
|
|
|
anycast
boolean
|
|
Configure as an anycast
|
|
|
autoconfig
dictionary
|
|
Obtain address using auto-configuration.
|
|
|
|
default
boolean
|
|
Insert default route.
|
|
|
|
enable
boolean
|
|
enable auto-configuration.
|
|
|
cga
boolean
|
|
Use CGA interface identifier
|
|
|
dhcp
dictionary
|
|
Obtain a ipv6 address using DHCP.
|
|
|
|
enable
boolean
|
|
Enable dhcp.
|
|
|
|
rapid_commit
boolean
|
|
Enable Rapid-Commit.
|
|
|
enable
boolean
|
|
Enable IPv6 on interface
|
|
|
eui
boolean
|
|
Use eui-64 interface identifier
|
|
|
link_local
boolean
|
|
Use link-local address
|
|
|
segment_routing
dictionary
|
|
Segment Routing submode
|
|
|
|
default
boolean
|
|
Set a command to its defaults.
|
|
|
|
enable
boolean
|
|
Enable segmented routing.
|
|
|
|
ipv6_sr
boolean
|
|
Set ipv6_sr.
|
|
mac_address
string
|
|
Manually set interface MAC address.
|
|
name
string
/ required
|
|
Full name of the interface excluding any logical unit number, i.e. GigabitEthernet0/1.
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the IOS device by executing the command show running-config | section ^interface.
The state parsed reads the configuration from running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- rendered
- gathered
- parsed
|
The state the configuration should be left in
The states rendered, gathered and parsed does not perform any change on the device.
The state rendered will transform the configuration in config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result.
The state parsed reads the configuration from running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config | section ^interface executed on device. For state parsed active connection to remote host is not required.
|