Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mutiple static IP addresses to one interface eg. IPv4 and IPv6 dual stack not possible #10725

Open
godfryd opened this issue Mar 11, 2019 · 6 comments

Comments

@godfryd
Copy link

godfryd commented Mar 11, 2019

It seems that it is not possible to configure two IP addresses on one network interface.
I wanted to have 1 IPv4 and 1 IPv6 address assigned to one interface like this

enp0s9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.50.252  netmask 255.255.255.0  broadcast 192.168.50.255
        inet6 fe80::a00:27ff:fed0:c918  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:d0:c9:18  txqueuelen 1000  (Ethernet)
        RX packets 422  bytes 50343 (50.3 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 300  bytes 34995 (34.9 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

inet 192.168.50.252 and inet6 fe80::a00:27ff:fed0:c918

@briancain
Copy link
Member

Hi there,

Thank you for opening an issue. However, there is not enough information here to reproduce or provide a recommendation. When you first open an issue, a template is pre-filled in the box. That template provides instructions for getting your host and guest information, the version of Vagrant, and the debug output. Without that information, it is very challenging for us to assist you.

Please supply that information either by updating this ticket or by closing this ticket and opening a new one. Thank you!

@godfryd
Copy link
Author

godfryd commented Mar 12, 2019

I do not understand the question. Reported issue is simple. What do you need more? Please, be more specific. There is no way to configure 2 different IP addresses on 1 network interface. It would be good to be able to do that.

@briancain
Copy link
Member

@godfryd You did not specify:

  • What Vagrant guest (and operating system) you are trying this is on
  • How you are trying to configure it through Vagrant inside a Vagrantfile
  • What provider you are using to configure your networks
  • A debug log showing the behavior you are experiencing
  • Version of Vagrant (network fixes/implementations change between versions)

This is all covered in the issue template which is provided when you open a new issue.

Without this information, it could be a lot of things. Providing that information helps us narrow down what could be going wrong with Vagrant.

@godfryd
Copy link
Author

godfryd commented Mar 12, 2019

What Vagrant guest (and operating system) you are trying this is on

Ubuntu 18.04

How you are trying to configure it through Vagrant inside a Vagrantfile

This is the question. It is not possible currently.

What provider you are using to configure your networks

virtualbox

A debug log showing the behavior you are experiencing

None

Version of Vagrant (network fixes/implementations change between versions)

2.2.3

@briancain
Copy link
Member

This could easily be accomplished by using the auto_config: false flag for the network config option. You can then use a provisioner or trigger to run after the guest is up to add your second ip to the configured interface using the /sbin/ip tool.

https://askubuntu.com/questions/547289/how-can-i-from-cli-assign-multiple-ip-addresses-to-one-interface

Because this option is very provider and platform specific, there's no one solution here. Happy to leave this open in case someone feels motivated to pick it up and make a pull request. Thanks!

@godfryd
Copy link
Author

godfryd commented Mar 13, 2019

Yes, I did this that way but this is fragile as I had to assume interface names. What if they change in the future? I do not have that guarantee. So I would prefer to have such ability on Vagrantfile network level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants