Questions tagged [vlan]

In computer networking, a single layer-2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them via one or more routers; such a domain is referred to as a virtual local area network, virtual LAN or VLAN.

In computer networking, a single layer-2 network may be partitioned to create multiple distinct broadcast domains, which are mutually isolated so that packets can only pass between them via one or more routers; such a domain is referred to as a virtual local area network, virtual LAN or VLAN.

This is usually achieved on switch or router devices. Simpler devices only support partitioning on a port level (if at all), so sharing VLANs across devices requires running dedicated cabling for each VLAN. More sophisticated devices can mark packets through tagging, so that a single interconnect (trunk) may be used to transport data for various VLANs.

Grouping hosts with a common set of requirements regardless of their physical location by VLAN can greatly simplify network design. A VLAN has the same attributes as a physical local area network (LAN), but it allows for end stations to be grouped together more easily even if they are not on the same network switch. VLAN membership can be configured through software instead of physically relocating devices or connections. Most enterprise-level networks today use the concept of virtual LANs. Without VLANs, a switch considers all interfaces on the switch to be in the same broadcast domain.

To physically replicate the functions of a VLAN would require a separate, parallel collection of network cables and equipment separate from the primary network. However, unlike physically separate networks, VLANs share bandwidth, so VLAN trunks may require aggregated links and/or quality of service prioritization.

Source: http://en.wikipedia.org/wiki/Virtual_LAN

182 questions
12
votes
3 answers

VLAN information using NETLINK

How do you get VLAN information like addition and deletion of VLAN sub interface from kernel to userspace using NETLINK socket in C? I did little study in NETLINK man as suggested in comments. I added and deleted a VLAN sub interface and monitored…
user1762571
  • 1,888
  • 7
  • 28
  • 47
7
votes
1 answer

What exactly do the rx-vlan-offload and tx-vlan-offload ethtool options do?

The ethtool manpage only gives a nebulous explanation: rxvlan on|off Specifies whether RX VLAN acceleration should be enabled txvlan on|off Specifies whether TX VLAN acceleration should be enabled What exactly do the…
Christian
  • 1,499
  • 2
  • 12
  • 28
5
votes
1 answer

IP_PKTINFO socket option not working

I have been banging my head on this one for a few weeks now and am finally submitting to the fact that I just can't figure it out. I have also been working with networking engineers on my team to no avail. My problem is as follows: I am working on…
5
votes
1 answer

Scapy: How to insert a new layer (802.1q) into existing packet?

I have a packet dump and want to inject a vlan tag (802.1q header) to the packets. How to do that?
Enno Gröper
  • 4,391
  • 1
  • 27
  • 33
4
votes
1 answer

Scapy - cant send vlan tagged packet

I can sent a basic packet using scapy and inspect it on the receiving PC using wireshark. When I add a VLAN tag I cannot receive the packet or capture it in wireshark on the origination side sendp( Ether()/IP(dst="172.16.64.49")/Raw(load="some…
phenning
  • 93
  • 1
  • 6
3
votes
0 answers

C# Socket Connections using VLANs

Using C#, I am trying to establish a tcp connection, then send tcp packets to a remote device Socket sock = new Socket(System.Net.Sockets.AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPAddress destAddress =…
3
votes
1 answer

How to parse 802.1q triple tagged frames using Scapy?

Background: I'm working with scapy to parse IEEE 802.1Q triple tagged frames. I'm generating test frames using scapy and capturing them to a pcap file. The parsing is done in a separate script by reading in the pcap file. I can successfully work…
bit_flip
  • 171
  • 2
  • 12
3
votes
0 answers

Disable Ethernet VLAN filter to enable capture of raw packets

I'm writing a rather elaborated software working on almost-exclusive layer-2 Ethernet. The system is really downcut - kernel has no filesystems, no IP stack (yep, just Ethernet drivers and CONFIG_PACKET - I implemented rudimentary ARP and IP with no…
2
votes
0 answers

Dynamic interfaces list pf.conf

I looking wat to adding passing in/out at interfaces "in fly", first I try just add one by one to anchors by pfctl, but adding next rule clear rule before ;/ "pass in on vlanN proto tcp from any to port 22" | sudo pfctl -a vlan_ssh -f - I was try…
Horns
  • 21
  • 3
2
votes
2 answers

Reading VLAN field of a raw ethernet packet in Python

I have a low level comunication between two nodes using Ethernet packets (2-layer, no UDP/IP nor TCP/IP). These packets has the VLAN field inside, my interface is configured in promiscuous mode and it is able to read them completely due to I can see…
ferdepe
  • 510
  • 1
  • 6
  • 21
2
votes
1 answer

Obtaining real device of VLAN-interface through the netlink

I need to obtain the real_dev (f.e. ID) of the given VLAN-inteface. I wrote some test snippet using libnl: int main(void) { struct nl_sock *sock; struct nl_cache *cache; char iface[] = "eno1.10"; //char iface[] = "eno1"; if…
red0ct
  • 4,840
  • 3
  • 17
  • 44
2
votes
2 answers

What's wrong with my macvlan settings with docker?

I'm studying "docker with macvlan". Below is my settings: G 192.168.1.1, gateway(physical) W 192.168.1.2, windows 10, ether-net card(physical) V 192.168.1.5, virtualbox+centos7, bridged network c1 192.168.1.10, docker container in macnet c2…
Leon
  • 3,124
  • 31
  • 36
2
votes
0 answers

How does vlan driver pass vlan info to the h/w ethernet driver

I'm trying to implement vlans on a target programmatically. But first I wanted to set up vlans manually to help get a better understanding of vlan setup. So I setup a vlan manually on my development system (ubuntu) using the vconfig/ifconfig…
carlh
  • 31
  • 4
2
votes
3 answers

Does scapy support IEEE 802.1ad?

I've checked the latest Scapy sources and there isn't any 802.1AD support, yet I have seen Scapy scripts referencing Dot1AD.
bit_flip
  • 171
  • 2
  • 12
2
votes
1 answer

Reading 802.1Q frames with specific VLAN tag under Linux

Is there any way to receive data of a specific VLAN tagged frame? Currently I am receiving all VLAN tagged frames by giving htons(0x22f0) as input to socket() function like: m_iSocketDesc = socket(AF_PACKET, SOCK_RAW, htons(0x22f0)); numBytes =…
Avb Avb
  • 545
  • 2
  • 13
  • 25
1
2 3
12 13