Friday, January 8, 2010

Creating network aliases for single network interface

First some assumptions:
  • network interface is aliased to eth0
  • eth0 assigned to
Here's how you assign more than one IP to a single network interface in Ubuntu/Debian:
# ifconfig eth0:0 up
That's it.  Wait for a while for the interface to become active and you'll be able to configure services to serve from that IP.  To make the change permanent, edit the /etc/network/interfaces file and add the following lines:
auto eth0:0
iface eth0:0 inet static

No comments: