Hello,
I'm trying to setup a VPP interface to do the following:
- accept frames with VLAN X
- reject frames with VLAN != X
- accept untagged frames and add VLAN X
I thought I could do this with:
create host-int name myintf
create sub-int host-myintf 111 dot1q 111
create sub-int host-myintf 112 untagged
set int l2 tag-rewrite host-myintf.112 push dot1q 111
However I ran into some strange behavior with untagged sub-interfaces.
The create command returns a "vlan is already in use" error due to
SUBINT_CONFIG_VALID being set. I haven't been able to create an untagged
sub-int on a first attempt.
However, if I run the same command a second time it appears to succeed,
but I think this might be a bug. I believe the subint->flags are cleared
after the failed creation so the second creation succeeds.
vpp# show version
vpp v26.06-release built by <> on <> at 2026-09-10T08:21:17
vpp# show interface
Name Idx State MTU (L3/IP4/IP6/MPLS)
Counter Count
local0 0 down 0/0/0/0
vpp# create host-int name myintf
host-myintf
vpp# create sub-int host-myintf 111 dot1q 111
host-myintf.111
vpp# create sub-int host-myintf 112 untagged
create sub-interfaces: vlan is already in use
vpp# create sub-int host-myintf 112 untagged
host-myintf.112
vpp# set int l2 tag-rewrite host-myintf.112 push dot1q 111
vpp# show interface
Name Idx State MTU (L3/IP4/IP6/MPLS)
Counter Count
host-myintf 1 down 9000/0/0/0
host-myintf.111 2 down 0/0/0/0
host-myintf.112 3 down 0/0/0/0
local0 0 down 0/0/0/0
vpp#
My questions are:
- Is my general approach correct? Am I using untagged sub-ints correctly?
- If not, is there a recommended way to support what I'm looking for
(accept VLAN X, reject VLAN != X, accept untagged + push VLAN X)?
Thanks,
Jeff
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#27195): https://lists.fd.io/g/vpp-dev/message/27195
Mute This Topic: https://lists.fd.io/mt/121356346/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/14379924/21656/631435203/xyzzy
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-