Skip to content

Instantly share code, notes, and snippets.

Brent Salisbury nerdalert

Block or report user

Report or block nerdalert

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View macvlan-global.md

Macvlan Global Driver

Setup

  • The same functionality is preserved as in the instructions in the experimental Macvlan README. To run the driver locally dockerd daemon label is used for local driver registration like so: dockerd --label com.docker.network.driver.macvlan=local

  • By running the drivers globally it enables the user to have globally distributed IPAM and DNS support via the libnetwork IPAM/DNS excellence.

  • To run the PoC binary download this tar and extract to the /usr/bin/ directory from here: dockerd-binaries Note: (backup your Docker binaries prior if you dont want them overwritten by the extracted binaries).

View vlan_ip_link_example.md
View upgrade_iproute2_instructions.sh
# DL the src code from http://www.kernel.org/pub/linux/utils/net/iproute2/
# Ubuntu 4.0.0-1:
apt-get install -y libdb4o-cil-dev libdb-dev bison flex build-essential gcc module-init-tools
wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.1.1.tar.xz
tar xvf iproute2-4.1.1.tar.xz
cd iproute2-4.1.1
make
# This will build the new `ip` binary in the ip directory.
# Next backup your old ip binary if you want:
View docker-experimental-dhcp-ipam-driver.md

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

View Docker_Swarm_Network_Event_API_Stream.md

Example Viewing Docker Events via the Swarm/Docker API Event Stream

QuickStart

Example Docker event stream:

# (Optionally) grab the latest experimental for Macvlan/Ipvlan.
$ wget https://experimental.docker.com/builds/Linux/x86_64/docker-latest
View gistify653521.sh
####################################
# Macvlan Bridge Mode with Netlink #
####################################
#!/bin/bash
# add the namespaces
ip netns add ns1
ip netns add ns2
View macvlan_ipvlan_simple_docker_examples.md
  • Host configuration is two interfacces:
$ ip a show eth0
   eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
       link/ether 00:50:56:2b:29:40 brd ff:ff:ff:ff:ff:ff
       inet 172.16.86.151/24 brd 172.16.86.255 scope global eth0
       
$ ip a show eth1
View docker-macvlan-ipvlan-examples.md

Docker Macvlan and Ipvlan Experimental Driver Examples

  • The build will be vendored into github.com/docker/docker in the next few days. In the meantime here is the binary that will be getting vendored. docker-1.11.0-dev.zip
  • Ipvlan L2 mode network with multiple subnets without a parent specified
  • For a long test that will create 54 networks and 120+ containers, then delete them all and recreate them again try ipvlan-macvlan-it.sh Instructions here Docker Macvlan and Ipvlan Manual IT Test
  • FYI Note: When the parent is empty or the --internal flag is used, a linux type dummy interface is dynamically created by Libnetwork to act as the parent. This network is completely isolated and is the equivalent to a --internal flag. This is a good mode for demoing.
  • The first test requires an interface
View vmware-fusion-hgfs-share-fix.sh
#!/bin/sh
#
# Fixes the Vmware Fusion hgfs shared drive mounts not working with tested kernels 4.0-4.3
#
git clone https://github.com/rasa/vmware-tools-patches.git
sleep 1
cd vmware-tools-patches
# 8.0.0 is the fusion ver. Change to to whatever fusion version you ahve
./download-tools.sh 8.0.0
You can’t perform that action at this time.