my $plugin_config = $transport_cfg->{ids}->{$id};
my $controllerid = $plugin_config->{controller};
next if !$controllerid;
- my $controller = $transport_cfg->{ids}->{$controllerid};
+ my $controller = $controller_cfg->{ids}->{$controllerid};
if ($controller) {
my $controller_plugin = PVE::Network::SDN::Controllers::Plugin->lookup($controller->{type});
$controller_plugin->generate_controller_transport_config($plugin_config, $controller, $id, $uplinks, $config);
@router_config = ();
#import /32 routes of evpn network from vrf1 to default vrf (for packet return)
- #frr 7.1 tag is bugged -> works fine with 7.1 stable branch(20190829-02-g6ba76bbc1)
- #https://github.com/FRRouting/frr/issues/4905
foreach my $address (@gatewaypeers) {
push @router_config, "neighbor $address activate";
}
sub generate_controller_transport_config {
my ($class, $plugin_config, $router, $id, $uplinks, $config) = @_;
- my $vrf = $plugin_config->{'vrf'};
+ my $vrf = $id;
my $vrfvxlan = $plugin_config->{'vrf-vxlan'};
my $asn = $router->{asn};
my $gatewaynodes = $router->{'gateway-nodes'};
sub properties {
return {
- 'vrf' => {
- description => "vrf name.",
- type => 'string', #fixme: format
- },
'vrf-vxlan' => {
type => 'integer',
description => "l3vni.",
return {
nodes => { optional => 1},
'uplink-id' => { optional => 0 },
- 'vrf' => { optional => 0 },
'vrf-vxlan' => { optional => 0 },
'controller' => { optional => 0 },
};
my $mac = $vnet->{mac};
my $uplink = $plugin_config->{'uplink-id'};
- my $vrf = $plugin_config->{'vrf'};
+ my $vrf = $zoneid;
my $vrfvxlan = $plugin_config->{'vrf-vxlan'};
die "missing vxlan tag" if !$tag;
if ($vrfvxlan) {
#l3vni vxlan interface
- my $iface_vxlan = "vxlan$vrf";
+ my $iface_vxlan = "vxvrf$vrf";
@iface_config = ();
push @iface_config, "vxlan-id $vrfvxlan";
push @iface_config, "vxlan-local-tunnelip $ifaceip" if $ifaceip;
die "$controller is not a evpn controller type" if $controller_cfg->{ids}->{$controller}->{type} ne 'evpn';
}
- #vrf && vrf-vxlan need to be defined
- my $vrf = $zone_cfg->{ids}->{$zoneid}->{vrf};
-
- # verify that vrf is not already declared in another zone
- foreach my $id (keys %{$zone_cfg->{ids}}) {
- next if $id eq $zoneid;
- die "vrf $vrf is already declared in $id"
- if (defined($zone_cfg->{ids}->{$id}->{vrf}) && $zone_cfg->{ids}->{$id}->{vrf} eq $vrf);
- }
+ #vrf-vxlan need to be defined
my $vrfvxlan = $zone_cfg->{ids}->{$zoneid}->{'vrf-vxlan'};
# verify that vrf-vxlan is not already declared in another zone
pvesh create /cluster/sdn/zones/ --zone layer2evpnzone --type evpn --uplink-id 1 --controller frrrouter1
#create a layer3 routable vxlan bgpevpn transportzone
-pvesh create /cluster/sdn/zones/ --zone layer3evpnzone --type evpn --uplink-id 1 --controller frrrouter1 --vrf vrf1 --vrf-vxlan 4000
+pvesh create /cluster/sdn/zones/ --zone layer3evpnzone --type evpn --uplink-id 1 --controller frrrouter1 --vrf-vxlan 4000
#create a vnet in the transportzone