Mako with Breakout Cables

  • 1
  • Idea
  • Updated 2 years ago
We had a customer request where they want all server ports (ports facing servers) to be a trunk with 2 VLANs.  One VLAN untagged (lets make it VLAN10) and one VLAN tagged (lets make it VLAN500).  

On top of this they want to use breakout cables for ports swp1-12.  This means each swp will look like this-
swp1s0
swp1s1
swp1s2
swp1s3

They also wanted to just do this on the box (no Ansible, Puppet, etc).

Here was my idea for two bridge types


bridge in vlan-aware mode

auto br0
iface br0
bridge-ports regex swp[1-9]s[0-3]|swp[1-3][0-2]s[0-3]
bridge-vlan-aware yes
bridge-stp on
% for interface in range(1,13):
  % for breakout in range(0,4):
auto swp${interface}s${breakout}
iface swp${interface}s${breakout}
  mtu 9000
  bridge-pvid 10
  bridge-vids 500
  alias server port
  % endfor
% endfor

bridges in traditional mode

% for interface in range(1,13):
  % for breakout in range(0,4):
auto swp${interface}s${breakout}
iface swp${interface}s${breakout}
  mtu 9000
  % endfor
% endfor
auto vlan10
iface vlan10
post-up brctl addbr vlan10
% for interface in range(1,13):
  % for breakout in range(0,4):
post-up brctl addif vlan10 swp${interface}s${breakout}
post-down brctl delif vlan10 swp${interface}s${breakout}
  % endfor
% endfor
post-down brctl delbr vlan10
% for interface in range(1,13):
  % for breakout in range(0,4):
auto swp${interface}s${breakout}.500
iface swp${interface}s${breakout}.500
  mtu 9000
  % endfor
% endfor
auto vlan500
iface vlan500
post-up brctl addbr vlan500
% for interface in range(1,13):
  % for breakout in range(0,4):
post-up brctl addif vlan500 swp${interface}s${breakout}.500
post-down brctl delif vlan500 swp${interface}s${breakout}.500
  % endfor
% endfor
post-down brctl delbr vlan500
Photo of Sean Cavanaugh

Sean Cavanaugh, Alum

  • 3,380 Points 3k badge 2x thumb

Posted 2 years ago

  • 1
Photo of Eric Pulvino

Eric Pulvino, Official Rep

  • 4,082 Points 4k badge 2x thumb
I would probably do it differently for traditional bridge, this is cool!

% for interface in range(1,13):
% for breakout in range(0,4):
auto swp${interface}s${breakout}
iface swp${interface}s${breakout}
mtu 9000

auto swp${interface}s${breakout}.500
iface swp${interface}s${breakout}.500
mtu 9000

% endfor
% endfor

auto vlan10
iface vlan10
bridge-ports regex swp[1-9]s[0-3]|swp1[0-2]s[0-3]

auto vlan500
iface vlan500
bridge-ports regex swp[1-9]s[0-3].500|swp1[0-2]s[0-3].500
Photo of Sean Cavanaugh

Sean Cavanaugh, Alum

  • 3,380 Points 3k badge 2x thumb
Did you try that on a switch yet ?  I had done the same thing but.... you will see