Netconf-Module/mod-doc.md
2024-09-04 09:17:07 +02:00

4.9 KiB
Raw Permalink Blame History

Documentation des modules

Documentations des modules qu'on utilise pour config un switch, on retire ce qui n'est pas dans les config qu'on écrit, des modules supplémentaires sont présent en backend.

Détail complet dans auto-doc.md.

dgn-interfaces

Unified configuration of interfaces adapted to DGNum usage:

  • each interfaces have only one logical subinterface;
  • enabling ethernet-switching also enable RSTP;
  • automatic enabling interface and relevant config family when configuring;
  • allows enabling PoE along other configurations.

Type: attribute set of (submodule)

Default: { }

Declared by:

dgn-interfaces.<name>.enable

Whether to enable this interface.

Type: boolean

Default: "config.inet.enable || config.inet6.enable || config.ethernet-switching.enable"

Example: true

Declared by:

dgn-interfaces.<name>.ethernet-switching.enable

Whether to enable the ethernet switching on this interface.

Type: boolean

Default: "config.ethernet-switching.interface-mode != null"

Example: true

Declared by:

dgn-interfaces.<name>.ethernet-switching.interface-mode

Mode of operation for vlan addressing of this interface. “trunk” means that the traffic is tagged, “access” means the traffic is tagged by the switch. Use null to desactivate the switching.

Type: null or one of “trunk”, “access”

Default: null

Declared by:

dgn-interfaces.<name>.ethernet-switching.vlans

Vlans that can be used on this interface. Only one ID should be here for “access” mode of operation.

Type: list of (string or (unsigned integer, meaning >=0))

Default: [ ]

Declared by:

dgn-interfaces.<name>.inet.enable

Whether to enable the ipv4 on this interface.

Type: boolean

Default: "config.inet.addresses != [ ]"

Example: true

Declared by:

dgn-interfaces.<name>.inet.addresses

ipv4 addresses of this interface.

Type: list of string

Default: [ ]

Declared by:

dgn-interfaces.<name>.inet6.enable

Whether to enable the ipv6 on this interface.

Type: boolean

Default: "config.inet6.addresses != [ ]"

Example: true

Declared by:

dgn-interfaces.<name>.inet6.addresses

ipv6 addresses of this interface.

Type: list of string

Default: [ ]

Declared by:

dgn-interfaces.<name>.poe

Whether to enable the PoE on this interface.

Type: boolean

Default: false

Example: true

Declared by:

netconf.mandatoryInterfaces

JunOS require some interfaces to always be configured (even if they are disabled), which correspond to physical interfaces of the switch. They have to be declared here with some information about it (only if it supports PoE for now).

Type: attribute set of (submodule)

Example:

{
  "ge-0/0/0" = {
    supportPoE = true;
  };
  "ge-0/0/1" = {
    supportPoE = true;
  };
  "xe-0/0/0" = {
    supportPoE = false;
  };
}

Declared by:

netconf.mandatoryInterfaces.<name>.supportPoE

Wether this interface supports PoE.

Type: boolean

Example: true

Declared by:

netconf.xmls.configuration

The full configuration to send to a JunOS.

Type: string (read only)

Declared by:

vlans

Named vlans configuration. Allows to name vlans inside interface configuration, instead of just using their IDs.

Type: attribute set of (submodule)

Declared by:

vlans.<name>.id

The ID of this vlan, null means no ID. Incompatible with vlans.name.id-list.

Type: null or (unsigned integer, meaning >=0)

Default: null

Declared by:

vlans.<name>.id-list

List of IDs or IDs range to classify as this vlan. Incompatible with vlans.name.id.

Type: list of (unsigned integer, meaning >=0, or (submodule))

Default: [ ]

Example:

[
  42
  {
    begin = 100;
    end = 200;
  }
]

Declared by:

vlans.<name>.l3-interface

Switchs logical interface to connect directly to this vlan. This allows to communicate with the switch from a vlan without having a cable looping back on its management interface.

Type: null or string

Default: null

Example: "irb.0"

Declared by: