From owner-freebsd-net@FreeBSD.ORG Sat Feb 18 05:28:28 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1BED106566C for ; Sat, 18 Feb 2012 05:28:28 +0000 (UTC) (envelope-from qing.li@bluecoat.com) Received: from whisker.bluecoat.com (whisker.bluecoat.com [216.52.23.28]) by mx1.freebsd.org (Postfix) with ESMTP id 9369C8FC0C for ; Sat, 18 Feb 2012 05:28:28 +0000 (UTC) Received: from PWSVL-EXCHTS-01.internal.cacheflow.com ([10.2.2.122]) by whisker.bluecoat.com (8.14.2/8.14.2) with ESMTP id q1I5SSsb013653 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Fri, 17 Feb 2012 21:28:28 -0800 (PST) Received: from PWSVL-EXCMBX-01.internal.cacheflow.com ([fe80::15bc:12e2:4676:340f]) by PWSVL-EXCHTS-01.internal.cacheflow.com ([fe80::5c50:e2ba:8115:4223%20]) with mapi id 14.01.0289.001; Fri, 17 Feb 2012 21:28:23 -0800 From: "Li, Qing" To: "M. V." , "freebsd-net@freebsd.org" Thread-Topic: Assigning multiple IPs in the same network to an interface Thread-Index: AQHM7KWcO/Pv8StWKUWgK1T5BpUJNZZCIcqg Date: Sat, 18 Feb 2012 05:28:22 +0000 Message-ID: References: <1329376106.7683.YahooMailNeo@web162203.mail.bf1.yahoo.com> In-Reply-To: <1329376106.7683.YahooMailNeo@web162203.mail.bf1.yahoo.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [216.52.23.68] Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: RE: Assigning multiple IPs in the same network to an interface X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 05:28:28 -0000 Yes, what you are trying to do is allowed and is supported. In fact several= bugs=20 were fixed to support such configuration properly. For example, see these c= ommits: http://svnweb.freebsd.org/base?view=3Drevision&revision=3D225947 http://svnweb.freebsd.org/base?view=3Drevision&revision=3D225223 I vague remember fixing a bug with this exact description but I am having a bit difficult locating the patch. Could you please indicate what version you are running ? --Qing > -----Original Message----- > From: owner-freebsd-net@freebsd.org [mailto:owner-freebsd- > net@freebsd.org] On Behalf Of M. V. > Sent: Wednesday, February 15, 2012 11:08 PM > To: freebsd-net@freebsd.org > Subject: Assigning multiple IPs in the same network to an interface >=20 > hi everybody, >=20 > i have a problem with setting multiple IPs in the same network in > FreeBSD: >=20 > - suppose I assign two new IP addresses in the same network to eth0 > with ifconfig: > #ifconfig eth0 add 192.168.10.1/24 > #ifconfig eth0 add 192.168.10.2/24 >=20 > - everything works fine and the output of "netstat -r" is like what it > should be: > #netstat -r > .... > 192.168.10.0=A0=A0 eth0 > 192.168.10.1=A0=A0=A0 lo0 > 192.168.10.2=A0=A0=A0 lo0 > ... >=20 > - but now if I delete first IP address, connection to 192.168.10.0 > network will be gone. and in output of "netstat -r" the route to > 192.168.10.0 (via eth0) is gone: > #ifconfig eth0 delete 192.168.10.1 >=20 > #netstat -r > .... >=20 > 192.168.10.2=A0=A0=A0 lo0 > ..... >=20 > - am i missing something here? shouldn't the route to the network > remain in routing table (because we still have 192.168.10.2 assigned to > interface)? >=20 > Thanks. >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"