Skip to content

Docker Network Plugin for creating host network based on veth

License

Notifications You must be signed in to change notification settings

evsinev/docker-network-veth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker Network Driver Plugin for veth

Debugging

Run io.pne.veth.server.ServerApplication

Create /etc/docker/plugins/veth.spec with the content shows below:

tcp://localhost:9090

Create Docker Network dns-1-network:

docker network create \
    --driver  veth \
    --subnet  192.168.4.0/24 \
    --gateway 192.168.4.1 \
    -o ip.pne.veth.interface.prefix=dns-1 \
    dns-1-network

Run container dns-1:

docker run -it --rm \
    --name dns-1  \
    --ip 192.168.3.2 \
    --mac-address 62:7b:0b:7d:54:8d \
    --network dns-1 \
    alpine /bin/sh

How the Plugin creates the network

ip link add name dns-1.h type veth peer name dns-1.c
ip link set dev dns-1.c address 62:7b:0b:7d:54:8d
ip addr add dev dns-1.h 192.168.3.1/24
ip link set dev dns-1.h up

Remote API Overview

Create Network

Create Network

Create Endpoint

Create Endpoint

About

Docker Network Plugin for creating host network based on veth

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages