标签:ado logs project margin blog set add 51cto http
OVS+Docker网络打通docker 基础环境
host0 host1 本地网卡:192.168.56.10 192.168.56.11 docker0网卡:172.17.10.0/24 172.17.20.0/24
docker实现内部的私有网络互通
rpm -ivh http://downloads.naulinux.ru/pub/NauLinux/7x/x86_64/Extras/RPMS/Projects/OpenFlow/openvswitch-2.5.0-2.el7.x86_64.rpm
systemctl start openvswitch.service #all server ovs-vsctl add-br br0 ########新建一个br0 网桥######## #all server ip link set dev br0 up #########开启br0 网桥########## #all server ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre options:remote_ip=192.168.56.11 ###将虚拟接口加入网桥###设置接口类型##对端IP地址 hosts0 ovs-vsctl add-port br0 gre0 -- set Interface gre0 type=gre options:remote_ip=192.168.56.10 ##### hosts1 brctl addif docker0 br0 ##################将docker0 网桥加入br0 网桥########## #all server ovs-vsctl show
ip route add 172.17.10.0/24 dev docker0 #####添加到host1 的路由条目########## #host1 ip route add 172.17.20.0/24 dev docker0 #####添加到host0 的路由条目########## #host0
标签:ado logs project margin blog set add 51cto http
原文地址:http://blog.51cto.com/wsxxsl/2060781