Posts

Showing posts from June, 2017

VLAN’s for Docker containers using OVS

Image
In this post, I am going to show you how to connect docker containers to OVS and add them to separate VLANS. I am using Centos 7 logged in as superuser. Step 1: Install Open vSwitch Install open vswitch using the command # yum install openvswitch Step 2: Install ovs-docker utility To connect docker containers to open vswitch we need this utility # cd /usr/bin # wget  https://raw.githubusercontent.com/openvswitch/ovs/master/utilities/ovs-docker # chmod a+rwx ovs-docker Step 3: Create and Configure OVS bridge Add a bridge to ovs # ovs-vsctl add-br br0 Configure IP address to the bridge and change its state to up # ifconfig br0 172.19.1.1 netmask 255.255.255.0 up Step 4: Run four containers in docker I am using four alpine Linux containers for this demonstration # docker run -itd --name container1 alpine # docker run -itd --name container2 alpine # docker run -itd --name container3 alpine # docker run -itd --name container4 alpine ...

User defined network in Docker with an Example

Image
Hello, my name is Sai Ram Peesapati and in this post I am going to walk you through user defined network in docker. I hope by now you know what is docker if not click here to know about it. Docker by default comes with three networks, they are none, bridge and host. if you want to learn more about them click here . But docker also gives you privilege to create your own network and called them as user defined network. What is user defined network? A network which is created by the user, so that containers which are running in that network can talk to each other without using the legacy link . User defined networks will have automatic DNS resolution of container names to IP addresses, because of this containers can talk to each other.  If you already have docker in your computer you are good to go but if you don't have it, no problem click here and follow the installation steps for your operating system. Now let's start running your first container in user define...