Commit graph

33 commits

Author SHA1 Message Date
Thomas Lamprecht be39cee9ac evpn controller: avoid declaration in conditional statement
those are quite dangerous, as the variable will keep the value from
last time the evaluation was true and still evaluate to that old, out
of date value the next time, if the condition is false then.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-08-31 10:56:28 +02:00
Thomas Lamprecht 359796b052 evpn controller: style fixes
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2022-08-31 10:56:01 +02:00
Alexandre Derumier 32870bdc2f frr: config : add exit on router && routemaps.
added recently in last frr releases,

just to be sure to no break on future releases

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-08-31 10:16:04 +02:00
Alexandre Derumier 78f249bcc8 frr: add a local config parser and merge with generated config
some users with very specific config want to be able to add
custom local config and merge it with generated config

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-08-31 10:16:04 +02:00
Alexandre Derumier 4bd3d7bf73 frr: update config frrversion to 8.2.2
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-08-31 10:16:04 +02:00
Alexandre Derumier 916488ccca controllers: evpn: fix multiple exit-nodes with route-map filtering
Currently, when multiple exit-nodes are defined, each exit-nodes exchanges
their own default route, so traffic is looping between both exit nodes
instead going out.

This add a new route-map to filter received type-5 on exit node

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-04-27 10:31:30 +02:00
Alexandre Derumier 9c24bcc5eb controllers: evpn : use frr restart if reload fail
frr reload is not 100% perfect, and sometime is not able to
apply correctly changes.

Use restart in this case to be sure to have the correct config.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-24 13:39:53 +01:00
Alexandre Derumier 9c7dded6e3 controllers: evpn : remove ip forwarding, ipv6 forwarding and add frr version
Forwarding is enabled by default since frr 7.4
also add frr version && reorder some options to avoid warning message on frr reload

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier 57e463046e controllers: evpn : remove "no bgp ebgp-requires-policy"
It's already disabled in the default datacenter profile since frr 7.4

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier 96794fd6ce zones: evpn : add rt-import
Allow to import external route target list from external evpn network
(main usecase is DC inter-connect)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier f34a898e01 controllers: evpn: add missing bgp router-id in vrf
evpn route distinguisher is compute from bgp router-id.
if not defined, it take random ip or 0.0.0.0 and could result collisions between hosts

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier 847f514452 controllers: evpn/bgp : add exitnodes-primary && rework route-map
exitnodes-primary option force traffic to a primary node
A route-map is used to increase metric on backup nodes.
This can be usefull for snat or avoid asymetric routing.

Route-map is rework to handle multiple sequences of route map.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier 9e6b99fd8c controllers: evpn : add min/max value to asn
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier bbf4e4b17b controllers: bgp: use loopback ip src for loopback network
can be usefull if we want to join other loopback ips,
like a ceph cluster in the underlay network

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2022-02-13 14:23:36 +01:00
Alexandre Derumier 3d135423cc evpn: add exitnodes-local-routing
This option allow an exit-node to reach itself a guest in evpn network.

Forum user have requested it, the exitnode need to reach virtual dns server in evpn.

This use a veth-pair instead a simple leak.
It's not enable by default is slowing down a little bit the routing.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2021-08-24 14:25:02 +02:00
Alexandre Derumier 92d8effb6e evpn : add advertise-subnets option
allow to advertise type5 routes for evpn subnets, if vms are silents hosts.
(don't do any traffic, so anycast gateway don't have their mac-ip)

fix: https://bugzilla.proxmox.com/show_bug.cgi?id=3571
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2021-08-24 14:25:02 +02:00
Alexandre Derumier 9cef13e929 controllers: add generate_controller_rawconfig
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-12-18 18:02:47 +01:00
Alexandre Derumier b634e5772a zones: evpn: fix exitnodes for snat
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-12-18 17:58:22 +01:00
Alexandre Derumier 67a0f8157a evpn: frr: use datacenter default profile (lower timeouts)
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-12-18 17:58:22 +01:00
Alexandre Derumier f23633dc24 controllers: improve bgp-evpn
- add new bgp plugin
- add ebgp support
- add loopback support
- move gateway-nodes option to zone as 'exitnodes'
- move external-peers to bgp plugin
2020-11-25 12:04:00 +01:00
Fabian Grünbichler 3caa7687f9 split declaration and initialization with post-if
since combining them is undefined behaviour in perl and can cause
strange side-effects.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2020-07-01 09:57:34 +02:00
Alexandre Derumier 5a60da84d9 use PVE::Tools::split_list for ip lists
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-07-01 09:36:40 +02:00
Alexandre Derumier 1de0abc095 evpn: prefix interfaces
vnets can have random name, prefix other interfaces to avoid conflicts

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-05-19 21:20:46 +02:00
Thomas Lamprecht cdf2c8194b evpn: use file_{g,s}et_contents and import run_command
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-16 11:16:51 +01:00
Thomas Lamprecht 92526f0e48 evpn: indentation, whitespace cleanup and code refactoring
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2020-01-16 11:16:51 +01:00
Alexandre Derumier c7bb4ac53a controller : evpn : only allow 1 evpn controller
we can only have 1 bgp router on a server

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-16 10:47:28 +01:00
Alexandre Derumier 0d1ab7dc80 evpn: add support for local frr.config
For users with complex setup (underlay ebgp for example),
allow user to add a /etc/frr/frr.conf.local

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2020-01-16 10:47:28 +01:00
Alexandre Derumier 1f543c5f3c move find_local_ip_interface sub helper to zone plugin
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-28 14:15:25 +01:00
Alexandre Derumier 4405f2ded1 evpn: remove uplink-id
instead, auto find interfaces

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-28 14:15:25 +01:00
Alexandre Derumier 659c27c2fe controller: evpn: use frr-reload.py for reloading frr
vtysh is not enough to cleanly reload configuration
This require frr-pythontools package

Also add default global values or frr-reload will try to remove them
each time

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-26 12:33:40 +01:00
Alexandre Derumier 56cdcac99d cleanup old transport/router/sdn_cfg references
use zone/controller...

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-26 12:33:40 +01:00
Alexandre Derumier 7cb9714d76 evpn zone plugin : remove vrf option
instead, use zone name as vrf

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-26 12:33:40 +01:00
Alexandre Derumier fa253735a4 rename frrevpn controller plugin to evpn plugin
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2019-11-26 12:33:40 +01:00
Renamed from PVE/Network/SDN/Controllers/FrrEvpnPlugin.pm (Browse further)