Configuration Properties

Node Properties

Returns configuration settings of nodes.

Lists global settings of devices in the network. Settings that are specific to interfaces, routing protocols, etc. are available via other questions.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

properties

Include properties matching this regex.

NodePropertySpec

True

Invocation

[6]:
result = bfq.nodeProperties().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

AS_Path_Access_Lists

Names of AS path access lists

Set of str

Authentication_Key_Chains

Names of authentication keychains

Set of str

Community_Lists

Names of community lists

Set of str

Configuration_Format

Configuration format of the node

str

DNS_Servers

Configured DNS servers

Set of str

DNS_Source_Interface

Source interface to use for communicating with DNS servers

str

Default_Cross_Zone_Action

Default action (PERMIT, DENY) for traffic that traverses firewall zones (null for non-firewall nodes)

str

Default_Inbound_Action

Default action (PERMIT, DENY) for traffic destined for this node

str

Domain_Name

Domain name of the node

str

Hostname

Hostname of the node

str

IKE_Phase1_Keys

Names of IKE Phase 1 keys

Set of str

IKE_Phase1_Policies

Names of IKE Phase 1 policies

Set of str

IKE_Phase1_Proposals

Names of IKE Phase 1 proposals

Set of str

IP6_Access_Lists

Names of IPv6 filters (ACLs, firewall rule sets)

Set of str

IP_Access_Lists

Names of IPv4 filters (ACLs, firewall rule sets)

Set of str

IPsec_Peer_Configs

Names of IPSec peers

Set of str

IPsec_Phase2_Policies

Names of IPSec Phase 2 policies

Set of str

IPsec_Phase2_Proposals

Names of IPSec Phase 2 proposals

Set of str

Interfaces

Names of interfaces

Set of str

Logging_Servers

Configured logging servers

Set of str

Logging_Source_Interface

Source interface for communicating with logging servers

str

NTP_Servers

Configured NTP servers

Set of str

NTP_Source_Interface

Source interface for communicating with NTP servers

str

PBR_Policies

Names of policy-based routing (PBR) policies

Set of str

Route6_Filter_Lists

Names of structures that filter IPv6 routes (e.g., prefix lists)

Set of str

Route_Filter_Lists

Names of structures that filter IPv4 routes (e.g., prefix lists)

Set of str

Routing_Policies

Names of policies that manipulate routes (e.g., route maps)

Set of str

SNMP_Source_Interface

Source interface to use for communicating with SNMP servers

str

SNMP_Trap_Servers

Configured SNMP trap servers

Set of str

TACACS_Servers

Configured TACACS servers

Set of str

TACACS_Source_Interface

Source interface to use for communicating with TACACS servers

str

VRFs

Names of VRFs present on the node

Set of str

Zones

Names of firewall zones on the node

Set of str

Print the first 5 rows of the returned Dataframe

[7]:
result.head(5)
[7]:
Node AS_Path_Access_Lists Authentication_Key_Chains Community_Lists Configuration_Format DNS_Servers DNS_Source_Interface Default_Cross_Zone_Action Default_Inbound_Action Domain_Name ... PBR_Policies Route6_Filter_Lists Route_Filter_Lists Routing_Policies SNMP_Source_Interface SNMP_Trap_Servers TACACS_Servers TACACS_Source_Interface VRFs Zones
0 as2dist1 [] [] ['dept_community'] CISCO_IOS [] None PERMIT PERMIT lab.local ... [] [] ['105'] ['as2dist_to_dept', 'dept_to_as2dist', '~BGP_COMMON_EXPORT_POLICY:default~', '~BGP_PEER_EXPORT_POLICY:default:2.1.2.1~', '~BGP_PEER_EXPORT_POLICY:default:2.1.2.2~', '~BGP_PEER_EXPORT_POLICY:default:2.34.101.4~', '~OSPF_EXPORT_POLICY:default~'] None [] [] None ['default'] []
1 host2 [] [] [] HOST [] None PERMIT PERMIT None ... [] [] [] [] None [] [] None ['default'] []
2 as1core1 [] [] [] CISCO_IOS [] None PERMIT PERMIT lab.local ... [] [] [] ['~BGP_COMMON_EXPORT_POLICY:default~', '~BGP_PEER_EXPORT_POLICY:default:1.1.1.1~', '~BGP_PEER_EXPORT_POLICY:default:1.2.2.2~', '~OSPF_EXPORT_POLICY:default~'] None [] [] None ['default'] []
3 as1border1 [] [] ['as1_community', 'as2_community', 'as3_community'] CISCO_IOS [] None PERMIT PERMIT lab.local ... [] [] ['101', '102', '103', 'default_list', 'inbound_route_filter'] ['as1_to_as2', 'as1_to_as3', 'as2_to_as1', 'as3_to_as1', '~BGP_COMMON_EXPORT_POLICY:default~', '~BGP_PEER_EXPORT_POLICY:default:1.10.1.1~', '~BGP_PEER_EXPORT_POLICY:default:10.12.11.2~', '~BGP_PEER_EXPORT_POLICY:default:3.2.2.2~', '~BGP_PEER_EXPORT_POLICY:default:5.6.7.8~', '~OSPF_EXPORT_POLICY:default~'] None [] [] None ['default'] []
4 as3border1 [] [] ['as1_community', 'as2_community', 'as3_community'] CISCO_IOS [] None PERMIT PERMIT lab.local ... [] [] ['101', '102', '103', 'default_list', 'inbound_route_filter'] ['as1_to_as3', 'as2_to_as3', 'as3_to_as1', 'as3_to_as2', '~BGP_COMMON_EXPORT_POLICY:default~', '~BGP_PEER_EXPORT_POLICY:default:10.23.21.2~', '~BGP_PEER_EXPORT_POLICY:default:3.10.1.1~', '~OSPF_EXPORT_POLICY:default~'] None [] [] None ['default'] []

5 rows × 34 columns

Print the first row of the returned Dataframe

[8]:
result.iloc[0]
[8]:
Node                         as2dist1
AS_Path_Access_Lists         []
Authentication_Key_Chains    []
Community_Lists              ['dept_community']
Configuration_Format         CISCO_IOS
DNS_Servers                  []
DNS_Source_Interface         None
Default_Cross_Zone_Action    PERMIT
Default_Inbound_Action       PERMIT
Domain_Name                  lab.local
Hostname                     as2dist1
IKE_Phase1_Keys              []
IKE_Phase1_Policies          []
IKE_Phase1_Proposals         []
IP6_Access_Lists             []
IP_Access_Lists              ['102', '105']
IPsec_Peer_Configs           []
IPsec_Phase2_Policies        []
IPsec_Phase2_Proposals       []
Interfaces                   ['Ethernet0/0', 'GigabitEthernet0/0', 'GigabitEthernet1/0', 'GigabitEthernet2/0', 'Loopback0']
Logging_Servers              []
Logging_Source_Interface     None
NTP_Servers                  []
NTP_Source_Interface         None
PBR_Policies                 []
Route6_Filter_Lists          []
Route_Filter_Lists           ['105']
Routing_Policies             ['as2dist_to_dept', 'dept_to_as2dist', '~BGP_COMMON_EXPORT_POLICY:default~', '~BGP_PEER_EXPORT_POLICY:default:2.1.2.1~', '~BGP_PEER_EXPORT_POLICY:default:2.1.2.2~', '~BGP_PEER_EXPORT_POLICY:default:2.34.101.4~', '~OSPF_EXPORT_POLICY:default~']
SNMP_Source_Interface        None
SNMP_Trap_Servers            []
TACACS_Servers               []
TACACS_Source_Interface      None
VRFs                         ['default']
Zones                        []
Name: 0, dtype: object

Interface Properties

Returns configuration settings of interfaces.

Lists interface-level settings of interfaces. Settings for routing protocols, VRFs, and zones etc. that are attached to interfaces are available via other questions.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this specifier.

NodeSpec

True

interfaces

Include interfaces matching this specifier.

InterfaceSpec

True

properties

Include properties matching this specifier.

InterfacePropertySpec

True

excludeShutInterfaces

Exclude interfaces that are shutdown.

bool

True

Invocation

[11]:
result = bfq.interfaceProperties().answer().frame()

Return Value

Name

Description

Type

Interface

Interface

Interface

Access_VLAN

VLAN number when the switchport mode is access (null otherwise)

int

Active

Whether the interface is active

bool

All_Prefixes

All IPv4 addresses assigned to the interface

List of str

Allowed_VLANs

Allowed VLAN numbers when the switchport mode is trunk

str

Auto_State_VLAN

For VLAN interfaces, whether the operational status depends on member switchports

bool

Bandwidth

Nominal bandwidth in bits/sec, used for protocol cost calculations

float

Blacklisted

Whether the interface is considered down for maintenance

bool

Channel_Group

Name of the aggregated interface (e.g., a port channel) to which this interface belongs

str

Channel_Group_Members

For aggregated interfaces (e.g., a port channel), names of constituent interfaces

List of str

DHCP_Relay_Addresses

IPv4 addresses to which incoming DHCP requests are relayed

List of str

Declared_Names

Any aliases explicitly defined for this interface

List of str

Description

Configured interface description

str

Encapsulation_VLAN

Number for VLAN encapsulation

int

HSRP_Groups

HSRP group identifiers

Set of str

HSRP_Version

HSRP version that will be used

str

Incoming_Filter_Name

Name of the input IPv4 filter

str

MLAG_ID

MLAG identifier of the interface

int

MTU

Layer3 MTU of the interface

int

Native_VLAN

Native VLAN when switchport mode is trunk

int

Outgoing_Filter_Name

Name of the output IPv4 filter

str

PBR_Policy_Name

Name of policy-based routing (PBR) policy

str

Primary_Address

Primary IPv4 address along with the prefix length

str

Primary_Network

Primary IPv4 subnet, in canonical form

str

Proxy_ARP

Whether proxy ARP is enabled

bool

Rip_Enabled

Whether RIP is enabled

bool

Rip_Passive

Whether interface is in RIP passive mode

bool

Spanning_Tree_Portfast

Whether spanning-tree portfast feature is enabled

bool

Speed

Link speed in bits/sec

float

Switchport

Whether the interface is configured as switchport

bool

Switchport_Mode

Switchport mode (ACCESS, DOT1Q_TUNNEL, DYNAMIC_AUTO, DYNAMIC_DESIRABLE, FEX_FABRIC, MONITOR, NONE, TAP, TOOL, TRUNK) for switchport interfaces

str

Switchport_Trunk_Encapsulation

Encapsulation type (DOT1Q, ISL, NEGOTIATE) for switchport trunk interfaces

str

VRF

Name of the VRF to which the interface belongs

str

VRRP_Groups

All VRRP groups to which the interface belongs

List of int

Zone_Name

Name of the firewall zone to which the interface belongs

str

Print the first 5 rows of the returned Dataframe

