Coder Social home page Coder Social logo

fcnet's Introduction

fcnet

fcnet is a simple and automatable CLI tool aimed at setting up and tearing down Firecracker microVM networks. fcnet has 3 operations you can invoke via appropriate CLI flags:

  • --add (-A) to create the given network configuration
  • --del (-D) to tear down the given network configuration
  • --check (-C) to check whether the given network configuration was set up correctly

fcnet aims to have sane defaults (for example, defaulting to IPs used by the Ubuntu 22.04 rootfs used in Firecracker CI) and, as such, working with it is easy. Two types of networks are supported:

  • simple, making a tap device in the default netns and connecting it to the Internet (performant, recommended for most use cases)
  • netns, making a netns with a veth pair and a tap device inside, by default connecting to the guest will be possible only in the netns, or you can use --forwarded-guest-ip flag to expose the guest IP in the default netns (requires more rules, but is better for clones and snapshotting)

Examples:

  1. Create a simple network with defaults, assuming wlp1s0 is the name of your host network interface (Wi-Fi card or Ethernet port): fcnet --iface wlp1s0 --add simple (analogously with --check and --del)

  2. Create a netns network without guest IP forwarding and guest having IP 172.16.0.2, assuming wlp1s0 is the name of your host network interface: fcnet --iface wlp1s0 --add netns --guest-ip 172.16.0.2

  3. Create a netns network with the guest IP 172.16.0.2 being accessible at 192.168.0.3 on the default netns: fcnet --iface wlp1s0 --add netns --guest-ip 172.16.0.2 --forwarded-guest-ip 192.168.0.3

fcnet's People

Contributors

kanpov avatar

Watchers

 avatar

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.