# 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](./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-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.enable Whether to enable this interface\. *Type:* boolean *Default:* ` "config.inet.enable || config.inet6.enable || config.ethernet-switching.enable" ` *Example:* ` true ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.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-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.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-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.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-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.inet\.enable Whether to enable the ipv4 on this interface\. *Type:* boolean *Default:* ` "config.inet.addresses != [ ]" ` *Example:* ` true ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.inet\.addresses ipv4 addresses of this interface\. *Type:* list of string *Default:* ` [ ] ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.inet6\.enable Whether to enable the ipv6 on this interface\. *Type:* boolean *Default:* ` "config.inet6.addresses != [ ]" ` *Example:* ` true ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.inet6\.addresses ipv6 addresses of this interface\. *Type:* list of string *Default:* ` [ ] ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## dgn-interfaces\.\\.poe Whether to enable the PoE on this interface\. *Type:* boolean *Default:* ` false ` *Example:* ` true ` *Declared by:* - [dgn-module\.nix](./dgn-module.nix) ## 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:* - [junos](./junos) ## netconf\.mandatoryInterfaces\.\\.supportPoE Wether this interface supports PoE\. *Type:* boolean *Example:* ` true ` *Declared by:* - [junos](./junos) ## netconf\.xmls\.configuration The full configuration to send to a JunOS\. *Type:* string *(read only)* *Declared by:* - [junos](./junos) ## vlans Named vlans configuration\. Allows to name vlans inside interface configuration, instead of just using their IDs\. *Type:* attribute set of (submodule) *Declared by:* - [junos/vlans\.nix](./junos/vlans.nix) ## vlans\.\\.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:* - [junos/vlans\.nix](./junos/vlans.nix) ## vlans\.\\.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:* - [junos/vlans\.nix](./junos/vlans.nix) ## vlans\.\\.l3-interface Switch’s 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 it’s management interface\. *Type:* null or string *Default:* ` null ` *Example:* ` "irb.0" ` *Declared by:* - [junos/vlans\.nix](./junos/vlans.nix)