ligato / vpp-agent

⚡️ Control plane management agent for FD.io's VPP
https://docs.ligato.io/
Apache License 2.0
247 stars 127 forks source link

ligato Delivers the configuration of the linux host interface #1927

Open ydl-super opened 1 year ago

ydl-super commented 1 year ago

My two containers, etcd and VVP-Agent, use the same host network to deliver routing information to the management interface of the host network, in order to test ligato's configuration of the linux host interface. Encountered the following problems,

I want to configure a static route through ligato to ens160, which is the host's management network card.

Is there a way for ligato to identify the linux network port on the host.

docker exec vpp-agent agentctl kvdb put /vnf-agent/vpp1/config/linux/l3/v2/route/10.0.0.0/24/ens160 \ '{"outgoing_interface":"ens160","scope":"GLOBAL","dst_network":"10.0.0.0/24","gw_addr":"10.89.1.254/24","metric":"60"}'

+======================================================================================================================+ | #156 - NBTransaction | +======================================================================================================================+

time="2023-05-10 06:44:36.03337" level=info msg="Transaction #156 successful! (took 400µs)" logger=dispatcher o----------------------------------------------------------------------------------------------------------------------o

docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255 ether 02:42:79:37:cd:11 txqueuelen 0 (以太网) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens160: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.89.1.97 netmask 255.255.255.0 broadcast 10.89.1.255 inet6 fe80::8304:2efb:2bbe:9346 prefixlen 64 scopeid 0x20 ether 00:0c:29:1c:c0:5a txqueuelen 1000 (以太网) RX packets 124323 bytes 46016066 (46.0 MB) RX errors 0 dropped 132 overruns 0 frame 0 TX packets 197627 bytes 22785095 (22.7 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::80b8:89d6:fa60:1f17 prefixlen 64 scopeid 0x20 ether 00:0c:29:1c:c0:64 txqueuelen 1000 (以太网) RX packets 1009 bytes 151321 (151.3 KB) RX errors 0 dropped 36 overruns 0 frame 0 TX packets 2622 bytes 412700 (412.7 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ens224: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet6 fe80::f52a:3525:c563:5288 prefixlen 64 scopeid 0x20 ether 00:0c:29:1c:c0:6e txqueuelen 1000 (以太网) RX packets 3260 bytes 574737 (574.7 KB) RX errors 0 dropped 12 overruns 0 frame 0 TX packets 2550 bytes 405038 (405.0 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10 loop txqueuelen 1000 (本地环回) RX packets 263406 bytes 30428176 (30.4 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 263406 bytes 30428176 (30.4 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

/vnf-agent/vpp1/check/status/v1/agent {"build_version":"8ff4aa9", "build_date":"Thu Apr 27 20:36:04 UTC 2023", "state":"OK", "start_time":"1683695460", "last_change":"1683695467", "last_update":"1683701172", "commit_hash":"8ff4aa9@master", "plugins":[{"name":"govpp", "state":"OK"}, {"name":"VPPAgent", "state":"OK"}, {"name":"etcd", "state":"OK"}, {"name":"vpp-ifplugin", "state":"OK"}]} /vnf-agent/vpp1/check/status/v1/plugin/VPPAgent {"state":"OK", "last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/etcd {"state":"OK", "last_change":"1683695466", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/govpp {"state":"OK", "last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-abfplugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-aclplugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-dnsplugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-ifplugin {"state":"OK", "last_change":"1683695467", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-ipsec-plugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-l2plugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-l3plugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-natplugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-srplugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/check/status/v1/plugin/vpp-wg-plugin {"last_change":"1683695461", "last_update":"1683701172"} /vnf-agent/vpp1/config/linux/l3/v2/route/10.0.0.0/24/ens160 {"outgoing_interface":"ens160","scope":"GLOBAL","dst_network":"10.0.0.0/24","gw_addr":"10.89.1.254/24","metric":"60"}