Route map without match statement

I found this in my production network, but since I’m encountering problems, I’m wondering if this is related.
BGP neighbor wants a community tag of 1234. So we have a route map like;

route-map NAME permit 10
set community 65123:1234

And then

router bgp 65123
network route-map NAME

So this is just saying “advertise this with this community”? Is this a less than ideal implementation? I would expect a prefix-list to match and then apply the route-map outbound to the neighbor.

Hello Robert

The configuration you describe looks correct. I labbed it up to confirm. You can set the community in a couple of ways. One way is to do it how you have it above, where you specify the route map on the network command. This will cause the community tag to be added for that particular prefix whenever it is advertised. The fact that you have no match statement simply means that everything is matched, therefore the community will be applied to the prefix.

The other way to do it is to apply a route map to the neighbor and specify an inbound or outbound direction. In such a case, you would have to also match a particular prefix within the route-map unless you want all prefixes advertised between the local device and that particular BGP neighbor to have their communities adjusted. Remember, if you don’t have a match statement, everything is matched.

You can find an example of the latter in the following lesson:

You mention that you’re encountering problems. Can you be more specific so that we can help you identify the issue?

I hope this has been helpful!