Routing Protocols

BGP Session Compatibility

Returns the compatibility of configured BGP sessions.

Checks the settings of each configured BGP peering and reports any issue with those settings locally or incompatiblity with its remote counterparts. Each row represents one configured BGP peering on a node and contains information about the session it is meant to establish. For dynamic peers, there is one row per compatible remote peer. Statuses that indicate an independently misconfigured peerings include NO_LOCAL_AS, NO_REMOTE_AS, NO_LOCAL_IP (for eBGP single-hop peerings), LOCAL_IP_UNKNOWN_STATICALLY (for iBGP or eBGP multi-hop peerings), NO_REMOTE_IP (for point-to-point peerings), and NO_REMOTE_PREFIX (for dynamic peerings). INVALID_LOCAL_IP indicates that the peering’s configured local IP does not belong to any active interface on the node; UNKNOWN_REMOTE indicates that the configured remote IP is not present in the network. A locally valid point-to-point peering is deemed HALF_OPEN if it has no compatible remote peers, UNIQUE_MATCH if it has exactly one compatible remote peer, or MULTIPLE_REMOTES if it has multiple compatible remote peers. A locally valid dynamic peering is deemed NO_MATCH_FOUND if it has no compatible remote peers, or DYNAMIC_MATCH if it has at least one compatible remote peer.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include sessions whose first node matches this specifier.

NodeSpec

True

remoteNodes

Include sessions whose second node matches this specifier.

NodeSpec

True

status

Only include sessions for which compatibility status matches this specifier.

BgpSessionCompatStatusSpec

True

type

Only include sessions that match this specifier.

BgpSessionTypeSpec

True

Invocation

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

Return Value

Name

Description

Type

Node

The node where this session is configured

str

VRF

The VRF in which this session is configured

str

Local_AS

The local AS of the session

int

Local_Interface

Local interface of the session

Interface

Local_IP

The local IP of the session

str

Remote_AS

The remote AS or list of ASes of the session

str

Remote_Node

Remote node for this session

str

Remote_Interface

Remote interface for this session

Interface

Remote_IP

Remote IP or prefix for this session

str

Address_Families

Address Families participating in this session

Set of str

Session_Type

The type of this session

str

Configured_Status

Configured status

str

Print the first 5 rows of the returned Dataframe

[7]:
result.head(5)
[7]:
Node VRF Local_AS Local_Interface Local_IP Remote_AS Remote_Node Remote_Interface Remote_IP Address_Families Session_Type Configured_Status
0 as1border1 default 1 None 1.1.1.1 1 as1core1 None 1.10.1.1 ['IPV4_UNICAST'] IBGP UNIQUE_MATCH
1 as1border1 default 1 None None 666 None None 3.2.2.2 [] EBGP_SINGLEHOP NO_LOCAL_IP
2 as1border1 default 1 None None 555 None None 5.6.7.8 [] EBGP_SINGLEHOP NO_LOCAL_IP
3 as1border1 default 1 None 10.12.11.1 2 as2border1 None 10.12.11.2 ['IPV4_UNICAST'] EBGP_SINGLEHOP UNIQUE_MATCH
4 as1border2 default 1 None 1.2.2.2 1 as1core1 None 1.10.1.1 ['IPV4_UNICAST'] IBGP UNIQUE_MATCH

Print the first row of the returned Dataframe

[8]:
result.iloc[0]
[8]:
Node                 as1border1
VRF                  default
Local_AS             1
Local_Interface      None
Local_IP             1.1.1.1
Remote_AS            1
Remote_Node          as1core1
Remote_Interface     None
Remote_IP            1.10.1.1
Address_Families     ['IPV4_UNICAST']
Session_Type         IBGP
Configured_Status    UNIQUE_MATCH
Name: 0, dtype: object

BGP Session Status

Returns the dynamic status of configured BGP sessions.

