2

I'm interested in setting up a Linux machine with several IP6 addresses. How do I do this?

Also, is there a theoretical and/or practical limitation on how many addresses a machine can have?

closed as too broad by Scott, Jeff Schaller, Stephen Rauch, Anthon, Archemar Aug 2 '17 at 8:00

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Could you tell us what you are trying to achieve, why you need multiple addresses? It could affect the answer, there is undoubtedly more than one way to do it, and the choice of method will be affected by what you are trying to achieve. – ctrl-alt-delor Aug 1 '17 at 23:01
-1

The general but legacy way on Debian is to use "virtual" ethernet devices:

$sudo ifconfig eth0:0

gives me:

eth0:0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether xx:xx:xx:xx:xx:xx  txqueuelen 1000  (Ethernet)

Which is the first "virtual" device of your first real (physical) device.

Now check /etc/network/interfaces (here on Debian, may be different on other distri).

With IPv4 it would go like this:

iface eth0 inet static
    address 192.168.1.2
    netmask 255.255.255.240
    gateway 192.168.1.1

iface eth0:0 inet static
    address 192.168.1.3
    netmask 255.255.255.240
    gateway 192.168.1.1

Just a start. :-) Now I don't know much about IPv6.

For 2nd question, I tried this:

$ sudo ifconfig eth0:99999999999999999999999999999999999
eth0:9999999999: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 44:8a:5b:84:71:1d  txqueuelen 1000  (Ethernet)
$

So 9999999999 seems to be the limit?

Not the answer you're looking for? Browse other questions tagged or ask your own question.