[12]:
result.head(5)
[12]:
Interface Access_VLAN Active All_Prefixes Allowed_VLANs Auto_State_VLAN Bandwidth Blacklisted Channel_Group Channel_Group_Members ... Rip_Enabled Rip_Passive Spanning_Tree_Portfast Speed Switchport Switchport_Mode Switchport_Trunk_Encapsulation VRF VRRP_Groups Zone_Name
0 as2dist1[GigabitEthernet2/0] None True ['2.34.101.3/24'] True 1e+09 False None [] ... False False False 1e+09 False NONE DOT1Q default [] None
1 as3core1[Loopback0] None True ['3.10.1.1/32'] True 8e+09 False None [] ... False False False None False NONE DOT1Q default [] None
2 as1core1[Loopback0] None True ['1.10.1.1/32'] True 8e+09 False None [] ... False False False None False NONE DOT1Q default [] None
3 as2border1[Loopback0] None True ['2.1.1.1/32'] True 8e+09 False None [] ... False False False None False NONE DOT1Q default [] None
4 as2border2[GigabitEthernet2/0] None True ['2.12.21.1/24'] True 1e+09 False None [] ... False False False 1e+09 False NONE DOT1Q default [] None

5 rows × 35 columns

Print the first row of the returned Dataframe

[13]:
result.iloc[0]
[13]:
Interface                         as2dist1[GigabitEthernet2/0]
Access_VLAN                       None
Active                            True
All_Prefixes                      ['2.34.101.3/24']
Allowed_VLANs
Auto_State_VLAN                   True
Bandwidth                         1e+09
Blacklisted                       False
Channel_Group                     None
Channel_Group_Members             []
DHCP_Relay_Addresses              []
Declared_Names                    ['GigabitEthernet2/0']
Description                       None
Encapsulation_VLAN                None
HSRP_Groups                       []
HSRP_Version                      None
Incoming_Filter_Name              None
MLAG_ID                           None
MTU                               1500
Native_VLAN                       None
Outgoing_Filter_Name              None
PBR_Policy_Name                   None
Primary_Address                   2.34.101.3/24
Primary_Network                   2.34.101.0/24
Proxy_ARP                         True
Rip_Enabled                       False
Rip_Passive                       False
Spanning_Tree_Portfast            False
Speed                             1e+09
Switchport                        False
Switchport_Mode                   NONE
Switchport_Trunk_Encapsulation    DOT1Q
VRF                               default
VRRP_Groups                       []
Zone_Name                         None
Name: 0, dtype: object

BGP Process Configuration

Returns configuration settings of BGP processes.

Reports configuration settings for each BGP process on each node and VRF in the network. This question reports only process-wide settings. Peer-specific settings are reported by the bgpPeerConfiguration question.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

properties

Include properties matching this regex.

BgpProcessPropertySpec

True

Invocation

[16]:
result = bfq.bgpProcessConfiguration().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VRF

VRF

str

Router_ID

Router ID

str

Confederation_ID

Externally visible autonomous system number for the confederation

int

Confederation_Members

Set of autonomous system numbers visible only within this BGP confederation

Set of int

Multipath_EBGP

Whether multipath routing is enabled for EBGP

bool

Multipath_IBGP

Whether multipath routing is enabled for IBGP

bool

Multipath_Match_Mode

Which AS paths are considered equivalent (EXACT_PATH, FIRST_AS, PATH_LENGTH) when multipath BGP is enabled

str

Neighbors

All peers configured on this process, identified by peer address (for active and dynamic peers) or peer interface (for BGP unnumbered peers)

Set of str

Route_Reflector

Whether any BGP peer in this process is configured as a route reflector client, for ipv4 unicast address family

bool

Tie_Breaker

Tie breaking mode (ARRIVAL_ORDER, CLUSTER_LIST_LENGTH, ROUTER_ID)

str

Print the first 5 rows of the returned Dataframe

[17]:
result.head(5)
[17]:
Node VRF Router_ID Confederation_ID Confederation_Members Multipath_EBGP Multipath_IBGP Multipath_Match_Mode Neighbors Route_Reflector Tie_Breaker
0 as2dept1 default 2.1.4.1 None None True True EXACT_PATH ['2.34.101.3/32', '2.34.201.3/32'] False ARRIVAL_ORDER
1 as2border2 default 2.1.1.2 None None True True EXACT_PATH ['2.1.2.1/32', '2.1.2.2/32', '10.23.21.3/32'] False ARRIVAL_ORDER
2 as2dist2 default 2.1.3.2 None None True True EXACT_PATH ['2.1.2.1/32', '2.1.2.2/32', '2.34.201.4/32'] False ARRIVAL_ORDER
3 as3border2 default 3.2.2.2 None None True True EXACT_PATH ['3.10.1.1/32', '10.13.22.1/32'] False ARRIVAL_ORDER
4 as3core1 default 3.10.1.1 None None True True EXACT_PATH ['3.1.1.1/32', '3.2.2.2/32'] True ARRIVAL_ORDER

Print the first row of the returned Dataframe

[18]:
result.iloc[0]
[18]:
Node                     as2dept1
VRF                      default
Router_ID                2.1.4.1
Confederation_ID         None
Confederation_Members    None
Multipath_EBGP           True
Multipath_IBGP           True
Multipath_Match_Mode     EXACT_PATH
Neighbors                ['2.34.101.3/32', '2.34.201.3/32']
Route_Reflector          False
Tie_Breaker              ARRIVAL_ORDER
Name: 0, dtype: object

BGP Peer Configuration

Returns configuration settings for BGP peerings.

Reports configuration settings for each configured BGP peering on each node in the network. This question reports peer-specific settings. Settings that are process-wide are reported by the bgpProcessConfiguration question.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

properties

Include properties matching this regex.

BgpPeerPropertySpec

True

Invocation

[21]:
result = bfq.bgpPeerConfiguration().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VRF

VRF

str

Local_AS

Local AS number

int

Local_IP

Local IPv4 address (null for BGP unnumbered peers)

str

Local_Interface

Local Interface

str

Confederation

Confederation AS number

int

Remote_AS

Remote AS numbers with which this peer may establish a session

str

Remote_IP

