Hello,
Post by Damian 'legion' SzuberskiPost by k***@gmail.comJust wondering what the differences between using "ip addr add ..."
and defining an interface alias with "ifconfig eth0:0 ..." are.
Aliases have been in use in times before Christ - they define different
interfaces (so different routing rules, tc, firewall...).
No they don't - at list on Linux. The eth0:0 thing is not an interface
but only a kind of label associated to the address. The label does not
exist for kernel networking functions such as routing, packet filtering
and so on. Only the real interface and its addresses (including the
aliases) exist.
Once created, I have not seen any operational difference between aliases
created by ifconfig and addresses added by "ip addr". Both add addresses
and direct routes to network interfaces. However addresses created by
"ip addr" without an explicit label (default label is the interface
name) do no show in ifconfig (but it works the same). Also, alias
handling in ifconfig is somehow inconsistant : you set the label DOWN
(like an interface, which it is not) to delete it.
Note that you can also add an IP address to an interface (and create an
alias) with "ifconfig ethX add...".