On Sun, Mar 30, 2003 at 07:59:21PM -0500, [EMAIL PROTECTED] wrote:
> On Sun, 30 Mar 2003 13:56:15 -0600
> Nathan E Norman <[EMAIL PROTECTED]> wrote:
> 
> >  auto eth1
> >  iface eth1 inet static
> >      address 192.168.1.1         <------
> >      network 192.168.1.0 
> >      netmask 255.255.255.252
> >      broadcast 192.168.1.3
> > 
> >  auto eth2
> >  iface eth2 inet static
> >      address 192.168.1.5         <------
> >      network 192.168.1.4
> >      netmask 255.255.255.252
> >      broadcast 192.168.1.7
> 
> 
> Wouldn't it be easier to just use:
> 
> 192.168.1.1 for eth1
> 192.168.2.1 for eth2

I don't see why.  Clearly the OP is using his ethernet to create point
to point links; using more address space than necessary[1] is probably
not going to teach the OP anything. If you're going to learn IP
networking and routing, it's a good idea to quit thinking about
classful networks, IMO.  Hence my example.

If it's easier to use 2 /24s, why not 2 /16s?  

If you want to argue that subnetting and dotted quads are hard to deal
with, I agree.  That is why on machines with more than one interface i
ignore the debian provided ifupdown package which prefers ifconfig,
and roll my own using iproute2 (in the iproute package).  That allows
the much more readable

 ip addr add 192.168.0.1/24 eth1
 ip link set eth1 up

Of course, YMMV.

In any case, I believe a primary purpose of this list is to teach, not
just solve problems.  If I can make someone _think_ I've been more
successful than if I fixed whatever was broke.  Oh and BTW, the OP
responded to me privately saying that the above soultion worked just
fine.  I would have just used a switch, myself.

[1] Admittedly my example "wastes" two addresses per subnet; I'm
pretty sure linux will allow /31 PTP links as per the internet-draft,
but why risk it?

-- 
Nathan Norman - Incanus Networking mailto:[EMAIL PROTECTED]
  Whenever men attempt to suppress argument and free speech, we may
  be sure that they know their cause to be a bad one.
          -- R. G. Horton


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to