ce_static_route_bfd – Manages static route configuration on HUAWEI CloudEngine switches

Synopsis

  • Manages the static routes on HUAWEI CloudEngine switches.

Parameters

Parameter Choices/Defaults Comments
aftype
string / required
    Choices:
  • v4
  • v6
Destination ip address family type of static route.
bfd_session_name
string
bfd name (range 1-15).
commands
list
Incoming command line is used to send sys,undo ip route-static default-bfd,commit.
description
string
Name of the route. Used with the name parameter on the CLI.
destvrf
string
VPN instance of next hop ip address.
detect_multiplier
integer
Configure the BFD multiplier (range 3-50).
function_flag
string / required
    Choices:
  • globalBFD
  • singleBFD
  • dynamicBFD
  • staticBFD
Used to distinguish between command line functions.
mask
string
Destination ip mask of static route.
min_rx_interval
integer
Set the minimum BFD receive interval (range 50-1000).
min_tx_interval
integer
Set the minimum BFD session sending interval (range 50-1000).
next_hop
string
Next hop address of static route.
nhp_interface
string
Next hop interface full name of static route.
pref
integer
Preference or administrative difference of route (range 1-255).
prefix
string / required
Destination ip address of static route.
state
string
    Choices:
  • present ←
  • absent
Specify desired state of the resource.
tag
integer
Route tag value (numeric).
vrf
string
VPN instance of destination ip address.

Notes

Note

  • This module requires the netconf system service be enabled on the remote device being managed.
  • Recommended connection is netconf.
  • This module also works with local connections for legacy playbooks.
  • If no vrf is supplied, vrf is set to default.
  • If state=absent, the route configuration will be removed, regardless of the non-required parameters.

Examples

#ip route-static bfd interface-type interface-number nexthop-address [ local-address address ]
#[ min-rx-interval min-rx-interval | min-tx-interval min-tx-interval | detect-multiplier multiplier ]
- name: Config an ip route-static bfd 10GE1/0/1 3.3.3.3 min-rx-interval 50 min-tx-interval 50 detect-multiplier 5
  ce_static_route_bfd:
    function_flag: 'singleBFD'
    nhp_interface: 10GE1/0/1
    next_hop: 3.3.3.3
    min_tx_interval: 50
    min_rx_interval: 50
    detect_multiplier: 5
    aftype: v4
    state: present

#undo ip route-static bfd [ interface-type interface-number | vpn-instance vpn-instance-name ] nexthop-address
- name: undo ip route-static bfd 10GE1/0/1 3.3.3.4
  ce_static_route_bfd:
    function_flag: 'singleBFD'
    nhp_interface: 10GE1/0/1
    next_hop: 3.3.3.4
    aftype: v4
    state: absent

#ip route-static default-bfd { min-rx-interval {min-rx-interval} | min-tx-interval {min-tx-interval} | detect-multiplier {multiplier}}
- name: Config an ip route-static default-bfd min-rx-interval 50 min-tx-interval 50 detect-multiplier 6
  ce_static_route_bfd:
    function_flag: 'globalBFD'
    min_tx_interval: 50
    min_rx_interval: 50
    detect_multiplier: 6
    aftype: v4
    state: present

- name: undo ip route-static default-bfd
  ce_static_route_bfd:
    function_flag: 'globalBFD'
    aftype: v4
    state: absent
    commands: 'sys,undo ip route-static default-bfd,commit'

- name: Config an ipv4 static route 2.2.2.0/24 2.2.2.1 preference 1 tag 2 description test for staticBFD
  ce_static_route_bfd:
    function_flag: 'staticBFD'
    prefix: 2.2.2.2
    mask: 24
    next_hop: 2.2.2.1
    tag: 2
    description: test
    pref: 1
    aftype: v4
    bfd_session_name: btoa
    state: present

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
changed
boolean
always
check to see if a change was made on the device

Sample:
True
end_state
dictionary
always
k/v pairs of switchport after module execution

Sample:
{'function_flag': 'staticBFD', 'next_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.0', 'mask': '24', 'description': 'testing', 'tag': 'null', 'bfd_session_name': 'btoa'}
existing
dictionary
always
k/v pairs of existing switchport

Sample:
{'function_flag': '', 'next_hop': '', 'pref': '101', 'prefix': '192.168.20.0', 'mask': '24', 'description': 'testing', 'tag': 'null', 'bfd_session_name': 'btoa'}
proposed
dictionary
always
k/v pairs of parameters passed into module

Sample:
{'function_flag': 'staticBFD', 'next_hop': '3.3.3.3', 'pref': '100', 'prefix': '192.168.20.642', 'mask': '24', 'description': 'testing', 'vrf': '_public_', 'bfd_session_name': 'btoa'}
updates
list
always
command list sent to the device

Sample:
['ip route-static 192.168.20.0 255.255.255.0 3.3.3.3 preference 100 description testing']


Status

Authors

  • xuxiaowei0512 (@CloudEngine-Ansible)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.