[PATCH] SRv6 support for BIRD
Sébastien PARISOT
sparisot at iliad-free.fr
Thu Feb 12 17:40:49 CET 2026
Hello BIRD team,
This patch (for master branch / 2.18) adds SRv6 L3VPN support to BIRD. It applies on top of the Multiple Labels capability (RFC 8277) patch I sent earlier.
- Patch 0001 is preparatory work that adds a new internal attribute BA_RAW_MPLS_LABEL_STACK (0xfd) that stores the full 24-bit wire values from MPLS label fields in BGP NLRI, alongside the existing BA_MPLS_LABEL_STACK (0xfe) which stores decoded 20-bit label values.
The existing BA_MPLS_LABEL_STACK only preserves the 20-bit label value from each 24-bit NLRI label field, discarding the traffic class and BOS fields. This is fine for normal MPLS but is lossy for SRv6: RFC 9252 uses the NLRI label field to carry part of an SRv6 SID via transposition, where the full 24 bits are significant and BOS may not be set.
- Patch 0002 adds SRv6 to the nest, it includes SID stack in next hop, adds the parser, display in CLI outputs.
- Patch 0003 adds Netlink support for SEG6 routes in Linux kernel (but not SEG6LOCAL routes).
- Patch 0004 adds SRv6 support to static protocol.
- Patch 0005 updates l3vpn protocol to operate without MPLS.
- Patch 0006 adds Prefix SID BGP attribute support for L3VPN.
With this patch set BIRD can act as a SRv6 PE/headend, but there are some limitations:
- Dynamic SID allocator is not implemented (SID can be read routing table with netlink or configured on static routes)
- The code supports a SID stack but SRV6_MAX_SID_STACK is currently #defined to 1 because L3VPN uses only one (no SRv6 TE support)
- The SID structure sub-sub-TLV is parsed on import (for transposition) but not generated on export (it is not mandatory per RFC 9252)
- Endpoint behavior is set the opaque value (0xffff) in generated SID information sub-TLV (it is not mandatory to specify the codepoint of actual SID behavior per RFC 9252)
A pair of BIRD configuration file are also included in attachment as examples. Example "show route" output:
65001:1 10.10.1.0/24
unicast [static_vpn 17:37:31.789] * (200)
via 10.0.0.100 on veth1 srv6 <fc00:a1::1>
Type: static univ
65002:1 10.20.1.0/24
unicast [peer2 17:37:36.192 from 10.0.0.2] * (100/) [AS65002i]
via 10.0.0.200 on veth1 srv6 <fc00:a2::1>
Type: BGP univ
BGP.origin: IGP
BGP.as_path: 65002
BGP.next_hop: 10.0.0.200
BGP.local_pref: 100
BGP.prefix_sid: SRv6 L3 Service SID=fc00:a2::1, Flags=0x00, Behavior=0xffff
BGP.raw_mpls_label_stack: 0x000000
BGP.mpls_label_stack: 0
Looking forward to your feedback.
Thanks!
--
Sébastien
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-bgp-Add-raw-MPLS-label-stack-attribute.patch
Type: text/x-patch
Size: 9947 bytes
Desc: 0001-bgp-Add-raw-MPLS-label-stack-attribute.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-nest-Add-SRv6-SID-stack-support-to-nexthop.patch
Type: text/x-patch
Size: 10893 bytes
Desc: 0002-nest-Add-SRv6-SID-stack-support-to-nexthop.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-netlink-Add-SEG6-encapsulation-support-for-SRv6.patch
Type: text/x-patch
Size: 8565 bytes
Desc: 0003-netlink-Add-SEG6-encapsulation-support-for-SRv6.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-static-Add-SRv6-SID-support-for-static-routes.patch
Type: text/x-patch
Size: 5832 bytes
Desc: 0004-static-Add-SRv6-SID-support-for-static-routes.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0005-l3vpn-Make-MPLS-channel-optional-for-SRv6-deployment.patch
Type: text/x-patch
Size: 2731 bytes
Desc: 0005-l3vpn-Make-MPLS-channel-optional-for-SRv6-deployment.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0006-bgp-Add-SRv6-Prefix-SID-attribute-and-service-TLV-su.patch
Type: text/x-patch
Size: 33502 bytes
Desc: 0006-bgp-Add-SRv6-Prefix-SID-attribute-and-service-TLV-su.patch
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0005.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bird1-srv6.conf
Type: application/octet-stream
Size: 724 bytes
Desc: bird1-srv6.conf
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bird2-srv6.conf
Type: application/octet-stream
Size: 724 bytes
Desc: bird2-srv6.conf
URL: <http://trubka.network.cz/pipermail/bird-users/attachments/20260212/6d05fc73/attachment-0001.obj>
More information about the Bird-users
mailing list