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

POST to /monitor/states with payload of {"choice": "bgp_prefixes"} does not return received routes #209

Open
flaminidavid opened this issue Oct 21, 2024 · 1 comment

Comments

@flaminidavid
Copy link

POST to /monitor/states with payload of {"choice": "bgp_prefixes"} does not return received routes

Calling the API over HTTP(S) with the following parameters does not return the list of routes received from any of the neighbours:

Method: "POST"
Path: "/monitor/states"
Payload: {"choice": "bgp_prefixes"}
Headers: {"content-type": "application/json"}

Example result:

{ 'choice': 'bgp_prefixes',
  'bgp_prefixes': [
        {'bgp_peer_name': 'some_ipv4_peer'},
        {'bgp_peer_name': 'some_ipv6_peer'}
    ]
}

I can see the routes being advertised by the neighbour in its out-RIB for the Ixia-c neighbour.
I tried filtering by peer name and address family, no prefixes returned. Tried with explicitly requesting a prefix using the filtering function as well, same result.

Interestingly it is also mentioned here:

https://github.com/open-traffic-generator/otg-examples/tree/main/docker-compose/cpdp-frr

5. Fetch BGP prefix announcements - TODO this doesn't show the actual announcements

curl -sk "${OTG_HOST}/monitor/states" \
    -X POST \
    -H  'Content-Type: application/json' \
    -d '{ "choice": "bgp_prefixes" }'

@biplamal
Copy link
Collaborator

Hi David,

You have to enable devices[i].bgp.ipv4/v6_interfaces[j].peers[k].learned_information_filter.unicast_ipv4/v6_prefix="true" on the OTG side to fetch learned information.

Thanks for pointing the example we will update it.

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

No branches or pull requests

2 participants