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

*: EVPN symmetric routing for IPv6 tenant routes #1806

Merged

Conversation

vivek-cumulus
Copy link
Contributor

Implement support for EVPN symmetric routing for IPv6 routes. The next hop
for EVPN routes is the IP address of the remote VTEP which is only an IPv4
address. This means that for IPv6 symmetric routing, there will be IPv6
destinations with IPv4 next hops. To make this work, the IPv4 next hops are
converted into IPv4-mapped IPv6 addresses.

As part of support, ensure that "L3" route-targets are not announced with
IPv6 link-local addresses so that they won't be installed in the routing
table.

Signed-off-by: Vivek Venkatraman vivek@cumulusnetworks.com
Reviewed-by: Mitesh Kanjariya mitesh@cumulusnetworks.com
Reviewed-by: Donald Sharp sharpd@cumulusnetworks.com

Implement support for EVPN symmetric routing for IPv6 routes. The next hop
for EVPN routes is the IP address of the remote VTEP which is only an IPv4
address. This means that for IPv6 symmetric routing, there will be IPv6
destinations with IPv4 next hops. To make this work, the IPv4 next hops are
converted into IPv4-mapped IPv6 addresses.

As part of support, ensure that "L3" route-targets are not announced with
IPv6 link-local addresses so that they won't be installed in the routing
table.

Signed-off-by: Vivek Venkatraman vivek@cumulusnetworks.com
Reviewed-by: Mitesh Kanjariya mitesh@cumulusnetworks.com
Reviewed-by: Donald Sharp sharpd@cumulusnetworks.com
@LabN-CI
Copy link
Collaborator

LabN-CI commented Feb 28, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1806 1ec3130
Date 02/27/2018
Start 21:15:13
Finish 21:37:57
Run-Time 22:44
Total 1805
Pass 1805
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-02-27-21:15:13.txt
Log autoscript-2018-02-27-21:15:51.log.bz2

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-2696/

This is a comment from an EXPERIMENTAL 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:

Checkout code: Successful with additional warnings:

Report for ipaddr.h
===============================================
< WARNING: Missing a blank line after declarations
< #93: FILE: /tmp/f1/ipaddr.h:93:
< +	u_int32_t addr_type = htonl(0xFFFF);
< +	memset(in6, 0, sizeof(struct in6_addr));
Report for zserv.c
===============================================
< WARNING: Block comments use * on subsequent lines
< #1229: FILE: /tmp/f1/zserv.c:1229:
---
> #1194: FILE: /tmp/f2/zserv.c:1194:

CLANG Static Analyzer Summary

  • Github Pull Request 1806, comparing to Git base SHA 8512150

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2696/artifact/shared/static_analysis/index.html

@donaldsharp
Copy link
Member

Can we get the newline added to ipaddr.h as the analyzer is complaining about it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
@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-2711/

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


CLANG Static Analyzer Summary

  • Github Pull Request 1806, comparing to Git base SHA 8512150

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2711/artifact/shared/static_analysis/index.html

Copy link
Member

@pguibert6WIND pguibert6WIND left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM, except for ipv4 mapped ipv6 handling. I have 2 remarks:

  • this ipv4_to_ipv4_mapped_ipv6 should be moved to lib/<>
  • on the remote side, I guess the IPv6 address will be displayed. don't you try to detect if it is an ipv4 mapped ipv6 address and try to display with the original ipv4 address ?

lib/ipaddr.h Outdated
@@ -85,4 +85,14 @@ static inline char *ipaddr2str(struct ipaddr *ip, char *buf, int size)
}
return buf;
}

static inline void ipv4_to_ipv4_mapped_ipv6(struct in6_addr *in6,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comment would be welcome to explain what is an ipv4 mapped address over IPv6.
I mean this function may be used.
This function should be put somewhere in the lib folder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is in lib/ already.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shall add a comment. Also, there is no change to how the routes are exchanged, they are sent with an IPv4 next hop as the EVPN route itself allows that of course. The change is only internal between BGP and zebra and then down to the kernel.

@donaldsharp
Copy link
Member

@vivek-cumulus Can you address @pguibert6WIND's Review comments and update so it can be moved on?

…pv6-tenant-routing

Conflicts:
	zebra/zserv.c
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 6, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1806 bfd498f
Date 03/06/2018
Start 17:30:37
Finish 17:53:35
Run-Time 22:58
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-06-17:30:37.txt
Log autoscript-2018-03-06-17:31:14.log.bz2

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-2774/

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


CLANG Static Analyzer Summary

  • Github Pull Request 1806, comparing to Git base SHA defd096

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2774/artifact/shared/static_analysis/index.html

@pguibert6WIND
Copy link
Member

Hi @vivek-cumulus ,
I just would like some explanation in text , attached with that function ipv4_to_ipv4_mapped_ipv6.
then , this pr will be find to be merged.

@vivek-cumulus
Copy link
Contributor Author

Hi @pguibert6WIND - I already did that as part of the additional commit yesterday. Do you think the comments in lib/ipaddr.h are fine?

…pv6-tenant-routing

Conflicts:
	bgpd/bgp_evpn.c
@LabN-CI
Copy link
Collaborator

LabN-CI commented Mar 10, 2018

💚 Basic BGPD CI results: SUCCESS, 0 tests failed

Results table
_ _
Result SUCCESS git merge/1806 4e26245
Date 03/09/2018
Start 23:05:33
Finish 23:28:12
Run-Time 22:39
Total 1816
Pass 1816
Fail 0
Valgrind-Errors 0
Valgrind-Loss 0
Details vncregress-2018-03-09-23:05:33.txt
Log autoscript-2018-03-09-23:06:09.log.bz2

For details, please contact louberger

@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: FAILED

See below for issues.
CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2834/

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

Get source and apply patch from patchwork: Successful

Building Stage: Successful

Basic Tests: Failed

Ubuntu 16.04 deb pkg check: Successful
CentOS 7 rpm pkg check: Successful
IPv4 ldp protocol on Ubuntu 16.04: Successful
Ubuntu 14.04 deb pkg check: Successful
Addresssanitizer topotest: Successful
Debian 8 deb pkg check: Successful
Fedora 24 rpm pkg check: Successful
CentOS 6 rpm pkg check: Successful
Topology tests on Ubuntu 16.04 amd64: Successful
IPv4 protocols on Ubuntu 14.04: Successful
Debian 9 deb pkg check: Successful
Ubuntu 12.04 deb pkg check: Successful
Static analyzer (clang): Successful
IPv6 protocols on Ubuntu 14.04: Successful

Topotest tests on Ubuntu 16.04 i386: Failed

Topology Test Results are at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-TOPOI386-2834/test

Topology Tests failed for Topotest tests on Ubuntu 16.04 i386:

RTNETLINK answers: Invalid argument
RTNETLINK answers: Invalid argument
2018-03-09 20:33:20,760 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_convergence": BGP router network did not converge
assert json["ipv4Unicast"]["peers"]["10.0.1.101"]["state"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -"Established"
  +"Idle")
  json["ipv4Unicast"]["peers"]["10.0.1.101"]["prefixReceivedCount"] value is different (
  --- Expected value
  +++ Current value
  @@ -1 +1 @@
  -10
  +0)
2018-03-09 20:33:23,976 ERROR: assert failed at "bgp_vrf_netns.test_bgp_vrf_netns_topo/test_bgp_vrf_netns": expected routes in "show ip bgp vrf r1-cust1 ipv4" output
assert expected key(s) ['10.201.3.0/24', '10.201.6.0/24', '10.201.5.0/24', '10.201.8.0/24', '10.201.9.0/24', '10.201.0.0/24', '10.201.2.0/24', '10.201.1.0/24', '10.201.4.0/24', '10.201.7.0/24'] in json["routes"] (have []):
  --- Expected value
  +++ Current value
  @@ -1,52 +1 @@
  -{
  -    "10.201.0.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.1.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.2.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.3.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.4.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.5.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.6.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.7.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.8.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ], 
  -    "10.201.9.0/24": [
  -        {
  -            "valid": true
  -        }
  -    ]
  -}
  +{}

see full log at https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2834/artifact/TOPOI386/ErrorLog/log_topotests.txt

Topology Tests memory analysis: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2834/artifact/TOPOI386/MemoryLeaks/

CLANG Static Analyzer Summary

  • Github Pull Request 1806, comparing to Git base SHA 58e7db1

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2834/artifact/shared/static_analysis/index.html

@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-2834/

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


CLANG Static Analyzer Summary

  • Github Pull Request 1806, comparing to Git base SHA 58e7db1

No Changes in Static Analysis warnings compared to base

19 Static Analyzer issues remaining.

See details at
https://ci1.netdef.org/browse/FRR-FRRPULLREQ-2834/artifact/shared/static_analysis/index.html

@pguibert6WIND pguibert6WIND merged commit c1a0038 into FRRouting:master Mar 13, 2018
@vivek-cumulus vivek-cumulus deleted the evpn-ipv6-tenant-routing branch May 25, 2020 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants