vconfig wrapper for 'ip' to create vlans after deprecation of linux vconfig
Project description
vconfig
vconfig is being deprecated, and I’ll miss it. This is a drop-in style wrapper that uses ip(8) under the hood for those of us who are a bit old-skool.
Note: The command name in the examples is
vconfig. If your installed console script is different (e.g.vconfig-cli), substitute that name.
Usage
vconfig.py — a vconfig-compatible wrapper implemented with ip(8).
Commands (same as vconfig -h):
add [interface-name] [vlan_id] [-name ifname]
rem [vlan-name]
set_flag [vlan-name] [flag-num] [0|1]
set_flag [vlan-name] [0|1] # compatibility: reorder_hdr only
set_egress_map [vlan-name] [skb_priority] [vlan_qos]
set_ingress_map [vlan-name] [skb_priority] [vlan_qos]
Notes
- Only creates/deletes VLAN links; it does not bring links up (mirrors
vconfigbehavior). set_flagsupports:1=reorder_hdr,2=gvrp,3=mvrp,4=loose_binding.- VLAN IDs are normalized to decimal (avoid octal/hex pitfalls).
Example usage
This script must be run as root. If
pipinstalled the script into~/.local/bin,sudomay not see it due to a restrictedPATH. You can run it like this:
sudo env "PATH=$PATH" vconfig
Or copy the script into root's ~/.local/bin, or install it as root..
Create eth0.10 using current name-type (default: DEV_PLUS_VID_NO_PAD)
sudo vconfig add eth0 10
Remove it
sudo vconfig rem eth0.10
Match vconfig’s reorder header flag
sudo vconfig set_flag eth0.10 1 1 # enable reorder_hdr
# (or simply: sudo vconfig set_flag eth0.10 1)
QoS maps (same args as vconfig)
sudo vconfig set_egress_map eth0.10 5 3 # skb prio 5 -> VLAN PCP 3
sudo vconfig set_ingress_map eth0.10 4 2 # VLAN PCP 2 -> skb prio 4
Naming style (persists in /run)
sudo vconfig set_name_type VLAN_PLUS_VID_NO_PAD # next add => vlan5
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vconfig_cli-0.1.0.tar.gz.
File metadata
- Download URL: vconfig_cli-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a275af7f6711d3ecc77795cb314304459fade91c6bfa23d287aea2e7736a7d08
|
|
| MD5 |
56190ab86902b07024973f82caa3b22f
|
|
| BLAKE2b-256 |
8bd72ac828fb4f52be409252922a8d3297ec6168c43784656342c7b29801a9f7
|
File details
Details for the file vconfig_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vconfig_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c03d61dbf54cee2bf3a301820ae4423fa3384f45a27112d623c87880444a127e
|
|
| MD5 |
e0fa8a2893834c879685e8be7051c847
|
|
| BLAKE2b-256 |
c7519dd8c4286de846519c7da3cd24a18a02e0f4b6b1d461c6627b58ddabe0e5
|