Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202012][Show][BGP] Show BGP Change for no neighbor scenario #2886

Merged
merged 21 commits into from
Jul 6, 2023

Conversation

developfast
Copy link
Contributor

@developfast developfast commented Jun 27, 2023

What I did

Changed the show bgp summary for both ipv4 and ipv6 to show basic bgp switch information. This was done in order for hardware proxy to set the correct settings for bgp connections when no neighbors are present, and prevent errors. This was a blocking issue which prevents image upgrades for backend storage ToRs which have no bgp neighbors. This is an approximate cherry-pick for #2885 for the 202012 branch.

How I did it

Checked for when a bgp neighbor is present using vtysh, if not, display basic bgp information.

How to verify it

Copied the respective bgp util files onto a switch and ran show ip bgp summary and show ipv6 bgp summary when there are no bgp neighbors and see that it displays the correct information.

Previous command output (if the output of a command-line utility has changed)

~$ show ip bgp summary
No IPv4 neighbor is configured

~$ show ipv6 bgp summary
No IPv6 neighbor is configured

New command output (if the output of a command-line utility has changed)

~$ show ip bgp summary

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 12811
RIB entries 0, using 0 bytes of memory
Peers 0, using 0 KiB of memory
Peer groups 0, using 0 bytes of memory


Neighbor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------

Total number of neighbors 0

~$ show ipv6 bgp summary

IPv6 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 65100 vrf-id 0
BGP table version 8972
RIB entries 0, using 0 bytes of memory
Peers 0, using 0 KiB of memory
Peer groups 0, using 0 bytes of memory


Neighbor      V     AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down    State/PfxRcd    NeighborName
-----------  ---  -----  ---------  ---------  --------  -----  ------  ---------  --------------  --------------

Total number of neighbors 0

admin@dut:/$ show ip bgp sum

IPv4 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 4200065100 vrf-id 0
BGP table version 12810
RIB entries 12807, using 2458944 bytes of memory
Peers 4, using 87264 KiB of memory
Peer groups 4, using 256 bytes of memory


Neighbhor      V          AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down      State/PfxRcd  NeighborName
-----------  ---  ----------  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
10.0.0.33      4  4200064600       3939       7143         0      0       0  12:14:54             6400  ARISTA01T1
10.0.0.35      4  4200064600       3939       3942         0      0       0  12:14:52             6400  ARISTA02T1
10.0.0.37      4  4200064600       3942       3941         0      0       0  12:14:52             6400  ARISTA03T1
10.0.0.39      4  4200064600       4721       7142         0      0       0  12:14:53             6400  ARISTA04T1

Total number of neighbors 4

admin@dut:/$ show ipv6 bgp sum

IPv6 Unicast Summary:
BGP router identifier 10.1.0.32, local AS number 4200065100 vrf-id 0
BGP table version 6411
RIB entries 12807, using 2458944 bytes of memory
Peers 4, using 87264 KiB of memory
Peer groups 4, using 256 bytes of memory


Neighbhor      V          AS    MsgRcvd    MsgSent    TblVer    InQ    OutQ  Up/Down      State/PfxRcd  NeighborName
-----------  ---  ----------  ---------  ---------  --------  -----  ------  ---------  --------------  --------------
fc00::2a       4  4200064600       3939       3942         0      0       0  12:14:59             6400  ARISTA03T1
fc00::2e       4  4200064600       3944       7145         0      0       0  12:15:03             6400  ARISTA04T1
fc00::22       4  4200064600       3940       7146         0      0       0  12:15:03             6400  ARISTA01T1
fc00::26       4  4200064600       3939       3942         0      0       0  12:14:59             6400  ARISTA02T1

Total number of neighbors 4

@developfast developfast marked this pull request as ready for review June 27, 2023 02:11
@developfast developfast requested a review from arlakshm June 27, 2023 02:11
@developfast
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@developfast
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@developfast
Copy link
Contributor Author

/azp run Azure.sonic-utilities

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@arlakshm
Copy link
Contributor

@developfast , is there PR for Master branch as well?

@arlakshm
Copy link
Contributor

@developfast , is there PR for Master branch as well?

nvm found it #2885

@developfast
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@arlakshm arlakshm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@developfast developfast merged commit 399b1e3 into sonic-net:202012 Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants