From owner-freebsd-net@FreeBSD.ORG Mon Jan 17 15:23:01 2005 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 255A016A4CE for ; Mon, 17 Jan 2005 15:23:01 +0000 (GMT) Received: from mx0.metrocast.net (coltrane-mx.metrocast.net [65.175.128.144]) by mx1.FreeBSD.org (Postfix) with SMTP id 43BFD43D39 for ; Mon, 17 Jan 2005 15:23:00 +0000 (GMT) (envelope-from tenpin784@metrocast.net) Received: (qmail 7201 invoked from network); 17 Jan 2005 15:22:50 -0000 Received: from xwing.jbarbieri.net (HELO ?10.10.100.109?) (65.175.136.163) by coltrane-mx.metrocast.net with SMTP; 17 Jan 2005 15:22:50 -0000 Message-ID: <41EBD846.7040808@metrocast.net> Date: Mon, 17 Jan 2005 10:22:46 -0500 From: John Barbieri User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: vova@fbsd.ru References: <1105974518.1229.9.camel@localhost> In-Reply-To: <1105974518.1229.9.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-net Subject: Re: Invalid 'route change' functioning X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jan 2005 15:23:01 -0000 Vladimir Grebenschikov wrote: >Hi > >I am try to do following thing - configure another interface with same >address on same broadcast segment (but wired) and then change route >entry from one interface to another: > > ># ifconfig iwi0 >iwi0: flags=8843 mtu 1500 > inet 192.168.1.111 netmask 0xfffffe00 broadcast 192.168.1.255 > ether 00:0e:35:03:82:74 > media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/54Mbps) > status: associated > ... ># netstat -rn >Routing tables > >Internet: >Destination Gateway Flags Refs Use Netif Expire >default 192.168.1.1 UGS 0 511183 iwi0 >127.0.0.1 127.0.0.1 UH 1 626 lo0 >192.168.0/23 link#3 UC 0 0 iwi0 >192.168.1.111 127.0.0.1 UGHS 0 0 lo0 >192.168.1.255 ff:ff:ff:ff:ff:ff UHLWb 0 1 iwi0 ># > >All is ok so far, then configure same address on another interface (not wireless): > ># ifconfig fxp0 192.168.1.111/23 ># ifconfig fxp0 >fxp0: flags=8843 mtu 1500 > options=8 > inet 192.168.1.111 netmask 0xfffffe00 broadcast 192.168.1.255 > ether 08:00:46:c8:45:b3 > media: Ethernet autoselect (100baseTX ) > status: active > >Ok, routing not changed, now I whant to change route entry 192.168.0/23 -> iwi0, to 192.168.0/23 -> fxp0 > ># route change 192.168.0/23 -iface fxp0 -cloning >change net 192.168.0: gateway fxp0 ># > >looks like ok, but: > ># netstat -rn >Routing tables > >Internet: >Destination Gateway Flags Refs Use Netif Expire >default 192.168.1.1 UGS 0 511317 iwi0 >127.0.0.1 127.0.0.1 UH 1 661 lo0 >192.168.0/23 link#3 UC 0 0 iwi0 >192.168.1.111 127.0.0.1 UGHS 0 0 lo0 ># > >nothing changed, delete + add works as expected: > ># route delete 192.168.0/23 && route add 192.168.0/23 -iface fxp0 -cloning >delete net 192.168.0 >add net 192.168.0: gateway fxp0 ># netstat -rn >Routing tables > >Internet: >Destination Gateway Flags Refs Use Netif Expire >default 192.168.1.1 UGS 0 511336 iwi0 >127.0.0.1 127.0.0.1 UH 1 663 lo0 >192.168.0/23 link#1 UCS 0 0 fxp0 >192.168.1.111 127.0.0.1 UGHS 0 0 lo0 ># > >(default still goes through wireless, as expected) > >Any ideas what wrong with 'route change' ? > > > why not do route delete default, down the wireless, then route add default 192.168.1.1 (and maybe even throw in an interface tag at the same time to make sure) ive never really had luck with the change command, if i was on the same lan as the box, i always just delete the default and re-add it. just my 2 cents worth