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

bgpd: display rpki state in 'show bgp ipvX detail' #17686

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pguibert6WIND
Copy link
Member

The rpki current state was ignored when calling for the 'show bgp ipvX detail' command. Handle the support for this, with json support too.

"rpkiValidationState" : "valid",
"rpkiValidationState" : "invalid",
"rpkiValidationState" : "not used",
"rpkiValidationState" : "not found",

The rpki current state was ignored when calling for the 'show bgp ipvX
detail' command. Handle the support for this, with json support too.

> "rpkiValidationState" : "valid",
> "rpkiValidationState" : "invalid",
> "rpkiValidationState" : "not used",
> "rpkiValidationState" : "not found",

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND
Copy link
Member Author

expected output:

r2# show bgp ipv4 detail 
BGP table version is 3, local router ID is 192.0.2.2, vrf id 0
Default local pref 100, local AS 65002
BGP routing table entry for 10.0.0.0/24, version 1
Paths: (1 available, best #1, table default, vrf (null))
  Advertised to non peer-group peers:
  192.0.2.1 192.168.4.4
  65530
    192.0.2.1 from 192.0.2.1 (192.0.2.1)
      Origin IGP, metric 0, valid, external, best (First path received), rpki validation-state: not found
      Last update: Fri Dec 20 09:53:20 2024
BGP routing table entry for 198.51.100.0/24, version 2
Paths: (1 available, best #1, table default, vrf (null))
  Advertised to non peer-group peers:
  192.0.2.1 192.168.4.4
  65530
    192.0.2.1 from 192.0.2.1 (192.0.2.1)
      Origin IGP, metric 0, valid, external, best (First path received), rpki validation-state: valid
      Last update: Fri Dec 20 09:53:20 2024
BGP routing table entry for 203.0.113.0/24, version 3
Paths: (1 available, best #1, table default, vrf (null))
  Advertised to non peer-group peers:
  192.0.2.1 192.168.4.4
  65530
    192.0.2.1 from 192.0.2.1 (192.0.2.1)
      Origin IGP, metric 0, valid, external, best (First path received), rpki validation-state: valid
      Last update: Fri Dec 20 09:53:20 2024

Displayed 3 routes and 3 total paths
r2# 

r2# show bgp ipv4 detail json 
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 3,
 "routerId": "192.0.2.2",
 "defaultLocPrf": 100,
 "localAS": 65002,
 "routes": { "10.0.0.0/24": [{"aspath":{"string":"65530","segments":[{"type":"as-sequence","list":[65530]}],"length":1},"origin":"IGP","metric":0,"valid":true,"version":1,"rpkiValidationState":"not found","bestpath":{"overall":true,"selectionReason":"First path received"},"lastUpdate":{"epoch":1734684800,"string":"Fri Dec 20 09:53:20 2024\n"},"nexthops":[{"ip":"192.0.2.1","hostname":"r1","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"192.0.2.1","routerId":"192.0.2.1","hostname":"r1","type":"external"}}]
,"198.51.100.0/24": [{"aspath":{"string":"65530","segments":[{"type":"as-sequence","list":[65530]}],"length":1},"origin":"IGP","metric":0,"valid":true,"version":2,"rpkiValidationState":"valid","bestpath":{"overall":true,"selectionReason":"First path received"},"lastUpdate":{"epoch":1734684800,"string":"Fri Dec 20 09:53:20 2024\n"},"nexthops":[{"ip":"192.0.2.1","hostname":"r1","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"192.0.2.1","routerId":"192.0.2.1","hostname":"r1","type":"external"}}]
,"203.0.113.0/24": [{"aspath":{"string":"65530","segments":[{"type":"as-sequence","list":[65530]}],"length":1},"origin":"IGP","metric":0,"valid":true,"version":3,"rpkiValidationState":"valid","bestpath":{"overall":true,"selectionReason":"First path received"},"lastUpdate":{"epoch":1734684800,"string":"Fri Dec 20 09:53:20 2024\n"},"nexthops":[{"ip":"192.0.2.1","hostname":"r1","afi":"ipv4","metric":0,"accessible":true,"used":true}],"peer":{"peerId":"192.0.2.1","routerId":"192.0.2.1","hostname":"r1","type":"external"}}]
 }  } 
r2# 

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

Can you cover these with a topotest (just add those to the already existing topotest)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants