Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Configuring the DHCP Server

  • L2 on board switches

  • Setting up the iptables

  • Process Monitors

  • Configuring MultiLan interfaces and creating bridges

  • Creating multiple VLans for isolating/securing the traffic across interfaces

High Level Architecture

Gliffy Diagramdrawio
namediagramNameHigh level architecture of utopia module.drawio
pagePinrevision1

Figure 1 - High level architecture of Utopia module

...

As described in the previous section Utopia is launched and initialised through a set of shell scripts. This section details the scripts and the initialisation sequence.

Gliffy Diagramdrawio
namediagramNameutopia initialization sequence diagram.drawio
pagePinrevision21

Figure 2 - Utopia Initialization Sequence Diagram

...

UtilityDescriptionReference
brctlIt is a tool used to configure Ethernet bridge (Network Bridging)https://linux.die.net/man/8/brctl
vconfigIt allows user to create and remove vlan-devices on a vlan enabled kernel. Vlan-devices are virtual Ethernet devices which represents the virtual lans on the physical lan.https://linux.die.net/man/8/vconfig
dropbearIt is a lightweight SSH2 server designed to be small enough to be used in small memory environments, while still being functional and secure enough.

https://linux.die.net/man/8/dropbear

https://matt.ucc.asn.au/dropbear/dropbear.html

dibblerIt is an implementation of DHCPv6 Server/Clienthttp://klub.com.pl/dhcpv6/
ifconfigUtility used to configure a network interfacehttps://linux.die.net/man/8/ifconfig
iptablesAdministration tool for IPv4 packet filtering and NAThttps://linux.die.net/man/8/iptables
ip ruleUtility used to manipulate rules in the routing policy database control the route selection algorithmhttp://man7.org/linux/man-pages/man8/ip-rule.8.html
ip routeUtility used to manipulate routing tableshttp://linux-ip.net/html/tools-ip-route.html
ebtablesIt is an application program used to set up and maintain the tables of rules (inside the Linux kernel) that inspect Ethernet frames. It is analogous to the iptables application, but less complicated, due to the fact that the Ethernet protocol is much simpler than the IP protocol.https://linux.die.net/man/8/ebtables
portmapIt is a server that converts RPC program numbers into DARPA protocol port numbers. It must be running in order to make RPC calls.https://linux.die.net/man/8/portmap
walled gardenWalled garden is used to restrict internet for devices prior to activation. Once the activation is completed, the device downloads a walled garden config file and the internet is provisioned.https://www.computerhope.com/jargon/w/walled-garden.htm
igdInternet Gateway Device (IGD) Standardized Device Control Protocol[1] is a protocol for mapping ports in network address translation (NAT) setups, supported by some NAT-enabled routers.
It is a common communications protocol for automatically configuring port forwarding, and is part of an ISO/IEC Standard rather than an Internet Engineering Task Force standard.
https://en.wikipedia.org/wiki/Internet_Gateway_Device_Protocol
HNAPThe Home Network Administration Protocol (HNAP) is an HTTP-Simple Object Access Protocol (SOAP)-based protocol that can be implemented inside of network devices to allow advanced programmatic configuration and management by remote entities. HNAP

User and default configuration initialization

Syscfg_create executable creates shared memory with user configuration data (/nvram/syscfg.db). This is present in the code base at the location /ccsp/utopia/source/syscfg

draw.io Diagram
diagramName
Gliffy Diagram
macroId14087161-8487-4cd1-8398-8d450cd9c843
nameinitialization diag.drawio
pagePinrevision1

Apply_system_defaults executable reads the data from system_defaults file (path: /etc/utopia/system_defaults) and compares with syscfg.db, in case of any data is missing in syscfg, those defaults are written in to shared memory. On start of any module, data is read from the shared memory during initialization.

If syscgfsyscfg.db does not exists (e.g in case of factory reset) apply_system_default executable writes all default data on to shared memory and syscfg_commit() gets called which in turn creates syscgfsyscfg.db.

syscfg variable definations  are defined under utopia(syscfg_lib.c file).

...

Panel

Examples:

syscfg get wan_physical_ifname
syscfg get lan_ifname
syscfg get ecm_wan_ifname
syscfg get lan_ipaddr
syscfg get X_RDKCENTRAL-COM_LastRebootReason

Example Firewall Initialization

Note: The RDK data model naming convention prefix was changed in March 2020 to “X_RDK_”. We request you use the new prefix going forward.

Example Firewall Initialization

Gw_prov_utopia exe Gw_prov_utopia exe calls Init script. Init script executes all executables present in /etc/utopia/registration.d/ directory. 10_firewall exe is responsible for firewall events and it registers for sysevent callback with service name as firewall. Handler script is firewall_log_handle.sh. If any firewall event occurs sysevent is triggered with firewall-restart event name.

draw.io Diagram
diagramName
Gliffy Diagram
macroIdd5a62b6a-6fd7-4fec-b00d-7e3cad34dcc7
namefirewall initialization process flow.drawio
pagePinrevision1

Firewall Initialization Process

draw.io Diagram
diagramName
Gliffy Diagram
macroId8e3054b1-13be-43bc-92d8-fed3706142b9
namefirewall initialization process 2.drawio
pagePinrevision1

On firewall-restart event service_start() method gets called. Ip4table and Ip6table rules are prepared by reading data from shared memory, written into /tmp/.ipt and /tmp/.ipt_v6 files respectively. Iptable rules are restored using these files.

...

  • syscfg_set() checks if the syscfg value exists, if not allocates memory and add it to the end of the linked list and sets the value.
  • SysCfg_Commit() – calls syscfg_commit().
  • syscfg_commit API updates the persistent memory with the shared memory details.

Gliffy Diagramdrawio
namediagramNameEXAMPLE SET FLOW FOR PC URL 1.drawio
pagePinrevision1

Example set flow for PC URL