From owner-freebsd-current@FreeBSD.ORG Sun Mar 10 02:21:45 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 51A68EF9 for ; Sun, 10 Mar 2013 02:21:45 +0000 (UTC) (envelope-from zbeeble@gmail.com) Received: from mail-vb0-x22d.google.com (mail-vb0-x22d.google.com [IPv6:2607:f8b0:400c:c02::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 0FAD16FA for ; Sun, 10 Mar 2013 02:21:44 +0000 (UTC) Received: by mail-vb0-f45.google.com with SMTP id p1so1141587vbi.4 for ; Sat, 09 Mar 2013 18:21:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=HAagzD4pmPAy1ozvIKh23qSohbUREVPLe++vQZlrX78=; b=MlP63Mn13dJqoefZFfL+c7reJkIai7veIWX3oBWtA+aKtdEMI0oXvBRugU/68yzdm4 jwHsMtyXx4FwWZjCeTEVWhJK92jkL92k7qlNonyehwd61vTqYQTJfBTEg0ibOVZ4c5xZ 0UWtiXaaTf3VpOFO3Dntse8EBWRXK/2GtmU9X7JNFP/891rMr5Ks0UkxGJxo++QJnAh4 XSCDPVkeospm6hoPvxEwKWWhdwhwTW7PjFEXz9oczhVGS7lSLb0kb+TgomHCTTC74uHU vYf7Tl9ZjeBbmhJ4n/6jM0yfcWa2rMgH7e1vOv/amEt4qvWTV8QLcHkY4ZBff2Ex5F4F ip3Q== MIME-Version: 1.0 X-Received: by 10.220.40.9 with SMTP id i9mr3021264vce.23.1362882104607; Sat, 09 Mar 2013 18:21:44 -0800 (PST) Received: by 10.220.232.6 with HTTP; Sat, 9 Mar 2013 18:21:44 -0800 (PST) In-Reply-To: References: Date: Sat, 9 Mar 2013 21:21:44 -0500 Message-ID: Subject: Re: multi-homing in freebsd From: Zaphod Beeblebrox To: Yasir hussan Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Current , Daniel Nebdal X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Mar 2013 02:21:45 -0000 On Sat, Mar 9, 2013 at 8:57 AM, Yasir hussan wrote: > i want to have differnet ips`s and each should have different interface, > it could be a virtual interface. like u can made it like > > *ifconfig arge0.1 create* > > but each ip should able to access from differnet machine > > This is linux-specific. We don't create sub interfaces. If you want the equivalent on FreeBSD, you would just: ifconfig arge0 192.168.0.1/24 ifconfig arge0 192.168.1.1/24 alias ... and so on for as many addresses as you require. Replace "alias" with "delete" to remove an alias from an interface (including the first one). In retrospect, it might be good for us to harmonize the meanings there... > On Sat, Mar 9, 2013 at 7:29 AM, Daniel Nebdal wrote: > >> Going by Zaphod's recommendation of using a /32 for each IP, how about >> this? >> >> ifconfig arge0 inet 192.168.1.100/32 >> ifconfig arge0 alias 192.169.1.100/32 >> > Nope, you miss an important point. If you were going to add 192.168.0.[123] you might: ifconfig em0 192.168.0.1/24 ifconfig em0 192.168.0.2/32 alias ifconfig em0 192.168.0.3/32 alias ... these three addresses are on the _same_ network. In your example above, you would require the correct netmask for each network _unless_ you did something like the following: ifconfig em0 192.168.1.1/15 ifconfig em0 192.168.1.100/32 alias ifconfig em0 192.169.1.100/32 alias ... ie: you're in effect saying the network goes from 192.168.1.0 to 192.169.255.255.