The group command allows you to batch multiple BGP announcements (or withdrawals) into a single BGP UPDATE message. This is useful for reducing the total number of UPDATE messages sent during bulk operations, ensuring atomic updates, and achieving exact wire-format reproduction for multi-NLRI (Network Layer Reachability Information) updates.
Semantics
- Buffering: Commands within a group are collected and not sent immediately.
- Processing: When
group end is reached (or a newline in single-line syntax), ExaBGP groups the buffered commands by compatible attributes (family, next-hop, and other attributes). - Transmission:
- Matching NLRIs are packed into a single UPDATE message.
- If attributes differ between commands, multiple separate UPDATE messages are produced.
- Withdrawals can be mixed with announcements within the same group to produce a single UPDATE containing both sections.
### Multi-line Example
```text
group start
announce ipv4 mcast-vpn shared-join rp 10.99.199.1 group 239.251.255.228 rd 65000:99999 source-as 65000 next-hop 10.10.6.3 extended-community [target:192.168.94.12:5]
announce ipv4 mcast-vpn source-join source 10.99.12.2 group 239.251.255.228 rd 65000:99999 source-as 65000 next-hop 10.10.6.3 extended-community [target:192.168.94.12:5]
group end