User Tools

Site Tools


networking:vlan

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
networking:vlan [2018/08/06 18:16]
Lamb-To-Wolf fix a mistake in the ethernet frame packet (missing field: preambule)
networking:vlan [2022/10/14 00:36]
q2ven [3.1 The vconfig tool]
Line 32: Line 32:
 Normally you will find in the ethernet 802.3 header the following for a vlan packet : Normally you will find in the ethernet 802.3 header the following for a vlan packet :
 | Packet type| Preamble| Start frame delimiter| Destination MAC address| Source MAC address| dot1q identifier| tag type (4 bits)| vlan ID (12 bits)| packet type field| data| padding| FCS| | Packet type| Preamble| Start frame delimiter| Destination MAC address| Source MAC address| dot1q identifier| tag type (4 bits)| vlan ID (12 bits)| packet type field| data| padding| FCS|
-| Normal ethernet tcp packet| 10101010 (56 alternating bits)| 10101011 | 00:​10:​C6:​C0:​61:​CD| 00:​13:​CE:​47:​06:​86| not present| not present| not present| 0x800| <insert ip packet here>| <insert padding if packet too small| <​checksum>​| +| Normal ethernet tcp packet| 10101010 (56 alternating bits)| 10101011 | 00:​10:​C6:​C0:​61:​CD| 00:​13:​CE:​47:​06:​86| not present| not present| not present| 0x800| <insert ip packet here>| <insert padding if packet too small>| <​checksum>​| 
-| VLAN packet| 10101010 (56 alternating bits)| 10101011 | 00:​10:​C6:​C0:​61:​CD| 00:​13:​CE:​47:​06:​86| 0x8100| QOS bits| VLAN ID| 0x800| <insert ip packet here>| <insert padding if packet too small| <​checksum>​|+| VLAN packet| 10101010 (56 alternating bits)| 10101011 | 00:​10:​C6:​C0:​61:​CD| 00:​13:​CE:​47:​06:​86| 0x8100| QOS bits| VLAN ID| 0x800| <insert ip packet here>| <insert padding if packet too small>| <​checksum>​|
  
 So VLAN packets can be identified by their TYPE field, which is set to 0x8100. If the packet is to be received, the VLAN tag is to be stripped of the packet, and a second TYPE field will have to be interpreted. It is possible to insert multiple VLAN tags, although this is not supported on linux, nor is it supported on many devices. (Search cisco dot1q tunnel implementation). So VLAN packets can be identified by their TYPE field, which is set to 0x8100. If the packet is to be received, the VLAN tag is to be stripped of the packet, and a second TYPE field will have to be interpreted. It is possible to insert multiple VLAN tags, although this is not supported on linux, nor is it supported on many devices. (Search cisco dot1q tunnel implementation).
Line 54: Line 54:
 ====== 3.1 The vconfig tool====== ====== 3.1 The vconfig tool======
  
-Using the vconfig tool you can add a VLAN subinterface. Say you have configured the switch ​eth1 is connected to to send packets in the vlans 810 and 820. Then you can do+Using the vconfig tool you can add a VLAN subinterface. Say you have configured the switch ​eth0 is connected to to send packets in the vlans 810 and 820. Then you can do
 <​code>​ vconfig add eth0 810 <​code>​ vconfig add eth0 810
  ​vconfig add eth0 820</​code>​  ​vconfig add eth0 820</​code>​
networking/vlan.txt · Last modified: 2022/10/14 00:36 by q2ven