4

I want to set up two IP addresses on my system for access through LAN. This is my config on my other system.

Desktop Installation

My Connection Information

My desktop installation runs with multiple IPs added through Network Manager both through LAN and wifi.

Server Installation

On my server install I've edited /etc/network/interfaces to the following:

auto eth0
auto eth0:1
# IP-1
iface eth0 inet static
address 172.16.35.35
network 172.16.34.1
netmask 255.255.254.0
broadcast 172.16.35.255
dns-nameservers 172.16.100.221 8.8.8.8
# IP-2
iface eth0:1 inet static
address 172.16.34.34
network 172.16.34.1
netmask 255.255.254.0
gateway 172.16.34.1
broadcast 172.16.35.255

After restarting through /etc/init.d/networking restart I receive

Failed to bring up eth0:1

What am I doing wrong?

3 Answers3

1

An alias interface should not have a gateway.

https://wiki.debian.org/NetworkConfiguration#Multiple_IP_addresses_on_One_Interface

NGRhodes
  • 9,680
1

It has been a long time since I posted this question. While I never got around to configuring the old server with multiple addresses, the following is a working configuration I'm using on a different server currently.

auto eth0
iface eth0 inet static
        address 172.16.100.125
        netmask 255.255.255.0
        network 172.16.100.0
        broadcast 172.16.100.255
        gateway 172.16.100.1
        dns-nameservers 172.16.100.221 208.67.222.222

auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
        address 172.16.100.123
        netmask 255.255.255.0
        network 172.16.100.0
        broadcast 172.16.100.255
        gateway 172.16.100.1
muru
  • 207,228
0

I know this comes in a little late but my guess is that you can do the following:

edit /etc/network/interfaces

auto venet 0:0
iface venet 0:0 inet static
        address XXX.XX.XXX.XXX
        netmask 255.XXX.XXX.XXX

auto venet 0:1
iface venet 0:1 inet static
        address XXX.XX.XXX.XX1
        netmask 255.XXX.XXX.XXX

auto venet 0:2
iface venet 0:2 inet static
        address XXX.XX.XXX.XX2
        netmask 255.XXX.XXX.XXX
muru
  • 207,228
Phil
  • 1