From owner-freebsd-net@FreeBSD.ORG Sun Feb 19 15:14:43 2006 Return-Path: X-Original-To: net@freebsd.org 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 0934A16A420 for ; Sun, 19 Feb 2006 15:14:43 +0000 (GMT) (envelope-from joe@tao.org.uk) Received: from mailhost.tao.org.uk (transwarp.tao.org.uk [87.74.4.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9124E43D45 for ; Sun, 19 Feb 2006 15:14:41 +0000 (GMT) (envelope-from joe@tao.org.uk) Received: from genius.tao.org.uk (genius.tao.org.uk [87.74.4.41]) by mailhost.tao.org.uk (Postfix) with ESMTP id A26C05C24 for ; Sun, 19 Feb 2006 15:14:40 +0000 (GMT) Received: by genius.tao.org.uk (Postfix, from userid 100) id C69524054; Sun, 19 Feb 2006 15:14:35 +0000 (GMT) Date: Sun, 19 Feb 2006 15:14:35 +0000 From: Josef Karthauser To: net@freebsd.org Message-ID: <20060219151435.GE15477@genius.tao.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a1QUDc0q7S3U7/Jg" Content-Disposition: inline User-Agent: Mutt/1.5.11 Cc: Subject: Default gateway - wrong interface. ! X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Feb 2006 15:14:43 -0000 --a1QUDc0q7S3U7/Jg Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hey guys, I'm guessing that this is a bug (or feature!). I've got a machine with a wlan interface (iwi0), with an ipv4 network address and a default gateway. I also have an ethernet card in the same machine (em0) with the same IP address. The idea is that I can bring the wireless down, and the wired interface up to get fast transfers when approriate, and be wireless the rest of the time. That works fine, apart from the default gateway: # ifconfig iwi0 down # ifconfig em0 up # arp -ad # netstat -rn Internet: Destination Gateway Flags Refs Use Netif Expire default 87.74.4.33 UGS 0 123 iwi0 87.74.4.32/27 link#3 UC 0 0 em0 87.74.4.33 00:90:d0:02:3f:16 UHLW 2 1 em0 87.74.4.34 00:d0:b7:88:c8:20 UHLW 1 1191414 em0 127.0.0.1 127.0.0.1 UH 0 2 lo0 Notice, the local subnet is off the em0, but the default route is still wired off the iwi0. # route delete default # route add default 87.74.4.33 # netstat -rn Internet: Destination Gateway Flags Refs Use Netif Expire default 87.74.4.33 UGS 0 123 iwi0 87.74.4.32/27 link#3 UC 0 0 em0 87.74.4.33 00:90:d0:02:3f:16 UHLW 2 1 em0 87.74.4.34 00:d0:b7:88:c8:20 UHLW 1 1191414 em0 127.0.0.1 127.0.0.1 UH 0 2 lo0 The default route is _still_ off iwi0; but should be off em0. There's obviously something dumb doing on here. Why does the default route have to be nailed to an interface? It's clear that 87.74.4.33 is available from em0 as far as the routing table is concerned. Joe --a1QUDc0q7S3U7/Jg Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iEYEARECAAYFAkP4i1sACgkQXVIcjOaxUBZ3WwCfZ4w5Q8OUaUxmYxouHWjqfEfj NrEAoIsQf2gYn9HRq6vogf4K62Biul8V =VUxB -----END PGP SIGNATURE----- --a1QUDc0q7S3U7/Jg--