Hi Andy,
Thanks for contributing, will be really appreciated. Problem solved. Thanks for the help @all
Grtz,
MekMek.
Hi Andy,
Thanks for contributing, will be really appreciated. Problem solved. Thanks for the help @all
Grtz,
MekMek.
Alles anzeigenIt's not possible to define an interface multiple times. Your last config is clearly invalid.
Ok, try this:
CodeAlles anzeigenauto lo iface lo inet loopback allow-hotplug ens3 iface ens3 inet static address 89.58.56.189/22 gateway 89.58.56.1 iface ens3 inet6 static address 2a03:4000:6a:3c1::1/64 gateway fe80::1 dad-attempts 0 accept_ra 0 post-up ip -6 addr add 2a03:4000:6a:3c1::2/128 dev $IFACE preferred_lft 0 pre-down ip -6 addr del 2a03:4000:6a:3c1::2/128 dev $IFACE
Hi KB19,
Greats, works also smoothly now!
Output: /etc/network/interfaces
CodeAlles anzeigen#Local loopback section auto lo iface lo inet loopback #IPV4 section allow-hotplug ens3 iface ens3 inet static address 89.58.56.189/22 gateway 89.58.56.1 dns-nameservers 46.38.225.230 46.38.252.230 2a03:4000:0:1::e1e6 2001:4860:4860::8888 #IPv6 section iface ens3 inet6 static address 2a03:4000:6a:3c1::1/64 gateway fe80::1 dad-attempts 0 accept_ra 0 post-up ip -6 addr add 2a03:4000:6a:3c1::2/128 dev $IFACE preferred_lft 0 pre-down ip -6 addr del 2a03:4000:6a:3c1::2/128 dev $IFACE post-up ip -6 addr add 2a03:4000:6a:3c1::3/128 dev $IFACE preferred_lft 0 pre-down ip -6 addr del 2a03:4000:6a:3c1::3/128 dev $IFAC
Output: ip a
CodeAlles anzeigen1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b6:27:70:ef:a3:2f brd ff:ff:ff:ff:ff:ff altname enp0s3 inet 89.58.56.189/22 brd 89.58.59.255 scope global ens3 valid_lft forever preferred_lft forever inet6 2a03:4000:6a:3c1::1337/64 scope global valid_lft forever preferred_lft forever inet6 2a03:4000:6a:3c1::2/64 scope global valid_lft forever preferred_lft forever inet6 2a03:4000:6a:3c1::1/64 scope global valid_lft forever preferred_lft forever inet6 fe80::b427:70ff:feef:a32f/64 scope link valid_lft forever preferred_lft forever root@gate /etc/network #
Many thanks for your help also, will be really appreciated KB19!
Have a good weekend+
Grtz,
MekMek
works with ipv6, just tried here with debian 12.
so this sould work for mrmekmek
CodeAlles anzeigensource /etc/network/interfaces.d/* auto lo iface lo inet loopback auto ens3 iface ens3 inet static address 89.58.56.189/22 gateway 89.58.56.1 dns-nameservers 46.38.225.230 46.38.252.230 2a03:4000:0:1::e1e6 iface ens3 inet6 static address 2a03:4000:6a:3c1::1/64 gateway fe80::1 iface ens3 inet6 static address 2a03:4000:6a:3c1::2/64 gateway fe80::1
Hi Etwas,
Yes great this fixed my problem!
Good to know this works also smoothly on Debian 12.
Network config: /etc/network/interfaces
source /etc/network/interfaces.d/*
#IP local loopback section
auto lo
iface lo inet loopback
#IPv4 section for 1 single /32 IP in a /22 IP block
auto ens3
iface ens3 inet static
address 89.58.56.189/22
gateway 89.58.56.1
dns-nameservers 46.38.225.230 46.38.252.230 2a03:4000:0:1::e1e6 2001:4860:4860::8888
#IPv6 multiple IP address setup on a /64 IP block
iface ens3 inet6 static
address 2a03:4000:6a:3c1::1/64
gateway fe80::1
iface ens3 inet6 static
address 2a03:4000:6a:3c1::2/64
gateway fe80::1
iface ens3 inet6 static
address 2a03:4000:6a:3c1::1337/64
gateway fe80::1
Alles anzeigen
Output: root@gate /etc/network # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b6:27:70:ef:a3:2f brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 89.58.56.189/22 brd 89.58.59.255 scope global ens3
valid_lft forever preferred_lft forever
inet6 2a03:4000:6a:3c1::1337/64 scope global
valid_lft forever preferred_lft forever
inet6 2a03:4000:6a:3c1::2/64 scope global
valid_lft forever preferred_lft forever
inet6 2a03:4000:6a:3c1::1/64 scope global
valid_lft forever preferred_lft forever
inet6 fe80::b427:70ff:feef:a32f/64 scope link
valid_lft forever preferred_lft forever
Alles anzeigen
etc etc.
Many thanks for your help, will be really appreciated.
Have good weekend Etwas!
Grtz,
Mek
Yes did this, but no IPv6 connectivity when I did this
Working example from one of my netcup VPS with Debian 11:
CodeAlles anzeigenallow-hotplug ens3 iface ens3 inet static address xxx.xxx.xxx.xxx/22 gateway xxx.xxx.xxx.xxx post-up ip -4 addr add xxx.xxx.xxx.xxx/32 dev $IFACE pre-down ip -4 addr del xxx.xxx.xxx.xxx/32 dev $IFACE iface ens3 inet6 static address 2a03:4000:xxxx:xxxx::xxxx/64 gateway fe80::1 dad-attempts 0 accept_ra 0 post-up ip -6 addr add 2a03:4000:xxxx:xxxx::xxxx:xxxx/128 dev $IFACE preferred_lft 0 pre-down ip -6 addr del 2a03:4000:xxxx:xxxx::xxxx:xxxx/128 dev $IFACE
+ mentioned sysctl config
Important: This snippet is for a 2nd IPv6 address from the same subnet. If you've ordered another IPv6 subnet, the required config is a little bit different!
Hi KB,
Great, looks like this did the trick:
#IPv4 /32 section in the /22 range
allow-hotplug ens3
iface ens3 inet static
address 89.58.56.189/22
gateway 89.58.56.1
post-up ip -4 addr add 89.58.56.189/32 dev $IFACE
pre-down ip -4 addr del 89.58.56.189/32 dev $IFACE
#IPV6 primary IP
iface ens3 inet6 static
address 2a03:4000:6a:3c1::1/64
gateway fe80::1
dad-attempts 0
accept_ra 0
post-up ip -6 addr add 2a03:4000:6a:3c1::1/128 dev $IFACE preferred_lft 0
pre-down ip -6 addr del 2a03:4000:6a:3c1::1/128 dev $IFACE
#IPv6 secondary IP etc etc.
iface ens3 inet6 static
address 2a03:4000:6a:3c1::2/64
gateway fe80::1
dad-attempts 0
accept_ra 0
post-up ip -6 addr add 2a03:4000:6a:3c1::2/128 dev $IFACE preferred_lft 0
pre-down ip -6 addr del 2a03:4000:6a:3c1::2/128 dev $IFACE
But the second IP on the same way is not working, is there a shortage how I can add this, I did this for the second IP-address (same network adapter):
#IPv4 secondary IP etc etc.
iface ens3 inet6 static
address 2a03:4000:6a:3c1::2/64
gateway fe80::1
dad-attempts 0
accept_ra 0
post-up ip -6 addr add 2a03:4000:6a:3c1::2/128 dev $IFACE preferred_lft 0
pre-down ip -6 addr del 2a03:4000:6a:3c1::2/128 dev $IFACE
Firtst IP (works):
root@gate /etc/network # ping6 2a03:4000:6a:3c1::1
PING 2a03:4000:6a:3c1::1(2a03:4000:6a:3c1::1) 56 data bytes
64 bytes from 2a03:4000:6a:3c1::1: icmp_seq=1 ttl=64 time=0.017 ms
64 bytes from 2a03:4000:6a:3c1::1: icmp_seq=2 ttl=64 time=0.040 ms
64 bytes from 2a03:4000:6a:3c1::1: icmp_seq=3 ttl=64 time=0.052 ms
Second IP (not working):
root@gate /etc/network # ping6 2a03:4000:6a:3c1::2
PING 2a03:4000:6a:3c1::2(2a03:4000:6a:3c1::2) 56 data bytes
From 2a03:4000:6a:3c1::1 icmp_seq=1 Destination unreachable: Address unreachable
From 2a03:4000:6a:3c1::1 icmp_seq=2 Destination unreachable: Address unreachable
From 2a03:4000:6a:3c1::1 icmp_seq=3 Destination unreachable: Address unreachable
From 2a03:4000:6a:3c1::1 icmp_seq=4 Destination unreachable: Address unreachable
From 2a03:4000:6a:3c1::1 icmp_seq=5 Destination unreachable: Address unreachable
From 2a03:4000:6a:3c1::1 icmp_seq=6 Destination unreachable: Address unreachable
Looks like I'm close in the good direction
GRtz,
MekMek
Hi Etwas,
Thanks for your reply!. I did add this extra to the config:
/etc/network/interfaces
I have the following info in the:
file: sysctl.conf
net.ipv6.conf.default.accept_ra=0
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.all.autoconf=0
net.ipv6.conf.ens3.accept_ra=0
net.ipv6.conf.ens3.autoconf=0
ip a output:
root@gate /etc/network # ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b6:27:70:ef:a3:2f brd ff:ff:ff:ff:ff:ff
altname enp0s3
inet 89.58.56.189/22 brd 89.58.59.255 scope global dynamic noprefixroute ens3
valid_lft 2678180sec preferred_lft 2678180sec
inet6 fe80::b427:70ff:feef:a32f/64 scope link noprefixroute
valid_lft forever preferred_lft forever
root@gate /etc/network #
Alles anzeigen
route -n output
root@gate /etc/network # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 89.58.56.1 0.0.0.0 UG 100 0 0 ens3
89.58.56.0 0.0.0.0 255.255.252.0 U 100 0 0 ens3
I did several tests with add extra secondary IP's but ony the first one works:
but after a reboot it's not working for some reason.
Grtz,
MekMek
Hi @all,
Good morning.
Is there someone who would like to share an working Debian 11 (bullseye) IPv6 configuration with additional IP addresses. In Ubuntu with netplan it's quite easy, but in Debian (11) I have some issues.
Would be appreciated if someone could share an working configuration.
I took also a look at: https://www.netcup-wiki.de/wik…sse_konfigurieren#IPv6%7C
but looks like, it's a litte bit outdated (not working in my situation).
My config tryings so far, but after an reboot it's not working anymore:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
#iface eth0:1 inet6 static
#address 2a03:4000:6a:3c1::1
#netmask 64
#gateway fe80::1
#IPV6 networking
iface ens3 inet6 static
address 2a03:4000:6a:3c1::1
netmask 64
gateway fe80::1
#iface eth0:1 inet6 static
# address 2a03:4000:6a:3c1::2
# netmask 64
# gateway fe80::1
#auto eth0:0
#iface eth0:0 inet6 static
# address 2a03:4000:6a:3c1::1/64
# address 2a03:4000:6a:3c1::2/64
# gateway fe80::1
# post-up route add -A inet6 default gw fe80::1%eth0:0 true
# pre-down route del -A inet6 default gw fe80::1%eth0:0 true
#Start IPv6 secondary additional IP configuration
#up ip -6 addr add 2a03:4000:6a:3c1::2/64 dev ens3
#up /sbin/ifconfig ens3 inet6 static add 2a03:4000:6a:3c1::2/64
#up /sbin/ifconfig ens3 inet6 static add 2a03:4000:6a:3c1::3/64
#up /sbin/ifconfig ens3 inet6 static add 2a03:4000:6a:3c1::1337/64
#iface eth0:0 inet6 static
#address 2a03:4000:6a:3c1:2:2:2:2
#address 2a03:4000:6a:3c1::3
#address 2a03:4000:6a:3c1::1337
#address 2a03:4000:6a:3c1::1338
#netmask 64
#gateway fe80::1
#iface ens3 inet6 static
# address 2a03:4000:6a:3c1::2
# netmask 64
# up ip -6 route add 2a03:4000:6a:3c1::2 via fe80::1 true
Some actions when it works:
root@gate /etc/network # /etc/init.d/networking restart
Restarting networking (via systemctl): networking.service.
root@gate /etc/network # sudo ifdown ens3 && ifup ens3
ifdown: interface ens3 not configured
Waiting for DAD... Done
root@gate /etc/network # ping6 http://www.unet.nl
PING http://www.unet.nl(purpureus.unet.nl (2a02:120:320:851::49)) 56 data bytes
64 bytes from purpureus.unet.nl (2a02:120:320:851::49): icmp_seq=2 ttl=57 time=203 ms
64 bytes from purpureus.unet.nl (2a02:120:320:851::49): icmp_seq=3 ttl=57 time=25.6 ms
64 bytes from purpureus.unet.nl (2a02:120:320:851::49): icmp_seq=4 ttl=57 time=25.6 ms
PS I'm using an vps-server, new type: G10s.
Grtz,
MekMek