scion

module
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2020 License: Apache-2.0

README

SCION

Documentation Build Status Go Report Card GitHub issues Release license

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. This environment assumes you're running as a non-root user with sudo access.

  2. Install Bazel version 1.2.0:

    sudo apt-get install g++ unzip zip
    wget https://github.com/bazelbuild/bazel/releases/download/1.2.0/bazel-1.2.0-installer-linux-x86_64.sh
    bash ./bazel-1.2.0-installer-linux-x86_64.sh --user
    rm ./bazel-1.2.0-installer-linux-x86_64.sh
    
  3. 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"
    
  4. 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 https://github.com/scionproto/scion
    cd scion
    
  5. Install required packages with dependencies:

    ./env/deps
    
  6. Install docker and docker-compose. Please follow the instructions for docker-ce and docker-compose. Add your user to the docker group: sudo usermod -a -G docker $LOGNAME. Log out and log back in so that your group membership is re-evaluated.

  7. 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.

  8. Run the infrastructure:

    ./scion.sh run

  9. 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').

  • control_servers (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/braccept/parser
This package is responsible for parsing a packet description, more specifically, an ordered list of layers definitions.
This package is responsible for parsing a packet description, more specifically, an ordered list of layers definitions.
border/brconf
Package brconf holds all of the global router state, for access by the router's various packages.
Package brconf holds all of the global router state, for access by the router's various packages.
border/internal/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/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.
cs
The beacon server implementation.
The beacon server implementation.
cs/beacon/mock_beacon
Package mock_beacon is a generated GoMock package.
Package mock_beacon is a generated GoMock package.
cs/beaconing
Package beaconing implements tasks and handlers related to beacon propagation and registration.
Package beaconing implements tasks and handlers related to beacon propagation and registration.
cs/beaconing/mock_beaconing
Package mock_beaconing is a generated GoMock package.
Package mock_beaconing is a generated GoMock package.
cs/beaconstorage
Package beaconstorage provides a "factory" for beacon stores.
Package beaconstorage provides a "factory" for beacon stores.
cs/config
Package config describes the configuration of the beacon server.
Package config describes the configuration of the beacon server.
cs/ifstate
Package ifstate implements the interface state in memory structure as well as related tasks and handlers.
Package ifstate implements the interface state in memory structure as well as related tasks and handlers.
cs/ifstate/mock_ifstate
Package mock_ifstate is a generated GoMock package.
Package mock_ifstate is a generated GoMock package.
cs/keepalive
Package keepalive implements tasks and handlers related IFID keepalives.
Package keepalive implements tasks and handlers related IFID keepalives.
cs/keepalive/mock_keepalive
Package mock_keepalive is a generated GoMock package.
Package mock_keepalive is a generated GoMock package.
cs/onehop
Package onehop provides a sender for messages sent on a one-hop path.
Package onehop provides a sender for messages sent on a one-hop path.
cs/revocation
Package revocation implements a revocation handler for the beacon server.
Package revocation implements a revocation handler for the beacon server.
cs/revocation/mock_revocation
Package mock_revocation is a generated GoMock package.
Package mock_revocation is a generated GoMock package.
cs/segreq
Package segreq contains everything that is needed to handle segment requests in the path server.
Package segreq contains everything that is needed to handle segment requests in the path server.
cs/segreq/mock_segreq
Package mock_segreq is a generated GoMock package.
Package mock_segreq is a generated GoMock package.
cs/segutil/mock_segutil
Package mock_segutil is a generated GoMock package.
Package mock_segutil is a generated GoMock package.
examples/pingpong
Simple application for SCION connectivity using the snet library.
Simple application for SCION connectivity using the snet library.
godispatcher/internal/config
Package config contains the configuration of the SCION dispatcher.
Package config contains the configuration of the SCION dispatcher.
godispatcher/internal/respool
Package respool contains the Dispatcher's pool of free buffers/packets.
Package respool contains the Dispatcher's pool of free buffers/packets.
hidden_path_srv/internal/hpsegreq/mock_hpsegreq
Package mock_hpsegreq is a generated GoMock package.
Package mock_hpsegreq is a generated GoMock package.
hidden_path_srv/internal/registration/mock_registration
Package mock_registration is a generated GoMock package.
Package mock_registration is a generated GoMock package.
lib/addr
Package addr contains types for SCION addressing.
Package addr contains types for SCION addressing.
lib/config
Package config provides an unified pattern for configuration structs.
Package config provides an unified pattern for configuration structs.
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/ctrl/ifid
Package ifid contains the Go representation of an IFID keepalive packet.
Package ifid contains the Go representation of an IFID keepalive packet.
lib/ctrl/seg/mock_seg
Package mock_seg is a generated GoMock package.
Package mock_seg is a generated GoMock package.
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/fatal
Package fatal provides a way to handle fatal errors.
Package fatal provides a way to handle fatal errors.
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/infraenv
Package infraenv contains convenience function common to SCION infra services.
Package infraenv contains convenience function common to SCION infra services.
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/messenger/mock_messenger
Package mock_messenger is a generated GoMock package.
Package mock_messenger is a generated GoMock package.
lib/infra/messenger/tcp
Package tcp contains a tcp implementation of the messenger, it can be used for AS internal traffic.
Package tcp contains a tcp implementation of the messenger, it can be used for AS internal traffic.
lib/infra/mock_infra
Package mock_infra is a generated GoMock package.
Package mock_infra is a generated GoMock package.
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/db
Package db contains common database abstractions for our infra.
Package db contains common database abstractions for our infra.
lib/infra/modules/itopo
Package itopo stores topology state and manages topology updates for an application.
Package itopo stores topology state and manages topology updates for an application.
lib/infra/modules/segfetcher
Package segfetcher contains all the logic that is needed to fetch segments, verify and store segments in an efficient manner.
Package segfetcher contains all the logic that is needed to fetch segments, verify and store segments in an efficient manner.
lib/infra/modules/segfetcher/mock_segfetcher
Package mock_segfetcher is a generated GoMock package.
Package mock_segfetcher is a generated GoMock package.
lib/infra/modules/seghandler/mock_seghandler
Package mock_seghandler is a generated GoMock package.
Package mock_seghandler is a generated GoMock package.
lib/infra/modules/segverifier
Package segverifier implements primitives for verifying path segments.
Package segverifier implements primitives for verifying path segments.
lib/infra/modules/trust/mock_trust
Package mock_trust is a generated GoMock package.
Package mock_trust is a generated GoMock package.
lib/infra/rpc
Package rpc implements SCION Infra RPC calls over QUIC.
Package rpc implements SCION Infra RPC calls over QUIC.
lib/integration
Package integration simplifies the creation of integration tests.
Package integration simplifies the creation of integration tests.
lib/keyconf
Package keyconf defines basic primitives for key configuration.
Package keyconf defines basic primitives for key configuration.
lib/l4/mock_l4
Package mock_l4 is a generated GoMock package.
Package mock_l4 is a generated GoMock package.
lib/log/mock_log
Package mock_log is a generated GoMock package.
Package mock_log is a generated GoMock package.
lib/mocks/net/mock_net
Package mock_net is a generated GoMock package.
Package mock_net is a generated GoMock package.
lib/overlay/conn
Package conn implements overlay sockets with additional metadata on reads.
Package conn implements overlay sockets with additional metadata on reads.
lib/overlay/conn/mock_conn
Package mock_conn is a generated GoMock package.
Package mock_conn is a generated GoMock package.
lib/pathdb/mock_pathdb
Package mock_pathdb is a generated GoMock package.
Package mock_pathdb is a generated GoMock package.
lib/pathmgr
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
Package pathmgr implements an asynchronous Path Resolver for SCION Paths.
lib/pathmgr/mock_pathmgr
Package mock_pathmgr is a generated GoMock package.
Package mock_pathmgr is a generated GoMock package.
lib/pathpol
Package pathpol implements path policies, documentation in doc/PathPolicy.md Currently implemented: ACL, Sequence, Extends and Options.
Package pathpol implements path policies, documentation in doc/PathPolicy.md Currently implemented: ACL, Sequence, Extends and Options.
lib/periodic/internal/metrics/mock_metrics
Package mock_metrics is a generated GoMock package.
Package mock_metrics is a generated GoMock package.
lib/pktcls
Package pktcls implements tools for classifying and acting on network packets.
Package pktcls implements tools for classifying and acting on network packets.
lib/pktcls/mock_pktcls
Package mock_pktcls is a generated GoMock package.
Package mock_pktcls is a generated GoMock package.
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/prom/promtest
Package promtest contains helpers to test metrics structs.
Package promtest contains helpers to test metrics structs.
lib/revcache/mock_revcache
Package mock_revcache is a generated GoMock package.
Package mock_revcache is a generated GoMock package.
lib/sciond
Package sciond queries local SCIOND servers for information.
Package sciond queries local SCIOND servers for information.
lib/sciond/mock_sciond
Package mock_sciond is a generated GoMock package.
Package mock_sciond is a generated GoMock package.
lib/sciond/pathprobe
Package pathprobe contains methods to probe scion paths.
Package pathprobe contains methods to probe scion paths.
lib/scrypto/trc
Package trc contains the TRC implementation according to the new control-plane PKI design.
Package trc contains the TRC implementation according to the new control-plane PKI design.
lib/serrors
Package serrors provides enhanced errors.
Package serrors provides enhanced errors.
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/mock_snet
Package mock_snet is a generated GoMock package.
Package mock_snet is a generated GoMock package.
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/sock/reliable/mock_reliable
Package mock_reliable is a generated GoMock package.
Package mock_reliable is a generated GoMock package.
lib/sock/reliable/reconnect
Package reconnect implements transparent logic for reconnecting to the dispatcher.
Package reconnect implements transparent logic for reconnecting to the dispatcher.
lib/sock/reliable/reconnect/mock_reconnect
Package mock_reconnect is a generated GoMock package.
Package mock_reconnect is a generated GoMock package.
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/svc
Package svc implements support for SVC Resolution.
Package svc implements support for SVC Resolution.
lib/svc/internal/ctxconn
Package ctxconn provides a helper function to track context cancellation when working with connections.
Package ctxconn provides a helper function to track context cancellation when working with connections.
lib/svc/internal/ctxconn/mock_ctxconn
Package mock_ctxconn is a generated GoMock package.
Package mock_ctxconn is a generated GoMock package.
lib/svc/internal/proto
Package proto implements helpers for capnp SVC address resolution messages.
Package proto implements helpers for capnp SVC address resolution messages.
lib/svc/mock_svc
Package mock_svc is a generated GoMock package.
Package mock_svc is a generated GoMock package.
lib/topology
Package topology wraps two versions of the topology.
Package topology wraps two versions of the topology.
lib/topology/json
Package json encodes AS topology information via JSON.
Package json encodes AS topology information via JSON.
lib/topology/mock_topology
Package mock_topology is a generated GoMock package.
Package mock_topology is a generated GoMock package.
lib/truststorage
Package truststorage provides a "factory" for trust database.
Package truststorage provides a "factory" for trust database.
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
Code generated by graphupdater tool, DO NOT EDIT.
Code generated by graphupdater tool, DO NOT EDIT.
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/mock_xtest
Package mock_xtest is a generated GoMock package.
Package mock_xtest is a generated GoMock package.
lib/xtest/p2p
Package p2p (point to point) provides a net.PacketConn wrapper around net.Pipe().
Package p2p (point to point) provides a net.PacketConn wrapper around net.Pipe().
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/config
Package config contains the configuration of sciond.
Package config contains the configuration of sciond.
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/fetcher/mock_fetcher
Package mock_fetcher is a generated GoMock package.
Package mock_fetcher is a generated GoMock package.
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/egress/asmap
Package asmap contains the tables for remote SIGs, ASes and their prefixes.
Package asmap contains the tables for remote SIGs, ASes and their prefixes.
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/iface
iface contains interfaces that different components within egress use to communicate.
iface contains interfaces that different components within egress use to communicate.
sig/egress/iface/mock_iface
Package mock_iface is a generated GoMock package.
Package mock_iface is a generated GoMock package.
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/selector
selector package implements selection of a session to use for an outgoing packet.
selector package implements selection of a session to use for an outgoing packet.
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/egress/worker/mock_worker
Package mock_worker is a generated GoMock package.
Package mock_worker is a generated GoMock package.
sig/internal/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/internal/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
Tool to generate and verify control-plane PKI primitives.
Tool to generate and verify control-plane PKI primitives.
tools/scion-pki/internal/certs
Package certs defines the commands to generate issuer and AS certificates from the configuration files.
Package certs defines the commands to generate issuer and AS certificates from the configuration files.
tools/scion-pki/internal/conf
Package conf defines the configuration files for the scion-pki tool.
Package conf defines the configuration files for the scion-pki tool.
tools/scion-pki/internal/keys
Package keys defines the commands to generate the private and public keys from the key configuration files.
Package keys defines the commands to generate the private and public keys from the key configuration files.
tools/scion-pki/internal/pkicmn
Package pkicmn contains some commonly used functionality and definitions.
Package pkicmn contains some commonly used functionality and definitions.
tools/scion-pki/internal/trcs
Package trcs defines the commands to generate base TRC and TRC updates from the configuration files.
Package trcs defines the commands to generate base TRC and TRC updates from the configuration files.
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