Re: routers vs switches: how do I convince my Linux box that its a switch?

From: P Gentry (rdgentry1_at_cablelynx.com)
Date: 03/15/04


Date: 15 Mar 2004 12:23:24 -0800

enjoylife_95135@hotmail.com (enjoylife_95135) wrote in message news:<864c2cd6.0403142255.73b9c936@posting.google.com>...
> Hi,
> I understand how to make my Linux machine a router. I would like
> to make it a switch.
>
> I have a total of three machines, a client, a server and a system
> sitting in the middle. All are on the same network. The client and the
> server "plug" into the system sitting in the middle...this system has
> 2 NICs. Obviously this doesn't work unless I turn routing on. But if I
> do so the systems all have to be on a separate network. Arg.

Don't understand why using the middle machine as a router is not
adequate -- certainly it is more flexible and easier to work with in
such a simple setup in most circumstances, IMO.

> The general rule is that you cannot have 2 interfaces on a host on
> the same network. ...

It's a general rule because it's not generally appropriate -- and
where it is appropriate or OK, it's harder to set up and maintain. It
can be pretty brittle.

> ... So...how do switches deal with this? Because they're
> layer2...but how do I convince my Linux machine to only be concerned
> with layer2???

A switch (or a bridge in your case) is not much different than a
router in that they both "break up" a physical network into segments
or subnets. They both have to examine packets and decide to forward
or not to forward packets to other ports/interfaces. Working with MAC
addresses and layer 2, bridges are considered more transparent -- ie.,
hosts are basically unaware of their existence and presumably they are
"faster".

> Thanks and sorry if these are basic questions.
> S

If your requirements are better fulfilled using a bridge (or you just
want to experiment) have a look at these for a start:
http://www.tldp.org/HOWTO/Bridge/index.html
http://www.tldp.org/HOWTO/BRIDGE-STP-HOWTO/
and check here for other related/useful info:
http://www.tldp.org/HOWTO/HOWTO-INDEX/howtos.html

BTW, don't worry or pay attention if you here people going on about
the differences between switches and bridges -- in your case (and in
most all other cases) there is no substantial difference.
Theoretically, switches _are_ just multi-port bridges.

hth,
prg
email above disabled



Relevant Pages

  • Re: Is it possible to bridge three NIC on a Windows 2000 Server
    ... The early ones only had two ports and were called bridges, ... If it only has two Nics it would be a parallel to the old ... since you can go out and buy a cheap switch for $50 that does the same ... Router and a Switch. ...
    (microsoft.public.win2000.networking)
  • Re: Connecting Wireless Router to a Linux-IP-Masquerading based network
    ... > I currently have a local network with my Linux machine doing the routing/IP ... > wireless router seamlessly into my current network. ... > want the router to be connected to my switch and the 10/100 ports in the ... Set LAN side of router to an unused static IP in same subnet as your LAN ...
    (comp.os.linux.networking)
  • Re: linux and smb
    ... > switch and router the linux machine will read the xp machine with smb. ...
    (comp.os.linux.networking)
  • Re: sharing a firewall?
    ... so we can all share one dial-up connection. ... and the switch should provide better performance. ... Networks" or "File and printer sharing for Microsoft Networks" to the modem! ... Maybe a Google search on "dial-up router" might turn up others. ...
    (microsoft.public.windowsxp.network_web)
  • Re: sharing a firewall?
    ... so we can all share one dial-up connection. ... and the switch should provide better performance. ... Networks" or "File and printer sharing for Microsoft Networks" to the modem! ... Maybe a Google search on "dial-up router" might turn up others. ...
    (microsoft.public.security)