Re: Multi-Networking in Linux - Multiple Subnets

Andy Burns <[email protected]> Thu, 30 Jul 2026 14:53:52 +0100
Newsgroups comp.os.linux.misc
Message-ID <[email protected]>
Marc Haber wrote:

> Carlos E. R. wrote:
> >> eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>>          inet 192.168.2.9  netmask 255.255.0.0  broadcast 192.168.255.255
> 
> Using the entire 192.168.0.0/16 range for a single home network is a
> sure sign of a person not knowing too much about networking or an
> incompetent ISP.
> 
>> Works for me as above :-)
> 
> Until the moment you'd want to connect to another network.
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

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?