From owner-freebsd-current@FreeBSD.ORG Thu Mar 14 19:06:39 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 C69B7D7D for ; Thu, 14 Mar 2013 19:06:39 +0000 (UTC) (envelope-from gyrd-se@thanelange.no) Received: from smtp.getmail.no (smtp.getmail.no [84.208.15.66]) by mx1.freebsd.org (Postfix) with ESMTP id 501D95E5 for ; Thu, 14 Mar 2013 19:06:39 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=ISO-8859-1 Received: from get-mta-scan04.get.basefarm.net ([10.5.16.4]) by get-mta-out01.get.basefarm.net (Sun Java(tm) System Messaging Server 7.0-0.04 64bit (built Jun 20 2008)) with ESMTP id <0MJN00JR8ZQW1Q80@get-mta-out01.get.basefarm.net> for freebsd-current@freebsd.org; Thu, 14 Mar 2013 20:06:32 +0100 (MET) Received: from get-mta-scan04.get.basefarm.net (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id 82F8A770DA_1421FB8B for ; Thu, 14 Mar 2013 19:06:32 +0000 (GMT) Received: from smtp.getmail.no (unknown [10.5.16.4]) by get-mta-scan04.get.basefarm.net (Sophos Email Appliance) with ESMTP id 3246B770BC_1421FB8F for ; Thu, 14 Mar 2013 19:06:32 +0000 (GMT) Received: from cm-84.211.88.167.getinternet.no ([84.211.88.167]) by get-mta-in01.get.basefarm.net (Sun Java(tm) System Messaging Server 7.0-0.04 64bit (built Jun 20 2008)) with SMTP id <0MJN00CZ5ZQRVV10@get-mta-in01.get.basefarm.net> for freebsd-current@freebsd.org; Thu, 14 Mar 2013 20:06:32 +0100 (MET) Received: (qmail 48407 invoked by uid 89); Thu, 14 Mar 2013 20:06:26 +0100 Received: from unknown (HELO ?10.0.10.184?) (gyrd@thanelange.no@77.241.104.2) by cm-84.211.88.167.getinternet.no with SMTP; Thu, 14 Mar 2013 20:06:26 +0100 Message-id: <51421FB2.5070204@thanelange.no> Date: Thu, 14 Mar 2013 20:06:26 +0100 From: Gyrd Thane Lange User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 To: freebsd-current@freebsd.org, Yasir hussan Subject: Re: vlan interface does not repond on untagged packets References: In-reply-to: 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: Thu, 14 Mar 2013 19:06:39 -0000 On 14.03.2013 15:05, Yasir hussan wrote: > Hi, > > i am creating and testing vlan using these commands, > > *ifconfig arge0 192.168.100.10 netmask 255.255.255.0* > * > * > *ifconfig vlan4 create* > *ifconfig vlan4 vlandev arge0 vlan 4* > *ifconfig vlan4 192.168.1.10 netmask 255.255.255.0* > > here arge0 is the default interface of my ethernet device, This looks about right, you can test it locally on the FreeBSD machine with: freebsd# ifconfig vlan4 vlan4: flags=8843 metric 0 mtu 1500 options=3 ether 50:e5:49:5f:1f:89 inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::52e5:49ff:fe5f:1f89%vlan4 prefixlen 64 scopeid 0x8 nd6 options=21 media: Ethernet autoselect (100baseTX ) status: active vlan: 4 parent interface: re0 freebsd# ping 192.168.1.10 (you should receive a lot of replies from yourself) > now i want to access vlan4 interface from an other pc which has linux and > is dirctly connected to my freebsd machine, now if i try to ping linux > machine it will send tagged packets but linux does not recogniz it and > leave it, and similarly when i try to ping linux machine to vlan4 interface > on freebsd, linux send untagged packets so vlan4 does not response to it. Unless you have set up vlan interfaces on the Linux machine then this is to be expected. Using instructions from: https://wiki.archlinux.org/index.php/VLAN linux# ip link add link eth0 name eth0.4 type vlan id 4 linux# ip addr add 192.168.1.20/24 brd 192.168.1.255 dev eth0.4 linux# ip link set dev eth0.4 up Note: if you have udev running it will override your "eth0.4" name, and call it something else. After the first command: linux# ip link show (Will give a list. You should probably find something like "eth.4@eth0" near the end. Continue the rest of the commands with whatever part of the name before the "@". I.e. strip away the "@eth0" at end.) Use ifconfig and ping locally to verify that you have the vlan setup. You should now be able to reach both of the machines from each other. Assuming they are connected to the same network switch. > I want that my vlan4 interface could able to recongnize untagged packets > and could respond to it Now this is an entirely new and important requirement! I have read your previous threads, and still don't understand your networking requirement. For a vlan to work, tagging all the packets are essential. All the machines, including all the clients must also have the same vlan configured for it to work. It will *not work* otherwise. What exactly is your requirement? Could you please tell us *why* the other machines are unable to use the primary IP address (192.168.100.10) assigned to the arge0 interface? Once we have a better grasp of the situation we will be able to better guide you. Best regards, Gyrd ^_^ > > Thanks