From owner-freebsd-net@FreeBSD.ORG Mon Mar 5 10:00:45 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 537AF1065675 for ; Mon, 5 Mar 2012 10:00:45 +0000 (UTC) (envelope-from bagadeh@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id CC3488FC2B for ; Mon, 5 Mar 2012 10:00:43 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so3992275bkc.13 for ; Mon, 05 Mar 2012 02:00:36 -0800 (PST) Received-SPF: pass (google.com: domain of bagadeh@gmail.com designates 10.204.129.8 as permitted sender) client-ip=10.204.129.8; Authentication-Results: mr.google.com; spf=pass (google.com: domain of bagadeh@gmail.com designates 10.204.129.8 as permitted sender) smtp.mail=bagadeh@gmail.com; dkim=pass header.i=bagadeh@gmail.com Received: from mr.google.com ([10.204.129.8]) by 10.204.129.8 with SMTP id m8mr9908560bks.69.1330941636705 (num_hops = 1); Mon, 05 Mar 2012 02:00:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cdNjvJ0Hpv+E7Ytc89qVDpJF0TtZX6PoobRyQgXynvk=; b=q+3TXXkPXmsYenZ1BY2LUdgbR+8AP6QWe2CBhkjmYn7iKEwbXP/HsmqYvqtxy/9xeE JLr+rSVCExDV5ZHMT8h6bw6C7zq2C2FbLHnf0SC2JJ/Opud+7oEk30dhUgmlazCw9G7f aMcLSF2AImkcr9zWTKCkqzdkggu8Cu7XvEspqzDKjVzzn3v0eunRsOf4WIs7BsRPmq1o 40v9WreZc0Sl/mvoPM+PGCVxS8uZ8jPQPQj7is1EdRNnt5mfAdGjF4pMxBPPe3LkhJxt 7Hmvfm/Q8RB+r/0By7dYpUQaAxgJB1NqAcbbsotd+kfWulhLiLsEYtEVeR2ax3NDkTOV aPZw== MIME-Version: 1.0 Received: by 10.204.129.8 with SMTP id m8mr7845597bks.69.1330941636600; Mon, 05 Mar 2012 02:00:36 -0800 (PST) Received: by 10.204.167.139 with HTTP; Mon, 5 Mar 2012 02:00:36 -0800 (PST) In-Reply-To: <20120305084359.GA56606@server.vk2pj.dyndns.org> References: <20120305084359.GA56606@server.vk2pj.dyndns.org> Date: Mon, 5 Mar 2012 13:30:36 +0330 Message-ID: From: h bagade To: Peter Jeremy Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-net Subject: Re: problem with vlan interfaces tagging/untagging in a simulated switch box 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, 05 Mar 2012 10:00:45 -0000 on layer 2 switch, ports doesn't have ip addresses and traffic comming from a vlan port is tagged and pass through trunk port. this means that in our freebsd box which plays the role of switch, no interfaces should have ip addresses. In your topology the em0 which plays the role of trunk port has ip address and also vlan interfaces under its support. if we assume that em0 is the trunk port of our switch, and em1 the port assigned to vlan 2, which doesn't have any ip address too; then all traffic comes from em1 should be labled vlan 2 tag and send out the em0. I want to achieve this. besides if anoth On 3/5/12, Peter Jeremy wrote: > On 2012-Mar-04 10:01:07 +0330, h bagade wrote: >>I have problems with vlan interfaces on freebsd. I want to make my >>system like a switch with vlan ports and also a trunk port in >>conjuction with other switches. I thought that vlan interfaces would >>help me tagging traffic when traffic is going out the trunk port(or >>when it receives on vlan ports). >>The problem, I've encountered is that vlan interafaces on freebsd do >>tagging/untagging when the traffic is sourced/destined from/to them >>which in this case they should be assigned IP addresses. In other >>words they won't tag the traffic passing through their parent >>interface which I need to. > > I am doing this with no problems so I suspect you are doing something > wrong. As an example, the following creates a IEEE802.1Q trunk on > em0 with 192.168.1.0/24 untagged and the remaining subnett tagged: > > ifconfig em0 inet 192.168.1.123/24 > ifconfig vlan10 inet 192.168.10.123/24 vlandev em0 vlan 10 > ifconfig vlan11 inet 192.168.11.123/24 vlandev em0 vlan 11 > ifconfig vlan12 inet 192.168.12.123/24 vlandev em0 vlan 12 > ifconfig vlan13 inet 192.168.13.123/24 vlandev em0 vlan 13 > > Can you post the rc.conf etc entries that you are using and a > description of what you are trying to achieve. > > -- > Peter Jeremy >