These endpoints manage network interfaces configured in the router’s UCIDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/KevinCruz-cell/Redes-de-comunicaciones-/llms.txt
Use this file to discover all available pages before exploring further.
network section. They are served under /router2 and /interfaz2 and interact with the router over SSH. All endpoints require an active session (see Authentication). Most actions return HTTP redirects with flash messages; GET /interfaz2/{iface}/editar returns JSON.
GET /router2/interfaces
Lists all configured network interfaces and returns the management view. Interface data is read from the PHP session (session('interfaces')). The session is pre-populated with default LAN and WAN entries and updated as you create or delete interfaces. Additionally, the view receives the list of physical devices available on the router (fetched live via SSH from /sys/class/net).
Returns the Interfaces.interfaces Blade view.
POST /router2-reboot
Reboots the router by running thereinicio command over SSH.
Response
Redirects back to the previous page with a flash message:- Success:
"El router se está reiniciando. Espera 1 minuto." - Auth error:
"Contraseña de SSH incorrecta." - Connection error:
"Error de conexión (10060): El router no responde."
POST /router2/interfaces/create
Creates a new UCI network interface on the router.Request
Interface name. Converted to lowercase before use (e.g.,
"myvlan" → UCI section network.myvlan).Protocol for the interface. Common values:
"dhcp" (DHCP client), "static" (static IP).Physical device or VLAN interface to assign (e.g.,
"eth0", "eth0.3", "br-lan").If present, sets
network.{nombre}.type='bridge' to create a bridge interface.Static IP address. Only applied when
proto is "static".Subnet mask. Only applied when
proto is "static".Default gateway. Only applied when
proto is "static".DNS server address. Only applied when
proto is "static".Response
Redirects back with a success flash message on creation, or an error flash message on failure. The new interface is also added to the session cache with"Pendiente..." as the IP address until the network subsystem reloads.
GET /router2/refresh
Clears the cached interface list from the session and redirects to/router2/interfaces.
Use this endpoint when the session’s interface list has drifted out of sync with the actual router configuration. After clearing, the next page load re-fetches data from the session defaults.
POST /interfaz2//reiniciar
Restarts a specific network interface by runningifdown {iface}; sleep 1; ifup {iface} on the router.
Path parameters
Interface name as defined in UCI (e.g.,
"lan", "wan", "myvlan").Response
Redirects back with a success or error flash message.POST /interfaz2//detener
Stops a specific network interface by runningifdown {iface} on the router. The interface is brought down but its UCI configuration is not modified.
Path parameters
Interface name to stop.
Response
Redirects back with a success or error flash message.DELETE /interfaz2/
Deletes a network interface from the router’s UCI configuration and commits the change. The interface is also removed from the session cache.Path parameters
Interface name to delete. The name is lowercased before being passed to
uci delete network.{iface}.Response
Redirects back with a success or error flash message.GET /interfaz2//editar
Fetches the current UCI configuration of a specific interface and returns it as JSON. Used by the edit form to pre-populate fields.Path parameters
Interface name to read.
Response
Current protocol (e.g.,
"static", "dhcp").Assigned physical device.
Static IP address, or empty string if not set.
Subnet mask, or empty string if not set.
Default gateway, or empty string if not set.
DNS server, or empty string if not set.
error key on other failures.
PUT /interfaz2/
Updates the protocol and static IP settings of an existing interface. If switching to a non-static protocol, all static fields (ipaddr, netmask, gateway, dns) are deleted from UCI. Changes are committed and the network subsystem is reloaded.
Path parameters
Interface name to update.
Request body
New protocol:
"static" or "dhcp".New static IP address. Only applied when
proto is "static".New subnet mask. Only applied when
proto is "static".New gateway. Only applied when
proto is "static".New DNS server. Only applied when
proto is "static".