Giter VIP home page Giter VIP logo

container-networking's Introduction

Container Networking

Examples of creating a network of linux containers (network namespaces).

1 - Network Namespace

2 - Single Node

3 - Multi Node

4 - Overlay Network

Installation

OSX

brew cask install virtualbox
brew cask install vagrant
vagrant plugin install vagrant-vbguest

Linux

sudo apt-get install virtualbox
sudo apt-get install vagrant
vagrant plugin install vagrant-vbguest

Setup

To bring up the VMs for all examples:

make vagrant-up

Status

To check the status of the VMs for all examples:

make vagrant-status

Test

To run the tests for all examples:

make test

Teardown

To destroy the VMs for all of the examples:

make vagrant-destroy

Talks: 'Container Networking From Scratch'

References

https://blog.scottlowe.org/2013/09/04/introducing-linux-network-namespaces/

container-networking's People

Contributors

kristenjacobs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

container-networking's Issues

Container to Container on same/different node not working

Hi Kristen, I was trying your samples and noticed that container to container communication is not working for lab 2,3 as well as the Overlay scenario. Could it be because I am using a Cloud Linux VM's which may have inbuilt rules to disallow that. But even on my machine (win 10 with WSL) I could not get container to container communication working. I was able to ping the bridge/host successfully from the containers but not among between them on same node or different node with Overlay.

tun device setup is failing

sudo socat TUN:$TUNNEL_IP/16,iff-up UDP:$TO_NODE_IP:9000,bind=$NODE_IP:9000 &

This command expects a UDP server to be running on the target node ($TO_NODE_IP) on port 9000. Otherwise, we get the following error:

$ sudo socat TUN:$TUNNEL_IP/16,iff-up UDP:$TO_NODE_IP:9000,bind=$NODE_IP:9000
2024/06/10 05:27:47 socat[4826] E read(7, 0x5e426d5e2000, 8192): Connection refused

I tried running a small UDP echo server on both nodes on port 9000 and slightly modified the socat command in setup.sh to make it work-

$ sudo socat TUN:$TUNNEL_IP/16,iff-up UDP:$TO_NODE_IP:9000,bind=$NODE_IP:9001

Is there any misunderstanding? Shall I send a pull request?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.