Skip to content

Instantly share code, notes, and snippets.

@nerdalert
Last active March 13, 2016 01:28
Show Gist options
  • Save nerdalert/686d978450ae98e43bc1 to your computer and use it in GitHub Desktop.
Save nerdalert/686d978450ae98e43bc1 to your computer and use it in GitHub Desktop.
  1. Pre-req: docker daemon -D running with no networks that will overlap with tests. Pretty much 192.168.0.0/16 and the PR #964 compiled with experimental Docker or download this docker experimental binary including the drivers: docker-1.11.0-dev.zip.

  2. Pull script and give it executable permissions:

curl -o vlan-tests.sh \
    https://raw.githubusercontent.com/nerdalert/dotfiles/master/ipvlan-macvlan-it.sh && \ 
    chmod +x vlan-tests.sh
  • View the test output here
  1. With the docker daemon -D running, start the script you just downloaded ./vlan-tests.sh. If you don't have an ethernet device on your docker host named eth0, edit the 11th line in the script from ETH=${ETH:-eth0} to ETH=${ETH:-NAME_OF_YOUR_ETHERNET_DEV_GOES_HERE}

  2. The test will create 54 networks and 123 containers, then delete them all, and then repeat the test again by creating all of the networks.

  • The reason for running the test twice is to ensure things were released the first time such as IPAM pools and address assignments. The test will also create manual ip link links so as to test the scenario of passing in existing links and not deleting them when the docker network is deleted as described in the PR notes: Manually Creating 802.1q Links
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment