Commit 1013e9d4 authored by Leigh Stoller's avatar Leigh Stoller

Finally have spanning tree working, thanks Kirk! The main point is that

loop guard has to be enabled on switch to switch links only, not on
switch to pc.
parent a9aee5ed
......@@ -274,18 +274,26 @@ sub generateConfig($$)
my $card = $interface->card();
my $port = $interface->port();
push(@portlines,
"interface ethernet $card/$port",
" shutdown",
" switchport mode access",
" speed 10G no-autoneg",
my @pconfig = (
"interface ethernet $card/$port",
" shutdown",
" switchport mode access",
" speed 10G no-autoneg");
if ($vlan->GetRole() eq "trunk") {
push(@pconfig,
" spanning-tree guard loop");
}
push(@pconfig,
" no shutdown",
" exit");
push(@portlines, @pconfig);
}
}
if (@portlines) {
push(@config,
"no spanning-tree",
"spanning-tree mode rst",
@portlines);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment