Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

genuinetools/netns

Repository files navigation

netns

make-all make-image GoDoc Github All Releases

Runc hook for setting up default bridge networking.

Table of Contents

Installation

Binaries

For installation instructions from binaries please visit the Releases Page.

Via Go

$ go get github.com/genuinetools/netns

Usage

$ netns -h
netns - Runc hook for setting up default bridge networking.
Usage: netns <command>
Flags:
 --ipfile file in which to save the containers ip address (default: .ip)
 --mtu mtu for bridge (default: 1500)
 --state-dir directory for saving state, used for ip allocation (default: /run/github.com/genuinetools/netns)
 --bridge name for bridge (default: netns0)
 -d enable debug logging (default: false)
 --iface name of interface in the namespace (default: eth0)
 --ip ip address for bridge (default: 172.19.0.1/16)
Commands:
 create Create a network.
 ls List networks.
 rm Delete a network.
 version Show the version information.

Place this in the Hooks.Prestart field of your runc config.

{
 ...
 "hooks": {
 "prestart": [
 {
 "path": "/path/to/netns"
 }
 ]
 },
 ...
}

List network namespaces

$ sudo netns ls
IP LOCAL VETH PID STATUS
172.19.0.3 netnsv0-21635 21635 running
172.19.0.4 netnsv0-21835 21835 running
172.19.0.5 netnsv0-22094 22094 running
172.19.0.6 netnsv0-25996 25996 running

About

Runc hook (OCI compatible) for setting up default bridge networking for containers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 12

AltStyle によって変換されたページ (->オリジナル) /