Date: Mon, 6 Oct 1997 15:33:32 -0700 From: Don Lewis <Don.Lewis@tsc.tdk.com> To: "Daniel O'Callaghan" <danny@panda.hilink.com.au>, chrw <shredder@hack.babel.dk> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: routing between networks Message-ID: <199710062233.PAA00567@salsa.gv.tsc.tdk.com> In-Reply-To: "Daniel O'Callaghan" <danny@panda.hilink.com.au> "Re: routing between networks" (Oct 6, 10:41pm)
next in thread | previous in thread | raw e-mail | index | archive | help
On Oct 6, 10:41pm, "Daniel O'Callaghan" wrote:
} Subject: Re: routing between networks
}
} On Mon, 6 Oct 1997, chrw wrote:
}
} > Hello, I have a small question to ask. I do not fully understand how
} > routing between 2 logical networks works. Lets say I got net 194.19.1, with
} > default gateway and router to the internet at 194.19.1.1. Now, I want to
} > add another C net, 194.19.2 with the same gateway as net .1. This new net
} > cannot see the other net, so I need to setup a box to route between these
} > 2 nets.. right?
}
} Yes.
Not necessarily. If you have two (or some power of two) adjacent network
numbers that start on a power of two boundary, and if all the boxes on
the network understand classless routing ({Free,Open,Net}BSD should all
qualify, as does Solaris 2.6, and I imagine that Linux probably does
as well), then the best solution is to just change the network mask to
do supernetting. In this case, you would just need to do:
ifconfig interface 194.19.{1,2}.xxx netmask 255.255.254.0
The next best solution is to use the route command. On your 194.19.1.*
hosts, you would need to do:
route add net 194.19.2.0 address-of-this-host-on-194.19.2 metric 0
and on your 194.19.2.* hosts, you would need to do:
route add net 194.19.1.0 address-of-this-host-on-194.19.1 metric 0
I've never attempted this, but I think most TCP stacks support this. In
this scheme I don't know if your 194.19.2.* hosts can use a 194.19.1.1 as
a default gateway, so you may need to create an interface alias on the
194.19.2.* network for it and point the default route to that address.
The advantage of either of these schemes is that each host on the
network can communicate directly with any other host on the network.
If you route between the networks, any packets sent from one logical
network number to another will traverse the physical network twice.
} > Do I need to setup a box with 2 NICS, one for each net? The
}
} Yes.
No.
} > way I prefer it, is to route between the nets, but stay with a single NIC.
}
} You may *think* you prefer it, but if you do it that way you'll find that
} 1 NIC per network is best.
Any particular reason that you think 2 NICs are better than 1? I can
think of several reasons why 1 is better:
Less hardware to purchase (NICs, hub ports or transceivers, cables)
Fewer cables to hook up
Fewer slots used
Better performance (with two NICs, if both decide to transmit at
the same time, you'll get a collision and both will back off
for some random amount of time, but with one NIC the packets will
be sent out back to back)
--- Truck
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199710062233.PAA00567>
