routing

routing

Post by scr.. » Sun, 24 Aug 1997 04:00:00



im attempting to run 3 seperate subnets on my linux machine. each is a
block of 32 ips, an is in a seperate class c.

subnet 1 = x.y.21.224 thru 255
subnet 2 = x.y.20.32 thru 63
subnet 3 = x.y.202.32 thru 63

im at a total loss as to how to set these up in my route table. all
information i've come across refer only to either individual ips or
full class c's.

a little further information, im runnin linux, 2.0.30, 128k isdn, and
am hopefully going to be hosting virtual domains. i DO already have
several working on the first subnet, but im not sure ive done it
properly. what im looking for (hopefully) is someone to give me the
proper ifconfig and route commands to set this up. any help would be
appreciated. thanks in advance,


 
 
 

routing

Post by Radovan Bra » Sun, 24 Aug 1997 04:00:00



>im attempting to run 3 seperate subnets on my linux machine. each is a
>block of 32 ips, an is in a seperate class c.

>subnet 1 = x.y.21.224 thru 255
>subnet 2 = x.y.20.32 thru 63
>subnet 3 = x.y.202.32 thru 63

   Mhm ... how many interfaces ? What kind of interfaces ? Is
   the machine connected to the Internet, and how ? (The ISDN
   metioned below ?) Are all the subnets routed to you, or are
   some of them "private" ?

Quote:>im at a total loss as to how to set these up in my route table. all
>information i've come across refer only to either individual ips or
>full class c's.

   Hint: Linux does not care about Class A,B,C. You just have to
   adjust the netmask to any "subnet" or "supernet".

Quote:>a little further information, im runnin linux, 2.0.30, 128k isdn, and
>am hopefully going to be hosting virtual domains.

   2.0.30 might be less stable, especially for networking, than you may
   expect. Anyway, always include the output of "ifconfig" and "route",
   as well as a diagram of the net with this type of questions.

      RB

>i DO already have
>several working on the first subnet, but im not sure ive done it
>properly. what im looking for (hopefully) is someone to give me the
>proper ifconfig and route commands to set this up. any help would be
>appreciated. thanks in advance,



 
 
 

routing

Post by Erik Hense » Mon, 08 Sep 1997 04:00:00



>im attempting to run 3 seperate subnets on my linux machine. each is a
>block of 32 ips, an is in a seperate class c.
>subnet 1 = x.y.21.224 thru 255
>subnet 2 = x.y.20.32 thru 63
>subnet 3 = x.y.202.32 thru 63
>im at a total loss as to how to set these up in my route table. all
>information i've come across refer only to either individual ips or
>full class c's.

It doesn't matter what kind of subnet you use (to linux anyway).
What you'll have to do, is calculate the netmask of the subnets. 32
ips take 5 bits (2^5=32). The last eight bits of your submask will be:
11100000 (the first 24 bits will all be 1). 5 zero's at the end,
because of the 5 bits for the host.
Now convert this to decimal: 128+64+32=224. Your netmask will now be
255.255.255.224.
The network number will be the first IP, the broadcast will be the
last IP. Now, just setup the routing table like you normally do with a
normal class C networks.

I think you'll be able to find out the appropriate commands yourself,
if not, email me.

---
Erik Hensema
Please remove the "delete_me" from my address before replying.