Docker之修改docker0网桥

  • A+
所属分类:Docker
[root@DT_Node-172_30_7_233 ~]# systemctl stop docker.service 
[root@DT_Node-172_30_7_233 ~]# ip link set docker0 down 
[root@DT_Node-172_30_7_233 ~]# brctl delbr docker0
[root@DT_Node-172_30_7_233 ~]# iptables -t nat -F POSTROUTING
[root@DT_Node-172_30_7_233 ~]# brctl addbr docker0
[root@DT_Node-172_30_7_233 ~]# ip addr add 172.31.248.1/21 dev docker0              
[root@DT_Node-172_30_7_233 ~]# ip link set docker0 up
[root@DT_Node-172_30_7_233 ~]# cat /etc/docker/daemon.json
{
  "bip": "172.31.248.1/16"
}
[root@DT_Node-172_30_7_233 ~]# systemctl restart docker.service

Docker之修改docker0网桥

lookback

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: