0

I have a simple machine that has multiple IPv6 addresses routed to it. If I put these addresses in the netplan ethernet.eth0.addresses section, I confirmed that I can reach the machine from each of the addresses listed. In particular, I followed the second section from this DigitalOcean documentation.

I would now like to "split" up these addresses over multiple interfaces, such that a different source IP is used for each interface. Is there a way to do this?

I've tried setting up a bridged interface that has the secondary address (something akin to the following):

network:
version: 2
bridges:
  b0:
    addresses:
    - ipv6addr_2/64
    interfaces: [eth0]
ethernets:
  eth0:
    addresses:
    - ipv6addr_1/64
    - ipv6addr_2/64
    - 192.0.2.11/16
    gateway6: ...
    match:
        macaddress: ...
    nameservers:
        addresses:
        - 2001:4860:4860::8844
        - 2001:4860:4860::8888
        search: []
    set-name: eth0

but this doesn't seem to do anything but break my connection totally. Is such a thing even possible? Thanks

1 Answer 1

0

You would need new interfaces, all connected to the internet, in order to do this, and since it sounds like you're using a DigitalOcean VPS, you're better off seeing if they can add more virtual network adapters to your VPS. If they can, you can simple assign the ipv6 addresses to those.

A bridge combines two or more network connections. For instance, you might use a bridge on a laptop, between it's wireless and ethernet adapters, to allow the laptop to be used as a wireless adapter to whatever you then plug into the ethernet port. It doesn't break up the addresses in any way.

I am not 100% sure, but I do not believe that there is a way to do this from inside the VPS on the network adapter level.

I suppose the better question to ask would be, why are you trying to do this? I am asking so I can potentially help you avoid the XY Problem. If it's due to wanting to assign each of those addresses to a different service, vhosts on Nginx or Apache can listen on a specific address/domain name, as can HAProxy. That would, by far, be the better option. I can't think of what the benefit of having the addresses on separate adapters would be, aside from maybe network traffic monitoring. And even then, most of the time, that can be done per address.

So, depending on why you need these ipv6 addresses separated, if you are using DigitalOcean, or some other VPS provider, you would need to ask them to add more virtual network adapters to your VPS. They might say no. But explaining the situation may help, as from what it seems, you don't need additional ipv4 addresses on those adapters, just the adapters, which you can then configure with your ipv6 addresses.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .