• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

HOWTO: compile kernel with LISP support

Scheduled Pinned Locked Moved Development
3 Posts 3 Posters 2.5k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K
    kleinem
    last edited by May 11, 2016, 9:25 AM May 11, 2016, 9:20 AM

    Hello everyone,

    i'm thinking about exchanging my Cisco ISRs against pfSense appliances.
    One of the things currently holding me back is the lack of Locator/Identifier Separation Protocol (LISP) support in pfSense, which i'd really like to see in a future release.
    I'm hoping for a lot of potential imitators, testers and feedback on Lisp so we might even get a pfSense package in the future.

    I'm a versed *nix sysadmin and user, however i don't have much experience with BSD, kernel hacking or coding.
    So if anything is plain wrong or could be improved in this guide, please let me know.
    This guide is basically following the Official OpenLisp install guide found on Github [1] and mostly focusing on how to compile LISP support into the kernel,
    because i expect anyone reading/doing this being able to compile the associated userland applications without any problems.
    Since pfSense seems to make it's own modifications to the BSD kernel, one diff conflict arises. but apart from that, compiling a kernel is no rocket science either.

    [1] https://github.com/lip6-lisp/install-guide/blob/master/Quick%20install.pdf

    1) Prerequisites
    Since pfSense 2.3 is based on FreeBSD 10.3, you'll need a FreeBSD 10.3 build machine.

    1. install and update ports, git, compile libconfig
    2. download the pfSense sources and openlisp data-plane from github
    3. create a symlink to /usr/src for the pfSense sources, because the lisp install script is looking there by default
      As mentioned earlier, pfSense is making its own modifications to the kernel source and uses a custom kernel config aswell.
      Therefore /usr/src needs to point to the pfSense modified sources.
    
    cd /usr/ports/devel/libconfig
    make clean install
    
    cd <workdir>git --clone --depth 1 --branch master -- https://github.com/lip6-lisp/data-plane.git
    git --clone --depth 1 --branch RELENG_2_3 -- https://github.com/pfsense/FreeBSD-src.git pfSense_2.3
    ln -s <workdir>/pfSense_2.3 /usr/src</workdir></workdir> 
    

    2) patch the kernel
    Patching the kernel is easy with the provided "install-lisp.sh" script.
    As mentioned before, you'll run into a diff conflict which you need to resolve manually.
    Its important though, that you ignore the warning which the script emits and continue with it.

    cd data-plane
    sh install-lisp.sh
     <ommited>Trying to find the original file [Y/n]? n
    Skip this step and continue (not safe) [y/N]? Y</ommited> 
    

    This conflict needs to be resolved manually:

    ***************
    *** 139,144 ****
      #ifdef IPSEC
      	int no_route_but_check_spd = 0;
      #endif
      	M_ASSERTPKTHDR(m);
    
      	if (inp != NULL) {
    --- 147,158 ----
      #ifdef IPSEC
      	int no_route_but_check_spd = 0;
      #endif
    + + #ifdef LISP
    + 	struct eidmap *  local_map = NULL;
    + 	struct eidmap *  remote_map = NULL;
    + #endif /* LISP */
    +   	M_ASSERTPKTHDR(m);
    
      	if (inp != NULL) {
    
    

    3) compile the kernel
    At last, we need to add LISP support to the pfSense kernel config, compile it, and make a Kernel package. (assuming amd64 here)
    The result will be a /kernel.txz file which you can install on a pfSense 2.3 machine.

    
    echo "options LISP" >> /usr/src/sys/amd64/conf/pfSense
    cd /usr/src
    make buildkernel KERNCONF=pfSense
    make distributekernel KERNCONF=pfSense INSTKERNNAME=pfSense-2.3_lisp
    make packagekernel KERNCONF=pfSense INSTKERNNAME=pfSense-2.3_lisp
    

    4) userland applications
    Two problems i've encountered while compiling userland

    1. 'mapstat' needs to be compiled without IPX support to run on pfsense 'make -DWITHOUT_IPX_SUPPORT'
    2. 'opencp' needs to be compiled using clang on FreeBSD10.3 so 'make CC=clang'
    1 Reply Last reply Reply Quote 0
    • T
      TheBigBear
      last edited by Jan 21, 2017, 9:31 PM

      So is LISP support baked in to standard pfSense by now?

      1 Reply Last reply Reply Quote 0
      • D
        dragoangel
        last edited by May 2, 2017, 5:41 PM

        This topic has been readen 1177 times. It means that many people interested in this technology, really good thing to drop NPt away in IPv6 Multihoming.

        Latest stable pfSense on 2x XG-7100 and 1x Intel Xeon Server, running mutiWAN, he.net IPv6, pfBlockerNG-devel, HAProxy-devel, Syslog-ng, Zabbix-agent, OpenVPN, IPsec site-to-site, DNS-over-TLS...
        Unifi AP-AC-LR with EAP RADIUS, US-24

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received