I am BGP peering with a Juniper OS router. When starting the connection, my system advertises 4-byte ASN capability, which is accepted by the Juniper router: Jul 28 00:33:00.664202 BGP RECV 4 Byte AS-Path capability (65), as_num 55002 Jul 28 00:33:00.664217 bgp_parse_4byte_aspath_cap():273 AS4-Peer (RECV): 4 byte AS capability received, AS 55002 Jul 28 00:33:00.664296 bgp_4byte_aspath_add_cap():199 AS4-Peer (Internal AS 55002)(SEND): 4 byte AS capability added, AS 55002

The Juniper router sends back that 4-byte ASN capability: Jul 28 00:33:00.664405 BGP SEND 4 Byte AS-Path capability (65), as_num 55002

So I think it is safe to say that the two peers have established 4-byte ASN support.

Later on we try to send a BGP UPDATE message, which includes mp_reach_nlri attribute. If we send the BGP UPDATE message with a 2-octet AS/4-octet AN Extended Community attribute (ie, type 0x00, Transitive 2-Octet AS-Specific), Juniper router happily accepts. If we send the BGP UPDATE message a with a 4-octet AS/2-octet AN Extended Community attribute (ie, type 0x00, Transitive 4-octet AS-Specific), Juniper router complains and rejects it due to "rejected due to the lack of a valid target community". bgp_rcv_nlri: 64999:0: rejected due to the lack of a valid target community

Take a look at the two pcap screenshots below. The ONLY difference in communication between the two peers is this single issue: 4-byte AS in the mp_reach_nlri packet, vs 2-byte AS in the mp_reach_nlri packet. The first image is working, the second is not.

Any clues why this is? How can we successfully send an mp_reach_nlri path attribute with a 4-byte AS as the target community?

working pcap

non-working pcap

Junos version information: Model: mx960 Junos: 15.1R7.8 JUNOS OS Kernel 64-bit [20180310.ba55661_builder_stable_10]

My router: proprietary; trying to craft our own packets for this BGP peering session

Junos show bgp neighbor: Peer: AS 55002 Local: AS 55002 Type: Internal State: Established Flags: <Sync RSync> Peer supports 4 byte AS extension (peer-as 55002)

  • Please include software versions and configurations of both routers. A ‘show bgp neighbor’ on the juniper can be useful too. – Teun Vink Jul 28 '18 at 6:25
  • Added this information. I suppose what I also am looking for is a better understanding of the mp_reach_nlri path attribute. Does it require a valid target community as part of the Bgp UPDATE message? It seems that JunOS insists so. Where is this documented in an RFC? And if so, why does JunOS like the 2-byte AS target community but not the same encoding as a 4-byte AS target community? – Linux Ntwrk Jul 30 '18 at 14:54
  • "My router: proprietary; trying to craft our own packets for this BGP peering session" Unfortunately, your router is off-topic here. The manufacturer must offer optional, paid support for a device to be on-topic. – Ron Maupin Jul 30 '18 at 14:58
  • @Ron Thanks for the comment. But I am not asking for help with a router/brand/configuration. I am moreso asking for help with understanding protocol. Why might JunOS think that a BGP UPDATE message mp_reach_nlri with 4-byte ASN target community is invalid? – Linux Ntwrk Jul 31 '18 at 1:31
  • How do we know that the proprietary router is actually performing correctly? It may be the Juniper that is acting correctly, and the other router that is misbehaving. We would really need to see the configurations. There are other configurations that can affect thing, but you have not included those. I just don't see anyone helping much with this. – Ron Maupin Jul 31 '18 at 1:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.