标签:lxc

发表于
lxc类型的容器如何使用Open vSwitch做网络底层呢? 假设底层是ovs, 网桥是ovsbr0,容器已经启动,docker的底层是lxc 查看容器: ps axww --forest 找到-f 后面的配置文件: /var/lib/docker/containers/19ab1b6edd1635159095f3a59f4dab0c1e71f6512282156620fd532ca6446db8/config.lxc 编辑修改网络部分: # vi /var/lib/docker/containers/ae5bfe8ac3567d545c9a0dc64c30cbbdd5ae67466be0b44bd462a4815fbee11d lxc.network.type = veth lxc.network.flags = up lxc.network.link = lxcbr0 并增加以下三行,注意ovs port name: lxc.network.script.up = /etc/network/if-up.d/...
发表于
转自:https://blog.flameeyes.eu/2010/09/linux-containers-and-networking 以下只说明了veth和macvlan两种模式,phy和vlan不涉及。 Linux Containers and Networking So, at the moment I start writing this (and that’s unlikely to be the time I actually post this, given that I see now it could use some drawings) it’s early in the morning...
发表于
我们启动docker容器后,如果要固定容器的IP,可能会用到pipwork这个脚本,下面简单说一下过程: 网络环境如下,物理机的eth0口接上端交换机,本地起br0网桥连接到eth0: 运行docker,用pipwork固定ip: docker run -d -name=container_name container_image pipework br0 container_name ip/prefix_len@gateway 其实pipework是建立了一个netns,然后手动生成了一块虚拟网卡,然后在netns空间内设置IP,具体如下: 先起个随机名字、不重复的一块网卡: GUEST_IFNAME=ph$NSPID$eth1 把这块网卡挂接到系统的Bridge br0上,并且指定netns命名空间 ip link add link br0 dev $GUEST_IFNAME type macvlan mode...
发表于
Daily Dilemma Recently I’ve been finding myself in various conversations about Docker and Linux Containers (LXC). Most of the time the conversations eventually end up with one and the same question and that is whether we should run containers in production. Initially this post had a few paragraphs...