package
1.9.0-alpha
Repository: https://github.com/lxlee1102/vpp-agent.git
Documentation: pkg.go.dev

# README

Linux L3 plugin

The linux l3plugin is a Core Agent Plugin that is designed to configure ARP entries and routes in the linux environment. Configuration managed by this plugin is modelled by the proto file.

ARP entries

The configuration must be stored in ETCD using the following key:

/vnf-agent/<agent-label>/linux/config/v1/arp/<label>

An example of configuration in json format can be found here.

To insert config into etcd in json format vpp-agent-ctl can be used. We assume that we want to configure vpp with label vpp1 and config is stored in the arp-json.json file

vpp-agent-ctl -put "/vnf-agent/vpp1/linux/config/v1/arp/arp1" json/arp-linux.json

The vpp-agent-ctl also contains a simple predefined linux ARP entry config. It can be used for testing purposes. To setup the predefined ARP config run:

vpp-agent-ctl -larp

To remove it run:

vpp-agent-ctl -larpd

Routes

The configuration must be stored in etcd using the following key:

/vnf-agent/<agent-label>/linux/config/v1/route/<label>

An example of configuration in json format can be found here for static routes and here for default routes.

To insert config into etcd in json format vpp-agent-ctl can be used. We assume that we want to configure vpp with label vpp1 and config is stored in the routes-linux-static.json or routes-linux-default.json file

vpp-agent-ctl -put "/vnf-agent/vpp1/linux/config/v1/route/route1" json/routes-linux-static.json
vpp-agent-ctl -put "/vnf-agent/vpp1/linux/config/v1/route/defRoute" json/routes-linux-default.json

The vpp-agent-ctl contains a simple predefined route config also. It can be used for testing purposes. To setup the predefined route config run:

vpp-agent-ctl -lrte

To remove it run:

vpp-agent-ctl -lrted

To create a route, appropriate interface is required.

# Packages

Package l3idx implements name-to-index mapping registry and cache for Linux static arp entries and static routes.
No description provided by the author

# Functions

ArpIdentifier generates unique ARP ID used in mapping.
RouteIdentifier generates unique route ID used in mapping.

# Structs

ArpToInterface is an object which stores ARP-to-interface pairs used in cache.
LinuxArpConfigurator watches for any changes in the configuration of static ARPs as modelled by the proto file "model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/linux/config/v1/arp".
LinuxRouteConfigurator watches for any changes in the configuration of static routes as modelled by the proto file "model/l3/l3.proto" and stored in ETCD under the key "/vnf-agent/{vnf-agent}/linux/config/v1/route".