I'm trying to migrate my BGP filters from v6 to v7.
The problem is that I can't find how to migrate the "match-chain" rule.
These are my current rules, I receive transit from a provider and offer transit to a customer:
Code: Select all
/routing filter
# section 1 - Accept what my transit provider advertise me
add action=accept chain=MyTransitProvider-IN prefix=0.0.0.0/0
add action=accept chain=MyTransitProvider-IN prefix=::/0
# section 2 - Accept what my transit customer advertise me
add action=accept chain=MyTransitCustomer-IN match-chain=MyTransitCustomerAS set-bgp-local-pref=300 set-distance=10 comment="Accept MyTransitCustomer prefixes"
add action=discard chain=MyTransitCustomer-IN comment="No more from MyTransitCustomer"
add action=accept chain=MyTransitCustomer-OUT prefix=0.0.0.0/0 comment="Disabled to provide full routing" disabled=yes
add action=discard chain=MyTransitCustomer-OUT comment="Disabled to provide full routing" disabled=yes
# section 3 - I advertise my own prefixes and my transit customer prefixes to my transit provider
add action=accept chain=MyTransitProvider-OUT match-chain=MyOwnAS
add action=accept chain=MyTransitProvider-OUT match-chain=MyTransitCustomerAS
add action=discard chain=MyTransitProvider-OUT comment="Dont advertise more to MyTransitProvider"
# section 4 - Chains with my prefixes and my transit customer prefixes (like address list)
add action=accept prefix=1.0.0.0/8 prefix-length=0-32 chain=MyOwnAS
add action=accept prefix=2.0.0.0/8 prefix-length=0-32 chain=MyTransitCustomerAS
If someone is kind enough to help me with the migration I would appreciate it very much.
This is what I've tried, but I'm not sure if it's right? And as I say, I need help with sections 2 and 3 to use the match-chain rule.
Code: Select all
/routing/filter/rule
# section 1
add chain=MyTransitProvider-IN rule="if (dst==0.0.0.0/0 && protocol static) { accept }"
add chain=MyTransitProvider-IN rule="if (dst==::/0 && protocol static) { accept }"
# section 2
help!
# section 3
help!
# section 4
add chain=MyOwnAS rule="if (dst-len>0 && dst-len<32 && dst in 1.0.0.0/8) { accept }"
add chain=MyTransitCustomerAS rule="if (dst-len>0 && dst-len<32 && dst in 2.0.0.0/8) { accept }"
Thank you very much in advance!