sudo brctl addr br0(网桥名称)
yum install cunctl bridge-utils
sudo ifconfig br0(网桥名称) 192.168.31.45 netmask 255.255.255.0(网关)
docker network create -d bridge my-net
sudo ip netns list
sudo ip link # 查看网络端口
sudo ip netns delete test1 # test1 为网络名称
sudo ip netns add test1
sudo ip netns exec test1 ip a
sudo ip netns exec test1 ip link
sudo ip link add veth-test1 type veth peer name vath-test2
sudo ip link set veth-tast1 netns test1
sudo ip netns exec test1 ip addr add 192.168.1.110/24 dev veth-test1
sudo ip netns exec test1 ip link set dev veth-test1 up
容器互联
sudo docker network ls
sudo docker network inspect f975ef670b01(网络id)
sudo yum -y install bridge-utils
brctl show
sudo docker network create -d bridge my-bridge
sudo docker run -d --name test3 --network(指定连接的网络) my-bridge --link test1 busybox /bin/bash -c "while true; do sleep 3600; done"