Re: Network Alias



On Sat, 2019-09-21 at 14:53 +0000, Yannick MOLINET wrote:
In some case, i use iptables rules based on device... Using label.
Multiple IP don't work in this case. 

I see. That makes sense.

This should probably be added and is a worthy RFE.


best,
Thomas



Cordialement,
Yannick MOLINET

Envoyé depuis mon mobile.
De : Thomas Haller <thaller redhat com>
Envoyé : samedi 21 septembre 2019 16:40
À : Yannick MOLINET; networkmanager-list gnome org
Objet : Re: Network Alias

On Mon, 2019-09-16 at 06:04 +0000, Yannick MOLINET wrote:
Hi all,
 
I’m searching how to add an network alias (and not a secondary ip)
on
a network interface, like eth0:0 or ens3:1 or dummy0:4, with
Network
Manager (nmcli).

Hi,


These "aliases" are implemented by kernel by attaching a "label" to
the address (IFA_LABEL).
This is what you see in the deprecated `ifconfig` command line tool.
But beyond that, the label is
not really useful (is it?) and only partly supported by
NetworkManager. But multiple IP addresses work,
of course.

Why do you need the label? Just configure multiple IP addresses:

$ nmcli connection modify "$PROFILE" ipv4.addresses
"192.168.5.100/24,192.168.6.100/24"
$ nmcli connection modify "$PROFILE" +ipv4.addresses
"192.168.7.100/24"


Note that the ifcfg-rh settings plugin of NetworkManager supports the
label, but the keyfile plugin does not. That's
a severe limitation, to the point where it's not useful. Also, nmcli
does not support the label...



best,
Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]