Dhcp Manager Support has been brought in completely for both ipv4 and ipv6 in Bannapi R4.This page is share information about integration of dhcp manager in BPI R4.
RdkDHCPManager is a component in RDK-B OS responsible for configuration and command control of DHCP client and server for both IPv4 and IPv6.
We need to do the following code changes to integrate Dhcp Manager in the Bananapi R4 platform
1.Enable both the dhcp manager and configurable wan interface distro features in our configuration file for this feature to work seamlessly,
DISTRO_FEATURES_append = " dhcp_manager " |
|---|
2.Register dhcp manager in CR
<component> |
|---|
3.Enable the Cflags for both the distros in the ccsp_common.inc file
CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', 'dhcp_manager', '-DFEATURE_RDKB_DHCP_MANAGER', '', d)}" |
|---|
4.Updating the psm data base
CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', 'dhcp_manager', '-DFEATURE_RDKB_DHCP_MANAGER', '', d)}"
CFLAGS_append += " ${@bb.utils.contains('DISTRO_FEATURES', 'rdkb_configurable_wan_interface', '-DFEATURE_RDKB_CONFIGURABLE_WAN_INTERFACE', '', d)}"root@Filogic-GW:~# systemctl status snmpd ● snmpd.service - Simple Network Management Protocol (SNMP) Daemon. Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-04-28 17:42:30 UTC; 2 years 6 months ago Main PID: 1768 (snmpd) Tasks: 1 (limit: 4713) Memory: 10.5M CGroup: /system.slice/snmpd.service └─ 1768 /usr/sbin/snmpd -f -C -c /usr/ccsp/snmp/snmpd.conf -M /usr/share/snmp/mibs -Le 2022 Apr 28 17:42:30 Filogic-GW snmpd[1768]: A SNMP version other than 3 was requested with (D)TLS; using 3 anyways 2022 Apr 28 17:42:30 Filogic-GW snmpd[1768]: A SNMP version other than 3 was requested with (D)TLS; using 3 anyways 2022 Apr 28 17:42:30 Filogic-GW snmpd[1768]: NET-SNMP version 5.9.1 2022 Apr 28 17:42:30 Filogic-GW systemd[1]: Started Simple Network Management Protocol (SNMP) Daemon.. 2022 Apr 28 17:42:34 Filogic-GW snmpd[1768]: No pgpgin line in /proc/vmstat 2022 Apr 28 17:42:34 Filogic-GW snmpd[1768]: No pgpgout line in /proc/vmstat 2022 Apr 28 17:42:34 Filogic-GW snmpd[1768]: No pswpin line in /proc/vmstat 2022 Apr 28 17:42:34 Filogic-GW snmpd[1768]: No pswpout line in /proc/vmstat 2024 Nov 20 06:44:02 Filogic-GW snmpd[1768]: Name of an interface changed. Such interfaces will keep its old name in IF-MIB. 2024 Nov 20 06:44:23 Filogic-GW snmpd[1768]: IfIndex of an interface changed. Such interfaces will appear multiple times in IF-MIB. root@Filogic-GW:~# root@Filogic-GW:~# ls /lib/systemd/system/snmpSubAgent.service /lib/systemd/system/snmpSubAgent.service root@Filogic-GW:~# root@Filogic-GW:~# systemctl status snmpSubAgent ● snmpSubAgent.service - SNMP Subagent service Loaded: loaded (/lib/systemd/system/snmpSubAgent.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-04-28 17:43:08 UTC; 2 years 6 months ago Main PID: 3851 (snmp_subagent) Tasks: 3 (limit: 4713) Memory: 5.1M CGroup: /system.slice/snmpSubAgent.service └─ 3851 /usr/bin/snmp_subagent "&" 2022 Apr 28 17:43:08 Filogic-GW systemd[1]: Started SNMP Subagent service. 2022 Apr 28 17:43:08 Filogic-GW snmp_subagent[3851]: rdk_dyn_log_initg_dl_socket = 7 __progname = snmp_subagent 2022 Apr 28 17:43:09 Filogic-GW snmp_subagent[3851]: NET-SNMP version 5.9.1 AgentX subagent connected 2022 Apr 28 17:43:09 Filogic-GW snmp_subagent[3851]: PID path is /var/tmp/snmp_subagent_v2.pid |
|---|
Using netstat command to check the snmpd status
root@Filogic-GW:~# netstat -lutpn | grep snmp tcp 0 0 127.0.0.1:705 0.0.0.0:* LISTEN 1768/snmpd tcp 0 0 127.0.0.1:1161 0.0.0.0:* LISTEN 1768/snmpd udp 0 0 127.255.255.255:12035 0.0.0.0:* 3851/snmp_subagent udp 0 0 0.0.0.0:10161 0.0.0.0:* 1768/snmpd udp 0 0 0.0.0.0:10163 0.0.0.0:* 1768/snmpd udp 0 0 0.0.0.0:161 0.0.0.0:* 1768/snmpd udp 0 0 :::10161 :::* 1768/snmpd udp 0 0 :::10163 :::* 1768/snmpd udp 0 0 :::161 :::* 1768/snmpd |
|---|
Using snmpget/snmpset commands are used to control and monitor the Gateway device.
snmpget command is used for particular OID .
snmpget -OQ -Ir -v 2c -c public < WAN_IP(erouter0 IP Address> <OID>
For Example,
root@Filogic-GW:~# snmpget -OQ -Ir -v 2c -c public 192.168.2.159 1.3.6.1.4.1.17270.50.2.2.2.1.1.3.10001 SNMPv2-SMI::enterprises.17270.50.2.2.2.1.1.3.10001 = "Filogic_2g" root@Filogic-GW:~# |
|---|
Please check whether the snmp-subagent,snmpd process are running or not by using PS command.
SNMP Logs will be generated in below path,
| root@Filogic-GW:/rdklogs/logs# ls -l SNMP.txt.* -rw-r--r-- 1 root root 44977 Apr 28 2022 SNMP.txt.0 |
|---|
Please check whether the SNMP MIB xml files and conf are present in below location or not,
| root@Filogic-GW:/usr/ccsp/snmp# ls |
|---|
BPIR4 Jira reference wrt Dhcp Manager.
RDKBACCL-1484
-
Getting issue details...
STATUS