From owner-freebsd-net Fri Jun 7 1:38:31 2002 Delivered-To: freebsd-net@freebsd.org Received: from vbook.express.ru (asplinux.ru [195.133.213.194]) by hub.freebsd.org (Postfix) with ESMTP id 2CE6C37B403 for ; Fri, 7 Jun 2002 01:38:23 -0700 (PDT) Received: from vova by vbook.express.ru with local (Exim 3.36 #1) id 17GFGD-0000Bp-00 for net@freebsd.org; Fri, 07 Jun 2002 12:38:17 +0400 Subject: Re: [HELP] IPless VLAN interfaces From: "Vladimir B. " Grebenschikov To: "net@freebsd.org" In-Reply-To: <3CFFAD41.441C0E@tel.fer.hr> References: <20020606125126.3d44145c.c.prevotaux@hexanet.fr> <1023373804.470.20.camel@vbook.express.ru> <3CFF7644.F4F5CC1@tel.fer.hr> <1023376206.470.40.camel@vbook.express.ru> <3CFFAD41.441C0E@tel.fer.hr> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable X-Mailer: Ximian Evolution 1.0.5 Date: 07 Jun 2002 12:38:17 +0400 Message-Id: <1023439097.531.8.camel@vbook.express.ru> Mime-Version: 1.0 Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org =F7 Thu, 06.06.2002, =D7 22:43, Marko Zec =CE=C1=D0=C9=D3=C1=CC: > In your original post, you were suggesting to put the same IP/mask on dif= ferent > "real" interfaces, not loopback. Could you pls. try to create a couple of= vlan > interfaces (ifconfig vlan0 create...), than configure them with the same = IP > addresses/masks as you suggested earlier, and show us the results of this > procedure? On my 4.6-RC system, such thing just don't work, thanks God. Ok EEXISTS message you have is because kernel can't add one more route for same address, it need to help kernel a bit: vbook#/home/vova 121_> ifconfig vlan0 create vbook#/home/vova 122_> ifconfig vlan1 create vbook#/home/vova 123_> ifconfig vlan2 create vbook#/home/vova 124_> ifconfig vlan0 vlan 1 vlandev fxp0 vbook#/home/vova 125_> ifconfig vlan1 vlan 2 vlandev fxp0 vbook#/home/vova 126_> ifconfig vlan2 vlan 3 vlandev fxp0 vbook#/home/vova 127_> ifconfig fxp0 1.1.1.1/24 vbook#/home/vova 128_> ifconfig vlan0 1.1.1.1/32 vbook#/home/vova 129_> route delete 1.1.1.1 delete host 1.1.1.1 vbook#/home/vova 130_> ifconfig vlan1 1.1.1.1/32 vbook#/home/vova 131_> route delete 1.1.1.1 delete host 1.1.1.1 vbook#/home/vova 132_> ifconfig vlan2 1.1.1.1/32 vbook#/home/vova 133_> ifconfig -a lo0: flags=3D8049 mtu 16384 inet 127.0.0.1 netmask 0xff000000=20 fxp0: flags=3D8943 mtu 1500 inet 1.1.1.1 netmask 0xffffff00 broadcast 1.1.1.255 ether 08:00:46:04:31:b3 media: Ethernet autoselect (100baseTX) status: active vlan0: flags=3D8843 mtu 1500 inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1 ether 08:00:46:04:31:b3 vlan: 1 parent interface: fxp0 vlan1: flags=3D8843 mtu 1500 inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1 ether 08:00:46:04:31:b3 vlan: 2 parent interface: fxp0 vlan2: flags=3D8843 mtu 1500 inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1 ether 08:00:46:04:31:b3 vlan: 3 parent interface: fxp0 (sorry, I forget about such simple thing because rare use more then one=20 address with same mask) PS: about this in kernel code there is beautiful comment (XXX part): /*- * Don't add host routes for interface addresses of * 0.0.0.0 --> 0.255.255.255 netmask 255.0.0.0. This makes it * possible to assign several such address pairs with consistent * results (no host route) and is required by BOOTP. * * XXX: This is ugly ! There should be a way for the caller to * say that they don't want a host route. */ =20 > Marko >=20 --=20 Vladimir B. Grebenschikov vova@sw.ru, SWsoft, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message