Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDN model with iproute2 (w/o Open vSwitch) #16

Open
araobp opened this issue Mar 16, 2016 · 5 comments
Open

SDN model with iproute2 (w/o Open vSwitch) #16

araobp opened this issue Mar 16, 2016 · 5 comments

Comments

@araobp
Copy link
Owner

araobp commented Mar 16, 2016

I don't want to run OVSDB in my containers any longer to simplify the architecture.

I just use Linux bridges and Linux-native tunnels such as tuntap or VXLAN.

Something like this:
new arch

@araobp
Copy link
Owner Author

araobp commented Mar 20, 2016

However, using MACVLAN is more practical.
newarch2

@araobp
Copy link
Owner Author

araobp commented Mar 20, 2016

$ modprobe macvlan
$ lsmod | grep macvlan
macvlan                16088  0
$ docker inspect --format '{{.State.Pid}}' lf6
1282
$ docker inspect --format '{{.State.Pid}}' lf5
977
$ nsenter  -t 1282 -n date
Sun Mar 20 15:35:52 CET 2016
$ ln -s /proc/1282/ns/net /var/run/netns/lf6
$ ln -s /proc/977/ns/net /var/run/netns/lf5
$ ip netns show
lf5
lf6
$ ip link add link eth0 dev macvlan-lf5 type macvlan
$ ip link add link eth0 dev macvlan-lf6 type macvlan
$ ip link set dev macvlan-lf5 netns lf5
$ ip link set dev macvlan-lf6 netns lf6
$ nsenter -t 1282 -n ip link show dev macvlan-lf6
20: macvlan-lf6@ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default
    link/ether 6e:9c:fd:d8:eb:4b brd ff:ff:ff:ff:ff:ff
root@lf5:~# ip link set macvlan-lf5 name eth1 mode bridge
root@lf5:~# ip addr add 192.168.57.100/24 dev eth1
root@lf5:~# ip link set dev eth1 up
root@lf6:~# ip link set macvlan-lf6 name eth1 mode bridge
root@lf6:~# ip addr add 192.168.57.101/24 dev eth1
root@lf6:~# ip link set dev eth1 up

@araobp
Copy link
Owner Author

araobp commented Mar 21, 2016

IPROUTE2 cheat sheet: http://baturin.org/docs/iproute2/

@araobp araobp changed the title Migrating to a new architecture SDN model with iproute2 (w/o Open vSwitch) Mar 21, 2016
@araobp
Copy link
Owner Author

araobp commented Mar 21, 2016

At first, I have made this (GRE over docker0): dfa6e78
GRE

@araobp
Copy link
Owner Author

araobp commented Mar 22, 2016

netns is supported by this commit: a5b3abf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant