Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/caveats.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ and validation. Configuration is deployed with a bash script executed within the
* The ASAv IS-IS configuration templates were not tested, as all IS-IS integration tests include at least one point-to-point circuit
* ASAv implements OSPFv2 point-to-point links with the `point-to-point non-broadcast` network type. *netlab* configures static OSPF neighbors on these links.
* We did not implement OSPFv3 for ASAv
* ASAv static routes require an outgoing interface. *netlab* does not configure static routes with indirect next hops on ASAv.
* ASAv does not support equal-cost static routes over multiple interfaces. *netlab* configures only the first next hop of a static route.

(caveats-cat8000v)=
## Cisco Catalyst 8000v
Expand Down
22 changes: 22 additions & 0 deletions netsim/ansible/templates/routing/asa.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{#
ASA static routes need the outgoing interface (nameif == ifname in the initial template),
so only directly-connected next hops and discard routes can be configured
#}
{% for sr_data in routing.static|default([]) if 'intf' in sr_data.nexthop or 'discard' in sr_data.nexthop %}
{% if loop.first %}
!
! Static routes
!
{% endif %}
{% set sr_intf = 'Null0' if 'discard' in sr_data.nexthop else sr_data.nexthop.intf %}
{% if 'ipv4' in sr_data %}
route {{ sr_intf }} {{
sr_data.ipv4|ansible.utils.ipaddr('network') }} {{
sr_data.ipv4|ansible.utils.ipaddr('netmask') }}{{
'' if 'discard' in sr_data.nexthop else ' ' + sr_data.nexthop.ipv4 }}
{% endif %}
{% if 'ipv6' in sr_data %}
ipv6 route {{ sr_intf }} {{ sr_data.ipv6 }}{{
'' if 'discard' in sr_data.nexthop else ' ' + sr_data.nexthop.ipv6 }}
{% endif %}
{% endfor %}
2 changes: 2 additions & 0 deletions netsim/devices/asav.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ..utils import log
from . import _Quirks, report_quirk
from ._common import check_indirect_static_routes


def check_isis_p2p_interfaces(node: Box, topology: Box, igp: str = 'isis') -> None:
Expand All @@ -24,6 +25,7 @@ class ASA(_Quirks):

@classmethod
def device_quirks(self, node: Box, topology: Box) -> None:
check_indirect_static_routes(node)
mods = node.get('module', [])
for igp in ('isis'):
if igp in mods:
Expand Down
5 changes: 5 additions & 0 deletions netsim/devices/asav.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ features:
password: true
priority: true
timers: true
routing:
static:
caveats: true
discard: true
max_nexthop: 1
libvirt:
image: cisco/asav
create_template: asav.xml.j2
Expand Down
Loading