As per the RFC 8092
>The canonical representation of BGP Large Communities is three separate unsigned integers in decimal notation in the following order: Global Administrator, Local Data 1, Local Data 2.
>Numbers MUST NOT contain leading zeros; a zero value MUST be represented with a single zero.
> Each number is separated from the next by a single colon.
>RFC details https://datatracker.ietf.org/doc/html/rfc8092.html
For example:
>Configuring Community Value : large:199095:20:56 is valid ;
>But when configuring community value : large:199095:20:056 should throw an error (as per RFC) , but in Junos, it commits without throwing any error.
Upon investigation, we checked, the community is being handled well and leading "0" are dropped before creating a community structure and attaching with the route.
Please refer the outputs below:
[edit]
root@R1# show policy-options community com1
members [ large:199095:20:056 large:199095:00020:00056 ]; <<<<<<<
root@R1#
Dec 23 16:21:22.162413
Dec 23 16:21:22.162413 BGP SEND 1.1.1.1+179 -> 1.1.1.2 {bgp-updio-0}
Dec 23 16:21:22.162417 BGP SEND message type 2 (Update) length 63 {bgp-updio-0}
Dec 23 16:21:22.162420 BGP SEND Update PDU length 63 {bgp-updio-0}
Dec 23 16:21:22.162428 BGP SEND flags 0x40 code Origin(1): IGP, length(1) {bgp-updio-0}
Dec 23 16:21:22.162435 BGP SEND flags 0x40 code ASPath(2) (4-byte-cap) length 6: 65001 {bgp-updio-0}
Dec 23 16:21:22.162472 BGP SEND flags 0x40 code NextHop(3): 1.1.1.0 length(4) {bgp-updio-0}
Dec 23 16:21:22.162480 BGP SEND flags 0xc0 code Large Communities(32): count(1) large:199095:20:56 {bgp-updio-0} <<<<<<
Dec 23 16:21:22.162483 End-of-Attributes {bgp-updio-0}
Dec 23 16:21:22.162494 BGP SEND 6.6.6.6/32 {bgp-updio-0}
Dec 23 16:21:22.162526 wrote 63 bytes to I/O queue {bgp-updio-0}
Dec 23 16:21:22.162529 finished number of messages 8, write qidx 1 rc 1 {bgp-updio-0}
Dec 23 16:21:22.162537 bgp_rt_send_message:2234: 1.1.1.2 (External AS 65000): sent 63 bytes, out updates 1 {bgp-updio-0}
Receiver:
----------
root@R2# run show route receive-protocol bgp 1.1.1.1 detail
inet.0: 21 destinations, 21 routes (21 active, 0 holddown, 0 hidden)
* 6.6.6.6/32 (1 entry, 1 announced)
Accepted
Nexthop: 1.1.1.0
AS path: 65001 I
Communities: large:199095:20:56 <<<<<