OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • VLANs on multiple interfaces
« previous next »
  • Print
Pages: [1]

Author Topic: VLANs on multiple interfaces  (Read 1291 times)

firewalled101

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
VLANs on multiple interfaces
« on: August 29, 2022, 01:44:04 am »
I am setting up a Topton 4-NIC box. I assigned defaults of one NIC for WAN and another for LAN. I have 2 unassigned ports (OPT2,OPT3). My LAN is a trunk port and has multiple VLANs. How can assign one of those VLANs to unused OPT interfaces? The reason I want this because my desktop has 2.5gb NIC to utilize the speed on my network. I have TL-SG3428X gigabit switch. My NAS is connected to SFP+ port. I plan to connect my LAN trunk to another SFP+ port on the switch, and utilize one of the OPT ports on OPNsense box for my desktop.

I recognize that I cannot create VLANs on bridged interfaces. Can create a bridge assigned to VLAN? (thinking loud here).

Thank you so much.
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2789
  • Karma: 251
    • View Profile
Re: VLANs on multiple interfaces
« Reply #1 on: August 29, 2022, 08:07:12 am »
Do you want these ports to be port based VLAN members, i.e. carrying untagged frames?

What you need to do in this case is create your VLAN on the trunk port (you already did that), then create a bridge interface with that VLAN and the untagged additional port as members. Then, and this is important, assign the logical interface (Interfaces > Assignments) including IP address configuration etc. to the bridge interface, not the VLAN interface. Don't assign anything to the VLAN interface at all.

Additionally you might want to change two kernel tunables as documented in the "LAN bridge" chapter of the wiki.

HTH,
Patrick
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Demusman

  • Sr. Member
  • ****
  • Posts: 291
  • Karma: 12
    • View Profile
Re: VLANs on multiple interfaces
« Reply #2 on: August 29, 2022, 12:53:38 pm »
Maybe I'm missing something but from what I read, just go to Interfaces/assignments and change the vlan you want to move to opt2.
Logged

firewalled101

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
Re: VLANs on multiple interfaces
« Reply #3 on: August 29, 2022, 08:19:36 pm »
Quote from: pmhausen on August 29, 2022, 08:07:12 am
Do you want these ports to be port based VLAN members, i.e. carrying untagged frames?

What you need to do in this case is create your VLAN on the trunk port (you already did that), then create a bridge interface with that VLAN and the untagged additional port as members. Then, and this is important, assign the logical interface (Interfaces > Assignments) including IP address configuration etc. to the bridge interface, not the VLAN interface. Don't assign anything to the VLAN interface at all.

Additionally you might want to change two kernel tunables as documented in the "LAN bridge" chapter of the wiki.

HTH,
Patrick

This is exactly what I intended to do; that is to bridge logical to physical interfaces. The question is now the trunk port does not have that VLAN anymore, right?
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2789
  • Karma: 251
    • View Profile
Re: VLANs on multiple interfaces
« Reply #4 on: August 29, 2022, 08:52:10 pm »
But of course it does.
Code: [Select]
                             ┌────────┐                             
                             │        │                             
 Device in                   │   ┌────┴──────────────┬─┐           
  VLAN 2     ◀───────────────│   └────┬──────────────┤ │           
                             │        │              │ │           
                             └────────┘              │ │           
                           Phys. Interface           │ │           
                                                     │ │           
                                                     │ │           
                                                     │ │   Bridge   
                             ┌────────┐              │ │  Interface
                             │  ┌─────┴────────┐     │ │           
                             │  │    VLAN 1    │     │ │           
                             │  │              │     │ │           
                             │  └─────┬────────┘     │ │           
                             │  ┌─────┴────────┐     │ │           
                             │  │    VLAN 2 ┌──┴─────┤ │           
                             │  │           └──┬─────┴─┘           
   Trunk                     │  └─────┬────────┘                   
Switchport   ◀───────────────│  ┌─────┴────────┐                   
                             │  │    VLAN 3    │                   
                             │  │              │                   
                             │  └─────┬────────┘                   
                             │  ┌─────┴────────┐                   
                             │  │   VLAN ...   │                   
                             │  │              │                   
                             │  └─────┬────────┘                   
                             └────────┘                             
                           Phys. Interface                         
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

firewalled101

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
Re: VLANs on multiple interfaces
« Reply #5 on: August 29, 2022, 11:01:58 pm »
Thank you so much. Very nice drawing  ;D
Logged

pmhausen

  • Hero Member
  • *****
  • Posts: 2789
  • Karma: 251
    • View Profile
Re: VLANs on multiple interfaces
« Reply #6 on: August 29, 2022, 11:05:17 pm »
https://monodraw.helftone.com
Logged
Supermicro A2SDi-4C-HLN4F mainboard and SC101F chassis
16 GB ECC memory
Crucial MX300 275 GB SATA 2.5" plus
Crucial MX300 275 GB SATA M.2 (ZFS mirror)
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • VLANs on multiple interfaces
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2