]> git.proxmox.com Git - pve-network.git/log
pve-network.git
5 months agosdn: dhcp: add dnsmasq plugin
Stefan Hanreich [Fri, 17 Nov 2023 11:39:46 +0000 (12:39 +0100)]
sdn: dhcp: add dnsmasq plugin

The plugin creates a dnsmasq@<zone> service that spawns a dnsmasq
instance that handles dhcp for that zone.

The configuration files for a dnsmasq instance lie within
/etc/dnsmasq.d/<zone>

The plugin generates the following configuration files:
* 00-default.conf
  Contains the default global configuration for dnsmasq. Disables DNS,
  enables some specific options for Windows, does some
  security-related configuration and makes dnsmasq bind only to the
  interfaces it is responsible for
* 10-<subnet>.conf
  Contains the default settings for a subnet. Sets dhcp options for
  DNS and gateway.
* 10-<subnet>.ranges.conf
  Contains the configuration of DHCP ranges for a subnet.
* ethers
  Contains the MAC address to IP mappings for a zone.

Every subnet gets assigned a tag in the dnsmasq configuration that is
equal to the subnet_id. This can be used to override / set additional
configuration options on a per-subnet basis.

Additionally it creates the file /etc/default/dnsmasq.<zone> that
provides default options for the dnsmasq service.

Leases are stored in /var/lib/misc/dnsmasq.<zone>.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agodhcp: add abstract class for DHCP plugins
Stefan Hanreich [Fri, 17 Nov 2023 11:39:45 +0000 (12:39 +0100)]
dhcp: add abstract class for DHCP plugins

This abstract class provides several hooks that should be called
during the config generation process, they expose the functionality
for the different configuration tasks required from the DHCP plugins.

add_ip_mapping
Adds a mapping from MAC address to an IP for a given DHCP server. The
DHCP server will then always assign the given IP address to the MAC.

del_ip_mapping
Deletes all mappings for a given MAC address for a given DHCP server.

before_regenerate
Should be called before the plugin does any configuration tasks. The
main usage for this hook is tearing down old instances.

after_regenerate
Should be called after the plugin has finished generating any
configuration. The main usage for this hook is to perform cleanup and
restart / reload services.

before_configure
Should be called before creating the configuration for a specific DHCP
instance, as defined in the dhcp.cfg. This can be used for performing
instance-specific setup.

after_configure
Should be called after the configuration for a specific DHCP instance,
as defined in the dhcp.cfg. This will mainly be used for enabling and
restarting / reloading a specific instance of a DHCP server.

configure_subnet
This function configures the settings for a specific subnet (that can
contain multiple DHCP ranges). This sets global settings for a
specific subnet such as DNS server or gateway.

configure_range
This configures a DHCP range that is available for a given Subnet.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosubnet: vnet: refactor IPAM related methods
Stefan Hanreich [Fri, 17 Nov 2023 11:39:44 +0000 (12:39 +0100)]
subnet: vnet: refactor IPAM related methods

Those methods are used by the DHCP plugins to attain the next free
IP address for a given DHCP range, as well as delete all entries with
a certain MAC address.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agoipam: plugins: preparations for DHCP
Stefan Hanreich [Fri, 17 Nov 2023 11:39:43 +0000 (12:39 +0100)]
ipam: plugins: preparations for DHCP

Adds a new file priv/macs.db for caching the queries to IPAM.

Additionally adds and imeplements methods to the IPAM plugins that
are required for the DHCP functionality.

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: zone: add dhcp option
Stefan Hanreich [Fri, 17 Nov 2023 11:39:42 +0000 (12:39 +0100)]
sdn: zone: add dhcp option

Co-Authored-By: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosubnet: add dhcp options
Stefan Hanreich [Fri, 17 Nov 2023 11:39:41 +0000 (12:39 +0100)]
subnet: add dhcp options

Additionally add a helper function for parsing the DHCP ranges of a
subnet.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agosdn: preparations for DHCP plugin
Stefan Hanreich [Fri, 17 Nov 2023 11:39:40 +0000 (12:39 +0100)]
sdn: preparations for DHCP plugin

Add the option to retrieve the running configuration instead of only
the pending configuration via the config methods. Refactor methods
using the running config to utilize the new parameter.

Add helper methods and return additional attributes from the getter
functions that are needed by the dhcp plugins.

Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
5 months agogitignore: sort content
Thomas Lamprecht [Fri, 17 Nov 2023 14:53:03 +0000 (15:53 +0100)]
gitignore: sort content

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agogitignore: add build artefacts and .vscode to ignore list
Stefan Lendl [Fri, 17 Nov 2023 14:23:07 +0000 (15:23 +0100)]
gitignore: add build artefacts and .vscode to ignore list

Signed-off-by: Stefan Lendl <s.lendl@proxmox.com>
 [ TL: avoid one-word subject & make build-dir glob more specific ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 months agobump version to 0.8.2
Fabian Grünbichler [Wed, 25 Oct 2023 11:07:03 +0000 (13:07 +0200)]
bump version to 0.8.2

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
5 months agocontrollers: add isis router plugin
Alexandre Derumier [Wed, 13 Sep 2023 11:38:45 +0000 (13:38 +0200)]
controllers: add isis router plugin

5 months agocontrollers: frr: add parsing of "interfaces" section
Alexandre Derumier [Wed, 13 Sep 2023 11:38:43 +0000 (13:38 +0200)]
controllers: frr: add parsing of "interfaces" section

5 months agocontroller: evpn: fix find_bgp_controller
Alexandre Derumier [Wed, 13 Sep 2023 11:38:40 +0000 (13:38 +0200)]
controller: evpn: fix find_bgp_controller

5 months agozones: evpn: add disable-bridge-learning
Alexandre Derumier [Tue, 26 Sep 2023 07:39:42 +0000 (09:39 +0200)]
zones: evpn: add disable-bridge-learning

Allow to statically register mac address in evpn,

can be useful for silent hosts

5 months agozones: add add|del_bridge_fdb to plugins
Alexandre Derumier [Tue, 26 Sep 2023 07:39:41 +0000 (09:39 +0200)]
zones: add add|del_bridge_fdb to plugins

We want to be able to override it for some specific plugins.

Can be used by an sdn controller (like ovn for example), where
mac need to be registered manually.

5 months agozones: add|del_bridge_fdb : remove firewall param
Alexandre Derumier [Tue, 26 Sep 2023 07:39:40 +0000 (09:39 +0200)]
zones: add|del_bridge_fdb : remove firewall param

It's not used anymore in Network.pm

9 months agozones: simplify status code
Fabian Grünbichler [Wed, 19 Jul 2023 09:42:44 +0000 (11:42 +0200)]
zones: simplify status code

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
9 months agozones: improve error message
Fabian Grünbichler [Wed, 19 Jul 2023 09:42:33 +0000 (11:42 +0200)]
zones: improve error message

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
9 months agozones: status: display specific message if vnet is not generated.
Alexandre Derumier [Fri, 23 Jun 2023 12:49:41 +0000 (14:49 +0200)]
zones: status: display specific message if vnet is not generated.

also cleanup duplicate code in plugins

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
9 months agosdn: config generation : check if interfaces.d/sdn is sourced
Fabian Grünbichler [Wed, 19 Jul 2023 09:35:00 +0000 (11:35 +0200)]
sdn: config generation : check if interfaces.d/sdn is sourced

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agozones: fix status
Alexandre Derumier [Mon, 12 Jun 2023 17:43:46 +0000 (19:43 +0200)]
zones: fix status

Vnets were wrongly displayed in the main tree because of this,
and error was not set on zone

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 months agofix permissions && use new /sdn/zones/<zone>/<vnet> path
Alexandre Derumier [Thu, 8 Jun 2023 01:24:44 +0000 (03:24 +0200)]
fix permissions && use new /sdn/zones/<zone>/<vnet> path

- use new /sdn/zones/zone/<vnet> path for vnet && subnets permissions

- fix some permissions on /sdn/zones  && /sdn

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 months agofix tests for bookworm
Fabian Grünbichler [Wed, 7 Jun 2023 11:25:02 +0000 (13:25 +0200)]
fix tests for bookworm

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10 months agoget_local_vnets: fix permission path && perm
Alexandre Derumier [Tue, 6 Jun 2023 13:19:21 +0000 (15:19 +0200)]
get_local_vnets: fix permission path && perm

new path is /zones/<zone>/<vnetid>

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
10 months agobump version to 0.8.1
Thomas Lamprecht [Tue, 6 Jun 2023 06:33:30 +0000 (08:33 +0200)]
bump version to 0.8.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoskip tests in sbuild environment for now
Thomas Lamprecht [Tue, 6 Jun 2023 08:23:03 +0000 (10:23 +0200)]
skip tests in sbuild environment for now

they access pmxcfs directly and so cannot really work, this needs to
be mocked some day (soon!), but as stop-gap just skip the tests if a
sbuild lock is present

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: update dependencies
Thomas Lamprecht [Tue, 6 Jun 2023 08:22:50 +0000 (10:22 +0200)]
d/control: update dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoevpn: update config to frr 8.5.1
Alexandre Derumier [Tue, 23 May 2023 06:47:26 +0000 (08:47 +0200)]
evpn: update config to frr 8.5.1

add default values:
 "no bgp hard-administrative-reset"
 "no bgp graceful-restart notification"

to avoid frr-reload warning

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agonetwork reload: fix UPID parsing
Alexandre Derumier [Thu, 20 Apr 2023 21:36:22 +0000 (23:36 +0200)]
network reload: fix UPID parsing

When warning or error from ifreload are logged they are received in
1 line in result of pvesh.

So, the UPID might not always start at the beginning, which was
assumed by the old code, failing parsing it, throwing a warning like:

> Use of uninitialized value $upid in pattern match (m//) at /usr/share/perl5/PVE/Tools.pm line 1106.
> Use of uninitialized value $upid in concatenation (.) or string at /usr/share/perl5/PVE/Tools.pm line 1120.

Drop the start anchor of the regex.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix #4683: zones: QinQ: fix vlan-protocol when bridge is VLAN aware
Alexandre Derumier [Thu, 20 Apr 2023 21:36:21 +0000 (23:36 +0200)]
fix #4683: zones: QinQ: fix vlan-protocol when bridge is VLAN aware

The tagged bridge interface need to also have to correct
vlan-protocol

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix #4389: evpn: exit nodes: null routes subnets from other zones
Alexandre Derumier [Thu, 20 Apr 2023 21:36:20 +0000 (23:36 +0200)]
fix #4389: evpn: exit nodes: null routes subnets from other zones

We don't want to routes subnets between different zones when same
exit node is used.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix #4662: frr: fix config generation ordering
Alexandre Derumier [Thu, 20 Apr 2023 21:36:19 +0000 (23:36 +0200)]
fix #4662: frr: fix config generation ordering

vrf and router bgp vrf need to be ordered by vrf name

ip protocol need to be at the end

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix #4425: vxlan, evpn: add vxlan-port option to override default
Alexandre Derumier [Thu, 20 Apr 2023 21:36:18 +0000 (23:36 +0200)]
fix #4425: vxlan, evpn: add vxlan-port option to override default

Some users requested it as their physical network equipments don't
use standard vxlan port

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agofix #4657: evpn: fix exit-node with multiple vrf
Alexandre Derumier [Thu, 20 Apr 2023 21:36:17 +0000 (23:36 +0200)]
fix #4657: evpn: fix exit-node with multiple vrf

Currently, if a node is primary exit-node for 1 vrf, and secondary
exit-node for another vrf,

The deny route-map is filtering routes imports for both vrf.

This patch adds filtering only for the vrf's where the node is
secondary.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobump version to 0.8.0
Thomas Lamprecht [Thu, 25 May 2023 16:18:42 +0000 (18:18 +0200)]
bump version to 0.8.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: raise compat level to 13
Thomas Lamprecht [Thu, 25 May 2023 16:18:12 +0000 (18:18 +0200)]
d/control: raise compat level to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: derive upload dist automatically
Thomas Lamprecht [Thu, 25 May 2023 16:18:39 +0000 (18:18 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agoseparate packaging and source build system
Thomas Lamprecht [Thu, 25 May 2023 16:10:14 +0000 (18:10 +0200)]
separate packaging and source build system

like almost all of our repos do nowadays, modern git can detect such
things on rebase so in development stuff should be hopefully not too
much affected by this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: reword package description slightly
Thomas Lamprecht [Thu, 25 May 2023 16:06:48 +0000 (18:06 +0200)]
d/control: reword package description slightly

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: drop outdated breaks for pve-manager << 5.2-12
Thomas Lamprecht [Thu, 25 May 2023 16:06:19 +0000 (18:06 +0200)]
d/control: drop outdated breaks for pve-manager << 5.2-12

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: raise standards version compliance to 4.6.2
Thomas Lamprecht [Thu, 25 May 2023 16:05:56 +0000 (18:05 +0200)]
d/control: raise standards version compliance to 4.6.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: improve DSC target & add sbuild convenience target
Thomas Lamprecht [Thu, 25 May 2023 16:04:44 +0000 (18:04 +0200)]
buildsys: improve DSC target & add sbuild convenience target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agod/control: record missing libtest-mockmodule-perl build-dependency
Thomas Lamprecht [Thu, 25 May 2023 15:42:12 +0000 (17:42 +0200)]
d/control: record missing libtest-mockmodule-perl build-dependency

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: always pre-clean for dsc target
Thomas Lamprecht [Thu, 25 May 2023 15:41:47 +0000 (17:41 +0200)]
buildsys: always pre-clean for dsc target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agobuildsys: drop odd TARGZ
Thomas Lamprecht [Thu, 25 May 2023 15:41:26 +0000 (17:41 +0200)]
buildsys: drop odd TARGZ

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
10 months agomakefile: convert to use simple parenthesis
Thomas Lamprecht [Thu, 25 May 2023 15:37:58 +0000 (17:37 +0200)]
makefile: convert to use simple parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobump version to 0.7.3
Thomas Lamprecht [Mon, 20 Mar 2023 16:20:01 +0000 (17:20 +0100)]
bump version to 0.7.3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
14 months agod/control: add missing build dependency
Fabian Grünbichler [Fri, 20 Jan 2023 09:12:17 +0000 (10:12 +0100)]
d/control: add missing build dependency

the File::Slurp module is used for test cases..

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
15 months agofrr: add prefix-list support
Alexandre Derumier [Wed, 30 Nov 2022 15:18:59 +0000 (16:18 +0100)]
frr: add prefix-list support

parsing of prefix-list in frr.conf.local was missing

reported on forum:
https://forum.proxmox.com/threads/using-the-proxmox-sdn-to-manage-host-connectivity-with-bgp.118553

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
15 months agocontrollers: evpn : correctly limit the number of controllers to max 1
Alexandre Derumier [Tue, 27 Dec 2022 07:17:19 +0000 (08:17 +0100)]
controllers: evpn : correctly limit the number of controllers to max 1

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
17 months agobump version to 0.7.2
Thomas Lamprecht [Mon, 14 Nov 2022 13:08:34 +0000 (14:08 +0100)]
bump version to 0.7.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobridge-disable-mac-learning : use $opts for tap_plug
Alexandre Derumier [Wed, 24 Aug 2022 16:26:40 +0000 (18:26 +0200)]
bridge-disable-mac-learning : use $opts for tap_plug

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
19 months agoevpn controller: avoid declaration in conditional statement
Thomas Lamprecht [Wed, 31 Aug 2022 08:56:27 +0000 (10:56 +0200)]
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>
19 months agoevpn controller: style fixes
Thomas Lamprecht [Wed, 31 Aug 2022 08:56:01 +0000 (10:56 +0200)]
evpn controller: style fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
19 months agofrr: config : add exit on router && routemaps.
Alexandre Derumier [Wed, 24 Aug 2022 08:56:46 +0000 (10:56 +0200)]
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>
19 months agofrr: add a local config parser and merge with generated config
Alexandre Derumier [Wed, 24 Aug 2022 08:56:45 +0000 (10:56 +0200)]
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>
19 months agofrr: update config frrversion to 8.2.2
Alexandre Derumier [Wed, 24 Aug 2022 08:56:44 +0000 (10:56 +0200)]
frr: update config frrversion to 8.2.2

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
23 months agobump version to 0.7.1
Thomas Lamprecht [Thu, 28 Apr 2022 18:34:08 +0000 (20:34 +0200)]
bump version to 0.7.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
23 months agocontrollers: evpn: fix multiple exit-nodes with route-map filtering
Alexandre Derumier [Wed, 20 Apr 2022 14:19:30 +0000 (16:19 +0200)]
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>
2 years agozones: add del_bridge_fdb
Alexandre Derumier [Fri, 24 Sep 2021 08:51:01 +0000 (10:51 +0200)]
zones: add del_bridge_fdb

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agozones: add add_bridge_fdb
Alexandre Derumier [Fri, 24 Sep 2021 08:51:00 +0000 (10:51 +0200)]
zones: add add_bridge_fdb

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agozones : tap_plug: add support for disable bridge learning
Alexandre Derumier [Fri, 24 Sep 2021 08:50:59 +0000 (10:50 +0200)]
zones : tap_plug: add support for disable bridge learning

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agovnets: fix get_vnet
Alexandre Derumier [Fri, 24 Sep 2021 08:50:58 +0000 (10:50 +0200)]
vnets: fix get_vnet

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agocontrollers: evpn : use frr restart if reload fail
Alexandre Derumier [Wed, 23 Feb 2022 07:11:43 +0000 (08:11 +0100)]
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>
2 years agobuildsys: change upload dist to bullseye
Thomas Lamprecht [Mon, 14 Feb 2022 07:07:46 +0000 (08:07 +0100)]
buildsys: change upload dist to bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 0.7.0
Thomas Lamprecht [Sun, 13 Feb 2022 14:04:54 +0000 (15:04 +0100)]
bump version to 0.7.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocontrollers: evpn : remove ip forwarding, ipv6 forwarding and add frr version
Alexandre Derumier [Fri, 11 Feb 2022 09:33:31 +0000 (10:33 +0100)]
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>
2 years agocontrollers: bgp : remove bgp network import-check
Alexandre Derumier [Fri, 11 Feb 2022 09:33:30 +0000 (10:33 +0100)]
controllers: bgp : remove bgp network import-check

already enabled since frr 7.4

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agocontrollers: evpn : remove "no bgp ebgp-requires-policy"
Alexandre Derumier [Fri, 11 Feb 2022 09:33:29 +0000 (10:33 +0100)]
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>
2 years agozones: evpn : add rt-import
Alexandre Derumier [Fri, 11 Feb 2022 09:33:28 +0000 (10:33 +0100)]
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>
2 years agocontrollers: evpn: add missing bgp router-id in vrf
Alexandre Derumier [Fri, 11 Feb 2022 09:33:27 +0000 (10:33 +0100)]
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>
2 years agocontrollers: evpn/bgp : add exitnodes-primary && rework route-map
Alexandre Derumier [Fri, 11 Feb 2022 09:33:26 +0000 (10:33 +0100)]
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>
2 years agocontrollers: evpn : add min/max value to asn
Alexandre Derumier [Fri, 11 Feb 2022 09:33:25 +0000 (10:33 +0100)]
controllers: evpn : add min/max value to asn

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agocontrollers: bgp: add bgp-multipath-as-path-relax option
Alexandre Derumier [Fri, 11 Feb 2022 09:33:24 +0000 (10:33 +0100)]
controllers: bgp: add bgp-multipath-as-path-relax option

Some users need it to do ecmp when peering with 2 differents asn

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agocontrollers: bgp: use loopback ip src for loopback network
Alexandre Derumier [Fri, 11 Feb 2022 09:33:23 +0000 (10:33 +0100)]
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>
2 years agozones: status : skip node if node don't have the zone
Alexandre Derumier [Fri, 11 Feb 2022 09:33:22 +0000 (10:33 +0100)]
zones: status : skip node if node don't have the zone

reported by forum user:
https://forum.proxmox.com/threads/proxmox-sdn-incorrect-node-deployment.99834/

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agocontrollers: allow minus and underscore in IDs again
Thomas Lamprecht [Tue, 1 Feb 2022 10:19:43 +0000 (11:19 +0100)]
controllers: allow minus and underscore in IDs again

commit 7c5b0f6 not only reduced the possible length but also the
accepted character set, revert the latter partially again and allow
using minus and underscore for characters not being the start or end.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocontrollers: indentation fixes
Thomas Lamprecht [Tue, 1 Feb 2022 10:18:06 +0000 (11:18 +0100)]
controllers: indentation fixes

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 0.6.2
Thomas Lamprecht [Fri, 12 Nov 2021 18:34:24 +0000 (19:34 +0100)]
bump version to 0.6.2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovnets: alias: fix regex
Alexandre Derumier [Fri, 5 Nov 2021 08:06:45 +0000 (09:06 +0100)]
vnets: alias: fix regex

2 years agozones: evpn: add disable-arp-nd-suppression option
Alexandre Derumier [Fri, 5 Nov 2021 08:06:44 +0000 (09:06 +0100)]
zones: evpn: add disable-arp-nd-suppression option

arp-nd-suppression can break ip mobility,
when an ip from a vm is moved to another vm, with different mac.
For example, with a keepalived vip, the garp is filtered.

2 years agoapi2: zones: fix update
Alexandre Derumier [Fri, 5 Nov 2021 08:06:43 +0000 (09:06 +0100)]
api2: zones: fix update

2 years agovnet/subnet : add skipdns option
Alexandre Derumier [Fri, 5 Nov 2021 08:06:41 +0000 (09:06 +0100)]
vnet/subnet : add skipdns option

allow to register ip to ipam without dns registration.
can be used for temp/pending ip for example

2 years agovnet : alias : check pattern
Alexandre Derumier [Mon, 23 Aug 2021 13:22:17 +0000 (15:22 +0200)]
vnet : alias : check pattern

fix : https://bugzilla.proxmox.com/show_bug.cgi?id=2966
Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agoevpn: add exitnodes-local-routing
Alexandre Derumier [Mon, 23 Aug 2021 13:22:16 +0000 (15:22 +0200)]
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>
2 years agoevpn : add advertise-subnets option
Alexandre Derumier [Mon, 23 Aug 2021 13:22:15 +0000 (15:22 +0200)]
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>
2 years agoevpn : add "ip route del vrf vrf_myzone unreachable default metric 4278198272" on...
Alexandre Derumier [Mon, 23 Aug 2021 13:22:14 +0000 (15:22 +0200)]
evpn : add "ip route del vrf vrf_myzone unreachable default metric 4278198272" on exit node

This is breaking routing between the evpn vrf && default vrf leak  on exit node only

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agoRevert "evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198...
Thomas Lamprecht [Tue, 24 Aug 2021 12:23:53 +0000 (14:23 +0200)]
Revert "evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node"

replaced by another series
https://lists.proxmox.com/pipermail/pve-devel/2021-August/049771.html

This reverts commit 95e2f20f5c70f0cd0aa4fe80dad35dace9dc165d.

2 years agoget_local_vnets: add permissions on /sdn/vnets/*
Alexandre Derumier [Thu, 5 Aug 2021 14:59:38 +0000 (16:59 +0200)]
get_local_vnets: add permissions on /sdn/vnets/*

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agoevpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272...
Alexandre Derumier [Wed, 21 Jul 2021 06:22:28 +0000 (08:22 +0200)]
evpn : remove "ip route add vrf vrf_myzone unreachable default metric 4278198272" on exit node

This is breaking routing between the evpn vrf && default vrf leak  on exit node only

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
2 years agobump version to 0.6.1
Thomas Lamprecht [Mon, 5 Jul 2021 17:07:55 +0000 (19:07 +0200)]
bump version to 0.6.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agosubnets/ipam : fix is_gateway
Alexandre Derumier [Fri, 4 Jun 2021 11:25:00 +0000 (13:25 +0200)]
subnets/ipam : fix is_gateway

- add lost is_gateway in subnets subnet when creating subnet
- allow reuse ip as gateway in subnet create if it's already flagged gateway in the ipamdb
- add tests

2 years agovnets: subroutines: return if !$vnetid
Alexandre Derumier [Fri, 4 Jun 2021 11:24:59 +0000 (13:24 +0200)]
vnets: subroutines: return if !$vnetid

2 years agoadd vnets test + ipam fixes
Alexandre Derumier [Fri, 4 Jun 2021 11:24:58 +0000 (13:24 +0200)]
add vnets test + ipam fixes

- add vnets tests with multiple subnets
- fix pve ipam ipv6 with next_free_ip (ipv6 don't have network && broadcast address)
- fix vnet next_free_ip with no ipam

2 years agosdn: get_local_vnets : add ipam && vlanaware values
Alexandre Derumier [Fri, 4 Jun 2021 11:24:57 +0000 (13:24 +0200)]
sdn: get_local_vnets : add ipam && vlanaware values

to be able to use them in ui bridgeselector

2 years agobump version to 0.6.0
Thomas Lamprecht [Mon, 10 May 2021 08:45:56 +0000 (10:45 +0200)]
bump version to 0.6.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/source: switch to native versioning
Thomas Lamprecht [Mon, 10 May 2021 08:45:53 +0000 (10:45 +0200)]
d/source: switch to native versioning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agozones: simple|evpn : only enable ip-forward if gateway is defined on the subnet
Alexandre Derumier [Mon, 10 May 2021 06:40:58 +0000 (08:40 +0200)]
zones: simple|evpn : only enable ip-forward if gateway is defined on the subnet

or ifquery report an error

2 years agosubnets: fix add|del subnets withtout ipam
Alexandre Derumier [Sat, 8 May 2021 05:51:36 +0000 (07:51 +0200)]
subnets: fix add|del subnets withtout ipam

2 years agosubnets: tests: add noipam test
Alexandre Derumier [Sat, 8 May 2021 05:51:35 +0000 (07:51 +0200)]
subnets: tests: add noipam test