Having some issues grokking how to use netdev_lag resource correctly.
1. What is the purpose of this apply-macro it puts on my LAG interface, and/or is it a side-effect of something I'm doing wrong ?:
ae0 {
apply-macro "netdev_lag[:links]" {
ge-0/0/10;
ge-0/0/11;
ge-0/0/12;
}
unit 0 {
description "Puppet created eth-switch: ae0";
family ethernet-switching {
port-mode trunk;
vlan {
members [ Larry Moe ];
}
native-vlan-id Curly;
}
}
}
Here's my manifest:
1 node "wf-ps-ex4200-4" {
2
3 #
4 # include the "tackle_dummy" port,vlab settings. (vlans, ports ge-0/0/10 thru 12)
5 #
6 include tackle_dummy
7
8 netdev_lag { "ae0":
9 links => [ 'ge-0/0/10', 'ge-0/0/11', 'ge-0/0/12' ]
10 }
11
12 netdev_l2_interface { "ae0":
13 tagged_vlans => [ Larry, Moe ],
14 untagged_vlan => Curly
15 }
16 }
The link ports are defined in the config, a priori:
...
ge-0/0/10 {
ether-options {
802.3ad ae0;
}
}
ge-0/0/11 {
ether-options {
802.3ad ae0;
}
}
ge-0/0/12 {
ether-options {
802.3ad ae0;
}
}
....
2. I don't understand the documentation on the netdev_lag resource (Spefically the paragraph following the table in the "Application Note"). I guess that's the root of my confusion.
I'd like to just create a bunch of l2 interfaces like this:
$junk_ports = {
"ge-0/0/10" => { description => "${junk_port_desc} member 1" },
"ge-0/0/11" => { description => "${junk_port_desc} member 2" },
"ge-0/0/12" => { description => "${junk_port_desc} member 3" },
}
create_resources ( netdev_l2_interface, $junk_ports)
...and then assemble them into a lag. But they end up getting created with "unit 0", and then can't be added to a lag bundle using a netdev_lag resource.
How do I achive this using the create_resources() function ? The note re: using "ensure=>absent"in the netdev_l2_interface is unclear to me. (As usual, an example would go a long way to clarify this for me.)
FWIW: this is the documetation I'm not getting:
...
The links property will cause physical interfaces to be added or removed from the LAG. These physical interfaces MUST be in a prior state that would allow this configuration; i.e. there must *not* be any existing units configured on the physical interface prior to attempting to assign them to a LAG/ae port. You can use the netdev_l2_interface resource with ensure=>absent, for example, to ensure this precondition.
JUNOS requires at least one unit configured under the LAG/ae port for the links to display as part of the "show" command. Therefore you will need to define L2 services using the netdev_l2_interface resource type.
...
/doug
p.s. the example following it in the doc references the resource "netdev_lag_interface" instead of "netdev_lag".
Is that a typo, or am I missing something else ?
/doug