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,210 points

edited Jul 3, 2019 by Namik 335 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
• 50,530 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,940 points
+1 vote
12 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,960 points
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, 2019 in Docker by Sirajul
• 50,530 points
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
• 57,530 points
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,540 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
• 50,530 points