0

If I want to set up multiple IPv6 addresses on a web server, can I do this without using virtualization/VMs?

How would I do this on modern Linux kernels (5.x) or Windows Server 2016/2019?

Relatedly, is it possible to use the virtualization features of a NIC without using virtualization on the OS or CPU side? I know that it's possible to use the SR-IOV feature on NICs with containers, not just VMs. Could I use SR-IOV or similar without using containers or VMs, just dishing out the NIC to different bare metal web server app instances?

Thanks.

5
  • Just add secondary IPs that are routed to your machine/localnet Jul 10, 2020 at 13:20
  • 1
    On Linux, one NIC can have multiple IP addresses. A single web-server can listen on multiple ports and IP addresses. A single or multiple "Listen" directives will handle those. Jul 10, 2020 at 13:20
  • As others have said, you can simply do this at the OS level. It's called multihoming, and it can be done just by adding additional IPs to the NIC.
    – Ulfy
    Jul 10, 2020 at 13:26
  • 2
    @ulfy how is a secondary IPs multihoming ? multihoming is 2+ gateways/routes, generally two or more upstream systems and BGP/Routing protocols involved to manipulate routing tables for best/shortest paths Jul 10, 2020 at 14:08
  • @JacobEvans , you're right - I mixed up the terms in my head while rapid firing a comment. Multihoming/dual-homing/aliasing flashed through my mind. The correct term for this would be IP aliasing.
    – Ulfy
    Aug 6, 2020 at 17:13

1 Answer 1

2

Add Additional IPs

Note that many application servers listen on ALL IPs (IPv4 and IPv6); you may need to tell your applications to bind specific IPs to avoid port conflicts (like Nginx or IIS)

Windows enter image description here

Linux

Read the Docs at Netplan

create a file at /etc/netplan/config.yaml


network:
  version: 2
  renderer: networkd
  ethernets:
    enp3s0:
      addresses:
         - "2001:db8::10/64"
         - "2001:db8::11/64"
         - "2001:db8::12/64"
4
  • Thanks. Are there any hitches with using secondary IPs? Are there other solutions or is using secondary IPs the only one? Jul 10, 2020 at 21:17
  • For some reason the Netplan docs don't mention primary/secondary IPs, just IPs. Jul 10, 2020 at 21:18
  • Modern network stacks can do one interface with many IP addresses. You are inferring too much into the word "secondary" IPs, which is not a standard term, nor does it mean they are inferior. Perhaps think of them as "additional" IP addresses, hidden in advanced TCP/IP on Windows just because of an unfortunate UI. Jul 11, 2020 at 13:05
  • @LearningFast make sure whatever application you are using is only bound to one IP if you are using this to separate access to your applications. Generally SNI is sufficient for HTTPS separation but I'm not aware of what services you are exposing requiring the use of multiple IP Addresses. Jul 11, 2020 at 23:06

You must log in to answer this question.

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