mirror of
https://gitlab.com/prpl-foundation/prplos/prplos.git
synced 2025-12-20 00:56:07 +08:00
Page:
TR 181 components configuration
Pages
Build prplWrt manually for the Netgear RAX40
Building prplOS
CDRouter and GitLab CI in a nutshell
Extender
FAQ
Freedom
Getting Started
IOT: EFR32MG21 Support for OSPv2
Initial flashing of Netgear RAX40
IoT: EFR32MG Support for Freedom
MaxLinear Open Service Platform
RAX 40 flashing via bootloader
Release 1.3
Release 1.4
Releases
Reporting WLAN issues
Supported Hardware
TR 181 components configuration
_sidebar
bootloader update URX851 EVK 1 LGP
home
prpl Foundation Freedom board
prpl Foundation Haze board
release 1.0
release 1.1
release 1.2
ucwmpd
uxc
Clone
4
TR 181 components configuration
Raphaël Mélotte edited this page 2023-04-03 14:33:50 +00:00
Table of Contents
- Disabling the DHCP server on the LAN network| uci set dhcp.lan.ignore="1"
- Enable the DHCP client for a network
- Set a static IP for a network
- Moving the WAN interface to the LAN bridge
- Removing a lan interface from the bridge
- Creating a VLAN interface
- Allow SSH on the WAN network
- Remove the guest network
[[TOC]]
In recent prplOS versions (depending on the version different components are available - see the prplOS release page) TR-181 components replace their OpenWrt counterpart.
This page lists example configurations that a user might want to apply, and how to do so using the TR-181 components (using ubus as an example).
Disabling the DHCP server on the LAN network| uci set dhcp.lan.ignore="1"
UCI
uci set dhcp.lan.ignore="1"
TR-181
Remove DHCP server pools with name "lan"
ubus call "DHCPv4.Server.Pool" _del '{ "rel_path": ".[Alias == \"lan\"]."}'
ubus call "DHCPv6.Server.Pool" _del '{ "rel_path": ".[Alias == \"lan\"]."}'
#also guests:
ubus call "DHCPv4.Server.Pool" _del '{ "rel_path": ".[Alias == \"guest\"]."}'
ubus call "DHCPv6.Server.Pool" _del '{ "rel_path": ".[Alias == \"guest\"]."}'
Enable the DHCP client for a network
UCI
uci set network.lan.proto=dhcp
TR-181
Set LAN interface as interface name.
ubus call DHCPv4.Client.1 _set '{ "parameters": { "Interface": "IP.Interface.3." } }'
ubus call DHCPv6.Client.1 _set '{ "parameters": { "Interface": "IP.Interface.3." } }'
Note: this might not work on interfaces other than the WAN interface (see 212609b67a/src/dhcpv4c_config.c (L177)).
Set a static IP for a network
UCI
uci set network.lan.proto=static
uci set network.lan.ipaddr=192.168.1.2
TR-181
ubus call "IP.Interface" _set '{ "rel_path": ".[Name == \"br-lan\"].IPv4Address.[Alias == \"lan\"].", "parameters": { "IPAddress": "192.168.1.2" } }'
Moving the WAN interface to the LAN bridge
UCI
Assuming eth0 is by default the LAN interface and eth1 is WAN:
uci del network.wan
uci set network.lan.ifname="eth0 eth1"
TR-181
?
Removing a lan interface from the bridge
UCI
Remove the interface from network.lan.ifname using uci set network.lan.ifname.
TR-181
?
Creating a VLAN interface
Assuming eth0 is the parent interface to use:
UCI
set network.UCC=interface
set network.UCC.ifname='eth0.200'
set network.UCC.proto='static'
set network.UCC.netmask='255.255.255.0'
set network.UCC.ipaddr='192.168.200.130'
EOF
TR-181
?
Allow SSH on the WAN network
UCI
# Create a hole for SSH on WAN:
uci add firewall rule
uci batch << 'EOF'
set firewall.@rule[-1].name='SSH'
set firewall.@rule[-1].src='wan'
set firewall.@rule[-1].dest_port='22'
set firewall.@rule[-1].target='ACCEPT'
set firewall.@rule[-1].proto='tcp'
set firewall.@rule[-1].enabled='yes'
EOF
TR-181
?
Remove the guest network
UCI
uci del network.guest
TR-181
ubus call Bridging.Bridge _del '{ "rel_path": ".[Alias == \"guest\"]." }'
❓ Is anything else needed?