Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jun 2005 09:31:18 -0400
From:      "Michael H. Semcheski" <lists@immuneit.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: NAT router confusion
Message-ID:  <200506240931.18594.lists@immuneit.com>
In-Reply-To: <5675255661ae.5661ae567525@liu.se>
References:  <5675255661ae.5661ae567525@liu.se>

next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 24 June 2005 06:25 am, Ulf Magnusson wrote:
> Thanks, I think I understand how it works now. I guess it's basically
> like an ordinary router that pretends it's a switch for all addresses
> that appear on the same local network. It looks at the destination
> address in IP packets and the address of the sending system and goes
> into switch mode if they both appear on the same subnet (which is pretty
> much verbatim what you said, when I think about it).

Its my understanding, and it is somewhat limited, that the host that is 
generating the traffic is really the one that determines whether the traffic 
needs to leave the network or not.  The router functionality only kicks in if 
a packet is sent to the gateway (think of the gateway as another host on the 
network) and the destination is outside of the network.


> Do switches gain anything by having full-duplex connections to hubs? I
> understand there must be a performance benefit when you connect a host
> directly to a switch, but won't the half-duplex connections of the hosts
> to the hub become a bottleneck?

By this question I'm a little confused.  Switches are devices that allow a 
bunch of connections, and packets are routed from one interface to another 
within the switch.  A hub is a device that allows a bunch of connections, and 
packets are more or less broadcast to every other interface on the hub.

If you go to your local computer store, you will not be able to buy a hub.  
Maybe there are hubs sold for specific legacy applications I don't know 
about, but in the consumer market, they have not sold hubs in at least 5 
years.  

I personally have never setup a hub, so I don't know whether there is 
something special about them that makes them half-duplex only.  I do know 
that many ethernet flavors do not autonegotiate as well as we would hope.   
If you have a 100Mb half-duplex connection from a FreeBSD host to another 
host, try "ifconfig fxp0 media 100baseTX media-opt full-duplex", which, 
assuming your NIC is fxp0 and my syntax isn't too rusty, will force the 
device into full-duplex mode.

To connect to switches that do not autonegotiate correctly, one thing you can 
do is setup a FreeBSD host with two NIC's.  Plug one switch into each NIC, 
and force each NIC to the right media type.  Set up a bridge on the FreeBSD 
host, and voila, you have solved the duplex problem.  We have this problem at 
work in some places.  A switch we want to use does not autonegotiate 
full-duplex with the switch computing services provides.  So, put a bridge in 
between and remove autonegotiation.  

Mike



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506240931.18594.lists>