From owner-freebsd-net@FreeBSD.ORG Mon Jan 2 08:11:21 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 6F6EA106566B; Mon, 2 Jan 2012 08:11:21 +0000 (UTC) (envelope-from saeedeh.motlagh@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 76BE38FC14; Mon, 2 Jan 2012 08:11:20 +0000 (UTC) Received: by eaaf13 with SMTP id f13so19897284eaa.13 for ; Mon, 02 Jan 2012 00:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=zG8rP9nluB/a/fnZpRT4FDgySrXW54/nsD4iJJzoRB4=; b=NH0+90sD+tdO/urlqrLlSA1UObkX/U4DfWSYREjS3d2PjtWkR8GODH8c4a9ePaw+MK 8j1TO0X8ImRpZwUIN7D3c7fSpl+h5o+X7Q6i8OREqAURg2P6jgA3Ms/b4kMLYrNbwXpH FbR8UQj4PeFxIMextNnoTRQcoDabIa7yBodyo= Received: by 10.204.48.148 with SMTP id r20mr6551719bkf.116.1325491879429; Mon, 02 Jan 2012 00:11:19 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.123.17 with HTTP; Mon, 2 Jan 2012 00:10:37 -0800 (PST) In-Reply-To: References: <4EF038B9.5050203@gmx.com> <4EF18D7D.1050609@gmx.com> <4EF61535.4030507@gmx.com> <4EF8394F.8050108@gmx.com> <4EFAE551.8040101@gmx.com> From: saeedeh motlagh Date: Mon, 2 Jan 2012 11:40:37 +0330 Message-ID: To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, Alexander Lunev , Nikos Vassiliadis , Alireza Torabi Subject: Re: vlan without ip address 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: Mon, 02 Jan 2012 08:11:21 -0000 [image: untitled.bmp] thank you guys, the above picture is my network topology. as you see, i have four end point systems in the same range ip. three of them (c1, c3, c4) are the member of vlan1 and the other one (c2) is the member of vlan2. these three systems should ping each other and should not ping c2. there are three important points for me: 1- all of the vlans configurations should be done on the middle freebsd box which acts as switch and no vlan is defined on the end points. 2- the middle freebsd box should not have any ip addresses. 2- we can ping c4 from the other members of vlan1. in the other words, the middle freebsd box should be able to communicate with the remaining devices of the network (which can includes cisco switches). any suggestion for the configuration of the middle freebsd box to do this scenario, would be appreciated. yours On Sun, Jan 1, 2012 at 2:00 AM, Juli Mallett wrote: > On Sat, Dec 31, 2011 at 03:26, saeedeh motlagh > wrote: > > thank you guys for your answers but my problem is not solved yet:(( > > > > the thing is, i wanna have something like this: > > a freebsd box which acts like switch (for example cisco 2960). i want to > > define vlanX on one interface (without any ip address) and it tags any > > passing packets through that interface as vlanX (any passing packet will > > have vlanX ID). > > Did you see my previous message about VLAN interfaces in FreeBSD not > being like the VLANs one can define in a switch? You do not need the > interface to add any tag to incoming packets, if that is what you are > saying. Have you tried just bridging the interfaces without VLANs to > see if that does what you want? > > You may also be adding the VLAN in the wrong place. If you create an > interface em0.4, which is tagged VLAN 4 on em0, then any incoming > packet on em0 which has a VLAN tag of 4 will appear on em0.4. If you > send any packets on em0.4, then they will be sent out em0 with a VLAN > tag of for VLAN 4 added. Is that what you want? > > It may be helpful for you to draw us a diagram. Use specific > examples. Show an incoming packet. Does it have a VLAN tag? If so, > what is the VLAN number? What is the name of the physical interface > on which it arrives? Do you want that VLAN tag to be removed? Do you > want another VLAN tag to be added? Do you want it bridged to another > interface? If so, which interface? When it comes out that other > interface, should it have a VLAN tag? If so, with what VLAN number? > > You've mentioned that you're using bridging, then you say you want > switching, then you give a specific example of a switch you want > FreeBSD to act like. FreeBSD will not act like that switch. You may > be able to accomplish the same thing, but the performance, > configuration and operation will be different. If you want FreeBSD to > act exactly like a Cisco switch with a few lines in rc.conf, then you > should probably stop now, FreeBSD is the wrong tool for the job. > > If, however, you can be very specific about what it is you want to do, > instead of just repeating the same things about switches and VLANs, > then we might be able to help you do it with FreeBSD. We'd all very > much like to, but what you're trying to do is not clear. Forget all > about what the VLAN interfaces are named, forget all about IP > addresses, and tell us what you want to do. > > Thanks, > Juli. >