Score:0

How to switch linux interface to trunk-only mode?

cn flag

I'm trying to configure linux interface into trunk-only mode, that means 'accept only vlan-tagged traffic', and most importantly, ignore all untagged traffic.

I'm pretty successful at having tagged traffic to work (ip link add type vlan works nincely), but I'm having trouble to ignore all untagged traffic.

I've tried to create vlan interface with loose_binding on mode and to set main interface DOWN. It allowed me to set vlan interfaces UP, but it still show them with M-DOWN state, and none of the traffic is leaving interface (with tag or without). Basically, if I shutdown linked (main) interface, all vlans stops to work.

How to forbid linux to see traffic on 'main' (untagged, native) interface? I want to disable everything: reacting on suspicious mac addresses, ipv6, ipv4, arp, etc. I just want linux to ignore untagged traffic completely and never try to send anything untagged.

Is this possible without involving bridges and/or OVS?

Score:0
fr flag

Main interface must be UP for any virtual interfaces on top of it to work. Just don't configure any addresses on main interface. You may also want to disable IPv6 for it.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.