Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Jun 2002 11:42:46 +0300 (EEST)
From:      Iasen Kostov <ikostov@otel.net>
To:        Marko Zec <zec@tel.fer.hr>
Cc:        "Vladimir B. Grebenschikov" <vova@sw.ru>, <freebsd-net@freebsd.org>
Subject:   Re: [HELP] IPless VLAN interfaces
Message-ID:  <20020607113439.V32865-100000@shadowhand.OTEL.net>
In-Reply-To: <3CFFAD41.441C0E@tel.fer.hr>

next in thread | previous in thread | raw e-mail | index | archive | help


On Thu, 6 Jun 2002, Marko Zec wrote:

> "Vladimir B. Grebenschikov" wrote:
>
> > =F7 Thu, 06.06.2002, =D7 18:48, Marko Zec =CE=C1=D0=C9=D3=C1=CC:
> >
> > > > # ifconfig fxp0 1.1.1.1/24
> > > > # ifconfig vlan0 1.1.1.1/32
> > > > # ifconfig vlan1 1.1.1.1/32
> > > > # ifconfig vlan2 1.1.1.1/32
> > >
> > > This will never work - you can't have the same IP address/mask on mor=
e than
> > > one interface.
> >
> > Sure ? Do have try cut and paste my example into xterm ?
> >
> > vbook#/sys/i386/compile/VBOOK 142_> ifconfig -a
> > lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
> >         inet 127.0.0.1 netmask 0xff000000
> > fxp0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         inet 192.168.1.111 netmask 0xffffff00 broadcast 192.168.1.255
> >         ether 08:00:46:04:31:b3
> >         media: Ethernet autoselect (100baseTX)
> >         status: active
> > vbook#/sys/i386/compile/VBOOK 143_> ifconfig lo0 1.1.1.1/32 alias
> > vbook#/sys/i386/compile/VBOOK 144_> ifconfig fxp0 1.1.1.1/32 alias
> > vbook#/sys/i386/compile/VBOOK 145_> uname -a
> > FreeBSD vbook.express.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Fri May 24
> > 15:49:21 MSD 2002
> > root@vbook.express.ru:/usr/obj/usr/local/src/sys/VBOOK  i386
> > vbook#/sys/i386/compile/VBOOK 147_> ifconfig -a
> > lo0: flags=3D8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
> >         inet 127.0.0.1 netmask 0xff000000
> >         inet 1.1.1.1 netmask 0xffffffff
> > fxp0: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
> >         inet 192.168.1.111 netmask 0xffffff00 broadcast 192.168.1.255
> >         inet 1.1.1.1 netmask 0xffffffff broadcast 1.1.1.1
> >         ether 08:00:46:04:31:b3
> >         media: Ethernet autoselect (100baseTX)
> >         status: active
> >
> > Both addresses are work:
> >
> > vbook#/sys/i386/compile/VBOOK 153_> ping -R -S 1.1.1.1 127.0.0.1
> > PING 127.0.0.1 (127.0.0.1) from 1.1.1.1: 56 data bytes
> > 64 bytes from 127.0.0.1: icmp_seq=3D0 ttl=3D64 time=3D0.167 ms
> > RR:     localhost (127.0.0.1)
> >         1.1.1.1
> > 64 bytes from 127.0.0.1: icmp_seq=3D1 ttl=3D64 time=3D0.150 ms        (=
same
> > route)
> > vbook#/sys/i386/compile/VBOOK 154_> ping -n -R -S 1.1.1.1 192.168.1.109
> > PING 192.168.1.109 (192.168.1.109) from 1.1.1.1: 56 data bytes
> > 64 bytes from 192.168.1.109: icmp_seq=3D0 ttl=3D64 time=3D1.836 ms
> > RR:     192.168.1.109
> >         1.1.1.1
> > 64 bytes from 192.168.1.109: icmp_seq=3D1 ttl=3D64 time=3D1.600 ms    (=
same
> > route)
> >
> > (use loopback not best way to do this, but you can try any interface)
> >
> > > What OS are you running?
> >
> > # uname -a
> > FreeBSD vbook.express.ru 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Fri May 24
> > 15:49:21 MSD 2002
> > root@vbook.express.ru:/usr/obj/usr/local/src/sys/VBOOK  i386
> >
> > Same setup works well on 4-STABLE
>
> 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.
>
> Marko
>
xl0: flags=3D8943<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xfffffe00 broadcast 212.36.9.255
        ether 00:04:76:1b:cb:72
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
xl1: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xffffffff broadcast 212.36.9.113
        ether 00:50:da:5b:b2:64
        media: Ethernet autoselect (100baseTX <full-duplex>)
        status: active
xl2: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xffffffff broadcast 212.36.9.113
        ether 00:04:76:22:16:92
        media: Ethernet autoselect (10baseT/UTP)
        status: active
xl3: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xffffffff broadcast 212.36.9.113
        ether 00:04:76:22:16:97
        media: Ethernet autoselect (none)
        status: no carrier
xl4: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xffffffff broadcast 212.36.9.113
        ether 00:10:4b:b8:65:2c
        media: Ethernet autoselect (10baseT/UTP)
        status: active
xl5: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        options=3D3<rxcsum,txcsum>
        inet 212.36.9.113 netmask 0xffffffff broadcast 212.36.9.113
        ether 00:04:76:22:15:83
        media: Ethernet autoselect (100baseTX)
        status: active

As you see ip and mask are the same on 5 interfaces - it is realy realy
working productional router.

FreeBSD ShadoW.OTEL.net 4.5-STABLE FreeBSD 4.5-STABLE #3: Wed Apr 17
11:36:16 EE
ST 2002     root@ShadoW.OTEL.net:/usr/src/sys/compile/SH-GW  i386

  Of course I can do that and on 4.6-RC. Just a little patch in
netinet/in.c . And I wander who and why he put this "route addition check"
when kernel tries to set host route for the interface. Before it works
perfect with just a warring. And I realy need it to be that way.


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?20020607113439.V32865-100000>