Hoi,

Yes you can do that with the current plugin code from VPP -> Linux:

pim@hippo:~/src/vppcfg$ vppctl

*    _______    _     *   _   _____  ___

* __/ __/ _ \  (_)__ *   | | / / _ \/ _ \

* _/ _// // / / / _ \*   | |/ / ___/ ___/

* /_/ /____(_)_/\___/*   |___/_/  /_/


DBGvpp# lcp create GigabitEthernet3/0/1 host-if e0

DBGvpp# create sub-interfaces GigabitEthernet3/0/1 10 dot1q 1234 exact-match

GigabitEthernet3/0/1.10

DBGvpp# lcp create GigabitEthernet3/0/1.10 host-if e0.10


pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link

38: e0: <BROADCAST,MULTICAST> mtu 2026 qdisc mq state DOWN mode DEFAULT
group default qlen 1000

    link/ether 00:25:90:0c:05:01 brd ff:ff:ff:ff:ff:ff

43: e0.10@e0: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop state DOWN
mode DEFAULT group default qlen 1000

    link/ether 00:25:90:0c:05:01 brd ff:ff:ff:ff:ff:ff

The other way around does work in my local copy (github.com/pimvanpelt/lcpng)
and is described in https://ipng.ch/s/articles/2021/08/25/vpp-4.html where
it works like this:

pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link add link e0
name e0.1234 type vlan id 1234

pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link add link e0
name e0.100 type vlan id 100

pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link add link
e0.100 name e0.100.200 type vlan id 200

pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link add link e0
name e0.101 type vlan id 101 proto 802.1ad

pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link add link
e0.101 name e0.101.200 type vlan id 200


pim@hippo:~/src/vppcfg$ sudo ip netns exec dataplane ip link | grep e0

38: *e0*: <BROADCAST,MULTICAST> mtu 2026 qdisc mq state DOWN mode DEFAULT
group default qlen 1000

43: *e0*.1234@*e0*: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop state
DOWN mode DEFAULT group default qlen 1000

44: *e0*.100@*e0*: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop state
DOWN mode DEFAULT group default qlen 1000

45: *e0*.100.200@*e0*.100: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop
state DOWN mode DEFAULT group default qlen 1000

46: *e0*.101@*e0*: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop state
DOWN mode DEFAULT group default qlen 1000

47: *e0*.101.200@*e0*.101: <BROADCAST,MULTICAST,M-DOWN> mtu 2026 qdisc noop
state DOWN mode DEFAULT group default qlen 1000

Hope that helps - the code for the Linux -> VPP sub-interface plumbing will
likely be submitted in time for the 22.06 release of VPP.

groet,
Pim

On Thu, Mar 17, 2022 at 12:53 PM Chinmaya Aggarwal <chinmaya.agar...@hsc.com>
wrote:

> Hi,
>
> Is there a way by which I can bind vlan interfaces, created on linux
> kernel, in vpp similar to the way we do for physical interfaces?
>
> Thanks and Regards,
> Chinmaya Agarwal.
> 
>
>

-- 
Pim van Pelt <p...@ipng.nl>
PBVP1-RIPE - http://www.ipng.nl/
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#21052): https://lists.fd.io/g/vpp-dev/message/21052
Mute This Topic: https://lists.fd.io/mt/89843263/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to