Code Monkey home page Code Monkey logo

pilot's Introduction

Pilot

Simple web-based SDN controller for family and friends.

Build Status

Introduction

Pilot is the SDN controller for your home. Once Pilot is set up, any device in your LAN can visit Pilot's web interface to easily select their own VRF.

Pilot web interface screenshot

Requirements

Server running Pilot:

  • Python 3.7 or later (if you don't use the Docker image)
  • GoBGP with gRPC enabled (if you don't use the Docker image)
  • LAN devices should not go through SNAT/masquerade to access the server (for proper IP address detection)

Gateway router:

Usage

Router Setup

  • Put different network profiles in different VRFs
  • Add BGP session with your GoBGP instance and enable ipv4 flowspec and ipv6 flowspec address families
  • Allow flowspec rule installation on the interfaces to LAN clients

Example configuration for Cisco IOS XE 16.x:

! Enable flowspec rule installation
flowspec
 local-install interface-all

! VRF definition
ip vrf UPLINK1
 rd 100:100
 route-target both 100:100
ip vrf UPLINK2
 rd 200:200
 route-target both 200:200

! Uplink interfaces
interface GigabitEthernet0/0/0
 description uplink-1
 ip vrf select source
 ip vrf receive UPLINK1
 ip flowspec disable
 ipv6 flowspec disable
interface GigabitEthernet0/0/1
 description uplink-2
 ip vrf select source
 ip vrf receive UPLINK2
 ip flowspec disable
 ipv6 flowspec disable

! LAN interfaces
interface GigabitEthernet0/0/2
 description LAN
 ip address 192.168.1.1 255.255.255.0
 ip vrf select source
 ip vrf receive UPLINK1
 ip vrf receive UPLINK2

! BGP peer setup
router bgp 65540
 bgp router-id 169.254.1.2
 neighbor 169.254.1.1 remote-as 65540
 address-family ipv4 flowspec
  neighbor 169.254.1.1 activate
 address-family ipv6 flowspec
  neighbor 169.254.1.1 activate

! Routes for global and VRFs
ip route 0.0.0.0 0.0.0.0 x.x.x.x 10
ip route 0.0.0.0 0.0.0.0 y.y.y.y 20
ip route vrf UPLINK1 0.0.0.0 0.0.0.0 x.x.x.x
ip route vrf UPLINK2 0.0.0.0 0.0.0.0 y.y.y.y

Example configuration for Juniper Junos OS (interface configuration left out):

set policy-options policy-statement accept-all term 1 then accept
set protocols bgp local-as 65540
set protocols bgp group flowspec family inet flow no-validate accept-all
set protocols bgp group flowspec family inet6 flow no-validate accept-all
set protocols bgp group flowspec neighbor 169.254.1.1 peer-as 65540
set routing-options flow term-order standard
# exclude your upstream interfaces:
# set routing-options flow interface-group [<group-id>] [exclude <group-id>]

Pilot Setup

The easiest way to run Pilot is using the Docker image. Download all the files in config and put them in a directory.

In gobgpd.toml:

  • Change global.config.as and global.config.router-id
  • Change neighbors[].config.neighbor-address and neighbors[].config.peer-as

In pilot.toml:

  • Add or change rule

Then spin up our Docker container:

docker run --restart=always --name=pilot --network=host -v path/to/your/config/directory:/etc/pilot:ro jamesits/pilot:latest

The web UI will be on port 80.

Thanks

This project is inspired by xtomcom/NetworkSwitch.

pilot's People

Contributors

jamesits avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

briteming

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.