From owner-freebsd-net@FreeBSD.ORG Wed Feb 25 05:42:37 2004 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 52AA416A506 for ; Wed, 25 Feb 2004 05:42:37 -0800 (PST) Received: from tigra.ip.net.ua (tigra.ip.net.ua [82.193.96.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 38C7543D2F for ; Wed, 25 Feb 2004 05:42:36 -0800 (PST) (envelope-from ru@ip.net.ua) Received: from heffalump.office.ipnet (heffalump.office.ipnet [10.71.1.80]) by tigra.ip.net.ua (8.12.10/8.12.9) with ESMTP id i1PDiV7I006510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 25 Feb 2004 15:44:32 +0200 (EET) (envelope-from ru@ip.net.ua) Received: (from ru@localhost) by heffalump.office.ipnet (8.12.11/8.12.11) id i1PDgS8V025015; Wed, 25 Feb 2004 15:42:28 +0200 (EET) (envelope-from ru) Date: Wed, 25 Feb 2004 15:42:28 +0200 From: Ruslan Ermilov To: DrumFire Message-ID: <20040225134228.GB24810@ip.net.ua> References: <20040224124734.77e8835b.dpphln@tin.it> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="61jdw2sOBCFtR2d/" Content-Disposition: inline In-Reply-To: <20040224124734.77e8835b.dpphln@tin.it> User-Agent: Mutt/1.5.6i X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: freebsd-net@FreeBSD.org Subject: Re: ifconfig and route problem. 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: Wed, 25 Feb 2004 13:42:37 -0000 --61jdw2sOBCFtR2d/ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 24, 2004 at 12:47:34PM +0000, DrumFire wrote: > Hi, >=20 > this is my configuration: >=20 > rl0: flags=3D8843 mtu 1500 > options=3D8 > inet 192.168.100.1 netmask 0xffffff00 broadcast 192.168.100.255 > ether 00:30:84:9e:9d:26 > media: Ethernet autoselect (100baseTX ) > status: active >=20 > and this is my default route=20 >=20 > default 192.168.100.254 UGS 0 0 rl0 >=20 > If I write something of this: >=20 > # ifconfig rl0 $ip (where ip can be also 192.168.100.1), my default > route is deleted, cut off server for my net. >=20 The reason why this is done is because each route has a pointer to one of the interface's address, and when this adress gets deleted, we invalidate the entry too. Not doing this caused us many problems before. You can see this linkage by using the following command: route -vn get default > There's a way to avoid ifconfig delete my default route when I modify=20 > a ipaddress? >=20 Unfortunately not, because there's no such operation like modifying an IP address -- you essentially remove one address and replace it with a new one (there's no such thing like SIOCCIFADDR). Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --61jdw2sOBCFtR2d/ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAPKZEUkv4P6juNwoRAr+7AJ0ff1M9aG5LDyYxBoOr2VWlJmPuPQCfa8Wg vyqf5zqW70uRn3iASEB4d6A= =8qbE -----END PGP SIGNATURE----- --61jdw2sOBCFtR2d/--