How to announce self for bgp?

bgp

#1

Hi,

I’m pretty new to vyos and BGP. Below is the current setup for BGP.

AS1 --> AS2 (which is my vyos) --> AS3

I am receiving all the routes from AS1 which I do not want to pass it to AS3. I am able to do this in pfsense which is “announce-self”. How can I set it for AS2 in vyos? Is this term known as non-transitive? Thank you.


#2

Tried using

neighbor x.x.x.x nexthop-self

Option?


#3

Have you tried making a prefix list and configuring it in the BGP session?

set policy prefix-list ANNOUNCE-THESE rule 5 action ‘permit’
set policy prefix-list ANNOUNCE-THESE rule 5 prefix ‘12.34.56.0/24’
set policy prefix-list ANNOUNCE-THESE rule 10 action ‘deny’

set protocols bgp 65503 network ‘12.34.56.0/24’

set protocols bgp 65503 neighbor 198.32.160.1 maximum-prefix ‘50000’
set protocols bgp 65503 neighbor 198.32.160.1 remote-as ‘13538’
set protocols bgp 65503 neighbor 198.32.160.1 prefix-list export ‘ANNOUNCE-THESE’
set protocols bgp 65503 neighbor 198.32.160.1 soft-reconfiguration ‘inbound’
set protocols bgp 65503 neighbor 198.32.160.1 update-source ‘198.32.160.7’
set protocols bgp 65503 neighbor 198.32.160.1 weight ‘9989’