.. _cisco.ios.ios_static_routes_module:
***************************
cisco.ios.ios_static_routes
***************************
**Resource module to configure static routes.**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module configures and manages the static routes on IOS platforms.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
A dictionary of static route options
|
|
address_families
list
/ elements=dictionary
|
|
Address family to use for the static routes
|
|
|
afi
string
/ required
|
|
Top level address family indicator.
|
|
|
routes
list
/ elements=dictionary
|
|
Configuring static route
|
|
|
|
dest
string
/ required
|
|
Destination prefix with its subnet mask
|
|
|
|
next_hops
list
/ elements=dictionary
|
|
next hop address or interface
|
|
|
|
|
dhcp
boolean
|
|
Default gateway obtained from DHCP
|
|
|
|
|
distance_metric
integer
|
|
Distance metric for this route
|
|
|
|
|
forward_router_address
string
|
|
Forwarding router's address
|
|
|
|
|
global
boolean
|
|
Next hop address is global
|
|
|
|
|
interface
string
|
|
Interface for directly connected static routes
|
|
|
|
|
multicast
boolean
|
|
multicast route
|
|
|
|
|
name
string
|
|
Specify name of the next hop
|
|
|
|
|
permanent
boolean
|
|
permanent route
|
|
|
|
|
tag
integer
|
|
Set tag for this route
Refer to vendor documentation for valid values.
|
|
|
|
|
track
integer
|
|
Install route depending on tracked item with tracked object number.
Tracking does not support multicast
Refer to vendor documentation for valid values.
|
|
|
|
|
unicast
boolean
|
|
unicast route (ipv6 specific)
|
|
|
|
topology
string
|
|
Configure static route for a Topology Routing/Forwarding instance
NOTE, VRF and Topology can be used together only with Multicast and Topology should pre-exist before it can be used
|
|
vrf
string
|
|
IP VPN Routing/Forwarding instance name.
NOTE, In case of IPV4/IPV6 VRF routing table should pre-exist before configuring.
NOTE, if the vrf information is not provided then the routes shall be configured under global vrf.
|
|
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 | include ip route|ipv6 route.
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
- gathered
- rendered
- 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 | include ip route|ipv6 route executed on device. For state parsed active connection to remote host is not required.
|