Docker Community Forums

Share and learn in the Docker community.

Docker: Error response from daemon: failed to create the ipvlan port: operation not supported


(Iancollins) #1

Hi,
I am getting the above error in the subject after creating an ipvlan docker network.

I am running Docker version 1.13.1, build 092cba3.

on Centos7.3 kernel 4.9.8-1.el7.elrepo.x86_64

The experimental features are enabled:

docker version -f ‘{{.Server.Experimental}}’

true

I have created an ipvlan network using,

docker network create -d ipvlan --subnet=10.240.4.0/22 --gateway=10.240.4.1 --ip-range=10.240.7.1/26 -o parent=eno16777984 -o ipvlan_mode=l2 vnet

(it behaves the same when omitting the iprange).

where the interface for eno16777984 (gotta love interfaces names like that) is,
eno16777984: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.240.4.183 netmask 255.255.252.0 broadcast 10.240.7.255
inet6 fe80::250:56ff:fe8d:463a prefixlen 64 scopeid 0x20
ether 00:50:56:8d:46:3a txqueuelen 1000 (Ethernet)
RX packets 104092 bytes 48484311 (46.2 MiB)
RX errors 0 dropped 39 overruns 0 frame 0
TX packets 18025 bytes 1613223 (1.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

and,

netstat -rn

Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
0.0.0.0 10.240.4.1 0.0.0.0 UG 0 0 0 eno16777984
10.240.4.0 0.0.0.0 255.255.252.0 U 0 0 0 eno16777984
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0

The docker network inspection is:

docker network inspect vnet

[
{
“Name”: “vnet”,
“Id”: “5534760ac346e11878867b54310cf183ed6f394c2f81e56ca12ed29a205b66bb”,
“Created”: “2017-02-09T12:43:11.184192607+13:00”,
“Scope”: “local”,
“Driver”: “ipvlan”,
“EnableIPv6”: false,
“IPAM”: {
“Driver”: “default”,
“Options”: {},
“Config”: [
{
“Subnet”: “10.240.4.0/22”,
“IPRange”: “10.240.7.1/26”,
“Gateway”: “10.240.4.1”
}
]
},
“Internal”: false,
“Attachable”: false,
“Containers”: {},
“Options”: {
“parent”: “eno16777984”
},
“Labels”: {}
}
]

When I run a container, e.g.

docker run -it --net=vnet --rm ubuntu:14.04 /bin/bash

I get the error,
docker: Error response from daemon: failed to create the ipvlan port: operation not supported.

Could anyone offer any ideas?

Regards,
Ian


(Sunbowchen) #2

Same here. I met this issue on openstack Ubuntu 16.04 instance. Under the same environment, I can created macvlan network and connect container to that macvlan network. I tried to change a little bit with ipvlan options, but it didn’t work. CLI always return that error. It seems this happens with the go function LinkAdd, but don’t have time to dig in.


(Bwstitt) #3

Also ran into this on Ubuntu 16.04

Has anyone figured out how to make a host able to connect to container that has a macvlan network? I tried using ipvlan to work around that, but it failed. https://sreeninet.wordpress.com/2016/05/29/docker-macvlan-and-ipvlan-network-plugins/ and other blog posts claim it is possible, but I can’t get it to work.