Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bgpd: Set nexthop length to 16 bytes for IPv4 family prefixes #6579

Closed
wants to merge 1 commit into from
Closed

bgpd: Set nexthop length to 16 bytes for IPv4 family prefixes #6579

wants to merge 1 commit into from

Conversation

ton31337
Copy link
Member

This is the issue between other vendors with unnumbered sessions.
I tested with vQFX-re and got this notification from JunOS:

NOTIFICATION sent to fe80::a00:27ff:fec4:4b3e (External AS 65002): code 3 (Update Message Error) subcode 9 (error with optional attribute)

With this fix the session is UP and all prefixes received on JunOS side:

root@vqfx-re> show route 172.16.255.253/32 detail

inet.0: 13 destinations, 15 routes (13 active, 0 holddown, 0 hidden)
172.16.255.253/32 (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 342
                Address: 0xc65eb68
                Next-hop reference count: 16
                Source: fe80::a00:27ff:fec4:4b3e
                Next hop: fe80::a00:27ff:fec4:4b3e via em1.0, selected
                Session Id: 0x0
                State: <Active Ext>
                Local AS: 65004 Peer AS: 65002
                Age: 4:59       Metric: 0
                Validation State: unverified
                Task: BGP_65002.fe80::a00:27ff:fec4:4b3e
                Announcement bits (2): 0-KRT 1-Resolve tree 1
                AS path: 65002 ?
                Accepted
                Localpref: 100
                Router ID: 2.2.2.2

{master:0}

Related: #6433

Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com

This is the issue between other vendors with unnumbered sessions.
I tested with vQFX-re and got this notification from JunOS:

`NOTIFICATION sent to fe80::a00:27ff:fec4:4b3e (External AS 65002): code 3 (Update Message Error) subcode 9 (error with optional attribute)`

With this _fix_ the session is UP and all prefixes received on JunOS side:

```
root@vqfx-re> show route 172.16.255.253/32 detail

inet.0: 13 destinations, 15 routes (13 active, 0 holddown, 0 hidden)
172.16.255.253/32 (1 entry, 1 announced)
        *BGP    Preference: 170/-101
                Next hop type: Router, Next hop index: 342
                Address: 0xc65eb68
                Next-hop reference count: 16
                Source: fe80::a00:27ff:fec4:4b3e
                Next hop: fe80::a00:27ff:fec4:4b3e via em1.0, selected
                Session Id: 0x0
                State: <Active Ext>
                Local AS: 65004 Peer AS: 65002
                Age: 4:59       Metric: 0
                Validation State: unverified
                Task: BGP_65002.fe80::a00:27ff:fec4:4b3e
                Announcement bits (2): 0-KRT 1-Resolve tree 1
                AS path: 65002 ?
                Accepted
                Localpref: 100
                Router ID: 2.2.2.2

{master:0}
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
@LabN-CI
Copy link
Collaborator

LabN-CI commented Jun 13, 2020

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/6579 330c60b
Date 06/13/2020
Start 14:59:25
Finish 15:25:17
Run-Time 25:52
Total 1815
Pass 1815
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2020-06-13-14:59:25.txt
Log autoscript-2020-06-13-15:00:24.log.bz2
Memory 461 483 425

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12666/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

Warnings Generated during build:

Debian 10 amd64 build: Successful with additional warnings

Debian Package lintian failed for Debian 10 amd64 build:
(see full package build log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12666/artifact/DEB10BUILD/ErrorLog/log_lintian.txt)

W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr source: pkg-js-tools-test-is-missing
W: frr source: newer-standards-version 4.4.1 (current is 4.3.0)
W: frr-rpki-rtrlib: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g330c60ba7-0 (missing) -> 7.5-dev-20200613-00-g330c60ba7-0~deb10u1
W: frr-doc: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g330c60ba7-0 (missing) -> 7.5-dev-20200613-00-g330c60ba7-0~deb10u1
W: frr-snmp: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g330c60ba7-0 (missing) -> 7.5-dev-20200613-00-g330c60ba7-0~deb10u1
W: frr-pythontools: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g330c60ba7-0 (missing) -> 7.5-dev-20200613-00-g330c60ba7-0~deb10u1
W: frr: changelog-file-missing-explicit-entry 6.0-2 -> 7.5-dev-20200613-00-g330c60ba7-0 (missing) -> 7.5-dev-20200613-00-g330c60ba7-0~deb10u1

@donaldsharp
Copy link
Member

I am not sure I agree with making this change. We are sending data correctly as per the RFC and Juniper must accept it.

@ton31337
Copy link
Member Author

I agree with you, that is an incorrect behavior on JunOS, this is kinda for a discussion how should we treat that.

@donaldsharp
Copy link
Member

I have heard through the official routing grapevine that Juniper is going to fix the issue on their end.

@adam-kulagowski
Copy link

As an author of #6433 I believe this a kind gray area:

  • we have no global IPv6 on link (just the link-local). In result we are sending the same NH twice.
  • there is no MUST keyword in RFC

Yes according to the https://tools.ietf.org/html/rfc2545#section-3 The FRR behavior is correct (no question asked) but RFC states:

   The link-local address shall be included in the Next Hop field if and
   only if the BGP speaker shares a common subnet with the entity
   identified by the global IPv6 address carried in the Network Address
   of Next Hop field and the peer the route is being advertised to.

Although there is no MUST/SHOULD sending just one IPv6 NH might OK even in this case. Not handling double NH (and in result breaking the BGP session - thats another story :) )

Maybe we can make this somehow adjustable via BGP export policy? I would be more than happy if was able to set ipv6 next-hop local in outgoing direction (or anything else)

@ton31337
Copy link
Member Author

I don't have how to test with Arista, but seems they had the same problem. I hope it's already fixed.

@adam-kulagowski
Copy link

@ton31337

I don't have how to test with Arista, but seems they had the same problem. I hope it's already fixed.

I can confirm that latest Arista in VM does not suffer from this issue.

@donaldsharp That's great news. Was any date/roadmap/PR given?

@ton31337
Copy link
Member Author

Seems brilliant, I'm closing this PR then.

@ton31337 ton31337 closed this Jun 15, 2020
@ton31337 ton31337 deleted the fix/nhop_length_for_ipv4_prefixes branch June 15, 2020 19:13
@ton31337 ton31337 restored the fix/nhop_length_for_ipv4_prefixes branch June 19, 2020 08:49
@ton31337
Copy link
Member Author

According https://tools.ietf.org/html/draft-white-linklocalnh-00:

If an implementation intends to send a single link local forwarding
address in the Next Hop field of the MP_REACH_NLRI, it MUST set the
length of the Next Hop field to 16 and include only the IPv6 link
local address in the Next Hop field.

This PR seems what it does with, except without intends, but forcefully for IPv4 prefixes. Maybe we should adopt with set ipv6 next-hop local?

@ton31337 ton31337 deleted the fix/nhop_length_for_ipv4_prefixes branch December 14, 2020 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants