scion

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 31, 2018 License: Apache-2.0

README

SCION

An implementation of SCION, a future Internet architecture.

Necessary steps in order to run SCION:

  1. Make sure that you are using a clean and recently updated Ubuntu 16.04.

  2. Make sure that you have a Go workspace setup, and that ~/.local/bin, and $GOPATH/bin can be found in your $PATH variable. For example:

    echo 'export GOPATH="$HOME/go"' >> ~/.profile
    echo 'export PATH="$HOME/.local/bin:$GOPATH/bin:$PATH"' >> ~/.profile
    source ~/.profile
    mkdir -p "$GOPATH"
    
  3. Check out scion into the appropriate directory inside your go workspace (or put a symlink into the go workspace to point to your existing scion checkout):

    mkdir -p "$GOPATH/src/github.com/scionproto"
    cd "$GOPATH/src/github.com/scionproto"
    git clone --recursive git@github.com:scionproto/scion
    cd scion
    

    If you don't have a github account, or haven't setup ssh access to it, this command will make git use https instead: git config --global url.https://github.com/.insteadOf git@github.com:

  4. Install required packages with dependencies:

    ./env/deps
    
  5. Configure the host Zookeeper instance. At a minimum, add maxClientCnxns=0 to /etc/zookeeper/conf/zoo.cfg, but replacing it with docker/zoo.cfg is recommended. This has the standard parameters set, as well as using a ram disk for the data log, which greatly improves ZK performance (at the cost of reliability, so it should only be done in a testing environment).

  6. Create the topology and configuration files (according to topology/Default.topo):

    ./scion.sh topology

    The resulting directory structure will be created:

     ./gen/ISD{X}/AS{Y}/
         {elem}{X}-{Y}-{Z}/
             as.yml
             path_policy.yml
             supervisord.conf
             topology.yml
             certs/
                 ISD{X}-AS{Y}-V0.crt
                 ISD{X}-V0.trc
             keys/
                 as-sig.key
    

    The default topology looks like this.

  7. Run the infrastructure:

    ./scion.sh run

  8. Stop the infrastructure:

    ./scion.sh stop

Notes about topology/Default.topo:

  • defaults.subnet (optional): override the default subnet of 127.0.0.0/8.

  • core (optional): specify if this is a core AS or not (defaults to 'false').

  • beacon_servers, certificate_servers, path_servers, (all optional): number of such servers in a specific AS (override the default value 1).

  • links: keys are ISD_ID-AS_ID (format also used for the keys of the JSON file itself) and values can either be PARENT, CHILD, PEER, or CORE.

Tests

In order to run the unit tests:

./scion.sh test

Directories

