Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Virtual IPs in Buster

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
lxdn
Posts: 2
Joined: 2019-10-09 10:42

Virtual IPs in Buster

#1 Post by lxdn »

Hi there,

Just found out about network aliases syntax change in Buster.
My former working config from Stretch:

Code: Select all

auto lo
iface lo inet loopback

auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet dhcp


auto enp3s0:0
iface enp3s0:0 inet static
address 192.168.1.2/24
now it looks like this:

Code: Select all

auto lo
iface lo inet loopback

auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet dhcp


auto enp3s0.0
allow-hotplug enp3s0.0
iface enp3s0.0 inet static
address 192.168.1.2/24
ip link show tells that both interfaces are up, but I am able to send packets only from first physical interface and no ping via 192.168.1.2
Could you please give a hint where to dig?

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Virtual IPs in Buster

#2 Post by p.H »

1) "IP aliases" are obsolete and have been long before buster. With buster just add multiple addresses to the interface.
2) "Virtual IP" has nothing to do with "IP aliases".
3) enp3s0.0 is neither an IP alias nor a virtual IP, it is a tagged VLAN interface (in VLAN 0), which means it sends and receives frames with a special VLAN ID tag. Normal untagged interfaces ignore such frames. Only interfaces/ports in the same VLAN can communicate with it.

lxdn
Posts: 2
Joined: 2019-10-09 10:42

Re: Virtual IPs in Buster

#3 Post by lxdn »

p.H, many thanks,

It is weird, but I have tried to make it like this earlier, getting the info from https://wiki.debian.org/NetworkConfigur ... e_manually, and no success. I guess after the network file change I just restarted interfaces with /etc/init.d/networking restart command, then get ip link show output again and see only one interface with one address.

All I had to do is to restart the system and use ip -4 a to discover both IPv4 addresses. So below config is enough to everything works well:

Code: Select all

auto enp3s0
allow-hotplug enp3s0
iface enp3s0 inet dhcp

iface enp3s0 inet static
    address 192.168.1.2/24


Thanks again)

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Virtual IPs in Buster

#4 Post by p.H »

lxdn wrote:I guess after the network file change I just restarted interfaces with /etc/init.d/networking restart command
Doing this has issues : ifupdown does not keep track of how it configured an interface, so running ifdown or networking restart after changing the interface file may fail to stop the interface properly. Instead you should :
- ifdown the interface(s) you want to modify
- modify /etc/network/interfaces
- ifup the interface(s)
lxdn wrote:ip link show output again and see only one interface with one address.
"ip link" shows only the MAC address. Obviously, there is only one. You must use "ip addr" to show IP addresses.

PS : I would double check the IP addresses after the DHCP lease renewal.

Post Reply