From owner-freebsd-net@freebsd.org Thu Apr 26 17:58:30 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A96E6FB3F4D for ; Thu, 26 Apr 2018 17:58:30 +0000 (UTC) (envelope-from ab.tariq90@gmail.com) Received: from mail-it0-x233.google.com (mail-it0-x233.google.com [IPv6:2607:f8b0:4001:c0b::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3E3E281BEE for ; Thu, 26 Apr 2018 17:58:30 +0000 (UTC) (envelope-from ab.tariq90@gmail.com) Received: by mail-it0-x233.google.com with SMTP id m134-v6so25446991itb.3 for ; Thu, 26 Apr 2018 10:58:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=0TToTFEtbK9GrBIIN2QRVh0Pyn5D41TqwPSJ37xpCy0=; b=rI6bOVnjktuEn3iSQSU4PTk2dzeTXRgkYHqDOzM5QaP1T3eqKyx04B6br35QB0Qz/I 4dOs/u5vmgaIN31+bQ0eVTS5msZCz3G9gmeZPtnYvqWn2q5Yz5I0JOVDZmGGrcVYPNg9 ZaebwIqAek+IL8HO92IIEYBE5hnGOEk0GScLUZW0zyhLArhx6g0RvYDBKmUtciLM/OwX Vm5DBIpByUpDpLpYdEZ4zH0dcd+LoSXUnZq06OvRrbmAS3FEKD+JQh/dNyNeTPPMwDMJ 3+H+JwfhDhw6VZ0zyQ/2RsrzzkWPMgYkP8K+yTR0Ih1zBwJi+U9Gj+2lNOsVtMbySXbg bLew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=0TToTFEtbK9GrBIIN2QRVh0Pyn5D41TqwPSJ37xpCy0=; b=GoY5WGlFsZlZFordR3Y49DPHQ0G/Sd/VhYnyhgfPsOPfxtMOj8ODbavu2iqid2hBsI ZjeSf2DRiCScsa4agIAW9rMNDtXOoZ1PN2tEMdD37gMPLUpjJu8Dzheo/4YzpOlBZyHl TTlcQUmn2r3fnWVa2+8ZCsnAg5mcvN5cb9zo70UrGky/0sKOL43m+4MSA9GhpU5buC14 VZZhXaCHxFyPP/ePp+omwVYERsTOkhyEgAi5Wy1X02U7VrUOPOjebjLDChaaf793BqAV 3em3s7/ylHVIXW4kKDtd6uf8eyaYcykQvCvIUIbAcRyjWT6j4v+8x6YQH87ziDt9772X 2cuA== X-Gm-Message-State: ALQs6tBBafwwwMK0iMfCh9X+afo1ZraT6hvTa6HS1OvogQNoSeNpA/iP 21MfjaucOGNmALBc6S3qJVMNprskFcb2YC2xuZpdqA== X-Google-Smtp-Source: AB8JxZrQR3f7wvgt+bcssfaW88vzghz6HhSU8SkibU9rShueFW4969WSdBdpP1OgVYRqDaqMpMg/Ua/kzldsD5nGJUA= X-Received: by 2002:a24:a342:: with SMTP id p63-v6mr25580311ite.146.1524765509495; Thu, 26 Apr 2018 10:58:29 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:4a93:0:0:0:0:0 with HTTP; Thu, 26 Apr 2018 10:58:28 -0700 (PDT) From: Abdullah Tariq Date: Thu, 26 Apr 2018 22:58:28 +0500 Message-ID: Subject: NETGRAPH- bridge vlans using netgraph help To: freebsd-net@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Apr 2018 17:58:31 -0000 I am trying to make 2 systems connected to freebsd box directly to be able to communicated with each other. Explanation diagram is attached ifconfig vlan2 create vlan 5 vlandev igb5 ifconfig vlan3 create vlan 5 vlandev igb6 ifconfig bridge10 create addm vlan2 addm vlan3 up as explained to me on freebsd forums PC1 would send packets without any vlan tags attached (so they belong to > the "DEFAULT" vlan aka vlan 1). igb0 on FreeBSD would receive the packet, > compare the vlan tag to what it's configured to use (1 <--> 5), see they > are not equal, and would drop the packet. > Same for PC2. It would send untagged packets (aka vlan tag 1) to igb1. > FreeBSD would compare vlan tags, see they don't match what's set on igb1, > and drop the packets. > If you configure PC1 and PC2 to also use tagged vlan 5, then the bridge > configuration using tagged vlan 5 interfaces would work. Which turns me to netgraph. The documentation is very very scarce. So i want to know if what i am trying to achieve is possible and if anyone can please guide me. Rhanks