I have a new router with a new ISP and I want to test that the session comes up, without advertising my /24 network. I have the new neighbours set up with a prefix list called notransit. Can I just change the notransit prefix list from:
ip prefix-list notransit seq 5 permit x.x.x.0/24
ip prefix-list notransit seq 5 deny x.x.x.0/24
And then change it back afterwards? Or would you recommend to remove all prefix list entries (from neighbours)?
The simplest solution is not to advertise your networks to peer. By having no network statement under bgp config and not route-map / prefix-list with neighbor statement you are sure that no networks will be advertise. In this case you will still receive networks from your peer. If you would like not to receive anything put a
ip prefix-list notransit seq 5 deny 0.0.0.0/0
and add this to
neighbor x.x.x.x prefix-list notransit in
Your solution is good to for not advertising your networks.