[j-nsp] BGP Extended Community sub-type as zero not valid

heisenbug at xpto heisenbug at xpto.eng.br
Sat Feb 9 04:23:46 EST 2019


Thanks by the reply, yeah, I saw that, but this one of my doubts, 
because on IANA 
(https://www.iana.org/assignments/as-numbers/as-numbers.xhtml), the ASN 
zero is just reserved, like others ASN numbers and what do not make 
sense for me, if the Juniper understands ASN zero as invalid and not 
possible to be used on extended communities, I was expecting the same 
behavior for standard communities, but that's not what happens:

"as-numberis the AS number and can be a value in the range from 0 
through 65,535.community-valueis the community identifier and can be a 
number in the range from 0 through 65,535."

https://www.juniper.net/documentation/en_US/junos/topics/reference/configuration-statement/community-edit-policy-options.html

[edit]
AS2222# delete policy-options community TEST

[edit]
AS2222# set policy-options community TEST members 0:2222

[edit]
AS2222# commit
commit complete

AS222222> show route protocol bgp extensive

inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
172.255.255.0/24 (1 entry, 1 announced)
TSI:
KRT in-kernel 172.255.255.0/24 -> {172.0.0.1}
         *BGP Preference: 170/-101
                 Next hop type: Router, Next hop index: 524
Address: 0xb3a1030
Next-hop reference count: 2
                 Source: 172.0.0.1
                 Next hop: 172.0.0.1 via em1.0, selected
                 Session Id: 0x0
                 State: <Active Ext>
                 Local AS: 222222 Peer AS:  2222
                 Age: 9:09
Validation State: unverified
                 Task: BGP_2222.172.0.0.1
Announcement bits (1): 0-KRT
                 AS path: 2222 I
Communities: 0:2222
Accepted
Localpref: 100
                 Router ID: 172.0.0.1

inet6.0: 1 destinations, 1 routes (1 active, 0 holddown, 0 hidden)


[]s

On 08/02/2019 23:07, Olivier Benghozi wrote:
> Technically, AS0 is invalid (RFC 7607, but it was stated before that more or less clearly).
>
> However on JunOS you may fill the first field of an rt with 0 by using the IPv4:value format for rt (type 1):
> target:0.0.0.0:1
>
> ..but you will be limited to 16 bits for the other field (so up to 65535).
>
>
>> Le 8 févr. 2019 à 21:40, heisenbug at xpto <heisenbug at xpto.eng.br> a écrit :
>>
>> I'm doing some tests with Juniper devices (srx, vmx, vrr, ptx, mx) (from junos 15 to 18) and the result are the same, maybe is something that I'm not seeing. The purposed environment for test:
>>
>> AS2222(2bytes) <-> AS222222(4bytes)
>>
>> AS2222 is announcing the network 172.255.255.0 and setting the ext community rt:1:222222(for lab purpose). For example(this is working):
>> AS222222# run show route protocol bgp extensive
>>
>> inet.0: 5 destinations, 5 routes (5 active, 0 holddown, 0 hidden)
>> 172.255.255.0/24 (1 entry, 1 announced)
>> TSI:
>> KRT in-kernel 172.255.255.0/24 -> {172.0.0.1}
>>          *BGP    Preference: 170/-101
>>                  Next hop type: Router, Next hop index: 524
>>                  Address: 0xb3a1030
>>                  Next-hop reference count: 2
>>                  Source: 172.0.0.1
>>                  Next hop: 172.0.0.1 via em1.0, selected
>>                  Session Id: 0x0
>>                  State: <Active Ext>
>>                  Local AS: 222222 Peer AS:  2222
>>                  Age: 3:43
>>                  Validation State: unverified
>>                  Task: BGP_2222.172.0.0.1
>>                  Announcement bits (1): 0-KRT
>>                  AS path: 2222 I
>>                  Communities: target:1:222222
>>                  Accepted
>>                  Localpref: 100
>>                  Router ID: 172.0.0.1
>>
>> But if I try to set the sub-type as 0 (zero), Juniper dons't accept (https://tools.ietf.org/rfc/rfc4360.txt).
>>
>>
>> [edit]
>> AS2222# delete policy-options community TEST
>>
>> [edit]
>> AS2222# set policy-options community TEST members target:0:222222
>>
>> [edit]
>> AS2222# show | compare
>> [edit policy-options community TEST]
>> -   members target:1:222222;
>> +   members target:0:222222;
>>
>> [edit]
>> AS2222# commit
>> [edit policy-options community TEST]
>>    'members target:0:222222'
>>      invalid autonomous system value at '0' not in range 1 to 65535. Use '0L' Long format to specify 4 byte AS
>> error: configuration check-out failed
>>
>> [edit]
>> AS2222# delete policy-options community TEST
>>
>> [edit]
>> AS2222# set policy-options community TEST members target:0L:222222
>>
>> [edit]
>> AS2222# show | compare
>> [edit policy-options community TEST]
>> -   members target:1:222222;
>> +   members target:0L:222222;
>>
>> [edit]
>> AS2222# commit
>> [edit policy-options community TEST]
>>    'members target:0L:222222'
>>      invalid autonomous system value at '0' not in range 1 to 4294967295
>> error: configuration check-out failed
>>
>> [edit]
>>
>> Anyone have any idea about? There's another way to do that? I need to use zero on this case and other bgp daemons/vendors allow to do that.
>>
>> Thanks in advance.
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp


More information about the juniper-nsp mailing list