All Projects → CameronNemo → Brmgr

CameronNemo / Brmgr

Licence: lgpl-2.1
Manage bridge devices and provide DHCP and DNS services to connected interfaces.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Brmgr

Verwalter
A tool which manages cluster of services
Stars: ✭ 34 (+209.09%)
Mutual labels:  networking, containers
Ops
Tools&scripts for daily devops.
Stars: ✭ 128 (+1063.64%)
Mutual labels:  networking, containers
Cilium
eBPF-based Networking, Security, and Observability
Stars: ✭ 10,256 (+93136.36%)
Mutual labels:  networking, containers
Nff Go
NFF-Go -Network Function Framework for GO (former YANFF)
Stars: ✭ 1,036 (+9318.18%)
Mutual labels:  networking, containers
Kelda
Kelda is an approachable way to deploy to the cloud.
Stars: ✭ 433 (+3836.36%)
Mutual labels:  networking, containers
Awesome Scalability Toolbox
My opinionated list of products and tools used for high-scalability projects
Stars: ✭ 34 (+209.09%)
Mutual labels:  networking, containers
Tanya
GC-free, high-performance D library: Containers, networking, metaprogramming, memory management, utilities
Stars: ✭ 70 (+536.36%)
Mutual labels:  networking, containers
Felix
Project Calico's per-host agent Felix, responsible for programming routes and security policy.
Stars: ✭ 871 (+7818.18%)
Mutual labels:  networking, containers
Devops Guide
DevOps Guide - Development to Production all configurations with basic notes to debug efficiently.
Stars: ✭ 4,119 (+37345.45%)
Mutual labels:  networking, containers
Cni
Container Network Interface - networking for Linux containers
Stars: ✭ 3,907 (+35418.18%)
Mutual labels:  networking, containers
Dlib
Allocators, I/O streams, math, geometry, image and audio processing for D
Stars: ✭ 182 (+1554.55%)
Mutual labels:  networking, containers
Pavlos
A light-weight container runtime for Linux with NVIDIA gpu support, allows developers to quicky setup development environments for dev and test. Pavlos can emulate any Linux rootfs image as a container.
Stars: ✭ 22 (+100%)
Mutual labels:  networking, containers
Netplugin
Container networking for various use cases
Stars: ✭ 497 (+4418.18%)
Mutual labels:  networking, containers
Sdn Handbook
SDN网络指南(SDN Handbook)
Stars: ✭ 856 (+7681.82%)
Mutual labels:  networking, containers
Protobuf Swift
Google ProtocolBuffers for Apple Swift
Stars: ✭ 925 (+8309.09%)
Mutual labels:  networking
Kilo
Kilo is a multi-cloud network overlay built on WireGuard and designed for Kubernetes (k8s + wg = kg)
Stars: ✭ 845 (+7581.82%)
Mutual labels:  networking
Shrine
A TempleOS distro for heretics
Stars: ✭ 922 (+8281.82%)
Mutual labels:  networking
Kitura On Kubernetes
Develop a Full-Stack Swift application with a native iOS app and Kitura on Kubernetes
Stars: ✭ 24 (+118.18%)
Mutual labels:  containers
Ubernet
Flexible networking library for Unity
Stars: ✭ 10 (-9.09%)
Mutual labels:  networking
Ansible Role Docker
Ansible Role - Docker
Stars: ✭ 845 (+7581.82%)
Mutual labels:  containers

brmgr

This project leverages dnsmasq, iproute2, and iptables to manage virtual bridge devices for use with containers or virtual machines.

The brmgr-pre and brmgr-post tools are responsible for creating and tearing down the bridges. The brmgr tool is a wrapper around dnsmasq, which offers DHCP and DNS services to hosts connected to the bridge.

Installation

To install, just run make install. You may wish to change the install prefix, which is /usr/local by default, by setting the $PREFIX variable.

# make install PREFIX=/usr

Runtime dependencies include: iproute2, iptables, and dnsmasq.

If you are also running dnsmasq as a system service, you need to ensure that it does not conflict with brmgr. A config snippet is installed in /etc/dnsmasq.d to achieve this. Verify that the system dnsmasq instance is configured to use the snippet.

Configuring the bridge

The default configuration is found at $sysconfdir/brmgr/brmgr0.conf. Review and edit it as necessary.

# vim /etc/brmgr/brmgr0.conf

Note: The default subnet is 10.0.1.0/24; you may wish to change this and/or add an IPV6 subnet.

When you are ready, enable the service.

With systemd:

# systemctl enable [email protected]

Or with runit:

# ln -s /etc/sv/brmgr-brmgr0 /var/service

Configuring containers to use the bridge

Configure a veth interface in your containers and link it to the bridge set up by this package by including the following keys:

lxc.net.0.type = veth
lxc.net.0.link = brmgr0
lxc.net.0.name = eth0
lxc.net.0.hwaddr = ee:ec:fa:e9:56:7d
lxc.net.0.ipv4.gateway = auto
lxc.net.0.flags = up
# DHCP (default)
lxc.net.0.ipv4.address = 0.0.0.0
# Have LXC manage the dhclient
#lxc.hook.start-host = /usr/share/lxc/hooks/dhclient
#lxc.hook.stop = /usr/share/lxc/hooks/dhclient
# Static configuration
#lxc.net.0.ipv4.address = 10.0.1.2/24

Or simply:

lxc.include = @[email protected]/share/brmgr/lxc.container.conf

Where @[email protected] is /usr/local or the option used at install time.

Configuring QEMU/KVM to use the bridge

To use the bridge with QEMU, add the following to the command arguments:

-netdev bridge,id=lan0,br=brmgr0 -device virtio-net-pci,netdev=lan0

If you are running your VMs as an unprivileged user, you must add the line

allow brmgr0

to /etc/qemu/bridge.conf.

Replace brmgr0 with the name of the bridge you configured, if necessary.

DHCP

Unless LXC is managing dhclient or a static IP is in use, a DHCP client will need to run in the guest. This is often done by network configuration services such as dhcpcd, ifupdown, systemd-networkd, or NetworkManager, but in a lightweight container environment these may not be available.

It would be best to manage the dhclient with a service manager such as systemd or runit, but you can run it from the command line if necessary.

# dhclient

You may also need to add a nameserver to /etc/resolv.conf:

# echo "nameserver [addr]" >> /etc/resolv.conf

Replace [addr] with the gateway address (address of the bridge).

Starting brmgr

Current supported service managers are systemd, OpenRC, Runit, and Upstart. Contribution of an LSB init script is quite welcome and likely simple to write.

With systemd:

# systemctl start [email protected]

With runit:

# sv up brmgr-brmgr0

With Upstart:

# start brmgr MATCH=/etc/brmgr/brmgr0.conf
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].