Re: Multi-Networking in Linux - Multiple Subnets

Marc Haber <[email protected]> Thu, 30 Jul 2026 18:46:35 +0200
Newsgroups comp.os.linux.misc
Organization private site, see http://www.zugschlus.de/ for details
Message-ID <[email protected]>
Andy Burns <[email protected]> wrote:
>If you want multiple IP subnets on a single ethernet network, you'd be 
>better off using VLANs, even cheapo switches can handle that, then your 
>linux box with a single NIC can have VLAN sub-interfaces e.g. eth1.1 on 
>192.168.0.1/24 and eth1.10 on 192.168.1.0/24

Please don't introduce VLANs unless you have fully understood how IP
routing works.

>If you don't want VLANs you *could* use a NIC alias so that e.g. eth1 is 
>on 192.168.0.1/24 and the alias eth1:2 is on 192.168.1.1/24 ... but why?

NIC aliases have been obsolete in Linux for 20 years. Since then, you
just configure a second address on the Interface.

Greetings
Marc
-- 
----------------------------------------------------------------------------
Marc Haber         |   " Questions are the         | Mailadresse im Header
Rhein-Neckar, DE   |     Beginning of Wisdom "     | 
Nordisch by Nature | Lt. Worf, TNG "Rightful Heir" | Fon: *49 6224 1600402