|Table of Contents|
This page captures the RDK-B Utopia module, its elements, design and high level description of utilities involved. This document includes details of the usage of third party open source utilities as part of Utopia. To understand the internal workings of each of these open source utilities please refer the project links shared alongside the utilities.
- 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.
- Set IPv4 and IPv6 network parameters such as tcp timeout, udp timeout, and generic timeout and threshold values
- Starting log module from log_start.sh
- Starting syscfg using filestore and creating syscfg.db database using syscfg_create
- Read reset duration to check if the device was rebooted by pressing the HW reset button using /proc/P-UNIT/status
- 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
- Start system logging using service 'service_syslog.sh' with event 'syslog-start' and Start sysevent subsystem using syseventd.
- Setting the unset system values to defaults values using apply_system_defaults and apply iptables settings.
Registration: Run all executables in the sysevent registration directory /etc/utopia/registration.d.
Setting up private IPC VLAN on interface l2sd0 with vlan ID 500 using switch handler /etc/utopia/service.d/service_multinet/handle_sw.sh
Setting up RADIUS VLAN on interface l2sd0 with vlan ID 4090 using switch handler /etc/utopia/service.d/service_multinet/handle_sw.sh
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.
Start dropbear process from service 'service_sshd.sh' with event 'sshd-start'.
Setting Multicast MAC before any switch configuration using service 'service_multinet_exec' with event 'set_multicast_mac'
Utopia initialization is completed by creating utopia_inited flag
Scripts are the sysevent handlers which are tied up with different events
Default Event Handlers present in Utopia
Each service has three default events that it should handle:
sysevent rm_async `sysevent get event_name_asyncid_1`
Default Event Flags defined
TUPLE_FLAG_NORMAL=0x00000000 TUPLE_FLAG_SERIAL=0x00000001 TUPLE_FLAG_EVENT=0x00000002 ACTION_FLAG_NORMAL=0x00000000 ACTION_FLAG_NOT_THREADSAFE=0x00000001 ACTION_FLAG_COLLAPSE_PENDING_QUEUE=0x00000002
Utopia Open source utilities
|brctl||It is a tool used to configure Ethernet bridge (Network Bridging)||https://linux.die.net/man/8/brctl|
|vconfig||It 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|
|dropbear||It is a lightweight SSH2 server designed to be small enough to be used in small memory environments, while still being functional and secure enough.|
|dibbler||It is an implementation of DHCPv6 Server/Client||http://klub.com.pl/dhcpv6/|
|ifconfig||Utility used to configure a network interface||https://linux.die.net/man/8/ifconfig|
|iptables||Administration tool for IPv4 packet filtering and NAT||https://linux.die.net/man/8/iptables|
|ip rule||Utility used to manipulate rules in the routing policy database control the route selection algorithm||http://man7.org/linux/man-pages/man8/ip-rule.8.html|
|ip route||Utility used to manipulate routing tables||http://linux-ip.net/html/tools-ip-route.html|
|ebtables||It 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|
|portmap||It 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|