Repository navigation
Add LISP (Locator/ID Separation Protocol) elements - #513
Open
franck-messaoudi wants to merge 11 commits into
Open
franck-messaoudi wants to merge 11 commits into
franck-messaoudi wants to merge 11 commits into
Conversation
Add include/clicknet/lisp.h: byte-exact C structures and constants for the LISP data and control planes (RFC 9300, RFC 9301): the data header, Map-Request, Map-Reply, Map-Register, Map-Notify, EID records and locators, the Encapsulated Control Message, and the Follow Me Cloud Map-Migrate message (RFC 8113 shared extension).
lispcommon.{cc,hh} provides the outer IP/UDP header builder, EID prefix
tables with longest-prefix match, locator choice by priority and weight,
HMAC-SHA-256-128 authentication (RFC 9301 section 5.6), record helpers
and the locking used by the database elements.
LISPEncap and LISPDecap implement the LISP data plane (RFC 9300): LISP/UDP/IP encapsulation with nonce, locator-status-bits, instance ID and flow-hash source port, and decapsulation. LISPClassifierxTR, LISPClassifierMS and LISPClassifierFMCC sort packets by LISP message type for xTRs, Map-Servers/Map-Resolvers and the FMCC controller.
LISPMapCache holds the mappings learnt from Map-Replies and the pending Map-Requests. LISPMapRequester looks up data packets, sends Map-Requests (plain or in an Encapsulated Control Message), validates Map-Replies and Negative Map-Replies, and handles Solicit-Map-Requests.
…pRegistrar LISPEtrDatabase holds the EID prefixes of the site, LISPMapReplier answers Map-Requests, and LISPMapRegistrar sends authenticated Map-Registers and checks the Map-Notify replies.
LISPMappingDB stores registrations with expiry, LISPMapServer accepts authenticated Map-Registers per site and sends Map-Notify, and LISPMapResolver answers Map-Requests (plain or ECM) from the database, with Negative Map-Replies for unknown EIDs.
FMCCDatabase, FMCCManager and FMCCMigrator form a Follow Me Cloud controller that decides when a virtual machine moves between data centers and sends a Map-Migrate order. On the xTRs, LISPMigrationUpdater applies it (ETR database, Map-Register, SMRs to the ITRs) and LISPVMCounter delivers and counts traffic per VM.
test/lisp/ has 11 clicktests (encapsulation, classification, map resolution, registration and notification with authentication, SMR, map-cache, Map-Server, FMCC migration, and a Wireshark decode check run when tshark is available). conf/lisp/ has a two-xTR, MS/MR and FMCC demo.
README.md describes the element group, LISP_GUIDE.md explains LISP, how the elements map to it and how to run the demo. Doxyfile builds the API reference from the Doxygen comments, and .clang-format records the coding style.
The LISP element group is off by default, like ipsec and wifi; --enable-lisp or --enable-all-elements builds it.
LISP and Follow Me Cloud elements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds an element group,
elements/lisp, that implements the IPv4 parts ofLISP (RFC 9300 data plane,
RFC 9301 control plane), plus a
Follow Me Cloud extension that moves virtual machines between data centers
and updates the LISP mappings so their traffic follows them.
LISP splits an IP address into an endpoint identifier (EID), which stays the
same when a host moves, and a routing locator (RLOC), the address of the site
router. Tunnel routers (xTRs) encapsulate traffic between sites and learn
EID-to-RLOC mappings from a Map-Server / Map-Resolver.
The group is off by default (
--enable-lisp, or--enable-all-elements) andtouches nothing outside
elements/lisp/,include/clicknet/lisp.h,conf/lisp/,test/lisp/,configure.in/configure,.gitignoreandAUTHORS.Elements
LISPEncap,LISPDecapLISPClassifierxTR,LISPClassifierMS,LISPClassifierFMCCLISPMapCache,LISPMapRequesterLISPEtrDatabase,LISPMapReplier,LISPMapRegistrarLISPMappingDB,LISPMapServer,LISPMapResolverFMCCDatabase,FMCCManager,FMCCMigrator,LISPMigrationUpdater,LISPVMCounterWire formats are in
include/clicknet/lisp.h(plain C, byte-exact, networkbyte order).
What is covered
instance ID, map-versions, and a flow-hash UDP source port.
Map-Reply, Negative Map-Reply, Map-Register and Map-Notify with
HMAC-SHA-256-128 authentication, Solicit-Map-Request, per-site
authorization on the Map-Server, registration expiry.
then weight per flow.
extension message (type 15, provisional sub-type), optionally
HMAC-authenticated.
Not supported yet: IPv6 EIDs and RLOCs, PITR/PETR, RLOC-probing, LISP-SEC,
and the Linux kernel module (the elements are tested at userlevel only).
Testing
make check: 183 successes, 0 failures (gcc 12.3, Ubuntu 22.04).(
--enable-all-elements -std=gnu++11, as in CI), single-threaded and with--enable-user-multithread(4-thread stress test).field (
test/lisp/LISPWire-01.clicktest, run whentsharkis installed).this branch together with the CI fix in GitHub CI: Use a Python version available on current runners #512 (the current workflow fails
at "Set up Python" on every branch, including master, because Python 3.7
is no longer available on the runners):
https://github.com/franck-messaoudi/click/actions/runs/39845537158
conf/lisp/xtr1_xtr2_fmcc.clickruns two xTRs, a Map-Server/Map-Resolver andthe FMCC controller in one process;
elements/lisp/LISP_GUIDE.mdhas a quickstart for it.
Notes for review
ETR, Map-Server/Map-Resolver, Follow Me Cloud, tests, documentation,
configure,AUTHORS.configurewas updated with only the hunks that the newELEMENTS_ARG_ENABLE(lisp, ...)line generates, so the diff stays at 13lines; regenerating it with your usual Autoconf gives the same option.
=c/=s/=d/=hdocumentation comment; theinternal API also has Doxygen comments (
doxygen elements/lisp/Doxyfile).registered with IANA.