Re: How to configure a DHCP + (2nd) Static address (eg on eth0+eth0:0)?


Andrei Borzenkov <arvidjaar gmail com> writes:

29.09.2015 20:54, Dan Williams пишет:

Basically I want to automate NM doing, effectively:

   ifconfig eth0:0 192.168.x.y

Don't do this with interface aliases; the kernel is perfectly capable of
using more than one address on the same interface.  Simply do:

ip addr add 192.168.x.y/24 dev eth0

and magically you'll have two.

This makes addresses invisible in ifconfig output and that may confuse
legacy software (I know about at least one such case). Adding "label
xxx" will emulate legacy aliases enough to make them appear as
"normal" interface.

Could you explain more detail on how to add "label xxx" to the nmcli
command (which you inconveniently cut out of your reply, so I've
included it below)?  I cannot find any reference to "label" in the nmcli

  nmcli con mod "Wired connection 1" +ipv4.addresses "192.168.x.y/24"



       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL:    PP-ASEL-IA     N1NWH
       warlord MIT EDU                        PGP key available

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