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: add json support for BGP L3NHG values #16631

Merged
merged 1 commit into from
Aug 24, 2024

Conversation

pguibert6WIND
Copy link
Member

Some json attributes are missing for L3NHG values.

PE1# show bgp vrf all detail
[..]
Instance vrf-purple:
BGP table version is 1, local router ID is 27.3.0.85, vrf id 7
Default local pref 100, local AS 65000
BGP routing table entry for fe80::4620:ff:feff:ff01/128, version 1
Paths: (1 available, best #1, vrf vrf-purple)
Not advertised to any peer
Imported from 10.30.30.30:5:[2]:[0]:[48]:[44:20:00:ff:ff:01]:[128]:[fe80::4620:ff:feff:ff01], VNI 4000 Local
::ffff:a1e:1e1e (metric 20) from 10.30.30.30 (10.30.30.30) announce-nh-self
Origin IGP, localpref 100, valid, internal, best (First path received)
Extended Community: RT:65000:4000 ET:8
Last update: Thu Aug 22 18:23:38 2024

Displayed 1 routes and 1 total paths

PE1# show bgp vrf all json detail
{
"vrf-purple":{
"vrfId": 7,
"vrfName": "vrf-purple",
"tableVersion": 1,
"routerId": "27.3.0.85",
"defaultLocPrf": 100,
"localAS": 65000,
"routes": { "fe80::4620:ff:feff:ff01/128": [{"importedFrom":"10.30.30.30:5","l3nhg":false,"l3nhgActive":false,
"aspath":{"string":"Local","segments":[],"length":0},"announceNexthopSelf":true,"origin":"IGP","locPrf":100,
"valid":true,"version":1,"bestpath":{"overall":true,"selectionReason":"First path received"},
"extendedCommunity":{"string":"RT:65000:4000 ET:8"},"lastUpdate":{"epoch":1724343817,
"string":"Thu Aug 22 18:23:37 2024\n"},
"nexthops":[{"ip":"::ffff:a1e:1e1e","hostname":"PE2","afi":"ipv6",
"scope":"global","metric":20,"accessible":true,"used":true}],
"peer":{"peerId":"10.30.30.30","routerId":"10.30.30.30","hostname":"PE2","type":"internal"}}]
} }
}

@pguibert6WIND pguibert6WIND force-pushed the imported_from_l3nhg_json branch from b680bb2 to 008e9ec Compare August 22, 2024 21:22
@ton31337
Copy link
Member

Could you fix the styling before merging?

Some json attributes are missing for L3NHG values.

> PE1# show bgp vrf all detail
> [..]
> Instance vrf-purple:
> BGP table version is 1, local router ID is 27.3.0.85, vrf id 7
> Default local pref 100, local AS 65000
> BGP routing table entry for fe80::4620:ff:feff:ff01/128, version 1
> Paths: (1 available, best FRRouting#1, vrf vrf-purple)
>   Not advertised to any peer
>   Imported from 10.30.30.30:5:[2]:[0]:[48]:[44:20:00:ff:ff:01]:[128]:[fe80::4620:ff:feff:ff01], VNI 4000  Local
>     ::ffff:a1e:1e1e (metric 20) from 10.30.30.30 (10.30.30.30) announce-nh-self
>       Origin IGP, localpref 100, valid, internal, best (First path received)
>       Extended Community: RT:65000:4000 ET:8
>       Last update: Thu Aug 22 18:23:38 2024
>
> Displayed 1 routes and 1 total paths

> PE1# show bgp vrf all json detail
> {
> "vrf-purple":{
>  "vrfId": 7,
>  "vrfName": "vrf-purple",
>  "tableVersion": 1,
>  "routerId": "27.3.0.85",
>  "defaultLocPrf": 100,
>  "localAS": 65000,
>  "routes": { "fe80::4620:ff:feff:ff01/128": [{"importedFrom":"10.30.30.30:5","l3nhg":false,"l3nhgActive":false, "vni": "4000",
> "aspath":{"string":"Local","segments":[],"length":0},"announceNexthopSelf":true,"origin":"IGP","locPrf":100,
> "valid":true,"version":1,"bestpath":{"overall":true,"selectionReason":"First path received"},
> "extendedCommunity":{"string":"RT:65000:4000 ET:8"},"lastUpdate":{"epoch":1724343817,
> "string":"Thu Aug 22 18:23:37 2024\n"},
> "nexthops":[{"ip":"::ffff:a1e:1e1e","hostname":"PE2","afi":"ipv6",
> "scope":"global","metric":20,"accessible":true,"used":true}],
> "peer":{"peerId":"10.30.30.30","routerId":"10.30.30.30","hostname":"PE2","type":"internal"}}]
>  }  }
> }

Signed-off-by: Philippe Guibert <[email protected]>
@pguibert6WIND pguibert6WIND force-pushed the imported_from_l3nhg_json branch from 008e9ec to 3c22731 Compare August 23, 2024 08:40
@pguibert6WIND
Copy link
Member Author

Could you fix the styling before merging?

done

@ton31337 ton31337 merged commit 8d4c706 into FRRouting:master Aug 24, 2024
11 checks passed
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