Sniffing & Spoofingvlan802.1qnetworkingifupdownvconfig

vlan

Provides legacy integration for VLAN configuration with ifupdown and a compatibility wrapper for the deprecated vconfig program using ip(route2) commands. Supports VLAN (802.1q) interface management on Kali Linux.

Description

The vlan package offers legacy integration scripts for configuring VLAN interfaces via ifupdown in /etc/network/interfaces. It is primarily needed for supporting the legacy VLAN naming scheme (vlan0001) or specific features like vlan-raw-device, ip-proxy-arp, ip-rp-filter, and hw-mac-address. For most VLAN use cases with ifupdown, this package is not required.

It includes a wrapper script called vconfig for backwards compatibility, translating old vconfig commands to modern ip(route2) commands. This shim may be removed in future releases, so direct use of ip(route2) is recommended.

The package details VLAN (802.1q) configuration, with man page vlan-interfaces(5) providing further information. Installed size is 37 KB.

How It Works

The tool integrates with ifupdown for legacy VLAN setup, using scripts to manage interfaces with specific naming (e.g., vlan0001) and features like REORDER_HDR flag for ethernet header manipulation. The vconfig wrapper converts commands such as add, rem, set_flag to ip(route2) equivalents, handling VLAN IDs (0-4095), QoS mappings, name types (VLAN_PLUS_VID, DEV_PLUS_VID), and flags like REORDER_HDR which adjusts ethernet headers for compatibility with tools assuming standard packet formats.

Installation

bash
sudo apt install vlan

Flags

add [interface-name] [vlan_id]Add a VLAN device with the specified interface name and VLAN ID (0-4095).
rem [vlan-name]Remove the specified VLAN device.
set_flag [interface-name] [flag-num] [0 | 1]Set or unset a flag on the interface, e.g., flag 1 for REORDER_HDR to adjust ethernet headers.
set_egress_map [vlan-name] [skb_priority] [vlan_qos]Set egress mapping from skb_priority to vlan_qos (3-bit priority in VLAN header).
set_ingress_map [vlan-name] [skb_priority] [vlan_qos]Set ingress mapping from vlan_qos to skb_priority.
set_name_type [name-type]Set VLAN name type: VLAN_PLUS_VID (vlan0005), VLAN_PLUS_VID_NO_PAD (vlan5), DEV_PLUS_VID (eth0.0005), DEV_PLUS_VID_NO_PAD (eth0.5).

Examples

Creates a new VLAN interface on the specified ethernet card with the given VLAN ID.
vconfig add [interface-name] [vlan_id]
Removes the specified VLAN interface.
vconfig rem [vlan-name]
Enables REORDER_HDR flag (flag-num 1) on the interface to adjust ethernet headers for compatibility.
vconfig set_flag [interface-name] 1 1
Maps skb_priority to vlan_qos for outgoing packets on the VLAN.
vconfig set_egress_map [vlan-name] [skb_priority] [vlan_qos]
Maps vlan_qos to skb_priority for incoming packets on the VLAN.
vconfig set_ingress_map [vlan-name] [skb_priority] [vlan_qos]
Sets name type to VLAN_PLUS_VID, producing names like vlan0005.
vconfig set_name_type VLAN_PLUS_VID
Displays usage help for vconfig commands and options.
vconfig -h
Updated 2026-04-16kali.org ↗