Checks whether configured BGP peerings can be established. Each row represents one configured BGP peering and contains information about the session it is configured to establish. For dynamic peerings, one row is shown per compatible remote peer. Possible statuses for each session are NOT_COMPATIBLE, ESTABLISHED, and NOT_ESTABLISHED. NOT_COMPATIBLE sessions are those where one or both peers are misconfigured; the BgpSessionCompatibility question provides further insight into the nature of the configuration error. NOT_ESTABLISHED sessions are those that are configured compatibly but will not come up because peers cannot reach each other (e.g., due to being blocked by an ACL). ESTABLISHED sessions are those that are compatible and are expected to come up.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include sessions whose first node matches this specifier.

NodeSpec

True

remoteNodes

Include sessions whose second node matches this specifier.

NodeSpec

True

status

Only include sessions for which status matches this specifier.

BgpSessionStatusSpec

True

type

Only include sessions that match this specifier.

BgpSessionTypeSpec

True

Invocation

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

Return Value

Name

Description

Type

Node

The node where this session is configured

str

VRF

The VRF in which this session is configured

str

Local_AS

The local AS of the session

int

Local_Interface

Local interface of the session

Interface

Local_IP

The local IP of the session

str

Remote_AS

The remote AS or list of ASes of the session

str

Remote_Node

Remote node for this session

str

Remote_Interface

Remote interface for this session

Interface

Remote_IP

Remote IP or prefix for this session

str

Address_Families

Address Families participating in this session

Set of str

Session_Type

The type of this session

str

Established_Status

Established status

str

Print the first 5 rows of the returned Dataframe

[12]:
result.head(5)
[12]:
Node VRF Local_AS Local_Interface Local_IP Remote_AS Remote_Node Remote_Interface Remote_IP Address_Families Session_Type Established_Status
0 as1border1 default 1 None 1.1.1.1 1 as1core1 None 1.10.1.1 ['IPV4_UNICAST'] IBGP ESTABLISHED
1 as1border1 default 1 None None 666 None None 3.2.2.2 [] EBGP_SINGLEHOP NOT_COMPATIBLE
2 as1border1 default 1 None None 555 None None 5.6.7.8 [] EBGP_SINGLEHOP NOT_COMPATIBLE
3 as1border1 default 1 None 10.12.11.1 2 as2border1 None 10.12.11.2 ['IPV4_UNICAST'] EBGP_SINGLEHOP ESTABLISHED
4 as1border2 default 1 None 1.2.2.2 1 as1core1 None 1.10.1.1 ['IPV4_UNICAST'] IBGP ESTABLISHED

Print the first row of the returned Dataframe

[13]:
result.iloc[0]
[13]:
Node                  as1border1
VRF                   default
Local_AS              1
Local_Interface       None
Local_IP              1.1.1.1
Remote_AS             1
Remote_Node           as1core1
Remote_Interface      None
Remote_IP             1.10.1.1
Address_Families      ['IPV4_UNICAST']
Session_Type          IBGP
Established_Status    ESTABLISHED
Name: 0, dtype: object

BGP Edges

Returns BGP adjacencies.

Lists all BGP adjacencies in the network.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include adjacencies whose first node matches this name or regex.

NodeSpec

True

.*

remoteNodes

Include adjacencies whose second node matches this name or regex.

NodeSpec

True

.*

Invocation

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

Return Value

Name

Description

Type

Node

Node from which the edge originates

str

IP

IP at the side of originator

str

Interface

Interface at which the edge originates

str

AS_Number

AS Number at the side of originator

str

Remote_Node

Node at which the edge terminates

str

Remote_IP

IP at the side of the responder

str

Remote_Interface

Interface at which the edge terminates

str

Remote_AS_Number

AS Number at the side of responder

str

Print the first 5 rows of the returned Dataframe

[17]:
result.head(5)
[17]:
Node IP Interface AS_Number Remote_Node Remote_IP Remote_Interface Remote_AS_Number
0 as1border2 1.2.2.2 None 1 as1core1 1.10.1.1 None 1
1 as1core1 1.10.1.1 None 1 as1border1 1.1.1.1 None 1
2 as2dist2 2.1.3.2 None 2 as2core2 2.1.2.2 None 2
3 as3border2 3.2.2.2 None 3 as3core1 3.10.1.1 None 3
4 as3border1 10.23.21.3 None 3 as2border2 10.23.21.2 None 2

Print the first row of the returned Dataframe

[18]:
result.iloc[0]
[18]:
Node                as1border2
IP                  1.2.2.2
Interface           None
AS_Number           1
Remote_Node         as1core1
Remote_IP           1.10.1.1
Remote_Interface    None
Remote_AS_Number    1
Name: 0, dtype: object

OSPF Session Compatibility

Returns compatible OSPF sessions.

Returns compatible OSPF sessions in the network. A session is compatible if the interfaces involved are not shutdown and do run OSPF, are not OSPF passive and are associated with the same OSPF area.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include nodes matching this name or regex.

NodeSpec

True

remoteNodes

Include remote nodes matching this name or regex.

NodeSpec

True

statuses

Only include sessions matching this status specifier.

OspfSessionStatusSpec

True

Invocation

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

Return Value

Name

Description

Type

Interface

Interface

Interface

VRF

VRF

str

IP

Ip

str

Area

Area

int

Remote_Interface

Remote Interface

Interface

Remote_VRF

Remote VRF

str

Remote_IP

Remote IP

str

Remote_Area

Remote Area

int

Session_Status

Status of the OSPF session

str

Print the first 5 rows of the returned Dataframe

[22]:
result.head(5)
[22]:
Interface VRF IP Area Remote_Interface Remote_VRF Remote_IP Remote_Area Session_Status
0 as2core2[GigabitEthernet0/0] default 2.12.22.2 1 as2border2[GigabitEthernet1/0] default 2.12.22.1 1 ESTABLISHED
1 as2core2[GigabitEthernet1/0] default 2.12.12.2 1 as2border1[GigabitEthernet2/0] default 2.12.12.1 1 ESTABLISHED
2 as2border1[GigabitEthernet1/0] default 2.12.11.1 1 as2core1[GigabitEthernet0/0] default 2.12.11.2 1 ESTABLISHED
3 as2border1[GigabitEthernet2/0] default 2.12.12.1 1 as2core2[GigabitEthernet1/0] default 2.12.12.2 1 ESTABLISHED
4 as2core2[GigabitEthernet3/0] default 2.23.21.2 1 as2dist1[GigabitEthernet1/0] default 2.23.21.3 1 ESTABLISHED

Print the first row of the returned Dataframe

[23]:
result.iloc[0]
[23]:
Interface           as2core2[GigabitEthernet0/0]
VRF                 default
IP                  2.12.22.2
Area                1
Remote_Interface    as2border2[GigabitEthernet1/0]
Remote_VRF          default
Remote_IP           2.12.22.1
Remote_Area         1
Session_Status      ESTABLISHED
Name: 0, dtype: object

OSPF Edges

Returns OSPF adjacencies.

Lists all OSPF adjacencies in the network.

Inputs

Name

Description

Type

Optional

Default Value

nodes

Include adjacencies whose first node matches this name or regex.

NodeSpec

True

.*

remoteNodes

Include edges whose second node matches this name or regex.

NodeSpec

True

.*

Invocation

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

Return Value

Name

Description

Type

Interface

Interface from which the edge originates

Interface

Remote_Interface

Interface at which the edge terminates

Interface

Print the first 5 rows of the returned Dataframe

[27]:
result.head(5)
[27]:
Interface Remote_Interface
0 as1border1[GigabitEthernet0/0] as1core1[GigabitEthernet1/0]
1 as1core1[GigabitEthernet1/0] as1border1[GigabitEthernet0/0]
2 as1border2[GigabitEthernet1/0] as1core1[GigabitEthernet0/0]
3 as1core1[GigabitEthernet0/0] as1border2[GigabitEthernet1/0]
4 as2border1[GigabitEthernet1/0] as2core1[GigabitEthernet0/0]

Print the first row of the returned Dataframe

[28]:
result.iloc[0]
[28]:
Interface           as1border1[GigabitEthernet0/0]
Remote_Interface    as1core1[GigabitEthernet1/0]
Name: 0, dtype: object