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, 2019 in Docker by Namik
• 1,230 points

edited Jul 3, 2019 by Namik 1,655 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=  \
  --ip-range= \
  --gateway=  \
  --aux-address="my-router=" \
  -o parent=eth0 macnet32

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

answered Jul 3, 2019 by Sirajul
• 59,090 points

Related Questions In Docker

0 votes
1 answer

How to find a Docker container IP address from the command line?

Hi@akhtar, You can use the docker inspect command ...READ MORE

answered Sep 4, 2020 in Docker by MD
• 95,320 points
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 17, 2018 in Docker by Sophie may
• 10,550 points
+8 votes
19 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
• 7,040 points
+2 votes
1 answer
+2 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
• 58,140 points
+1 vote
2 answers

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

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

answered Aug 28, 2018 in Docker by Damon Salvatore
• 5,980 points
0 votes
1 answer

Can I run docker-compose inside a container?

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

answered Jun 10, 2019 in Docker by Sirajul
• 59,090 points