Skip site navigation (1)Skip section navigation (2)
Date:      07 Jun 2002 12:38:17 +0400
From:      "Vladimir B. " Grebenschikov <vova@sw.ru>
To:        "net@freebsd.org" <net@freebsd.org>
Subject:   Re: [HELP] IPless VLAN interfaces
Message-ID:  <1023439097.531.8.camel@vbook.express.ru>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
=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<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
        inet 127.0.0.1 netmask 0xff000000=20
fxp0: flags=3D8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1023439097.531.8.camel>