Linux Links‎ > ‎

Static IP

sudo vi /etc/network/interfaces

file:
auto eth0
auto eth0:0

auto eth0:1

iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.248

gateway 192.168.1.254


iface eth0:0 inet static
address 192.168.1.2
netmask 255.255.255.248
gateway 192.168.1.254

iface eth0:1 inet static
address 192.168.1.3
netmask 255.255.255.248
gateway 192.168.1.254

# add rest of alias / binds below


+++++ default static setup from debian ++++++

iface eth0 inet static

        address 192.168.1.100

        netmask 255.255.255.0

        network 192.168.1.0

        broadcast 192.168.1.255
        gateway 192.168.1.1

       # dns-* options are implemented by the resolvconf package, if installed

        dns-nameservers 192.168.1.254

       dns-search domain.com

Comments