I set up a quick'n'dirty lab and it would appear that the first example is actually correct, rather than the second.
The first example, I've got three routes being received, each tagged with a community of 65000:123
, 65000:999
or 65000:16
:
{primary:node0}
root@lab-srx240h> show route table CE3.inet.0 community ^65000:.{2,3}$ detail
CE3.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
3.3.3.3/32 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1383
Address: 0x15d464c
Next-hop reference count: 8
Source: 192.168.88.3
Next hop: 192.168.88.3 via reth4.100, selected
State: <Active Ext>
Peer AS: 65505
Age: 7:34
Task: BGP_65505.192.168.88.3+179
Announcement bits (1): 0-KRT
AS path: 65505 65505 I
Communities: 65000:123 target:65505:1
Accepted
Localpref: 100
Router ID: 192.168.6.1
192.168.5.0/24 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1383
Address: 0x15d464c
Next-hop reference count: 8
Source: 192.168.88.3
Next hop: 192.168.88.3 via reth4.100, selected
State: <Active Ext>
Peer AS: 65505
Age: 7:34
Task: BGP_65505.192.168.88.3+179
Announcement bits (1): 0-KRT
AS path: 65505 I
Communities: 65000:999 target:65505:1
Accepted
Localpref: 100
Router ID: 192.168.6.1
192.168.88.0/31 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1383
Address: 0x15d464c
Next-hop reference count: 8
Source: 192.168.88.3
Next hop: 192.168.88.3 via reth4.100, selected
State: <Active Ext>
Peer AS: 65505
Age: 7:34
Task: BGP_65505.192.168.88.3+179
Announcement bits (1): 0-KRT
AS path: 65505 I
Communities: 65000:16 target:65505:1
Accepted
Localpref: 100
Router ID: 192.168.6.1
The second example I've got a route tagged with 65010:45129
(not 65010:45119
as per the book) and I still get a match:
{primary:node0}
root@lab-srx240h> show route table CE3.inet.0 community ^65010:45.{2}9$ detail
CE3.inet.0: 7 destinations, 7 routes (7 active, 0 holddown, 0 hidden)
1.0.0.10/32 (1 entry, 1 announced)
*BGP Preference: 170/-101
Next hop type: Router, Next hop index: 1383
Address: 0x15d464c
Next-hop reference count: 8
Source: 192.168.88.3
Next hop: 192.168.88.3 via reth4.100, selected
State: <Active Ext>
Peer AS: 65505
Age: 2:23
Task: BGP_65505.192.168.88.3+179
Announcement bits (1): 0-KRT
AS path: 65505 65505 I
Communities: 65010:45129 target:65505:1 origin:65505:1
Accepted
Localpref: 100
Router ID: 192.168.6.1
So yes, .{2}
means any two characters and .{2,3}
means any two-to-three characters.