Remote IP

str

Route_Reflector_Client

Whether this peer is a route reflector client

bool

Cluster_ID

Cluster ID of this peer (null for peers that are not route reflector clients)

str

Peer_Group

Name of the BGP peer group to which this peer belongs

str

Import_Policy

Names of import policies to be applied to routes received by this peer

Set of str

Export_Policy

Names of export policies to be applied to routes exported by this peer

Set of str

Send_Community

Whether this peer propagates communities

bool

Is_Passive

Whether this peer is passive

bool

Print the first 5 rows of the returned Dataframe

[22]:
result.head(5)
[22]:
Node VRF Local_AS Local_IP Local_Interface Confederation Remote_AS Remote_IP Route_Reflector_Client Cluster_ID Peer_Group Import_Policy Export_Policy Send_Community Is_Passive
0 as2core1 default 2 2.1.2.1 None None 2 2.1.3.2 True 2.1.2.1 as2 [] [] True False
1 as2core2 default 2 2.1.2.2 None None 2 2.1.1.2 True 2.1.2.2 as2 [] [] True False
2 as2core2 default 2 2.1.2.2 None None 2 2.1.3.2 True 2.1.2.2 as2 [] [] True False
3 as1border1 default 1 None None None 555 5.6.7.8 False None xanadu [] [] False False
4 as2dept1 default 65001 2.34.101.4 None None 2 2.34.101.3 False None as2 ['as2_to_dept'] ['dept_to_as2'] True False

Print the first row of the returned Dataframe

[23]:
result.iloc[0]
[23]:
Node                      as2core1
VRF                       default
Local_AS                  2
Local_IP                  2.1.2.1
Local_Interface           None
Confederation             None
Remote_AS                 2
Remote_IP                 2.1.3.2
Route_Reflector_Client    True
Cluster_ID                2.1.2.1
Peer_Group                as2
Import_Policy             []
Export_Policy             []
Send_Community            True
Is_Passive                False
Name: 0, dtype: object

OSPF Process Configuration

Returns configuration parameters for OSPF routing processes.

Returns the values of important properties for all OSPF processes running across the network.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

properties

Include properties matching this specifier.

OspfProcessPropertySpec

True

Invocation

[26]:
result = bfq.ospfProcessConfiguration().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VRF

VRF name

str

Process_ID

Process ID

str

Areas

All OSPF areas for this process

Set of str

Reference_Bandwidth

Reference bandwidth in bits/sec used to calculate interface OSPF cost

float

Router_ID

Router ID of the process

str

Export_Policy_Sources

Names of policies that determine which routes are exported into OSPF

Set of str

Area_Border_Router

Whether this process is at the area border (with at least one interface in Area 0 and one in another area)

bool

Print the first 5 rows of the returned Dataframe

[27]:
result.head(5)
[27]:
Node VRF Process_ID Areas Reference_Bandwidth Router_ID Export_Policy_Sources Area_Border_Router
0 as2border1 default 1 ['1'] 1e+08 2.1.1.1 [] False
1 as2core1 default 1 ['1'] 1e+08 2.1.2.1 [] False
2 as2dist1 default 1 ['1'] 1e+08 2.1.3.1 [] False
3 as2dist2 default 1 ['1'] 1e+08 2.1.3.2 [] False
4 as1border2 default 1 ['1'] 1e+08 1.2.2.2 [] False

Print the first row of the returned Dataframe

[28]:
result.iloc[0]
[28]:
Node                     as2border1
VRF                      default
Process_ID               1
Areas                    ['1']
Reference_Bandwidth      1e+08
Router_ID                2.1.1.1
Export_Policy_Sources    []
Area_Border_Router       False
Name: 0, dtype: object

OSPF Interface Configuration

Returns OSPF configuration of interfaces.

Returns the interface level OSPF configuration details for the interfaces in the network which run OSPF.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this specifier.

NodeSpec

True

properties

Include properties matching this specifier.

OspfInterfacePropertySpec

True

Invocation

[31]:
result = bfq.ospfInterfaceConfiguration().answer().frame()

Return Value

Name

Description

Type

Interface

Interface

Interface

VRF

VRF name

str

Process_ID

Process ID

str

OSPF_Area_Name

OSPF area to which the interface belongs

int

OSPF_Enabled

Whether OSPF is enabled

bool

OSPF_Passive

Whether interface is in OSPF passive mode

bool

OSPF_Cost

OSPF cost if explicitly configured

int

OSPF_Network_Type

Type of OSPF network associated with the interface

str

OSPF_Hello_Interval

Interval in seconds between sending OSPF hello messages

int

OSPF_Dead_Interval

Interval in seconds before a silent OSPF neighbor is declared dead

int

Print the first 5 rows of the returned Dataframe

[32]:
result.head(5)
[32]:
Interface VRF Process_ID OSPF_Area_Name OSPF_Enabled OSPF_Passive OSPF_Cost OSPF_Network_Type OSPF_Hello_Interval OSPF_Dead_Interval
0 as1core1[GigabitEthernet1/0] default 1 1 True False 1 BROADCAST 10 40
1 as1core1[GigabitEthernet0/0] default 1 1 True False 1 BROADCAST 10 40
2 as2dist1[Loopback0] default 1 1 True False 1 BROADCAST 10 40
3 as3core1[GigabitEthernet0/0] default 1 1 True False 1 BROADCAST 10 40
4 as3core1[GigabitEthernet1/0] default 1 1 True False 1 BROADCAST 10 40

Print the first row of the returned Dataframe

[33]:
result.iloc[0]
[33]:
Interface              as1core1[GigabitEthernet1/0]
VRF                    default
Process_ID             1
OSPF_Area_Name         1
OSPF_Enabled           True
OSPF_Passive           False
OSPF_Cost              1
OSPF_Network_Type      BROADCAST
OSPF_Hello_Interval    10
OSPF_Dead_Interval     40
Name: 0, dtype: object

OSPF Area Configuration

Returns configuration parameters of OSPF areas.

Returns information about all OSPF areas defined across the network.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

Invocation

[36]:
result = bfq.ospfAreaConfiguration().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VRF

VRF

str

Process_ID

Process ID

str

Area

Area number

str

Area_Type

Area type

str

Active_Interfaces

Names of active interfaces

Set of str

Passive_Interfaces

Names of passive interfaces

Set of str

Print the first 5 rows of the returned Dataframe

[37]:
result.head(5)
[37]:
Node VRF Process_ID Area Area_Type Active_Interfaces Passive_Interfaces
0 as2dist2 default 1 1 NONE ['GigabitEthernet0/0', 'GigabitEthernet1/0', 'Loopback0'] []
1 as2border2 default 1 1 NONE ['GigabitEthernet1/0', 'GigabitEthernet2/0', 'Loopback0'] []
2 as3core1 default 1 1 NONE ['GigabitEthernet0/0', 'GigabitEthernet1/0', 'Loopback0'] []
3 as2core1 default 1 1 NONE ['GigabitEthernet0/0', 'GigabitEthernet1/0', 'GigabitEthernet2/0', 'GigabitEthernet3/0', 'Loopback0'] []
4 as1border2 default 1 1 NONE ['GigabitEthernet1/0', 'Loopback0'] []

Print the first row of the returned Dataframe

[38]:
result.iloc[0]
[38]:
Node                  as2dist2
VRF                   default
Process_ID            1
Area                  1
Area_Type             NONE
Active_Interfaces     ['GigabitEthernet0/0', 'GigabitEthernet1/0', 'Loopback0']
Passive_Interfaces    []
Name: 0, dtype: object

Multi-chassis LAG

Returns MLAG configuration.

Lists the configuration settings for each MLAG domain in the network.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this specifier.

NodeSpec

True

mlagIds

Include MLAG IDs matching this specifier.

MlagIdSpec

True

Invocation

[41]:
result = bfq.mlagProperties().answer().frame()

Return Value

Name

Description

Type

Node

Node name

str

MLAG_ID

MLAG domain ID

str

Peer_Address

Peer’s IP address

str

Local_Interface

Local interface used for MLAG peering

Interface

Source_Interface

Local interface used as source-interface for MLAG peering

Interface

Print the first 5 rows of the returned Dataframe

[42]:
result.head(5)
[42]:
Node MLAG_ID Peer_Address Local_Interface Source_Interface
0 dc1-bl1a DC1_BL1 10.255.252.11 dc1-bl1a[Port-Channel3] dc1-bl1a[Vlan4094]
1 dc1-bl1b DC1_BL1 10.255.252.10 dc1-bl1b[Port-Channel3] dc1-bl1b[Vlan4094]
2 dc1-l2leaf5a DC1_L2LEAF5 10.255.252.19 dc1-l2leaf5a[Port-Channel3] dc1-l2leaf5a[Vlan4094]
3 dc1-l2leaf5b DC1_L2LEAF5 10.255.252.18 dc1-l2leaf5b[Port-Channel3] dc1-l2leaf5b[Vlan4094]
4 dc1-l2leaf6a DC1_L2LEAF6 10.255.252.23 dc1-l2leaf6a[Port-Channel3] dc1-l2leaf6a[Vlan4094]

Print the first row of the returned Dataframe

[43]:
result.iloc[0]
[43]:
Node                dc1-bl1a
MLAG_ID             DC1_BL1
Peer_Address        10.255.252.11
Local_Interface     dc1-bl1a[Port-Channel3]
Source_Interface    dc1-bl1a[Vlan4094]
Name: 0, dtype: object

F5 BIG-IP VIP Configuration

Returns VIP configuration of F5 BIG-IP devices.

Lists all the VIP to server IP mappings contained in F5 BIP-IP configurations.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

Invocation

[46]:
result = bfq.f5BigipVipConfiguration().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VIP_Name

Virtual Service Name

str

VIP_Endpoint

Virtual Service Endpoint

str

Servers

Servers

Set of str

Description

Description

str

Print the first 5 rows of the returned Dataframe

[47]:
result.head(5)
[47]:
Node VIP_Name VIP_Endpoint Servers Description
0 f5bigip /Common/virtual1 192.0.2.1:80 TCP ['10.0.0.1:80'] virtual1 is cool
1 f5bigip /Common/virtual2 192.0.2.2:80 TCP ['10.0.0.2:80'] pool2 is lame
2 f5bigip /Common/virtual3 192.0.2.3:80 TCP ['10.0.0.4:80', '10.0.0.3:80']

Print the first row of the returned Dataframe

[48]:
result.iloc[0]
[48]:
Node            f5bigip
VIP_Name        /Common/virtual1
VIP_Endpoint    192.0.2.1:80 TCP
Servers         ['10.0.0.1:80']
Description     virtual1 is cool
Name: 0, dtype: object

IP Owners

Returns where IP addresses are attached in the network.

For each device, lists the mapping from IPs to corresponding interface(s) and VRF(s).

Inputs

Name

Description

Type

Optional

Default Value

duplicatesOnly

Restrict output to only IP addresses that are duplicated (configured on a different node or VRF) in the snapshot.

bool

False

False

Invocation

[51]:
result = bfq.ipOwners().answer().frame()

Return Value

Name

Description

Type

Node

Node hostname

str

VRF

VRF name

str

Interface

Interface name

str

IP

IP address

str

Mask

Network mask length

int

Active

Whether the interface is active

bool

Print the first 5 rows of the returned Dataframe

