Re: Subnetting recommendations

Allen K. Smith (lazlor@stardust.com)
Wed, 27 May 1998 17:14:40 -0700


At 04:11 PM 5/27/98 -0500, Brian Stone wrote:
>One thing to watch out for.
>
>You can't subnet a class C address into 4 2bit subnets. You only get 2
subnets
>becuase the you cant have a subnet mask of all 0s or all 1s. (11,00) .
>
>Brian

Sure you can.

>From RFC 1878 (1995, Informational)
For the sake of completeness within this memo, tables 2-1 and 2-2
illistrate some options for subnet/host partions within selected
block sizes using calculations which exclude all-zeros and all-ones
subnets [2]. Many vendors only support subnetting based upon this
premise. This practice is obsolete! Modern software will be able to
utilize all definable networks.

listed below is the relevent table from this memo:

255.255.255.192 4 nets N.N.N.0 N.N.N.1-62 N.N.N.63
2 bit Class C 62 N.N.N.64 N.N.N.65-126 N.N.N.127
10 bit Class B N.N.N.128 N.N.N.129-190 N.N.N.191
N.N.N.192 N.N.N.193-254 N.N.N.255

note that some commercial routers require you to enter a command to
enable one or both of the outside nets .0 and .192. Ask your router
vendor.

Linux will work fine with the above 4 nets.
>
>
>Irfan Akber wrote:
>
>> Hello everyone,
>>
>> I was planning on installing a network with subnets. Here is what I am
>> planning. 1 router, 6 access servers (PM 2e-30), 2 hubs, 4-5 servers, 20
>> workstations etc.
>>
>> Here is what I am planning.
>>
>> 1. One class C IP address space (Internet routable), here taking the
>> example of 192.168.1.x
>>
>> 2. 4 subnets giving 62 ips on each (netmask 255.255.255.192). One hub for
>> servers, workstations and router and the other for access servers.
>>

So 3 /26s for the access servers, and 1 /26 for the servers, workstations,
& router

>> 3. One Linux machine in between the two hubs for ip filtering and other
>> security issues with 2 ethernet cards.

No problem here.

>>
>> Now my question is as I need 30 ips for each access server that will be
>> given to dial up users, can I put the all the access servers on the second
>> hub, considering they will be on a different subnet. Willl this setup
>> impose any problem on routing through Linux and the router. What will be
>> possible routing table on access servers and the Linux machine.

There is no problem running multiple subnets on one ethernet shared
segment. Linux will happily route multiple networks to one physical interface.
Include ip-aliasing in your kernel. You can then say

# Router Net
ifconfig eth0 192.168.1.2 netmask 255.255.255.192 broadcast 192.168.1.63
# some access servers
ifconfig eth1 192.168.1.65 netmask 255.255.255.192 broadcast 192.168.1.127
# other access servers
ifconfig eth1:0 192.168.1.129 netmask 255.255.255.192 broadcast 192.168.1.191
# (more access servers)
ifconfig eth1:1 192.168.1.193 netmask 255.255.255.192 broadcast 192.168.1.255

then

route add -net 192.168.1.0 dev eth0
route add -net 192.168.1.64 dev eth1
route add -net 192.168.1.128 dev eth1:0
route add -net 192.168.1.192 dev eth1:1
route add default gw 192.168.1.1 metric 1

On the PMs you can set a default route to your linux box.

so something like:

add route 0.0.0.0 192.168.1.65 1

Notes
-----
I'm unfamiliar with using a PM for dialup. If they do proxy arp for
their dialup clients then this should work fine.

>>
>> Any recommendations and comments will be appreciated specially with PM 2e.
>>
>> Irfan Akber
>>
>> -

Allen Smith, lazlor@stardust.com
IP Multicast. Turn it on and tune-in to the future.
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.rutgers.edu