0

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?

1 Answers1

0

First method will assign address for interfaces temporary. Second will assign permanently. That is the difference.

MrSnowMan
  • 119
  • 2
  • 1
    both method I could add to network config file and I thought that both are permanent only shell comannd "ip addr add x.y.z.v/32 dev eth0" is temporary, isn't it? Both method are desribe in debian wiki as iprout2 method: https://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_one_Interface – kafebiwa Feb 05 '19 at 20:28