From owner-freebsd-current@FreeBSD.ORG Wed Mar 13 01:35:45 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 82AF3F43 for ; Wed, 13 Mar 2013 01:35:45 +0000 (UTC) (envelope-from ml@my.gd) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1AA7BD for ; Wed, 13 Mar 2013 01:35:44 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id 8so478474wgl.30 for ; Tue, 12 Mar 2013 18:35:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to:x-gm-message-state; bh=S+faIdRSKy8lT9VRmyfk3gooG/6lnEQmDTQZ8yXwLnk=; b=gZHv+S4TwBXhnOCIRRnng57kLmdbOCoF1zV4+FLnXAcIVmm/UmOdlLN8fGbvm2szxH e5363ecBhMOT4ePo/trCnLXWT+rpS2/1TmV+/87mFzET/64GkPZhSN21wvAQuTB+AFVG MA09y936W9sepRCRasSzuXe0t7dlsVRo2jzUCRUo0i2TfaMihL+JcnpQbaVCIKG0Oq0Y EzOSRs1JLBhg/nPy2Qv1GQZxNva7wWu966nkamnKv0Z9juhmVtYIMkZQVNFpFo2NBrI8 JwfKMT4JsqkiYrbVSi29kt5McTb5PouYQrjZsvdrivskMo1wKi0oabzX/KwxjkbpU5dI +fEA== X-Received: by 10.180.75.110 with SMTP id b14mr23793475wiw.21.1363138543513; Tue, 12 Mar 2013 18:35:43 -0700 (PDT) Received: from ?IPv6:2a01:e35:8a58:2600:dd05:db5b:e25e:ec7c? ([2a01:e35:8a58:2600:dd05:db5b:e25e:ec7c]) by mx.google.com with ESMTPS id k5sm27801728wiy.5.2013.03.12.18.35.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 18:35:42 -0700 (PDT) References: <513FCF2D.1000006@clearchain.com> Mime-Version: 1.0 (1.0) In-Reply-To: <513FCF2D.1000006@clearchain.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <0619561E-E343-4190-9C42-5BC5396D47E1@my.gd> X-Mailer: iPhone Mail (10B144) From: Damien Fleuriot Subject: Re: using multiple interfaces for same Network Card Date: Wed, 13 Mar 2013 02:35:22 +0100 To: Benjamin Close X-Gm-Message-State: ALoCoQnQDA0199fuJ3DhUveva7QyB26+VA4uNHFvCLB8DDlTBb0VRiX/Qi1BhQKeJE4/SnF/rcJT Cc: Tom Evans , Yasir hussan , Ian FREISLICH , Current 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: Wed, 13 Mar 2013 01:35:45 -0000 On 13 Mar 2013, at 01:58, Benjamin Close wro= te: > On 12/03/2013 22:36, Ian FREISLICH wrote: >> Yasir hussan wrote: >>> Thanks for notic but all the elebration was for make alias on one >>> interface but i want to have multiple interface, i can no where that >>> some one would have tring to creating new interfaces and using them, >>> or may be i am missing something, just send its solution if have, >>> solution should be for >> I still think you're confusing Linux semantics with FreeBSD semantics. >>=20 >> On linux you would have: >> eth0 Link encap:Ethernet HWaddr 00:1E:C9:53:0B:61 >> inet addr:10.0.0.1 Bcast:10.0.0.255 Mask:255.255.255.0 >> inet6 addr: fe80::21e:c9ff:fe53:b61/64 Scope:Link >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> RX packets:211328068 errors:0 dropped:0 overruns:0 frame:0 >> TX packets:368394006 errors:0 dropped:0 overruns:0 carrier:0 >> collisions:0 txqueuelen:1000 >> RX bytes:34065846811 (31.7 GiB) TX bytes:476377525764 (443.6 G= iB) >> Interrupt:169 Memory:e6000000-e6011100 >>=20 >> eth0:1 Link encap:Ethernet HWaddr 00:1E:C9:53:0B:61 >> inet addr:10.0.1.1 Bcast:10.0.1.255 Mask:255.255.255.0 >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 >> Interrupt:169 Memory:e6000000-e6011100 >>=20 >>=20 >> On FreeBSD you would have: >>=20 >> re0: flags=3D8843 metric 0 mtu 15= 00 >> options=3D8209b >> ether 54:04:a6:96:0c:1e >> inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 >> inet 10.0.1.1 netmask 0xffffff00 broadcast 10.0.1.255 >> media: Ethernet autoselect (1000baseT ) >> status: active >>=20 >> These are both the same thing. Is there any particular reason that >> you want multiple interfaces? I can't see a use for it beyond "it's >> what I'm used to seeing" unless they're VLAN interfaces. >>=20 >> Ian >=20 > Just a comment on the aliases vs virtual interfaces. Having used both alia= ses and virtual interfaces, there is use cases which have always been easie= r under Linux than FreeBSD due to the virtual interface. >=20 > Once case is firewall rules that follow the device. > Let me explain. >=20 > Lets say under freebsd I setup two lans on the same card using aliases and= a switch that is NOT vlan capable (ie home adsl modem, some other unmanaged= switch). > ifconfig re0 172.16.1.1 > ifconfig re0 alias 192.168.1.1 >=20 > The firewall rules require the net to be used rather than an interface sin= ce the interface handles more than one lan. > ie (pf style): >=20 > pass in quick on re0 from 192.168.1.1/24 to any >=20 > Linux makes this easier: >=20 > ifconfig eth0 172.16.1.1 > ifconfig eth0:1 192.168.1.1 >=20 > pass in quick on eth0:1 from any to any >=20 > Whilst it's a minor difference, I can shift the device IP and my firewall r= ules automatically follow. This is just one case where having a virtual devi= ce make things easier=20 I fail to see a use case where having 2 networks on a single interface would= be useful, let alone desirable. This isn't to say your reasoning behind the PF rules thing is incorrect, all= I'm saying is "oh god no" to this. By the way I'm wondering if this would work: re0 has IPs 192.168.0.1234, 10.0.0.1/24 pass in quick on re0 inet from re0:1:network re0:network =3D 192.168.0.0/24 re0:1 =3D 10.0.0.1/32 I wonder if re0:1:network would expand to 10.0.0.0/24...=