Hello;
I have 2 peers. Peer1 and Peer2
Adding a subnet into BGP> Networks automagically advertises the network to all peers.
I want only a specific prefix to be announced to a specific peer (peer1) and not advertise it to peer2
I couldn’t figure out how to do it.
Any help is appreciated.
You will need to set up routing filters for each peer.
Ok thanks.
So for that specific prefix in filters;
I will just make chain = peer2-out , prefix= x.x.x.x/24, action = accept ?
And chain = peer1-out, prefix = x.x.x.x/24, action = discard ?
Essentially yes - but if i remember correctly if there’s no rule to ‘reject’ your other prefixes then they will still be advertised - so if you ONLY want to do that /24 to peer2, then best bet will be to:
chain=peer2-out prefix=x.x.x.x/24 action=accept
chain=peer2-out prefix=0.0.0.0/0 action=discard
So this means that it will advertise /24 but then any other prefix you have active will get discarded for that peer.
As a side note, instance out filter (bgp-out) is not working as it should.
Normally it should be the global bgp-out filter, but it is not working at all when peers have different out filters set.
I hope it gets fixed or maybe I am doing something wrong.
Thanks a lot for the help.
From the wiki:
Output routing filter chain used by all BGP peers belonging to this instance. Due to known problems in ROS v6, it is not recommended to use instance out-filter, instead use out-filter on peer.
Besides that - I believe that a peer filter will ‘override’ the instance filter anyway - they are not both processed - so only those peers without a filter defined would try and use instance filter - but either way best not to use it.