On this page
iosxr_interface - Manage Interface on Cisco IOS XR network devices
New in version 2.4.
Synopsis
- This module provides declarative management of Interfaces on Cisco IOS XR network devices.
Options
parameter | required | default | choices | comments |
---|---|---|---|---|
aggregate |
no |
List of Interfaces definitions.
|
||
delay |
no | 10 |
Time in seconds to wait before checking for the operational state on remote device. This wait is applicable for operational state argument which are state with values up /down , tx_rate and rx_rate.
|
|
description |
no |
Description of Interface.
|
||
duplex |
no |
|
Interface link status
|
|
enabled |
no |
Interface link status.
|
||
mtu |
no |
Maximum size of transmit packet.
|
||
name |
yes |
Name of the Interface.
|
||
rx_rate |
no |
Receiver rate in bits per second (bps).
|
||
speed |
no |
Interface link speed.
|
||
state |
no | present |
|
State of the Interface configuration, up means present and operationally up and down means present and operationally down
|
tx_rate |
no |
Transmit rate in bits per second (bps).
|
Examples
- name: configure interface
iosxr_interface:
name: GigabitEthernet0/0/0/2
description: test-interface
speed: 100
duplex: half
mtu: 512
- name: remove interface
iosxr_interface:
name: GigabitEthernet0/0/0/2
state: absent
- name: make interface up
iosxr_interface:
name: GigabitEthernet0/0/0/2
enabled: True
- name: make interface down
iosxr_interface:
name: GigabitEthernet0/0/0/2
enabled: False
- name: Create interface using aggregate
iosxr_interface:
aggregate:
- name: GigabitEthernet0/0/0/3
- name: GigabitEthernet0/0/0/2
speed: 100
duplex: full
mtu: 512
state: present
- name: Delete interface using aggregate
iosxr_interface:
aggregate:
- name: GigabitEthernet0/0/0/3
- name: GigabitEthernet0/0/0/2
state: absent
- name: Check intent arguments
iosxr_interface:
name: GigabitEthernet0/0/0/5
state: up
delay: 20
- name: Config + intent
iosxr_interface:
name: GigabitEthernet0/0/0/5
enabled: False
state: down
delay: 20
Return Values
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
commands |
The list of configuration mode commands to send to the device.
|
always, except for the platforms that use Netconf transport to manage the device. | list | ['interface GigabitEthernet0/0/0/2', 'description test-interface', 'duplex half', 'mtu 512'] |
Notes
Note
- Tested against IOS XR 6.1.2
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance Info
For more information about Red Hat’s this support of this module, please refer to this knowledge base article<https://access.redhat.com/articles/rhel-top-support-policies>
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.4/iosxr_interface_module.html