Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Nov 2004 15:05:54 +0100
From:      Bernd Walter <ticso@cicely12.cicely.de>
To:        Sean Chittenden <sean@chittenden.org>
Cc:        net@freebsd.org
Subject:   Re: Ability to live lock 5.3 via routing...
Message-ID:  <20041110140554.GN98623@cicely12.cicely.de>
In-Reply-To: <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org>
References:  <7070775A-331F-11D9-A34C-000A95C705DC@chittenden.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Nov 10, 2004 at 05:50:10AM -0800, Sean Chittenden wrote:
> Pretty easy for me to reproduce.  The machine live locks so I can't get 
> anything out of it, serial console or otherwise.  :(  Imagine a machine 
> with two NICs, fxp0 and fxp1 (though it could be any two NICs).  The 
> following commands should lead to a lock:
> 
> # Add the primary address on the external NIC
> ifconfig fxp0 192.168.1.2 netmask 255.255.255.0 media 100baseTX 
> mediaopt full-duplex
> 
> # Add the default gateway
> route add default 192.168.1.1
> 
> # Add a network to the internal interface
> ifconfig fxp1 10.10.10.1 netmask 255.255.255.0 media 100baseTX mediaopt 
> full-duplex
> 
> # On the external interface, on the same VLAN, there are two other 
> networks.
> # Add aliases that way the machine can participate on those networks.
> ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.255
> ifconfig fxp0 alias 192.168.3.250 netmask 255.255.255.255

You should use the correct netmask for the networks:
e.g.:
ifconfig fxp0 alias 192.168.2.250 netmask 255.255.255.0
or:
ifconfig fxp0 alias 192.168.2.250/24
/32 is only correct if you are adding an alias for a network you
already participate.

> # Add a route so that machines on the internal network can get
> # to the 192.168.2.0/24 network.  This command succeeds.
> route add -net 192.168.2.250/24 192.168.2.250

If you add network routes you should better use the network address
(192.168.2.0 in this case).
But the complete route is only required because the above alias has the
wrong netmask.
You should just remove it.

> # Add a route so that machines on the internal network can also
> # get to the 192.168.3.0/24 network.  This command results in a hard
> # lock of the system.
> route add -net 192.168.3.250/24 192.168.3.250

Same as last route.
But it shouldn't hard lock anyway.

-- 
B.Walter                   BWCT                http://www.bwct.de
bernd@bwct.de                                  info@bwct.de



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