Interesting VLAN Utility on ASUS Router I found while trying to figure out how to create a VLAN Trunk to my managed switch.
Update: Pointed out its already known.....oh well.
admin@RT-AC86U-8A70:/tmp/home/root# vlanctl -h
VLAN Control Utility:
::: Usage:
vlanctl
--if <if_name> Sets the target Interface of a composite vlanctl command to <if_name>.
--rx Sets the direction of a composite vlanctl command to RECEIVE
--tx Sets the direction of a composite vlanctl command to TRANSMIT
--tags <nbr_of_tags> Sets the number of tags of a composite vlanctl command to <nbr_of_tags>
--if-create <real_if_name> <if_index> Creates a new VOPI named <real_if_name>.v<if_index> and attaches it to the real device
<real_if_name>. For instance, if this command were executed for the eth0 real interface and the VOPI interface index were
set to 3, the resulting interface would have been named eth0.v3.
--if-create-name <real_if_name> <vlan_if_name> Creates a new VOPI named <vlan_if_name> and attaches it to the real device
--if-delete <vlan_if_name> Destroy the VOPI named <vlan_if_name>.
--rule-append Inserts a new Tagging Rule as the last rule of the specified Tagging Rule Table. Dependencies: --if, --rx or
--tx, and --tags.
--rule-insert-before <rule-id> Inserts a new Tagging Rule before the Tagging Rule whose identifier matches <rule-id> in the
specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.
--rule-insert-after <rule-id> Inserts a new Tagging Rule after the Tagging Rule whose identifier matches <rule-id> in the
specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.
--rule-remove <rule-id> Removes the Tagging Rule that matches <rule-id> from the specified Tagging Rule Table. Dependencies:
--if, --rx or --tx, and --tags.
--rule-remove-all <real_if_name> <vlan_if_name> Removes all the Tagging Rules for the vlan device.
--show-table Lists all Tagging Rules stored in the specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and
--tags.
--default-tpid <tpid> Sets the default TPID value of a tagging rule table to <tpid>. When a table is created, its default
TPID value is set to 0x8100. Dependencies: --if, --rx or --tx, and --tags.
--default-pbits <pbits> Sets the default PBITS value of a tagging rule table to <pbits>. When a table is created, its
default PBITS value is set to 0. Dependencies: --if, --rx or --tx, and --tags.
--default-cfi <cfi> Sets the default CFI value of a tagging rule table to <cfi>. When a table is created, its default CFI
value is set to 0. Dependencies: --if, --rx or --tx, and --tags.
--default-vid <vid> Sets the default VID value of a tagging rule table to <vid>. When a table is created, its default VID
value is set to 1 (as per IEEE 802.1Q). Dependencies: --if, --rx or --tx, and --tags.
--cfg-dscp2pbits <dscp> <pbits> Programs the entry number <dscp> of the DSCP-TO-PBITS translation table of a Real Device to
the value specified by <pbits>. When a tagging rule table is created, the default values of the DSCP-TO-PBITS table are
set by copying the lowest 3 bits of each DSCP value as the PBITS value, for each entry in the table. For instance, the
following entries are programmed by default: DSCP=5BITS=5, DSCP=15BITS=7, etc. The DSCP-TO-PBITS translation table
has 64 entries. Dependencies: --if.
--show-dscp2pbits Lists the values programmed in the DSCP-TO-PBITS table of the specified Real Device. Dependencies:
--if.
--cfg-tpid <tpid0> <tpid1> <tpid2> <tpid3> Configures the TPID Table entries of a given Real Interface. The configured
TPID values are used to identify VLAN Headers of packets received from and transmitted to the VOPIs created for a given
Real Interface. Four values must always be specified. The default TPID values are 0x8100, 0x8100, 0x8100, and 0x8100.
Dependencies: --if.
--show-tpid Lists the values programmed in the TPID Table of the specified Real Device. Dependencies: --if.
--local-stats <vlan_if_name> Shows the statistics counters maintained for the VOPI named <vlan_if_name>. These counters
are complimentary to the standard counters maintained for the device, which can be read via the Linux ifconfig
command.
--filter-ethertype <ethertype> Match the Ethertype field in the Ethernet Header of incoming frames against <ethertype>.
--filter-pbits <pbits> <tag_nbr> Match the PBITS value of VLAN Header number <tag_nbr> of incoming frames against
<pbits>.
--filter-cfi <cfi> <tag_nbr> Match the CFI bit of VLAN Header number <tag_nbr> of incoming frames against <cfi>.
--filter-vid <vid> <tag_nbr> Match the VID value of VLAN Header number <tag_nbr> of incoming frames against <vid>.
--filter-tag-ethertype <ethertype> <tag_nbr> Match the Ethertype field of the VLAN Header number <tag_nbr> of incoming
frames against <ethertype>.
--filter-dscp <dscp> Match the DSCP value in the IPv4 header of incoming frames against <dscp>.
--filter-rxif <real_if_name> Match the rx VOPI of the transmitting packet against <real-if-name>. This filter can be used to bind a Tagging
Rule to a specific rx VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction.
--filter-txif <vlan_if_name> Match the transmitting VOPI against <vlan-if-name>. This filter can be used to bind a Tagging
Rule to a specific VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction.
TRANSMIT rules without this filter will apply to all frames transmitted from all VOPIs attached to the Real Device.
Update: Pointed out its already known.....oh well.
admin@RT-AC86U-8A70:/tmp/home/root# vlanctl -h
VLAN Control Utility:
::: Usage:
vlanctl
--if <if_name> Sets the target Interface of a composite vlanctl command to <if_name>.
--rx Sets the direction of a composite vlanctl command to RECEIVE
--tx Sets the direction of a composite vlanctl command to TRANSMIT
--tags <nbr_of_tags> Sets the number of tags of a composite vlanctl command to <nbr_of_tags>
--if-create <real_if_name> <if_index> Creates a new VOPI named <real_if_name>.v<if_index> and attaches it to the real device
<real_if_name>. For instance, if this command were executed for the eth0 real interface and the VOPI interface index were
set to 3, the resulting interface would have been named eth0.v3.
--if-create-name <real_if_name> <vlan_if_name> Creates a new VOPI named <vlan_if_name> and attaches it to the real device
--if-delete <vlan_if_name> Destroy the VOPI named <vlan_if_name>.
--rule-append Inserts a new Tagging Rule as the last rule of the specified Tagging Rule Table. Dependencies: --if, --rx or
--tx, and --tags.
--rule-insert-before <rule-id> Inserts a new Tagging Rule before the Tagging Rule whose identifier matches <rule-id> in the
specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.
--rule-insert-after <rule-id> Inserts a new Tagging Rule after the Tagging Rule whose identifier matches <rule-id> in the
specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.
--rule-remove <rule-id> Removes the Tagging Rule that matches <rule-id> from the specified Tagging Rule Table. Dependencies:
--if, --rx or --tx, and --tags.
--rule-remove-all <real_if_name> <vlan_if_name> Removes all the Tagging Rules for the vlan device.
--show-table Lists all Tagging Rules stored in the specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and
--tags.
--default-tpid <tpid> Sets the default TPID value of a tagging rule table to <tpid>. When a table is created, its default
TPID value is set to 0x8100. Dependencies: --if, --rx or --tx, and --tags.
--default-pbits <pbits> Sets the default PBITS value of a tagging rule table to <pbits>. When a table is created, its
default PBITS value is set to 0. Dependencies: --if, --rx or --tx, and --tags.
--default-cfi <cfi> Sets the default CFI value of a tagging rule table to <cfi>. When a table is created, its default CFI
value is set to 0. Dependencies: --if, --rx or --tx, and --tags.
--default-vid <vid> Sets the default VID value of a tagging rule table to <vid>. When a table is created, its default VID
value is set to 1 (as per IEEE 802.1Q). Dependencies: --if, --rx or --tx, and --tags.
--cfg-dscp2pbits <dscp> <pbits> Programs the entry number <dscp> of the DSCP-TO-PBITS translation table of a Real Device to
the value specified by <pbits>. When a tagging rule table is created, the default values of the DSCP-TO-PBITS table are
set by copying the lowest 3 bits of each DSCP value as the PBITS value, for each entry in the table. For instance, the
following entries are programmed by default: DSCP=5BITS=5, DSCP=15BITS=7, etc. The DSCP-TO-PBITS translation table
has 64 entries. Dependencies: --if.
--show-dscp2pbits Lists the values programmed in the DSCP-TO-PBITS table of the specified Real Device. Dependencies:
--if.
--cfg-tpid <tpid0> <tpid1> <tpid2> <tpid3> Configures the TPID Table entries of a given Real Interface. The configured
TPID values are used to identify VLAN Headers of packets received from and transmitted to the VOPIs created for a given
Real Interface. Four values must always be specified. The default TPID values are 0x8100, 0x8100, 0x8100, and 0x8100.
Dependencies: --if.
--show-tpid Lists the values programmed in the TPID Table of the specified Real Device. Dependencies: --if.
--local-stats <vlan_if_name> Shows the statistics counters maintained for the VOPI named <vlan_if_name>. These counters
are complimentary to the standard counters maintained for the device, which can be read via the Linux ifconfig
command.
--filter-ethertype <ethertype> Match the Ethertype field in the Ethernet Header of incoming frames against <ethertype>.
--filter-pbits <pbits> <tag_nbr> Match the PBITS value of VLAN Header number <tag_nbr> of incoming frames against
<pbits>.
--filter-cfi <cfi> <tag_nbr> Match the CFI bit of VLAN Header number <tag_nbr> of incoming frames against <cfi>.
--filter-vid <vid> <tag_nbr> Match the VID value of VLAN Header number <tag_nbr> of incoming frames against <vid>.
--filter-tag-ethertype <ethertype> <tag_nbr> Match the Ethertype field of the VLAN Header number <tag_nbr> of incoming
frames against <ethertype>.
--filter-dscp <dscp> Match the DSCP value in the IPv4 header of incoming frames against <dscp>.
--filter-rxif <real_if_name> Match the rx VOPI of the transmitting packet against <real-if-name>. This filter can be used to bind a Tagging
Rule to a specific rx VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction.
--filter-txif <vlan_if_name> Match the transmitting VOPI against <vlan-if-name>. This filter can be used to bind a Tagging
Rule to a specific VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction.
TRANSMIT rules without this filter will apply to all frames transmitted from all VOPIs attached to the Real Device.
Last edited: