moby / moby/libnetwork

Allow to use overlapping subnets for macvlan networks

Open
#2,334 20 comments 24 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
875
PR merge metrics
No merged PRs in 30d

Description

According to pull request #2148 there is a pool overlapping check added.
But check is not necessary when we use a macvlan driver for networks.

Now I've got an error

18.03.1-ce-0-ubuntu:
λ: docker network create -d macvlan \
>     --subnet=10.0.10.0/24 \
>     -o parent=eth1.10 \
>     macvlan10
eda930768dff1c77e6fcf7935fce2a6e066a5ea22d63452c764042b67fbc99ed
~
λ: 
~
λ: docker network create -d macvlan \
>     --subnet=10.0.10.0/24 \
>     -o parent=eth2.10 \
>     macvlan20
81f73d1ef978b030d541bf46d4f91320cf5e77e81d6bdd9449bf54d2607605e5
~
λ: 
18.09.1-ce-0-ubuntu:
~
λ: docker network create -d macvlan \
>     --subnet=10.0.10.0/24 \
>     -o parent=eth1.10 \
>     macvlan10
a89201f74726423b95b38c76a7aeb131101f8e2ff3937f78592da06350710cc0
~
λ: 
~
λ: docker network create -d macvlan \
>     --subnet=10.0.10.0/24 \
>     -o parent=eth2.10 \
>     macvlan20
Error response from daemon: Pool overlaps with other one on this address space
~
λ: 

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review pull request #2148 and the network creation path responsible for the “Pool overlaps” error. Reproduce the two macvlan commands using separate parent interfaces, then verify that identical subnets are accepted for macvlan networks without weakening overlap checks for other drivers.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.