Can I exclude a IP address from a MacVLAN network ?

0 votes
I am already using a given IP address. Can I exclude it from  MacVLAN Network? If Yes, How?
Jul 3 in Docker by Namik
• 1,200 points

edited Jul 3 by Namik 36 views

1 answer to this question.

0 votes

Yes, this is certainly possible.

If you need to exclude IP addresses from being used in the Macvlan network, such as when a given IP address is already in use, use --aux-addresses as shown in the code snippet below:

$ docker network create -d macvlan  \
  --subnet=192.168.32.0/24  \
  --ip-range=192.168.32.128/25 \
  --gateway=192.168.32.254  \
  --aux-address="my-router=192.168.32.129" \
  -o parent=eth0 macnet32

For a futher understanding of MacVLAN networks in docker, you could refer to:

https://docs.docker.com/network/macvlan/

answered Jul 3 by Sirajul
• 25,180 points

Related Questions In Docker

0 votes
1 answer

How to obtain the Docker container's IP address from the host?

This can be done by executing the ...READ MORE

answered Jul 16, 2018 in Docker by Sophie may
• 9,530 points
388 views
+1 vote
11 answers
0 votes
2 answers

How can I inspect the file system of a failed `docker build

Failed command is a build that has ...READ MORE

answered Aug 6, 2018 in Docker by Nilesh
• 6,880 points
75 views
0 votes
1 answer

how do I create an image from a tar archive in docker?

You can use docker load command inorder to get ...READ MORE

answered Jul 2 in Docker by Sirajul
• 25,180 points
44 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,520 points
150 views
0 votes
1 answer

How do I copy a file from docker container to host?

Here is a way which you can ...READ MORE

answered Aug 27, 2018 in Docker by Damon Salvatore
• 5,510 points
2,381 views
0 votes
1 answer

Can I run docker-compose inside a container?

Compose can also be run inside a ...READ MORE

answered Jun 10 in Docker by Sirajul
• 25,180 points
162 views