Versions Compared

Key

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

...

High Level Architecture

Figure 1 High level architecture of Utopia module1 - High level architecture of Utopia module


Utopia is a package with multiple independent utilities. These utilities are launched through a startup sequence using shell scripts.
Few of the sub components within Utopia are:

  • dhcp_proxy - Utility to modify the Network Processor (NP) bridge and setup a dhcp proxy between dhcp server (WAN) and dhcp client (LAN CPEs)
  • Firewall - Utility which is used to set all the IPv4 and IPv6 rules on device
  • service_routed - Utility to set routes using ip rule for IPv4 and IPv6. This utility is event triggered.
  • service_wan - Event triggered utility used to bring up the wan services (static and dhcp)
  • utctx - Standalone batch get/set application. Utility named utctx_cmd provides functionality such as Utopia_Free, Utopia_Init, Utopia_RawGet, Utopia_RawSet. This also has the list of Utopia events.

Utopia contains some of the Open Source Utilities like brctl, dropbear, ifconfig, iptables, ebtables and so on.

Utopia also contains swctl:

  • Switch control utility is designed to address dual switches: internal and external.
  • The internal switch connects two processors, network and application processors, in additional to MoCA port and external switch.
  • The external switch consists of 4 external Ethernet ports and the port connecting to internal switch.


Utopia Initialisation Sequence

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.

Image Added

Figure 2 - Utopia Initialization Sequence Diagram

 When device boots up following process will take place to initialise Utopia:

  1. Application processor CPU kernel comes up

  2. Initialize GWSDK using a PCD script present in /etc/scripts/gwsdk.pcd

  3. L2 Switch driver initialization completed

  4. RPC management server initialized

  5. Start gw_prov_utopia which will initialise CCSP system configuration through utopia_init.sh.

Utopia Initialization Steps from utopia_init.sh

  1. Set IPv4 and IPv6 network parameters such as tcp timeout, udp timeout, and generic timeout and threshold values
  2. Starting log module from log_start.sh
  3. Starting syscfg using filestore and creating syscfg.db database using syscfg_create
  4. Read reset duration to check if the device was rebooted by pressing the HW reset button using /proc/P-UNIT/status
  5. Set the factory reset key if it was pressed for longer than the threshold value. Remove syscfg, PSM storage files and the DHCP lease file. Restart syscfg and execute create_wifi_default
  6. Start system logging using service 'service_syslog.sh' with event 'syslog-start' and Start sysevent subsystem using syseventd.
  7. Setting the unset system values to defaults values using apply_system_defaults and apply iptables settings.
  8. Registration: Run all executables in the sysevent registration directory /etc/utopia/registration.d.

  9. Setting up private IPC VLAN on interface l2sd0 with vlan ID 500 using switch handler /etc/utopia/service.d/service_multinet/handle_sw.sh

  10. Setting up RADIUS VLAN on interface l2sd0 with vlan ID 4090 using switch handler /etc/utopia/service.d/service_multinet/handle_sw.sh

  11. Create IOT VLAN on ARM. Adding VLAN with ID 106 to internal switch using swctl and creating a virtual interface on l2sd0 with VLAN ID 106.

  12. Start dropbear process from service 'service_sshd.sh' with event 'sshd-start'.

  13. Setting Multicast MAC before any switch configuration using service 'service_multinet_exec' with event 'set_multicast_mac'

  14. Utopia initialization is completed by creating utopia_inited flag

Utopia Scripts

Scripts are the sysevent handlers which are tied up with different events

Few scripts that bring up all interface and initialises

service_bridge
./service.d/service_bridge_arm.sh
./service.d/service_bridge/dhcp_link.sh
./service.d/service_bridge.sh
./service.d/service_bridge_puma7.sh

LAN Service
./service.d/service_lan.sh
./service.d/service_lan/lan_hooks.sh
./service.d/service_lan/dhcp_lan.sh
./service.d/service_lan/wlan.sh
./service.d/lan_handler.sh
./service.d/bring_lan.sh

DHCP Server
./service.d/service_dhcp_server/dhcp_server_functions.sh
./service.d/service_dhcp_server.sh

SSH Service
./service.d/service_sshd.sh

Firewall
These scripts are replaced by C utility defined in ./source/firewall/firewall.c and nfq_handler.c.
Another utility ./source/firewall_log/GenFWLog.c is also defined to generate firewall log and write firewall rules in /tmp/.ipt_rule file.
./service.d/firewall_log_handle.sh
./service.d/service_firewall/firewall_log_handle.sh
./service.d/service_firewall/firewall_nfq_handler.sh
./service.d/service_firewall/log_reader.awk
./service.d/service_firewall/newhost_monitor.sh
./service.d/service_firewall/trigger_monitor.sh

service_syslog
./service.d/service_syslog/syslog_rotate_monitor.sh
./service.d/service_syslog.sh

Default Event Handlers present in Utopia