bgpd: Support brief option for show bgp neighbors command - #20914
Merged
Conversation
Greptile SummaryThis PR adds a Key Changes:
Implementation Details:
Confidence Score: 4/5
Important Files Changed
Last reviewed commit: 407137c |
hnattamaisub
force-pushed
the
bgp_brief_json
branch
5 times, most recently
from
February 24, 2026 06:05
d2305a7 to
7912ab5
Compare
Member
|
doc changes? |
Contributor
Author
|
ci:rerun |
ton31337
requested changes
Feb 25, 2026
hnattamaisub
force-pushed
the
bgp_brief_json
branch
from
February 26, 2026 04:25
08ab264 to
8b93db9
Compare
Contributor
Author
done |
Contributor
Author
done |
Contributor
Author
|
ci:rerun |
ton31337
approved these changes
Feb 27, 2026
ton31337
reviewed
Mar 2, 2026
ton31337
requested changes
Mar 2, 2026
ton31337
left a comment
Member
There was a problem hiding this comment.
Still some comments from my side...
hnattamaisub
force-pushed
the
bgp_brief_json
branch
from
March 3, 2026 13:06
8b93db9 to
f84f78e
Compare
ton31337
reviewed
Mar 3, 2026
Contributor
Author
|
ci:rerun |
hnattamaisub
force-pushed
the
bgp_brief_json
branch
3 times, most recently
from
March 5, 2026 03:49
db79c59 to
ab6cdc2
Compare
Contributor
Author
|
ci:rerun |
Contributor
ton31337
reviewed
Mar 6, 2026
ton31337
left a comment
Member
There was a problem hiding this comment.
Please use f-strings everywhere including logger.
hnattamaisub
force-pushed
the
bgp_brief_json
branch
from
March 6, 2026 07:57
ab6cdc2 to
7e60412
Compare
Contributor
Author
done , thanks |
Contributor
Author
|
ci:rerun |
1 similar comment
Contributor
Author
|
ci:rerun |
New commands: 1)show bgp neighbors 192.168.0.2 brief 2)show bgp neighbors brief 3)show ip bgp neighbors brief 4)show ip bgp neighbors 192.168.0.2 brief 5)show ip bgp neighbors 192.168.0.2 brief json 6)show bgp neighbors 192.168.0.2 brief json 7)show bgp neighbors brief json 8)show ip bgp neighbors brief json Signed-off-by: harini <hnattamaisub@nvidia.com>
hnattamaisub
force-pushed
the
bgp_brief_json
branch
from
March 9, 2026 14:17
7e60412 to
c4f14a1
Compare
ton31337
reviewed
Mar 9, 2026
Signed-off-by: harini <hnattamaisub@nvidia.com>
Signed-off-by: harini <hnattamaisub@nvidia.com>
hnattamaisub
force-pushed
the
bgp_brief_json
branch
from
March 9, 2026 15:29
c4f14a1 to
509fe96
Compare
Contributor
Author
|
ci:rerun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New brief option for "show bgp neighbor" is added and logs are as below:
r1# show bgp neighbors 192.168.0.2 brief
Neighbor AS MsgRcvd MsgSent ResetTime State Afi/Safi PfxRcd PfxSnt
192.168.0.2 65000 22 22 00:00:57 Established IPv4 Unicast 7 8
r1#
r1# show bgp neighbors brief
Neighbor AS MsgRcvd MsgSent ResetTime State Afi/Safi PfxRcd PfxSnt
192.168.0.2 65000 85 85 00:04:06 Established IPv4 Unicast 7 8
192.168.101.2 65100 99 99 00:04:06 Established IPv4 Unicast 3 9
r1#
r1# show ip bgp neighbors brief
Neighbor AS MsgRcvd MsgSent ResetTime State Afi/Safi PfxRcd PfxSnt
192.168.0.2 65000 98 98 00:04:44 Established IPv4 Unicast 7 8
192.168.101.2 65100 112 112 00:04:44 Established IPv4 Unicast 3 9
r1# show ip bgp neighbors 192.168.0.2 brief
Neighbor AS MsgRcvd MsgSent ResetTime State Afi/Safi PfxRcd PfxSnt
192.168.0.2 65000 110 110 00:05:22 Established IPv4 Unicast 7 8
r1# show ip bgp neighbors 192.168.0.2 brief json
{
"192.168.0.2":{
"hostname":"r2",
"remoteAs":65000,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":332000,
"bgpTimerUpString":"00:05:32",
"bgpTimerUpEstablishedEpoch":1771862507,
"lastResetTimerMsecs":343000,
"messageStats":{
"totalSent":117,
"totalRecv":117
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":7,
"sentPrefixCounter":8
}
}
}
}
r1# show bgp neighbors 192.168.0.2 brief json
{
"192.168.0.2":{
"hostname":"r2",
"remoteAs":65000,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":348000,
"bgpTimerUpString":"00:05:48",
"bgpTimerUpEstablishedEpoch":1771862507,
"lastResetTimerMsecs":359000,
"messageStats":{
"totalSent":122,
"totalRecv":122
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":7,
"sentPrefixCounter":8
}
}
}
}
r1# show bgp neighbors brief json
{
"192.168.0.2":{
"hostname":"r2",
"remoteAs":65000,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":363000,
"bgpTimerUpString":"00:06:03",
"bgpTimerUpEstablishedEpoch":1771862507,
"lastResetTimerMsecs":374000,
"messageStats":{
"totalSent":127,
"totalRecv":127
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":7,
"sentPrefixCounter":8
}
}
},
"192.168.101.2":{
"hostname":"r4",
"remoteAs":65100,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":373000,
"bgpTimerUpString":"00:06:13",
"bgpTimerUpEstablishedEpoch":1771862497,
"lastResetTimerMsecs":374000,
"messageStats":{
"totalSent":141,
"totalRecv":141
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":3,
"sentPrefixCounter":9
}
}
}
}
r1# show ip bgp neighbors brief json
{
"192.168.0.2":{
"hostname":"r2",
"remoteAs":65000,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":376000,
"bgpTimerUpString":"00:06:16",
"bgpTimerUpEstablishedEpoch":1771862507,
"lastResetTimerMsecs":387000,
"messageStats":{
"totalSent":132,
"totalRecv":132
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":7,
"sentPrefixCounter":8
}
}
},
"192.168.101.2":{
"hostname":"r4",
"remoteAs":65100,
"localAs":65000,
"lastResetDueTo":"No path to specified Neighbor",
"bgpState":"Established",
"bgpTimerUpMsec":386000,
"bgpTimerUpString":"00:06:26",
"bgpTimerUpEstablishedEpoch":1771862497,
"lastResetTimerMsecs":387000,
"messageStats":{
"totalSent":146,
"totalRecv":146
},
"addressFamilyInfo":{
"ipv4Unicast":{
"acceptedPrefixCounter":3,
"sentPrefixCounter":9
}
}
}
}
r1#