Skip to content

Instantly share code, notes, and snippets.

@higebu
Last active July 5, 2024 02:50
Show Gist options
  • Save higebu/d5e605bf58282bf95fae78ae9af800e2 to your computer and use it in GitHub Desktop.
Save higebu/d5e605bf58282bf95fae78ae9af800e2 to your computer and use it in GitHub Desktop.
VPP SRv6 MUP Plugin Errors

Install VPP

https://packagecloud.io/fdio/release

curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | sudo bash
sudo apt-get update
sudo apt-get install vpp vpp-plugin-core vpp-plugin-dpdk
sudo usermod -aG vpp $USER
sudo systemctl start vpp

SRv6 MUP Plugin Errors

The issue is that the commands listed in the manual result in errors, whereas the commands in the test code do not. It would be better to refer to the commands listed in the test code. https://github.com/FDio/vpp/blob/master/test/test_srv6_mobile.py

VPP Version

vpp# show version
vpp v22.06-release built by root on 73cad0f338d2 at 2022-06-29T13:28:03

Supported behaviors

vpp# show sr policy behaviors
SR Policy behaviors:
-----------------------

Plugin behaviors:
        t.m.gtp4.d      -> Transit function with decapsulation for IPv4/GTP tunnel.
                Parameters: '<sr-prefix>/<sr-prefixlen> v6src_prefix <v6src_prefix>/<prefixlen> [nhtype <nhtype>] fib-table <id>'
        t.m.gtp4.dt     -> Transit function with DT for IPv4/GTP tunnel.
                Parameters: 'fib-index <index> [local-fib-table <index>]'
        end.m.gtp6.d    -> Endpoint function with dencapsulation for IPv6/GTP tunnel.
                Parameters: '<sr-prefix>/<sr-prefixlen> [nhtype <nhtype>] fib-table <id>'
vpp# show sr localsid behaviors
SR LocalSIDs behaviors:
-----------------------

Default behaviors:
        End     -> Endpoint.
        End.X   -> Endpoint with Layer-3 cross-connect.
                Parameters: '<iface> <ip6_next_hop>'
        End.T   -> Endpoint with specific IPv6 table lookup.
                Parameters: '<fib_table>'
        End.DX2 -> Endpoint with decapsulation and Layer-2 cross-connect.
                Parameters: '<iface>'
        End.DX6 -> Endpoint with decapsulation and IPv6 cross-connect.
                Parameters: '<iface> <ip6_next_hop>'
        End.DX4 -> Endpoint with decapsulation and IPv4 cross-connect.
                Parameters: '<iface> <ip4_next_hop>'
        End.DT6 -> Endpoint with decapsulation and specific IPv6 table lookup.
                Parameters: '<ip6_fib_table>'
        End.DT4 -> Endpoint with decapsulation and specific IPv4 table lookup.
                Parameters: '<ip4_fib_table>'
Plugin behaviors:
        End.AD  -> Endpoint with dynamic proxy to SR-unaware appliance.
                Parameters: 'nh <next-hop> oif <iface-out> iif <iface-in>'
        End.AD.Flow     -> Endpoint with flow-based dynamic proxy to SR-unaware appliance.
                Parameters: 'nh <next-hop> oif <iface-out> iif <iface-in>'
        End.AM  -> Endpoint to SR-unaware appliance via masquerading.
                Parameters: 'nh <next-hop> oif <iface-out> iif <iface-in>'
        End.AS  -> Endpoint with static proxy to SR-unaware appliance.
                Parameters: 'nh <next-hop> oif <iface-out> iif <iface-in> src <src-addr> next <sid> [next <sid> ...]'
        end.m.gtp4.e    -> Endpoint function with encapsulation for IPv4/GTP tunnel.
                Parameters: ''
        end.m.gtp6.e    -> Endpoint function with encapsulation for IPv6/GTP tunnel.
                Parameters: ''
        end.m.gtp6.d    -> Endpoint function with dencapsulation for IPv6/GTP tunnel.
                Parameters: '<sr-prefix>/<sr-prefixlen> [nhtype <nhtype>] fib-table <id>'
        end.m.gtp6.d.di -> Endpoint function with drop-in dencapsulation for IPv6/GTP tunnel.
                Parameters: '<sr-prefix>/<sr-prefixlen> [nhtype <nhtype>]'
        end.m.gtp6.dt   -> Endpoint function with DT for IPv6/GTP tunnel.
                Parameters: 'fib-index <index> [local-fib-table <index>]'

t.m.gtp4.d

  • t.m.gtp4.d doesn't work due to sr policy: Invalid behavior
vpp# sr policy add bsid 2001:db8::1 behavior t.m.gtp4.d D1::/32 v6src_prefix A1::/64 nhtype ipv4
sr policy: Invalid behavior

t.m.gtp6.d

  • end.m.gtp6.d doesn't work due to unknown input `.m.gtp6.d D4::/64'
vpp# sr localsid prefix 2001:db8::/64 behavior end.m.gtp6.d D4::/64
unknown input `.m.gtp6.d D4::/64'
vpp# show sr localsids
SRv6 - My LocalSID Table:
=========================
        Address:        2001:db8::
        Behavior:       End
        Good traffic:   [0 packets : 0 bytes]
        Bad traffic:    [0 packets : 0 bytes]
--------------------

end.m.gtp4.e

  • end.m.gtp4.e doesn't work due to unknown input `.m.gtp4.e v4src_position 64'
vpp# sr localsid prefix 2001:db8::/32 behavior end.m.gtp4.e v4src_position 64
unknown input `.m.gtp4.e v4src_position 64'
vpp# show sr localsids
SRv6 - My LocalSID Table:
=========================
        Address:        2001:db8::
        Behavior:       End
        Good traffic:   [0 packets : 0 bytes]
        Bad traffic:    [0 packets : 0 bytes]
--------------------

end.m.gtp6.e

  • end.m.gtp6.e doesn't work due to unknown input `.m.gtp6.e'
vpp# sr localsid prefix 2001:db8::/64 behavior end.m.gtp6.e
unknown input `.m.gtp6.e'

sr policy: Invalid behavior

https://github.com/FDio/vpp/blob/d50e661d661ba96dd5e8b64f47d5d252dea8284b/src/vnet/srv6/sr_policy_rewrite.c#L1013-L1039

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment