# [SOLVED] network configuration: netmask

## Vieri

Hi,

My LAN has several network address ranges that I cannot change (corporate decision). So hosts in the same physical LAN must be within any one of these three subnets:

```
10.215.144.0/22

10.215.246.0/23

10.215.248.0/24

```

No traffic restrictions between all of these hosts. So no VLANs needed. All hosts within these three subnets should be able to communicate freely within the LAN.

At first, I set up each host in the network with IP addresses and network masks such as:

EXAMPLE HOST 1:

```
config_eth0="10.215.146.90/16"

routes_eth0="default via 10.215.144.91"

```

EXAMPLE HOST 2:

```
config_eth0="10.215.247.91/16"

routes_eth0="default via 10.215.144.91"

```

EXAMPLE HOST 3:

```
config_eth0="10.215.248.92/16"

routes_eth0="default via 10.215.144.91"

```

That works well and hosts 1, 2 and 3 can communicate just fine.

Then I changed the setup and defined the following configurations:

EXAMPLE HOST 1:

```
config_eth0="10.215.146.90/22"

routes_eth0="10.215.246.0/23 dev eth0 proto kernel scope link src 10.215.146.90 metric 1

10.215.248.0/24 dev eth0 proto kernel scope link src 10.215.146.90 metric 1

default via 10.215.144.91"

```

EXAMPLE HOST 2:

```
config_eth0="10.215.247.91/23"

routes_eth0="10.215.144.0/22 dev eth0 proto kernel scope link src 10.215.247.91 metric 1

10.215.248.0/24 dev eth0 proto kernel scope link src 10.215.247.91 metric 1

default via 10.215.144.91"

```

EXAMPLE HOST 3:

```
config_eth0="10.215.248.92/24"

routes_eth0="10.215.144.0/22 dev eth0 proto kernel scope link src 10.215.248.92 metric 1

10.215.246.0/23 dev eth0 proto kernel scope link src 10.215.248.92 metric 1

default via 10.215.144.91"

```

This also works well and hosts 1, 2 and 3 can communicate just fine.

Now I'd like to know what the differences between the two are. Pros and cons.

Any concerns as far as bandwidth usage/"network chatter" when using an extensive netmask (16)?

Thanks,

VieriLast edited by Vieri on Fri Oct 02, 2015 8:47 am; edited 1 time in total

----------

## szatox

Mask defines your network's broadcast address and scope of routing rules.

Using network 10.215/16 means your broadcast address is 10.215.255.255 and traffic to any IP within range 10.215.0.0-10.215.255.255 will not be routed via gateways (unless you specify a gateway for smaller range)

As long as your netmask doesn't generate conflicts, it's fine.

----------

## Vieri

Thanks!

----------

