batfish / batfish

Batfish is a network configuration analysis tool that can find bugs and guarantee the correctness of (planned or current) network configurations. It enables network engineers to rapidly and safely evolve their network, without fear of outages or security breaches.

Home Page:http://www.batfish.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Arista - unrecognized static destination NAT syntax

rmcmilli opened this issue · comments

I get the following in the batfish diagnostics log for this static destination NAT syntax from an Arista EOS device:

Nodes                                                          None
Source_Lines              [configs/coreswitch1_templated.eos:[936]]
Type                                                  Parse warning
Details                                 This syntax is unrecognized
Line_Text         ip nat destination static 1.1.1.9 5001 ...
Parser_Context    [ifipn_destination if_ip_nat if_ip if_inner s_...
Name: 179, dtype: object

A sanitized version of this configuration:

hostname CoreSwitch1
!
int eth1
   ip address 1.1.1.10/24
   ip nat destination static 1.1.1.9 5001 172.16.52.9 5001
   ip virtual-router address 1.1.1.9
   !
!

Removing the port number doesn't work either. ie ip nat destination static 1.1.1.9 172.16.52.9

The syntax works in production and is consistent with Arista documentation.

Thanks! Confirmed bug as it looks like that part of the Arista grammar was never updated and only accepts a limited version that doesn't have ports and requires an ACL:

ifipn_destination
:
DESTINATION STATIC IP_ADDRESS ACCESS_LIST acl = variable IP_ADDRESS
NEWLINE
;

@rmcmilli - please try out the next test image (will probably be test-2024.01.15.1362 looking at https://hub.docker.com/r/batfish/batfish/tags) or development HEAD and see if that fixes this issue.