I have dedicated server from some well known hoster and I bought new ip. I try to figured out what are advatages and disdvatages two methods of finish this task on debian 9.7
1) first method - which I found in hoster manual is to add two lines to interface
up ip addr add [new ip]/32 dev [interface]
down ip addr del [new ip]/32 dev [interface]
2) second method I found on the web is to add
auto [NIC]:[n]
iface [NIC]:[n] inet static
address [ip.add.rr.ss]
gateway [gw.ip.ad.rs]
netmask [ne.tm.as.kk]
In new system like debian 9.7 I read that there is not nesesery to adding subinterface ":[n]" just the same name of interface
But is there any advatages or disadvanteges between this two methods?