I think you want to look up CIDR addressing.
jmh
Peter Mairhofer wrote:
> Hello,
>
> I have to configure two private networks.
>
> One "bigger" network which should have the netmask 255.255.0.0:
>
> 192.168.0.0/255.255.0.0
>
> My "private" network (Class C) 192.168.200.0/255.255.255.0
>
> My Linux gateway has two network cards and each card connects
> one network of the nets described.
>
> But soon I realized that something was wrong. After debugging with
> tcpdump and ping I found out that the problem must be the netmasks.
>
> When I send a ping from a Windows PC in 192.168.100.0 to a station
> in the 192.168.0.0 I always got a timeout. In tcpdump I could see that
> the request was reached and routed correctly by the linux gateway
> but there was no response, there was just an ARP request asking
> for the MAC address of the PC in the 192.168.100.0 network.
> This is logical, because the PC in 192.168.0.0/255.255.0.0 believes
> that the other PC is in the same subnet.
>
> After a lot of desperation I had the solution: Somewhere I read of
> complex subnet masks like 255.255.240.0. I tried it out and that
> part worked. But now other parts did not work.
> I now that the subnet mask tells the important bits of the address
> but somehow I didn't get it working - I can't find out what's the
> right subnet mask for each network. At the moment I have:
>
> 192.168.200.0/255.255.255.0
> 192.168.0.0/255.255.240.0
>
> I my new configuration, the net 192.168.0.0 should have the subnets
> 192.168.0.1(-192.168.0.255) up to 192.168.99.1(-192.168.99.255)
>
> My other network should just have the network 192.168.200.0/255.255.255.0.
>
> Everything bigger than xxx.xxx.99.xxx which is not xxx.xxx.200.xxx should
> be reserved, so the former network 192.168.0.0/16 should only be able to
> address 192.168.0.1 to 192.168.99.255 any more.
>
> What are the correct subnet masks?
>
> I hope you can understand my question and my problem and that you
> can help me.
>
> Thanks in advance,
>
> Peter
>
>
>
|