1

I have managed to configure two IPs from different subnets on the same card. I changed /etc/network/interfaces to have:

auto eth0
iface eth0 inet static
    address 172.16.4.254
    netmask 255.255.255.0
    network 172.16.4.0
    broadcast 172.16.4.255
    gateway 172.16.4.1
    dns-nameservers 172.16.4.1

iface eth0 inet static
    address 192.168.1.10
    netmask 255.255.255.0

The problem is that the connections over the first IP started being laggy (the response time increased greatly). For instance it takes a lot of time to start loading a webpage, but it does eventually succeed. I need a console/configuration solution. No gui.

0

1 Answer 1

1

You can not configure eth on that way. Create aliases

auto eth0
iface eth0 inet static
address 192.168.1.10
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1

auto eth0:1
iface eth0:1 inet static
address 192.168.10.11
netmask 255.255.255.0
broadcast 192.168.10.255
2
  • Creating aliases is considered legacy ... the OP way is correct: askubuntu.com/questions/547289/… but some network cards struggle with it.
    – Emanuele
    Feb 3, 2018 at 6:44
  • Is this for physical adapters or virtual adapter IP's ? How should be configured the file in both cases ?
    – user849355
    Jan 20, 2022 at 16:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .