prefix-list's in bgp are used for the feature "outbound route filtering" or ORF. Basically, your config is telling the other router what to permit or drop in its advertisement to you.
From what you describe, you want to actually advertise these routes, not filter them. There are many ways to do this but I will give two examples.
First, if you ONLY want to advertise the 10.40.x.x networks to the remote peer, then you can use a route-map on the peer to limit what is advertised to him. This is good in the case where you have lots of other routes in the BGP routing tables and only want to advertise a select part of your table. This also assumes that the routes are already in your BGP routing table. If they are not there ( show ip bgp ) then you can use options 2's config to get them there.
Second, you have very little or no routes in your bgp routing table and you want to control what routes you redistribute INTO BGP, then we will use a route-map on the redistribute command.
Based on your routing table, I am assuming you want to advertise all the 10.40.x.x prefixes. There is an error with your prefix list. The prefix list you entered will match 10.40.0.0/25 exactly, not the longer prefixes that are part of that network and I do not see that exact network in your routing table.
So you prefix list should be:
ip prefix-list test permit 10.40.0.0/25 le 32
This will match all prefixes from a /25 to a /32 (le means less than or equal to)
We are pleased to announce availability of Beta software for 16.6.3. 16.6.3 will be the second rebuild on the 16.6 release train targeted towards Catalyst 9500/9400/9300/3850/3650 switching platforms. We are looking for early feedback from custome...