From owner-freebsd-net@FreeBSD.ORG Tue Sep 7 08:39:49 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 1E34316A4CE for ; Tue, 7 Sep 2004 08:39:49 +0000 (GMT) Received: from vbook.fbsd.ru (asplinux.ru [195.133.213.194]) by mx1.FreeBSD.org (Postfix) with ESMTP id C112E43D31 for ; Tue, 7 Sep 2004 08:39:48 +0000 (GMT) (envelope-from vova@vbook.fbsd.ru) Received: from vova by vbook.fbsd.ru with local (Exim 4.42 (FreeBSD)) id 1C4bVX-0000LV-5d; Tue, 07 Sep 2004 12:39:19 +0400 From: Vladimir Grebenschikov To: "Dmitriy V. Andrushko" In-Reply-To: References: Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable Organization: SWsoft Date: Tue, 07 Sep 2004 12:39:18 +0400 Message-Id: <1094546358.1010.5.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 1.5.94.1FreeBSD GNOME Team Port Sender: Vladimir Grebenschikov cc: kamal kc cc: freebsd-net@freebsd.org Subject: Re: help:: configuring two network interfaces--message->>ifconfig: ioctl (SIOCAIFADDR): File exists X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vova@fbsd.ru List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Sep 2004 08:39:49 -0000 =F7 =D7=D4, 07/09/2004 =D7 10:38 +0300, Dmitriy V. Andrushko =D0=C9=DB=C5= =D4: > > ifconfig_rl1=3D"inet 192.168.10.1 netmask 255.255.255.0" > > ifconfig_rl0=3D"inet 192.168.10.2 netmask 255.255.255.0" >=20 > You can't have two network interfaces on the same subnet. You can > configure your net next way: > ifconfig_rl1=3D"inet 192.168.10.1 netmask 255.255.255.0" > ifconfig_rl0=3D"inet 192.168.20.1 netmask 255.255.255.0" Actually you can # ifconfig ndis0 10.111.0.1/24 # route delete 10.111.0.0/24 delete net 10.111.0.0 # ifconfig fxp0 10.111.0.2/24 # ifconfig -a lo0: flags=3D8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000=20 fxp0: flags=3D8943 mtu 1500 options=3D8 inet 10.111.0.2 netmask 0xffffff00 broadcast 10.111.0.255 ether 08:00:46:c8:45:b3 media: Ethernet autoselect (100baseTX) status: active ndis0: flags=3D8843 mtu 1500 inet 10.111.0.1 netmask 0xffffff00 broadcast 10.111.0.255 ether 00:0e:35:03:82:74 media: IEEE 802.11 Wireless Ethernet autoselect status: no carrier ssid "" channel -1 authmode OPEN powersavemode OFF powersavesleep 100 rtsthreshold 2312 protmode CTS wepmode OFF weptxkey 1 But you should select what target interface will be for routing to this subnet, in my example, after configuration of ndis0, I have removed route of subnet 10.111.0.0/24 to this interface, and then add address and routing to subnet on fxp0 interface. now expecting routing table: # netstat -rn Routing tables Internet: Destination Gateway Flags Refs Use Netif Expire 10.111/24 link#2 UC 0 0 fxp0 127.0.0.1 127.0.0.1 UH 1 756 lo0 We see, subnet routed to fxp0, but ndis0 still can receive traffic as configured. But such configuration is very specific, and you should very understand what you do. --=20 Vladimir B. Grebenchikov vova@fbsd.ru