docker创建macvlan与ipvlan

docker network create -d 网络类型  --subnet IP段/掩码 --gateway 网关 -o parent=网卡名称 网络名称

 

#创建macvlan
docker network create -d macvlan --subnet 172.26.100.0/24 --gateway 172.26.100.1 -o parent=enp8s0f0 ydc1

 

 

#创建ipvlan
docker network create -d ipvlan --subnet 172.26.88.0/24 --gateway 172.26.88.1 -o parent=enp130s0f1 moecdn_ipvlan

posted @ 2023-01-31 20:52  cansin  阅读(25)  评论(0编辑  收藏  举报