Path Synopsis
go
border
Border is a Go implementation of the SCION border router.
Border is a Go implementation of the SCION border router.
border/conf
Package conf holds all of the global router state, for access by the router's various packages.
Package conf holds all of the global router state, for access by the router's various packages.
border/metrics
Package metrics defines and exports router metrics to be scraped by prometheus.
Package metrics defines and exports router metrics to be scraped by prometheus.
border/netconf
Package netconf handles the network configuration of the router as described by the topology.
Package netconf handles the network configuration of the router as described by the topology.
border/rcmn
Package rcmn contains small common types used by the border router, to eliminate circular dependencies.
Package rcmn contains small common types used by the border router, to eliminate circular dependencies.
border/rpkt
Package rpkt contains the router representation of a SCION packet.
Package rpkt contains the router representation of a SCION packet.
examples/pingpong
Simple application for SCION connectivity using the snet library.
Simple application for SCION connectivity using the snet library.
lib/addr
Package addr contains types for SCION addressing.
Package addr contains types for SCION addressing.
lib/ctrl
Package ctrl handles SCION control-plane payloads, which are encoded as capnp proto messages.
Package ctrl handles SCION control-plane payloads, which are encoded as capnp proto messages.
lib/ctrl/ctrl_msg
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads.
Package ctrl_msg implements a layer for sending SCION Ctrl payload requests/notifications via the infra dispatcher, including integrated signing and signature verification of ctrl payloads.
lib/env
Package env contains common command line and initialization code for SCION services.
Package env contains common command line and initialization code for SCION services.
lib/hpkt
Package hpkt (Host Packet) contains low level primitives for parsing and creating end-host SCION messages.
Package hpkt (Host Packet) contains low level primitives for parsing and creating end-host SCION messages.
lib/infra
Package infra contains common definitions for the SCION infrastructure messaging layer.
Package infra contains common definitions for the SCION infrastructure messaging layer.
lib/infra/dedupe
Package dedupe implements a generic request/response proxy that issues a single request instead of multiple redundant requests.
Package dedupe implements a generic request/response proxy that issues a single request instead of multiple redundant requests.
lib/infra/disp
Package disp implements a generic message dispatcher for request/reply protocols.
Package disp implements a generic message dispatcher for request/reply protocols.
lib/infra/example
Example infrastructure service that does nothing except service some requests using default handlers.
Example infrastructure service that does nothing except service some requests using default handlers.
lib/infra/messenger
Package messenger contains the default implementation for interface infra.Messenger.
Package messenger contains the default implementation for interface infra.Messenger.
lib/infra/modules/combinator
Package combinator contains methods for constructing SCION forwarding paths.
Package combinator contains methods for constructing SCION forwarding paths.
lib/infra/modules/segverifier
Package segverifier implements primitives for verifying path segments.
Package segverifier implements primitives for verifying path segments.
lib/infra/modules/trust
Package trust defines type Store, a unified interface for TRC and Certificate retrieval.
Package trust defines type Store, a unified interface for TRC and Certificate retrieval.
lib/infra/modules/trust/trustdb
Package trustdb provides wrappers for SQL calls for managing a database containing TRCs and Certificate Chains.
Package trustdb provides wrappers for SQL calls for managing a database containing TRCs and Certificate Chains.
lib/integration
Package integration simplifies the creation of integration tests.
Package integration simplifies the creation of integration tests.
lib/pathmgr
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
lib/pktcls
Package class implements tools for classifying and acting on network packets.
Package class implements tools for classifying and acting on network packets.
lib/profile
Package profile handles CPU and memory profiling.
Package profile handles CPU and memory profiling.
lib/prom
Package prom contains some utility functions for dealing with prometheus metrics.
Package prom contains some utility functions for dealing with prometheus metrics.
lib/sciond
Package sciond queries local SCIOND servers for information.
Package sciond queries local SCIOND servers for information.
lib/snet
Package snet implements interfaces net.Conn and net.PacketConn for SCION connections.
Package snet implements interfaces net.Conn and net.PacketConn for SCION connections.
lib/snet/rpt
package rpt (Reliable Packet Transport) implements a simple packet-oriented protocol with ACKs on top of net.PacketConn.
package rpt (Reliable Packet Transport) implements a simple packet-oriented protocol with ACKs on top of net.PacketConn.
lib/snet/squic
QUIC/SCION implementation.
QUIC/SCION implementation.
lib/sock/reliable
Package reliable implements the SCION ReliableSocket protocol Servers should first call Listen on a UNIX socket address, and then call Accept on the received Listener.
Package reliable implements the SCION ReliableSocket protocol Servers should first call Listen on a UNIX socket address, and then call Accept on the received Listener.
lib/sockctrl
This version of sockctrl is for Go versions >= 1.9, where the socket FDs are accessible via RawConn.Control().
This version of sockctrl is for Go versions >= 1.9, where the socket FDs are accessible via RawConn.Control().
lib/spath/spathmeta
Package spathmeta implements basic types for working with SCIOND paths.
Package spathmeta implements basic types for working with SCIOND paths.
lib/topology
The topology package wraps two versions of the topology.
The topology package wraps two versions of the topology.
lib/util/bufpool
Package bufpool initializes an elastic pool of free buffers.
Package bufpool initializes an elastic pool of free buffers.
lib/xtest
Package xtest implements common functionality for unit tests.
Package xtest implements common functionality for unit tests.
lib/xtest/graph
Package graph implements a multigraph model of a SCION network for use in tests.
Package graph implements a multigraph model of a SCION network for use in tests.
lib/xtest/loopback
Package loopback defines a net.PacketConn implementation where sent messages are echoed back on the same connection.
Package loopback defines a net.PacketConn implementation where sent messages are echoed back on the same connection.
lib/xtest/p2p
Package p2p (point to point) defines a net.PacketConn implementation where messages are exchanged via channels.
Package p2p (point to point) defines a net.PacketConn implementation where messages are exchanged via channels.
proto
Package proto contains mostly auto-generated code for parsing/packing SCION capnp messages, as well as some helper functions to working with capnp in Go simpler.
Package proto contains mostly auto-generated code for parsing/packing SCION capnp messages, as well as some helper functions to working with capnp in Go simpler.
sciond/internal/fetcher
Package fetcher implements path segment fetching, verification and combination logic for SCIOND.
Package fetcher implements path segment fetching, verification and combination logic for SCIOND.
sciond/internal/servers
Package servers contains the logic for creating and managing SCIOND API servers.
Package servers contains the logic for creating and managing SCIOND API servers.
sig
sig/base/core
Package core contains the tables for remote SIGs, ASes and their prefixes
Package core contains the tables for remote SIGs, ASes and their prefixes
sig/config
Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.
Package config is responsible for parsing the SIG json config file into a set of simple intermediate data-structures.
sig/egress/dispatcher
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session.
Package dispatcher reads from input ring buffer, decides on a Session and puts data on the ring buffer of the Session.
sig/egress/reader
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher.
Package reader implements a reader object that reads from tun, routes with support from egress/router to determine the correct egressDispatcher, and puts data on the ring buffer of the egressDispatcher.
sig/egress/router
Package router implements an IPv4/IPv6 router.
Package router implements an IPv4/IPv6 router.
sig/egress/session
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session.
Package session monitors session health and maintains a concurrency-safe remote SIG address (that includes a working path) for each session.
sig/egress/worker
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames.
Package worker implements the logic for reading packets from a session's ring buffer, encapsulating them and writing them to the network as frames.
sig/metrics
Package metrics publishes information about SIG operation NOTE(all): Work in progress, do not recommend reviewing this code yet
Package metrics publishes information about SIG operation NOTE(all): Work in progress, do not recommend reviewing this code yet
sig/xnet
Package xnet contains low level Linux networking calls (generally related to netlink and tunneling)
Package xnet contains low level Linux networking calls (generally related to netlink and tunneling)
tools/scion-pki/internal/pkicmn
Package pkicmn contains some commonly used functionality and definitions.
Package pkicmn contains some commonly used functionality and definitions.
tools/scmp
Simple echo application for SCION connectivity tests.
Simple echo application for SCION connectivity tests.
tools/showpaths
Simple show paths application for SCION.
Simple show paths application for SCION.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL