Docker Network Configuration, custom Bridge network 1. Stop service Service docker stop 2. Turn off docker0 ifconfig docker0 down 3. Remove Docker brctl delbr docker0 4. Add Bridge Br500 yum install bridge-utils 2, Network Configuration [[email protected] network-scripts]# cat ifcfg-br500 device=br500 ONBOOT=yes NM_CONTROLLED=no BOOTPROTO=static type=bridge ipaddr=10.14.23.1 netmask= 255.255.255.0 [[email protected] network-scripts]# cat Ifcfg-p3p2 device=p3p2 onboot=yes nm_controlled=no bootproto =static bridge=br500 3, restart the NIC service netowrk restart5, View network Information ip addr show bridge0 View routing Information:route -n View bridge information: brctl show 6. Add variables: #Centos 6.5 Configuration, the system version is not the same, the configuration is not the same vim /etc/sysconfig /docker other_args= "-b=br500" 7, start Docker service service docker start 8. Launch Docker container service docker restart 9 , Log Related Information 2014/10/08 10:31:55 warning: you are running linux kernel version 2.6.32-431.29.2.el6.x86_64, which might be Unstable running dOcker. please upgrade your kernel to 3.8.0. 2014/10/08 10:31:55 docker daemon: 1.1.2 d84a070/1.1.2; execdriver: native; Graphdriver: [11c90a98] +job serveapi (Unix:///var/run/docker.sock) [11c90a98] +job initserver () [11c90a98.initserver ()] Creating server 2014/10/08 10:31:55 listening for http on unix (/var/run/docker.sock) [11c90a98] +job init_networkdriver () [11c90a98.init_networkdriver ()] bridge not found: bridge500 net: no such interface [11c90a98] -job init_ Networkdriver () = ERR (1) net: no such interface [11c90a98]&Nbsp;-job initserver () = ERR (1) 2014/10/08 10:31:55 net: no such interface \n2014 10 month 08 day Wednesday 10:52:55 CST\n 2014/10/08 10:52:55 WARNING: You are running Linux kernel version 2.6.32-431.29.2.el6.x86_64, which might be unstable running docker. Please upgrade your kernel to 3.8.0. 2014/10/08 10:52:55 docker daemon: 1.1.2 d84a070/1.1.2; execdriver: native; graphdriver: [dabc6783] +job serveapi (unix:///var/run/ Docker.sock) [dabc6783] +job initserver () [ Dabc6783.initserver ()] creating server 2014/10/08 10:52:55 listening for http on unix  (/var/run/docker.sock) [dabc6783] +job init_networkdriver () [dabc6783] -job init_networkdriver () = OK (0) Loading containers: : done. [dabc6783.initserver ()] Creating Pidfile [dabc6783.initserver ()] setting up signal traps [dabc6783] -job initserver () = OK (0) [dabc6783] +job acceptconnections () [dabc6783] -job acceptconnections () = ok (0) 2014/10/08 10:53:17 GET /v1.13/images/json [dabc6783] +job images () [dabc6783] -job images () = OK (0)
This article from "Welcome comments, Welcome to like" blog, please be sure to keep this source http://swq499809608.blog.51cto.com/797714/1561155
Docker network configuration, customizing Bridge networks