[52]:
result.head(5)
[52]:
Node VRF Interface IP Mask Active
0 as2dist2 default Loopback0 2.1.3.2 32 True
1 as2dist1 default Loopback0 2.1.3.1 32 True
2 as2dept1 default GigabitEthernet1/0 2.34.201.4 24 True
3 as2dept1 default Loopback0 2.1.1.2 32 True
4 as3border2 default GigabitEthernet1/0 3.0.2.1 24 True

Print the first row of the returned Dataframe

[53]:
result.iloc[0]
[53]:
Node         as2dist2
VRF          default
Interface    Loopback0
IP           2.1.3.2
Mask         32
Active       True
Name: 0, dtype: object

Named Structures

Returns named structure definitions.

Return structures defined in the configurations, represented in a vendor-independent JSON format.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this specifier.

NodeSpec

True

structureTypes

Include structures of this type.

NamedStructureSpec

True

structureNames

Include structures matching this name or regex.

str

True

ignoreGenerated

Whether to ignore auto-generated structures.

bool

True

True

indicatePresence

Output if the structure is present or absent.

bool

True

Invocation

[56]:
result = bfq.namedStructures().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

Structure_Type

Structure type

str

Structure_Name

Structure name

str

Structure_Definition

Structure definition

dict

Print the first 5 rows of the returned Dataframe

[57]:
result.head(5)
[57]:
Node Structure_Type Structure_Name Structure_Definition
0 as3border1 Routing_Policy as3_to_as2 {'name': 'as3_to_as2', 'statements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~1~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~3~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~5~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnLocalDefaultAction'}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': 'default_list'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': '103'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': '101'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}]}
1 as1core1 VRF default {'name': 'default', 'ospfProcesses': {'1': {'adminCosts': {'ospf': 110, 'ospfE1': 110, 'ospfE2': 110, 'ospfIA': 110}, 'areas': {'1': {'injectDefaultRoute': True, 'interfaces': ['GigabitEthernet0/0', 'GigabitEthernet1/0', 'Loopback0'], 'metricOfDefaultRoute': 0, 'name': 1, 'stubType': 'NONE'}}, 'exportPolicy': '~OSPF_EXPORT_POLICY:default~', 'processId': '1', 'referenceBandwidth': 100000000.0, 'routerId': '1.10.1.1', 'summaryAdminCost': 254}}, 'bgpProcess': {'ebgpAdminCost': 20, 'ibgpAdminCost': 200, 'routerId': '1.10.1.1', 'clusterListAsIgpCost': False, 'multipathEbgp': True, 'multipathEquivalentAsPathMatchMode': 'EXACT_PATH', 'multipathIbgp': True, 'neighbors': {'1.1.1.1/32': {'class': 'org.batfish.datamodel.BgpActivePeerConfig', 'clusterId': 17432833, 'defaultMetric': 0, 'ebgpMultihop': False, 'enforceFirstAs': False, 'group': 'as1', 'ipv4UnicastAddressFamily': {'addressFamilyCapabilities': {'additionalPathsReceive': True, 'additionalPathsSelectAll': True, 'additionalPathsSend': True, 'advertiseExternal': False, 'advertiseInactive': True, 'allowLocalAsIn': False, 'allowRemoteAsOut': True, 'sendCommunity': True, 'sendExtendedCommunity': False}, 'exportPolicy': '~BGP_PEER_EXPORT_POLICY:default:1.1.1.1~', 'routeReflectorClient': True}, 'localAs': 1, 'localIp': '1.10.1.1', 'peerAddress': '1.1.1.1', 'remoteAsns': '1'}, '1.2.2.2/32': {'class': 'org.batfish.datamodel.BgpActivePeerConfig', 'clusterId': 17432833, 'defaultMetric': 0, 'ebgpMultihop': False, 'enforceFirstAs': False, 'group': 'as1', 'ipv4UnicastAddressFamily': {'addressFamilyCapabilities': {'additionalPathsReceive': True, 'additionalPathsSelectAll': True, 'additionalPathsSend': True, 'advertiseExternal': False, 'advertiseInactive': True, 'allowLocalAsIn': False, 'allowRemoteAsOut': True, 'sendCommunity': True, 'sendExtendedCommunity': False}, 'exportPolicy': '~BGP_PEER_EXPORT_POLICY:default:1.2.2.2~', 'routeReflectorClient': True}, 'localAs': 1, 'localIp': '1.10.1.1', 'peerAddress': '1.2.2.2', 'remoteAsns': '1'}}, 'tieBreaker': 'ARRIVAL_ORDER'}}
2 host1 IP_Access_List filter::INPUT {'lines': [{'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstPorts': ['53-53'], 'ipProtocols': ['UDP'], 'negate': False}}, 'name': '-p udp --dport 53 -j ACCEPT', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line -p udp --dport 53 -j ACCEPT'}]}}, {'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstPorts': ['22-22'], 'ipProtocols': ['TCP'], 'negate': False}}, 'name': '-p tcp --dport 22 -j ACCEPT', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line -p tcp --dport 22 -j ACCEPT'}]}}, {'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'DENY', 'matchCondition': {'class': 'org.batfish.datamodel.acl.TrueExpr'}, 'name': 'default', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line default'}]}}], 'name': 'filter::INPUT'}
3 as2border2 IP_Access_List 103 {'lines': [{'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '255.255.255.0'}, 'negate': False, 'srcIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '3.0.1.0'}}}, 'name': 'permit ip host 3.0.1.0 host 255.255.255.0', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line permit ip host 3.0.1.0 host 255.255.255.0'}]}}, {'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '255.255.255.0'}, 'negate': False, 'srcIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '3.0.2.0'}}}, 'name': 'permit ip host 3.0.2.0 host 255.255.255.0', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line permit ip host 3.0.2.0 host 255.255.255.0'}]}}], 'name': '103', 'sourceName': '103', 'sourceType': 'extended ipv4 access-list'}
4 as2border1 IP_Access_List 103 {'lines': [{'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '255.255.255.0'}, 'negate': False, 'srcIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '3.0.1.0'}}}, 'name': 'permit ip host 3.0.1.0 host 255.255.255.0', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line permit ip host 3.0.1.0 host 255.255.255.0'}]}}, {'class': 'org.batfish.datamodel.ExprAclLine', 'action': 'PERMIT', 'matchCondition': {'class': 'org.batfish.datamodel.acl.MatchHeaderSpace', 'headerSpace': {'dstIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '255.255.255.0'}, 'negate': False, 'srcIps': {'class': 'org.batfish.datamodel.IpWildcardIpSpace', 'ipWildcard': '3.0.2.0'}}}, 'name': 'permit ip host 3.0.2.0 host 255.255.255.0', 'traceElement': {'fragments': [{'class': 'org.batfish.datamodel.TraceElement$TextFragment', 'text': 'Matched line permit ip host 3.0.2.0 host 255.255.255.0'}]}}], 'name': '103', 'sourceName': '103', 'sourceType': 'extended ipv4 access-list'}

Print the first row of the returned Dataframe

[58]:
result.iloc[0]
[58]:
Node                    as3border1
Structure_Type          Routing_Policy
Structure_Name          as3_to_as2
Structure_Definition    {'name': 'as3_to_as2', 'statements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~1~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~3~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.If', 'comment': '~RMCLAUSE~as3_to_as2~5~', 'falseStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnLocalDefaultAction'}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': 'default_list'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': '103'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}], 'guard': {'class': 'org.batfish.datamodel.routing_policy.expr.MatchPrefixSet', 'prefix': {'class': 'org.batfish.datamodel.routing_policy.expr.DestinationNetwork'}, 'prefixSet': {'class': 'org.batfish.datamodel.routing_policy.expr.NamedPrefixSet', 'name': '101'}}, 'trueStatements': [{'class': 'org.batfish.datamodel.routing_policy.statement.SetMetric', 'metric': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralLong', 'value': 50}}, {'class': 'org.batfish.datamodel.routing_policy.statement.AddCommunity', 'expr': {'class': 'org.batfish.datamodel.routing_policy.expr.LiteralCommunitySet', 'communities': ['3:2']}}, {'class': 'org.batfish.datamodel.routing_policy.statement.Statements$StaticStatement', 'type': 'ReturnTrue'}]}]}
Name: 0, dtype: object

Defined Structures

Lists the structures defined in the network.

Lists the structures defined in the network, along with the files and line numbers in which they are defined.

Inputs

Name

Description

Type

Optional

Default Value

filename

Include structures defined in the given file.

str

True

nodes

Include files used to generate nodes whose name matches this specifier.

NodeSpec

True

.*

names

Include structures whose name matches this string or regex.

str

True

.*

types

Include structures whose vendor-specific type matches this string or regex.

str

True

.*

Invocation

[61]:
result = bfq.definedStructures().answer().frame()

Return Value

Name

Description

Type

Structure_Type

Vendor-specific type of the structure

str

Structure_Name

Name of the structure

str

Source_Lines

File and line numbers where the structure is defined

FileLines

Print the first 5 rows of the returned Dataframe

[62]:
result.head(5)
[62]:
Structure_Type Structure_Name Source_Lines
0 bgp peer-group as2 configs/as1border1.cfg:[81]
1 interface GigabitEthernet1/0 configs/as1core1.cfg:[69, 70, 71]
2 extended ipv4 access-list 103 configs/as1border2.cfg:[140]
3 ipv4 prefix-list as4-prefixes configs/as1border2.cfg:[132]
4 extended ipv4 access-list 101 configs/as2border2.cfg:[140, 141]

Print the first row of the returned Dataframe

[63]:
result.iloc[0]
[63]:
Structure_Type    bgp peer-group
Structure_Name    as2
Source_Lines      configs/as1border1.cfg:[81]
Name: 0, dtype: object

Referenced Structures

Lists the references in configuration files to vendor-specific structures.

Lists the references in configuration files to vendor-specific structures, along with the line number, the name and the type of the structure referenced, and configuration context in which each reference occurs.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include files used to generate nodes whose name matches this specifier.

NodeSpec

True

names

Include structures whose name matches this string or regex.

str

True

types

Include structures whose vendor-specific type matches this string or regex.

str

True

Invocation

[66]:
result = bfq.referencedStructures().answer().frame()

Return Value

Name

Description

Type

Structure_Type

Type of structure referenced

str

Structure_Name

The referenced structure

str

Context

Configuration context in which the reference appears

str

Source_Lines

Lines where reference appears

FileLines

Print the first 5 rows of the returned Dataframe

[67]:
result.head(5)
[67]:
Structure_Type Structure_Name Context Source_Lines
0 bgp peer-group as1 bgp neighbor peer-group configs/as1border1.cfg:[89]
1 bgp peer-group as2 bgp neighbor peer-group configs/as1border1.cfg:[93]
2 bgp peer-group bad-ebgp bgp neighbor peer-group configs/as1border1.cfg:[91]
3 bgp peer-group xanadu bgp neighbor peer-group configs/as1border1.cfg:[92]
4 community-list as2_community route-map match community-list configs/as1border1.cfg:[154]

Print the first row of the returned Dataframe

[68]:
result.iloc[0]
[68]:
Structure_Type    bgp peer-group
Structure_Name    as1
Context           bgp neighbor peer-group
Source_Lines      configs/as1border1.cfg:[89]
Name: 0, dtype: object

Undefined References

Identifies undefined references in configuration.

Finds configurations that have references to named structures (e.g., ACLs) that are not defined. Such occurrences indicate errors and can have serious consequences in some cases.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Look for undefined references on nodes matching this name or regex.

NodeSpec

True

.*

Invocation

[71]:
result = bfq.undefinedReferences().answer().frame()

Return Value

Name

Description

Type

File_Name

File containing reference

str

Struct_Type

Type of struct reference is supposed to be

str

Ref_Name

The undefined reference

str

Context

Context of undefined reference

str

Lines

Lines where reference appears

FileLines

Print the first 5 rows of the returned Dataframe

[72]:
result.head(5)
[72]:
File_Name Struct_Type Ref_Name Context Lines
0 configs/as2core2.cfg route-map filter-bogons bgp inbound route-map configs/as2core2.cfg:[109]

Print the first row of the returned Dataframe

[73]:
result.iloc[0]
[73]:
File_Name      configs/as2core2.cfg
Struct_Type    route-map
Ref_Name       filter-bogons
Context        bgp inbound route-map
Lines          configs/as2core2.cfg:[109]
Name: 0, dtype: object

Unused Structures

Returns nodes with structures such as ACLs, routemaps, etc. that are defined but not used.

Return nodes with structures such as ACLs, routes, etc. that are defined but not used. This may represent a bug in the configuration, which may have occurred because a final step in a template or MOP was not completed. Or it could be harmless extra configuration generated from a master template that is not meant to be used on those nodes.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Look for unused structures on nodes matching this name or regex.

NodeSpec

True

.*

Invocation

[76]:
result = bfq.unusedStructures().answer().frame()

Return Value

Name

Description

Type

Structure_Type

Vendor-specific type of the structure

str

Structure_Name

Name of the structure

str

Source_Lines

File and line numbers where the structure is defined

FileLines

Print the first 5 rows of the returned Dataframe

[77]:
result.head(5)
[77]:
Structure_Type Structure_Name Source_Lines
0 bgp peer-group as3 configs/as1border1.cfg:[83]
1 expanded community-list as1_community configs/as1border1.cfg:[119]
2 ipv4 prefix-list inbound_route_filter configs/as1border1.cfg:[129, 130]
3 bgp peer-group as2 configs/as1border2.cfg:[87]
4 expanded community-list as1_community configs/as1border2.cfg:[123]

Print the first row of the returned Dataframe

[78]:
result.iloc[0]
[78]:
Structure_Type    bgp peer-group
Structure_Name    as3
Source_Lines      configs/as1border1.cfg:[83]
Name: 0, dtype: object

VLAN Properties

Returns configuration settings of switched VLANs.

Lists information about implicitly and explicitly configured switched VLANs.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this specifier.

NodeSpec

True

interfaces

Include interfaces matching this specifier.

InterfaceSpec

True

vlans

Include VLANs in this space.

str

True

excludeShutInterfaces

Exclude interfaces that are shutdown.

bool

True

Invocation

[81]:
result = bfq.switchedVlanProperties().answer().frame()

Return Value

Name

Description

Type

Node

Node

str

VLAN_ID

VLAN_ID

int

Interfaces

Switched interfaces carrying traffic for this VLAN

Set of Interface

VXLAN_VNI

VXLAN VNI with which this VLAN is associated

int

Print the first 5 rows of the returned Dataframe

[82]:
result.head(5)
[82]:
Node VLAN_ID Interfaces VXLAN_VNI
0 dc1-bl1b 250 [dc1-bl1b[Port-Channel3], dc1-bl1b[Vlan250]] 20250
1 dc1-leaf1a 210 [dc1-leaf1a[Vlan210]] 20210
2 dc1-leaf1a 211 [dc1-leaf1a[Vlan211]] 20211
3 dc1-leaf2a 3764 [dc1-leaf2a[Port-Channel3]] None
4 dc1-leaf2b 3789 [dc1-leaf2b[Port-Channel3]] None

Print the first row of the returned Dataframe

[83]:
result.iloc[0]
[83]:
Node          dc1-bl1b
VLAN_ID       250
Interfaces    [dc1-bl1b[Port-Channel3], dc1-bl1b[Vlan250]]
VXLAN_VNI     20250
Name: 0, dtype: object

Interface MTU

Finds interfaces where the configured MTU matches the specified comparator and mtuBytes.

For example, if comparator is ‘<’ and mtuBytes is 1500, then only interfaces where the configured MTU is less than 1500 bytes will be returned.

Inputs

Name

Description

Type

Optional

Default Value

interfaces

Evaluate interfaces matching this specifier.

InterfaceSpec

True

.*

mtuBytes

The reference MTU in bytes against which to check the configured MTU.

int

True

1500

nodes

Include nodes matching this specifier.

NodeSpec

True

.*

comparator

Returned devices will satisfy . Use ‘<’ to find devices that do not have MTU smaller than the specified MTU.

str

True

<

Invocation

[86]:
result = bfq.interfaceMtu(mtuBytes=2000, comparator='<').answer().frame()

Return Value

Name

Description

Type

Interface

Interface

Interface

MTU

Layer3 MTU of the interface

int

Print the first 5 rows of the returned Dataframe

[87]:
result.head(5)
[87]:
Interface MTU
0 as1border1[Ethernet0/0] 1500
1 as1border1[GigabitEthernet0/0] 1500
2 as1border1[GigabitEthernet1/0] 1500
3 as1border1[Loopback0] 1500
4 as1border2[Ethernet0/0] 1500

Print the first row of the returned Dataframe

[88]:
result.iloc[0]
[88]:
Interface    as1border1[Ethernet0/0]
MTU          1500
Name: 0, dtype: object