Signed-off-by: Madhu Venugopal <madhu@docker.com>
Madhu Venugopal authored on 2016/03/25 08:19:59... | ... |
@@ -157,8 +157,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpvlanOverlapParent(c *check.C) { |
157 | 157 |
|
158 | 158 |
func (s *DockerNetworkSuite) TestDockerNetworkMacvlanMultiSubnet(c *check.C) { |
159 | 159 |
// create a dual stack multi-subnet Macvlan bridge mode network and validate connectivity between four containers, two on each subnet |
160 |
- testRequires(c, DaemonIsLinux, MacvlanKernelSupport, NotUserNamespace, NotArm) |
|
161 |
- dockerCmd(c, "network", "create", "--driver=macvlan", "--subnet=172.28.100.0/24", "--subnet=172.28.102.0/24", "--gateway=172.28.102.254", |
|
160 |
+ testRequires(c, DaemonIsLinux, IPv6, MacvlanKernelSupport, NotUserNamespace, NotArm) |
|
161 |
+ dockerCmd(c, "network", "create", "--driver=macvlan", "--ipv6", "--subnet=172.28.100.0/24", "--subnet=172.28.102.0/24", "--gateway=172.28.102.254", |
|
162 | 162 |
"--subnet=2001:db8:abc2::/64", "--subnet=2001:db8:abc4::/64", "--gateway=2001:db8:abc4::254", "dualstackbridge") |
163 | 163 |
// Ensure the network was created |
164 | 164 |
assertNwIsAvailable(c, "dualstackbridge") |
... | ... |
@@ -212,8 +212,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkMacvlanMultiSubnet(c *check.C) { |
212 | 212 |
|
213 | 213 |
func (s *DockerNetworkSuite) TestDockerNetworkIpvlanL2MultiSubnet(c *check.C) { |
214 | 214 |
// create a dual stack multi-subnet Ipvlan L2 network and validate connectivity within the subnets, two on each subnet |
215 |
- testRequires(c, DaemonIsLinux, IpvlanKernelSupport, NotUserNamespace, NotArm) |
|
216 |
- dockerCmd(c, "network", "create", "--driver=ipvlan", "--subnet=172.28.200.0/24", "--subnet=172.28.202.0/24", "--gateway=172.28.202.254", |
|
215 |
+ testRequires(c, DaemonIsLinux, IPv6, IpvlanKernelSupport, NotUserNamespace, NotArm) |
|
216 |
+ dockerCmd(c, "network", "create", "--driver=ipvlan", "--ipv6", "--subnet=172.28.200.0/24", "--subnet=172.28.202.0/24", "--gateway=172.28.202.254", |
|
217 | 217 |
"--subnet=2001:db8:abc8::/64", "--subnet=2001:db8:abc6::/64", "--gateway=2001:db8:abc6::254", "dualstackl2") |
218 | 218 |
// Ensure the network was created |
219 | 219 |
assertNwIsAvailable(c, "dualstackl2") |
... | ... |
@@ -266,8 +266,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpvlanL2MultiSubnet(c *check.C) { |
266 | 266 |
|
267 | 267 |
func (s *DockerNetworkSuite) TestDockerNetworkIpvlanL3MultiSubnet(c *check.C) { |
268 | 268 |
// create a dual stack multi-subnet Ipvlan L3 network and validate connectivity between all four containers per L3 mode |
269 |
- testRequires(c, DaemonIsLinux, IpvlanKernelSupport, NotUserNamespace, NotArm) |
|
270 |
- dockerCmd(c, "network", "create", "--driver=ipvlan", "--subnet=172.28.10.0/24", "--subnet=172.28.12.0/24", "--gateway=172.28.12.254", |
|
269 |
+ testRequires(c, DaemonIsLinux, IPv6, IpvlanKernelSupport, NotUserNamespace, NotArm, IPv6) |
|
270 |
+ dockerCmd(c, "network", "create", "--driver=ipvlan", "--ipv6", "--subnet=172.28.10.0/24", "--subnet=172.28.12.0/24", "--gateway=172.28.12.254", |
|
271 | 271 |
"--subnet=2001:db8:abc9::/64", "--subnet=2001:db8:abc7::/64", "--gateway=2001:db8:abc7::254", "-o", "ipvlan_mode=l3", "dualstackl3") |
272 | 272 |
// Ensure the network was created |
273 | 273 |
assertNwIsAvailable(c, "dualstackl3") |
... | ... |
@@ -325,8 +325,8 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpvlanL3MultiSubnet(c *check.C) { |
325 | 325 |
|
326 | 326 |
func (s *DockerNetworkSuite) TestDockerNetworkIpvlanAddressing(c *check.C) { |
327 | 327 |
// Ensure the default gateways, next-hops and default dev devices are properly set |
328 |
- testRequires(c, DaemonIsLinux, IpvlanKernelSupport, NotUserNamespace, NotArm) |
|
329 |
- dockerCmd(c, "network", "create", "--driver=macvlan", "--subnet=172.28.130.0/24", |
|
328 |
+ testRequires(c, DaemonIsLinux, IPv6, IpvlanKernelSupport, NotUserNamespace, NotArm) |
|
329 |
+ dockerCmd(c, "network", "create", "--driver=macvlan", "--ipv6", "--subnet=172.28.130.0/24", |
|
330 | 330 |
"--subnet=2001:db8:abca::/64", "--gateway=2001:db8:abca::254", "-o", "macvlan_mode=bridge", "dualstackbridge") |
331 | 331 |
assertNwIsAvailable(c, "dualstackbridge") |
332 | 332 |
dockerCmd(c, "run", "-d", "--net=dualstackbridge", "--name=first", "busybox", "top") |
... | ... |
@@ -341,7 +341,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpvlanAddressing(c *check.C) { |
341 | 341 |
|
342 | 342 |
// Verify ipvlan l2 mode sets the proper default gateway routes via netlink |
343 | 343 |
// for either an explicitly set route by the user or inferred via default IPAM |
344 |
- dockerCmd(c, "network", "create", "--driver=ipvlan", "--subnet=172.28.140.0/24", "--gateway=172.28.140.254", |
|
344 |
+ dockerCmd(c, "network", "create", "--driver=ipvlan", "--ipv6", "--subnet=172.28.140.0/24", "--gateway=172.28.140.254", |
|
345 | 345 |
"--subnet=2001:db8:abcb::/64", "-o", "ipvlan_mode=l2", "dualstackl2") |
346 | 346 |
assertNwIsAvailable(c, "dualstackl2") |
347 | 347 |
dockerCmd(c, "run", "-d", "--net=dualstackl2", "--name=second", "busybox", "top") |
... | ... |
@@ -355,7 +355,7 @@ func (s *DockerNetworkSuite) TestDockerNetworkIpvlanAddressing(c *check.C) { |
355 | 355 |
c.Assert(out, checker.Contains, "default via 2001:db8:abcb::1 dev eth0") |
356 | 356 |
|
357 | 357 |
// Validate ipvlan l3 mode sets the v4 gateway to dev eth0 and disregards any explicit or inferred next-hops |
358 |
- dockerCmd(c, "network", "create", "--driver=ipvlan", "--subnet=172.28.160.0/24", "--gateway=172.28.160.254", |
|
358 |
+ dockerCmd(c, "network", "create", "--driver=ipvlan", "--ipv6", "--subnet=172.28.160.0/24", "--gateway=172.28.160.254", |
|
359 | 359 |
"--subnet=2001:db8:abcd::/64", "--gateway=2001:db8:abcd::254", "-o", "ipvlan_mode=l3", "dualstackl3") |
360 | 360 |
assertNwIsAvailable(c, "dualstackl3") |
361 | 361 |
dockerCmd(c, "run", "-d", "--net=dualstackl3", "--name=third", "busybox", "top") |