Assuming the new IP address is on the same subnet as the first, add a second virtual interface (sometimes called an "alias") to the primary network interface. This is configured, like all network interface settings, in /etc/network/interfaces
. The Debian Reference manual has a section on the topic:
http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_virtual_interface
A simple example, assuming your primary network interface is eth0
and has an ip of 192.168.1.1
and the new ip is 192.168.1.2
:
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
auto eth0:0
iface eth0:0 inet static
address 192.168.1.2
netmask 255.255.255.0
Once the appropriate settings have been added to /etc/network/interfaces
, run ifup eth0:0
to activate the new interface.
If, however, the new ip is on a different subnet, you need to either provision the ip on a physically distinct network interface or create a VLAN interface, depending on how your ISP is prepared to hand it off to you. That's a whole new topic.