Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Sep 2004 12:39:18 +0400
From:      Vladimir Grebenschikov <vova@fbsd.ru>
To:        "Dmitriy V. Andrushko" <da@ubtc.kharkov.ua>
Cc:        freebsd-net@freebsd.org
Subject:   Re: help:: configuring two network interfaces--message->>ifconfig: ioctl (SIOCAIFADDR): File exists
Message-ID:  <1094546358.1010.5.camel@localhost>
In-Reply-To: <Pine.LNX.4.33.0409071036420.6980-100000@sa.ubtc.kharkov.ua>
References:  <Pine.LNX.4.33.0409071036420.6980-100000@sa.ubtc.kharkov.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
=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<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
        options=3D8<VLAN_MTU>
        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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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



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