1. macvlan을 생성한다.
MACVLAN_PARENT_INTERFACE=enx047bcb5e8b20
MACVLAN_SUBNET=192.168.25.0/24
MACVLAN_GATEWAY=192.168.25.1
docker network create -d macvlan --subnet=$MACVLAN_SUBNET --gateway=$MACVLAN_GATEWAY -o parent=$MACVLAN_PARENT_INTERFACE macvlan_network
#고정IP
docker run -itd --name=macvlan_container --network=macvlan_network --ip=192.168.25.100 --mac-address=00:11:22:33:44:55 hello:0.1
#자동IP
docker run -it --name=macvlan_container --network=macvlan_network --mac-address=00:11:22:33:44:55 hello:0.1
댓글 없음:
댓글 쓰기