routeros: IPv6 BGP peering for c1, reject-all output filter #152
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lab/iac!152
Loading…
Reference in a new issue
No description provided.
Delete branch "bgp-v6-145"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements lab/iac#145 (IPv6 over BGP for c1) and folds in the explicit
output filter from lab/iac#125. TCP MD5 and the input route filters stay
in #125.
What changes
modules/site: c1 think peers gainaddr6(their ULA on VLAN 20).modules/router/bgp.tf: each dual-stack peer gets a second, v6-onlyrouteros_routing_bgp_connection(address_families = "ipv6")sourced from the router's own ULA in the peer's net. v6 NLRI over the
v4 session would carry a v4-mapped next hop RouterOS cannot forward
on, hence a parallel session. Every connection (v4 and v6) now sets
output.filter_chainto a reject-all chain: RouterOS re-advertisesto every connection whatever it learns from one of them (proven live:
each think received 23 prefixes it does not need), and the chain makes
"routers advertise nothing" structural instead of incidental.
modules/router/firewall6.tf: per-peerin-bgp6-*input accepts(Cilium dials out, so the routers must accept :179 from the peers'
ULAs), src as
/128because RouterOS normalises v6 filter addressesand a plain-address config never converges.
routeros/sim: the lab CHR pair now runs a real dual-stack eBGP pair(r1 AS 64512 <-> r2 AS 65003 over VLAN 20, v4+v6) so the sim root
exercises all of the above.
Proof (lab CHR pair, RouterOS 7.25.1)
routeros_routing_filter_rulewithrule = "reject"is accepted andlands as
/routing/filter/rule chain=bgp-out.ULA pair (
/routing/bgp/session:established=true,prefix-count=0).output.filter-chain=bgp-outplus
default-originate=alwaysthe router advertises nothing(
/routing/bgp/advertisementsempty); removing only the filter chainmakes
0.0.0.0/0appear instantly.tofu validateclean for rb5009-a/b, crs309, sim;tofu plan -detailed-exitcode= 0 on the lab after apply.Follow-up: flux-clusters PR adds the matching v6 peers + v6-only
peerconfig to c1's Cilium; #125 shrinks to MD5 + input filters.