In some use-cases it would be useful to be able to infer using the base MAC (chassis MAC) address on an interface, e.g., VETH pairs or layer-2 tunnel interfaces.
This issue details a proposal to extend the ietf-interfaces.yang model with options to tweak and override the defaults.
Furthermore, in an effort (very small) to reduce the deviations, we propose reverting the config true; change for ietf-interfaces:phys-address and fold that support as well into this new syntax.
YANG Model
augment "/if:interfaces/if:interface" {
description "Custom phys-address management, static or derived from chassis MAC.";
container custom-phys-address {
description "Container for custom physical address options";
choice address-type {
description "Choose between static MAC address or chassis-derived MAC";
case static {
leaf static {
type yang:phys-address;
description "Statically configured interface address on protocol sub-layer, e.g., MAC.";
}
}
case chassis {
container chassis {
presence "Enable chassis-derived address options";
description "Container for options when using chassis-derived address.";
leaf offset {
type yang:phys-address;
description "Address offset to add to the chassis-derived MAC.";
}
}
}
}
}
}
Note: node and container names are of course just suggestions at this point.
Example
Base MAC address of the device, sometimes referred to Chassis MAC, is read from VPD and parsed by probe at boot into /run/system.json. In this example the Base MAC is 00:53:00:c0:ff:ee.
A previous proposal used format specifiers, which exist today in an extension to ietf-system.yang, for hostname. That proposal was scrapped in favor of this current one, which is a more YANG friendly alternative.
General Information
Anyone can help out by sponsoring development of new features or contributing pull requests.
Please use this issue for discussions related to the feature.
Description
In some use-cases it would be useful to be able to infer using the base MAC (chassis MAC) address on an interface, e.g., VETH pairs or layer-2 tunnel interfaces.
This issue details a proposal to extend the ietf-interfaces.yang model with options to tweak and override the defaults.
Furthermore, in an effort (very small) to reduce the deviations, we propose reverting the
config true;
change forietf-interfaces:phys-address
and fold that support as well into this new syntax.YANG Model
Example
Base MAC address of the device, sometimes referred to Chassis MAC, is read from VPD and parsed by
probe
at boot into/run/system.json
. In this example the Base MAC is00:53:00:c0:ff:ee
.1) Fixed custom
2) Use Chassis MAC
3) Use Chassis MAC, with local bit
4) Use Chassis MAC, with offset
5) Use Chassis MAC, with offset and local bit
Additional Information
A previous proposal used format specifiers, which exist today in an extension to ietf-system.yang, for
hostname
. That proposal was scrapped in favor of this current one, which is a more YANG friendly alternative.General Information
Anyone can help out by sponsoring development of new features or contributing pull requests. Please use this issue for discussions related to the feature.