### VLAN Configuration Summary Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Configuration parameters observed for VLAN treatment and preferred setup strategy. ```text romfile.cfg VLAN: 100 OMCI ME 171 VLAN treatment: 331 Observed working VLANs: 100 and 331 Preferred setup: transparent/manual SFP VLAN mode, router-side VLAN handling ``` -------------------------------- ### Generate VS_AUTH_KEY Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/TWCGPON657/README.md Syntax and example for using the VsAuthKeyGen utility to generate authentication keys. ```shell VsAuthKeyGen.exe [HW_HWVER] ``` ```shell VsAuthKeyGen.exe 781735000000 3FE48153CBAA ``` -------------------------------- ### Emulator Terminal Output Source: https://github.com/anime4000/rtl960x/blob/main/Tools/emulator/README.md Example of the terminal output displayed when the emulator successfully initializes the MIPS chroot environment. ```text Installing: chroot QEMU MIPS RTL960x Emulator is Running! BusyBox v1.12.4 (2020-10-26 08:35:57 CST) built-in shell (ash) Enter 'help' for a list of built-in commands. # ``` -------------------------------- ### View ME 171 Configuration Data Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Example output of the Extended VLAN Tagging Operation Configuration Data (ME 171). ```text ExtVlanTagOperCfgData ================================= EntityId: 0x101 AssociationType: 2 InputTPID: 0x8100 OutputTPID: 0x8100 DsMode: 0 ReceivedFrameVlanTaggingOperTable INDEX 0 Filter Outer : PRI 15,VID 4096, TPID 0 Filter Inner : PRI 15,VID 4096, TPID 0, EthType 0x00 Treatment Outer : PRI 15,VID 4096, TPID 0, RemoveTags 0 Treatment Inner : PRI 0,VID 331, TPID 4 AssociatedMePoint : 0x101 ``` -------------------------------- ### Get L2 Table VID Unmatch Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays VID unmatch status for all ports. ```text RTK.0> l2-table get vid-unmatch port all Port 0 Action: Forward Port 2 Action: Forward ``` -------------------------------- ### Example Stock ONT Configuration Values Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Sample values extracted from a Genexis T2122A ONT for reference during the cloning process. ```text Manufacturer: GENEXIS ProductClass: 3f1e00 SerialNumber: GNXS93901379 HWVer: C40-210 SWVer: T21PRO-V1.14EU ONU MAC: 20:0C:86:3F:1E:02 GPON MAC: 20:0C:86:3F:1E:00 OUI: 200c86 xponsn: GNXS93901379 ``` -------------------------------- ### Get Bandwidth Statistics Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays egress and ingress bandwidth rates for all ports. ```text RTK.0> bandwidth get egress port all port: 0 rate:1048568 queue: 0 apr-index: 0 queue: 1 apr-index: 0 queue: 2 apr-index: 0 queue: 3 apr-index: 0 queue: 4 apr-index: 0 queue: 5 apr-index: 0 queue: 6 apr-index: 0 queue: 7 apr-index: 0 port: 2 rate:4194296 queue: 0 apr-index: 0 queue: 1 apr-index: 0 queue: 2 apr-index: 0 queue: 3 apr-index: 0 queue: 4 apr-index: 0 queue: 5 apr-index: 0 queue: 6 apr-index: 0 queue: 7 apr-index: 0 ``` ```text RTK.0> bandwidth get ingress port all port: 0 rate:1048568 port: 2 rate:4194296 ``` -------------------------------- ### Get Port Status Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays the status, speed, and duplex settings for all ports. ```text RTK.0> port get status port all Port Status Speed Duplex TX_FC RX_FC ---- ------ ----- ------ ----- ----- 0 Up 1000M Full Dis Dis 2 Up 1000M Full Dis Dis ``` -------------------------------- ### Run firmware modification script Source: https://github.com/anime4000/rtl960x/blob/main/Firmware_Mod/README.md Execute the qemu-test.sh script to initiate the firmware modification process. ```bash qemu-test.sh ``` -------------------------------- ### Execute Emulator Script Source: https://github.com/anime4000/rtl960x/blob/main/Tools/emulator/README.md Run the emulator script by passing the firmware tar file as an argument. ```bash .\qemu-test.sh firmware_file.tar ``` -------------------------------- ### Configure CWMP Product Class Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Sets the product class identifier for CWMP provisioning. ```shell flash set HW_CWMP_PRODUCTCLASS HGU ``` -------------------------------- ### Configure PPPoE Client Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Sets up the PPPoE client on the previously created VLAN interface. ```routeros /interface pppoe-client add add-default-route=yes dial-on-demand=yes disabled=no interface=wan-vlan331 name=pppoe-out1 use-peer-dns=yes user= password= ``` -------------------------------- ### Default Flash Configuration Commands Source: https://github.com/anime4000/rtl960x/blob/main/Docs/FLASH_GETSET_INFO.md A comprehensive list of default flash settings for device initialization. Note that a reboot is required for these changes to take effect. ```bash flash set OMCI_OLT_MODE 0 flash set OMCI_FAKE_OK 0 flash set OMCI_TM_OPT 2 flash set VLAN_CFG_TYPE 0 flash set VLAN_MANU_MODE 0 flash set DIRECT_BRIDGE_MODE 1 flash set PON_MODE 1 flash set PON_VENDOR_ID GPON flash set GPON_ONU_MODEL IGD flash set GPON_SN GPONC6FFFFFF flash set GPON_PLOAM_PASSWD 1234567890 flash set ELAN_MAC_ADDR 6cefc6ffffff flash set FIBER_MODE 0 flash set DEVICE_TYPE 0 flash set OMCI_VEIP_SLOT_ID 255 flash set VS_AUTH_KEY 1CAFC40AC99B014BB013849A92942FEB reboot ``` -------------------------------- ### Working Configuration Structure Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Conceptual overview of the required interface, VLAN, and NAT structure for the SFP module. ```text /interface ethernet sfp1 MAC overridden to stock WAN MAC /interface vlan wan-vlan331 on sfp1, vlan-id 331 /interface pppoe-client pppoe-out1 on wan-vlan331 /ip address 192.168.88.1/24 on bridge 192.168.1.1/24 on sfp1 for SFP management /ip firewall nat masquerade out WAN masquerade to 192.168.1.80 out sfp1 for SFP management ``` -------------------------------- ### Retrieve Ethernet Provisioning MIB Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Use this command to fetch the Ethernet UNI (ME 11) configuration, often used for locking specific LAN ports. ```bash omcicli mib get 11 ``` -------------------------------- ### Access Firmware Upgrade/Downgrade Page Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Useful_Links.md Direct URL to the firmware management interface. ```text http://192.168.1.1/upgrade.asp ``` -------------------------------- ### Configure OMCI Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Sets device-specific OMCI parameters copied from an existing ONT. ```bash flash set OMCI_SW_VER1 V3R017C10S100 flash set OMCI_SW_VER2 V3R017C10S100 flash set GPON_ONU_MODEL HG8240H flash set GPON_SN HWTC14211ED8 flash set PON_VENDOR_ID HWTC flash set HW_HWVER BF9.A flash set HW_CWMP_MANUFACTURER 'Huawei Technologies Co., Ltd' flash set HW_CWMP_PRODUCTCLASS HGU ``` -------------------------------- ### Switch Firmware Partition Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fw_part.md Commands to toggle the active partition and reboot the device. Use the appropriate set based on the current sw_commit value. ```shell nv setenv sw_commit 1 nv setenv sw_active 1 reboot ``` ```shell nv setenv sw_commit 0 nv setenv sw_active 0 reboot ``` -------------------------------- ### Post-Flash Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/TWCGPON657/README.md Commands to execute after the firmware update to prevent invalid key reboots. ```shell flash set ELAN_MAC_ADDR 6CEFC6000000 flash set HW_HWVER RTL960x flash set VS_AUTH_KEY 00CF646955CCBDB88AB3B68922DB810F ``` -------------------------------- ### Tar firmware folder Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Modify_Firmware.md Package the modified firmware files into a tar archive. ```bash tar -cvf ../firmware.tar * ``` -------------------------------- ### Configure Nokia G-240G-E ONU emulation Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Sets various flash parameters to emulate a Nokia G-240G-E ONU. A reboot is required after applying these changes. ```shell flash set GPON_PLOAM_PASSWD 0123456789 flash set GPON_SN ALCL00000000 flash set GPON_ONU_MODEL G-240G-E flash set PON_VENDOR_ID ALCL flash set OMCI_SW_VER1 3FE46606BGCB45 flash set OMCI_SW_VER2 3FE46606BGCB45 flash set CUSTOM_OMCI_SW_VER1 3FE46606BGCB45 flash set CUSTOM_OMCI_SW_VER2 3FE46606BGCB45 flash set HW_HWVER 3FE48153CBAA flash set ELAN_MAC_ADDR 781735000000 flash set VS_AUTH_KEY EF0FC1A970A27D52DF340835F0561507 flash set OMCI_FAKE_OK 1 flash set OMCI_OLT_MODE 1 ``` -------------------------------- ### Backup Original Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Retrieve current device configuration values from flash memory to ensure a restore point exists before modification. ```shell flash get PON_VENDOR_ID flash get HW_CWMP_MANUFACTURER flash get HW_CWMP_PRODUCTCLASS flash get HW_HWVER flash get OMCI_VEIP_SLOT_ID flash get OMCI_OLT_MODE flash get OMCI_FAKE_OK flash get OMCI_SW_VER1 flash get OMCI_SW_VER2 flash get GPON_ONU_MODEL flash get GPON_SN flash get GPON_PLOAM_PASSWD flash get ELAN_MAC_ADDR flash get VS_AUTH_KEY flash get MAC_KEY flash get OUI flash get HW_SERIAL_NO ``` -------------------------------- ### Customization Directory Structure Source: https://github.com/anime4000/rtl960x/blob/main/Tools/emulator/README.md Visual representation of the expected directory layout for customizing firmware files. ```text ─┐ ├ [custom] │ ├ [bin] │ ├ [home] │ │ └ [httpd] │ │ ├ [web] │ │ │ └ *.asp │ │ └ boa.conf │ └ [etc] │ ├ [init.d] │ │ └ rc* │ └ [scripts] │ └ *.sh │ ├ [V2801F_V1.9.0-200825] │ ├ [squashfs-root] │ ├ fwu.sh │ ┊ │ └ md5.txt │ ├ custom.sh ├ V2801F_V1.9.0-200825.tar └ qemu-test.sh ``` -------------------------------- ### Configure NAT Rules Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Sets up masquerading for internet access and SFP management reachability. ```routeros /ip firewall nat add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN ``` ```routeros /ip firewall nat add action=masquerade chain=srcnat comment="NAT for SFP management" dst-address=192.168.1.80 out-interface=sfp1 ``` -------------------------------- ### Retrieve Bandwidth Configuration for RTL9601x Source: https://github.com/anime4000/rtl960x/blob/main/Docs/SlowUploadSpeed.md Use these commands to inspect the egress and ingress bandwidth settings on an RTL9601x device to identify potential shaping discrepancies. ```shell bandwidth get egress port all port: 0 rate:1048568 queue: 0 apr-index: 0 queue: 1 apr-index: 0 queue: 2 apr-index: 0 queue: 3 apr-index: 0 queue: 4 apr-index: 0 queue: 5 apr-index: 0 queue: 6 apr-index: 0 queue: 7 apr-index: 0 port: 2 rate:4194296 queue: 0 apr-index: 0 queue: 1 apr-index: 0 queue: 2 apr-index: 0 queue: 3 apr-index: 0 queue: 4 apr-index: 0 queue: 5 apr-index: 0 queue: 6 apr-index: 0 queue: 7 apr-index: 0 bandwidth get ingress port all port: 0 rate:1048568 port: 2 rate:4194296 ``` -------------------------------- ### List Required ONT Configuration Values Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md A checklist of parameters that must be extracted from the stock ONT for successful migration. ```text Manufacturer ProductClass SerialNumber / GPON SN / XPON SN Hardware version Software version ONU MAC WAN MAC OUI PLOAM password, if used LOID and LOID password, if used PPPoE username and password Internet WAN VLAN ``` -------------------------------- ### Retrieve Bandwidth Configuration for RTL9607x Source: https://github.com/anime4000/rtl960x/blob/main/Docs/SlowUploadSpeed.md Use these commands to inspect the egress and ingress bandwidth settings on an RTL9607x device for comparison. ```shell bandwidth get egress port all port: 0 rate:1024000 bandwidth get ingress port all port: 0 rate:32767999 port: 1 rate:32767999 port: 2 rate:32767999 port: 3 rate:32767999 port: 4 rate:32767999 port: 5 rate:32767999 port: 6 rate:32767999 port: 7 rate:32767999 ``` -------------------------------- ### View System Version and ONU Info Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays the system version and GPON ONU information. ```text # cat /etc/version C00R657V00B12 -- Thu Nov 21 14:52:46 CST 2019 # diag RTK.0> gpon show onu-info Vendor ID : GPON Model ID : G657 Gpon MAC : 6cefc6000000 Hardware : V1.0 Software : C00R657V00B13 ``` -------------------------------- ### Retrieve SFP CPU Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Displays the CPU architecture and model details of the HSGQ GPON SFP stick. ```text system type : RTL8672 processor : 0 cpu model : 56322 BogoMIPS : 299.00 ``` -------------------------------- ### Configure TWCGPON657 via Telnet Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/TWCGPON657/README.md Commands to execute via telnet before flashing the V2801F firmware. ```shell flash set LAN_SDS_MODE 1 flash set PON_MODE 3 ``` -------------------------------- ### Repack rootfs partition Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Modify_Firmware.md Create a new squashfs image with specific block size and compression settings. ```bash mksquashfs squashfs-root rootfs.new -b 131072 -comp lzma ``` -------------------------------- ### Reboot Device Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Apply configuration changes by restarting the device. ```shell reboot ``` -------------------------------- ### Show VLAN Mapping Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Query MIB 171 to display the VLAN mapping configuration from PON to LAN. ```bash omcicli mib get 171 ``` ```text XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ExtVlanTagOperCfgData XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x101 AssociationType: 2 ReceivedFrameVlanTagOperTableMaxSize: 0 InputTPID: 0x8100 OutputTPID: 0x8100 DsMode: 0 ReceivedFrameVlanTaggingOperTable AssociatedMePoint: 0x101 DscpToPbitMapping: 0x000000 0x249249 0x492492 0x6db6db 0x924924 0xb6db6d 0xdb6db6 0xffffff ``` -------------------------------- ### Configure PLDT ISP settings via CLI Source: https://github.com/anime4000/rtl960x/blob/main/Docs/ISP_specific_configuration.md Use these commands via telnet or SSH to set the required ONT parameters. Ensure all placeholders are replaced with values from your original stock ONT. ```bash flash set HW_SERIAL_NO flash set HW_CWMP_MANUFACTURER fiberhome flash set OUI flash set GPON_SN flash set HW_HWVER flash set PON_VENDOR_ID FHTT flash set OMCI_OLT_MODE 3 flash set OMCI_SW_VER1 RP2841 flash set OMCI_SW_VER2 RP2841 flash set GPON_ONU_MODEL HG6245D flash set LOID flash set LOID_PASSWD flash set ELAN_MAC_ADDR flash set MAC_KEY flash set WAN_PHY_PORT 0 ``` -------------------------------- ### Enable OMCI Fake OK Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Enables the ONU to acknowledge unsupported vendor-specific OMCI messages. ```shell flash set OMCI_FAKE_OK 1 ``` -------------------------------- ### Configure Vivo and Movistar Parameters Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fakeO5.md Sets specific OMCC and traffic management parameters for Telefónica-based networks. ```shell flash set OMCC_VER 160 flash set OMCI_TM_OPT 1 ``` -------------------------------- ### RouterOS Export Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Verbatim RouterOS export commands for setting up VLAN 331, PPPoE, and SFP management NAT. ```routeros /interface vlan add comment=wan-vlan331 interface=sfp1 name=wan-vlan331 vlan-id=331 /interface pppoe-client add add-default-route=yes dial-on-demand=yes disabled=no interface=wan-vlan331 name=pppoe-out1 use-peer-dns=yes user= /ip address add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0 add address=192.168.1.1/24 comment="SFP management" interface=sfp1 network=192.168.1.0 /ip firewall nat add action=masquerade chain=srcnat comment="defconf: masquerade" ipsec-policy=out,none out-interface-list=WAN add action=masquerade chain=srcnat comment="NAT for SFP management" dst-address=192.168.1.80 out-interface=sfp1 ``` -------------------------------- ### Display Bridge Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Useful_Links.md Command to show bridge status and interface mapping. ```bash brctl show bridge name bridge id STP enabled interfaces br0 8000.000000deadd7 no eth0 nas0_0 ``` -------------------------------- ### Set Software Version and OLT Mode Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Sets the software version identifiers or forces OLT mode if firmware prevents direct modification. ```shell flash set OMCI_SW_VER1 V5R019C00S125 flash set OMCI_SW_VER2 V5R019C00S125 ``` ```shell flash set OMCI_OLT_MODE 3 ``` -------------------------------- ### Update md5sum Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Modify_Firmware.md Generate a new md5.txt file containing checksums for the firmware components. ```bash md5sum fwu.sh rootfs uImage fwu_ver > md5.txt ``` -------------------------------- ### Configure Traffic Management Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Adjusts traffic management options to potentially unlock bandwidth limits. ```bash flash set OMCI_TM_OPT 0 ``` -------------------------------- ### Generate and apply V2801F VS_AUTH_KEY Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Uses the vendor utility to generate an authentication key required when changing the MAC address or hardware version on V2801F devices. ```shell VsAuthKeyGen.exe [HW_HWVER] ``` ```shell VsAuthKeyGen.exe 000000111111 168D.A ``` ```text 9E7E54597511D721D3A2932B048C0494 ``` ```shell flash set VS_AUTH_KEY 9E7E54597511D721D3A2932B048C0494 ``` -------------------------------- ### Transfer files using netcat Source: https://github.com/anime4000/rtl960x/blob/main/Firmware_Mod/README.md Use netcat to send and receive files between the GPON ONU SFP and an Ubuntu PC. Note that the listening process on the SFP must be manually terminated with CTRL+C. ```bash nc -l -p 12345 > file ``` ```bash nc 192.168.1.1 12345 < file ``` -------------------------------- ### Configure MIME types in boa.conf Source: https://github.com/anime4000/rtl960x/blob/main/WebGui/README.md Add these lines to /home/httpd/boa.conf after the AddType application/x-httpd-cgi asp directive to enable support for JSON, CSS, and JavaScript files. ```text AddType application/json map AddType text/css css AddType text/javascript js ``` -------------------------------- ### Retrieve VEIP MIB Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Use this command to fetch the Virtual Ethernet Interface Point (VEIP) configuration data. ```bash omcicli mib get 329 ``` -------------------------------- ### Manual Factory Reset via Telnet Source: https://github.com/anime4000/rtl960x/blob/main/Docs/factory_reset.md Erases the configuration partition directly from the device shell. Requires root access via telnet. ```bash flash_eraseall /dev/mtd3 reboot ``` -------------------------------- ### Configure CWMP Manufacturer Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Sets the manufacturer string for CWMP provisioning. ```shell flash set HW_CWMP_MANUFACTURER 'Huawei Technologies Co., Ltd' ``` -------------------------------- ### Configure LAN DHCP Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Sets up the local bridge IP, DHCP pool, and server settings. ```routeros /ip address add address=192.168.88.1/24 comment=defconf interface=bridge network=192.168.88.0 /ip pool add name=dhcp ranges=192.168.88.2-192.168.88.254 /ip dhcp-server add address-pool=dhcp interface=bridge name=defconf /ip dhcp-server network add address=192.168.88.0/24 comment=defconf dns-server=192.168.88.1 gateway=192.168.88.1 ``` -------------------------------- ### Set OLT Compatibility Mode Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Configures the device to reply with OK to OMCI requests to improve compatibility with various OLTs. ```bash flash set OMCI_OLT_MODE 1 flash set OMCI_FAKE_OK 1 ``` -------------------------------- ### Revert to 1Gbps Mode Source: https://github.com/anime4000/rtl960x/blob/main/Firmware_Router/TP-Link/Archer BE800/README.md Command to restore the default 1Gbps connection speed. ```plaintext combo_debug ipg_set combo10g 1 ``` -------------------------------- ### Retrieve ZTP/SLIMS Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Fetches device identification information such as OUI and hardware serial number. ```bash flash get OUI 785773 flash get HW_SERIAL_NO UONHUWH52100000000 ``` -------------------------------- ### Set Device Model Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Configures the ONU model identifier. ```shell flash set GPON_ONU_MODEL HG8240H5 ``` -------------------------------- ### Network Interface Layout Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Logical mapping of the SFP interface, WAN VLAN, and LAN bridge. ```text sfp1 = physical SFP interface and SFP management access wan-vlan331 on sfp1 = PPPoE WAN over VLAN 331 pppoe-out1 = Internet PPPoE client bridge = LAN bridge ``` -------------------------------- ### Configure LOID Authentication Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Set the LOID and LOID password for EPON network authentication. ```shell flash set LOID 0123456789 flash set LOID_PASSWD 0123456789 ``` -------------------------------- ### Retrieve VEIP MIB status Source: https://github.com/anime4000/rtl960x/blob/main/Docs/VEIP.md Use these commands to verify the VEIP configuration before and after applying changes. ```bash # omcicli mib get 329 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX VEIP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x0601 AdminState: 1 OperState: 1 InterDomainName: 0x00000000000000000000000000000000000000000000000000 TcpUdpPtr: 0x0000 IansAssignPort: 0 CustomizedSlotId: 0xff ================================= ``` ```bash # omcicli mib get 329 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX VEIP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x0e01 AdminState: 1 OperState: 1 InterDomainName: 0x00000000000000000000000000000000000000000000000000 TcpUdpPtr: 0x0000 IansAssignPort: 0 CustomizedSlotId: 0x0e ================================= ``` -------------------------------- ### Configure ONU Parameters via Telnet Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Stock_ONU.md Use these commands to set or retrieve specific ONU identification parameters via the device's flash memory. ```shell flash set GPON_ONU_MODEL flash set GPON_SN flash set PON_VENDOR_ID flash set HW_HWVER flash set OMCI_SW_VER1 flash set OMCI_SW_VER2 flash get OUI flash get HW_SERIAL_NO ``` -------------------------------- ### Set OMCI OLT Mode Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Configures the OLT compatibility mode for the RTL960x. ```shell flash set OMCI_OLT_MODE 0 ``` -------------------------------- ### Monitor PON State Progression Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Displays the ONU state and LOID status during the initialization process of the SFP stick. ```text ONU State: O0 ONU ID: 255 LOID Status: WRONG ``` ```text ONU State: O3 ONU ID: 255 LOID Status: WRONG ``` ```text ONU State: O5 ONU ID: 127 LOID Status: WRONG ``` ```text ONU State: O5 ``` -------------------------------- ### Extract Stock WAN Service Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md XML configuration snippet showing the Internet WAN service VLAN settings. ```xml ``` -------------------------------- ### Configure PLOAM Password (ASCII Format) Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Set the PLOAM password using ASCII format for supported models like V2801F, TWCGPON657, and UF-Instant. ```shell flash set GPON_PLOAM_PASSWD DEFAULT012 ``` -------------------------------- ### VLAN 100 Alternative Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Commands to switch the PPPoE client to VLAN 100 if the ISP requires it instead of VLAN 331. ```routeros /interface vlan add comment=wan-vlan100 interface=sfp1 name=wan-vlan100 vlan-id=100 /interface pppoe-client set pppoe-out1 interface=wan-vlan100 ``` -------------------------------- ### Override Bandwidth via Diag Source: https://github.com/anime4000/rtl960x/blob/main/Docs/SlowUploadSpeed.md Manually sets port auto-negotiation and bandwidth limits. These settings are runtime-only and will be lost upon reboot. ```shell /bin/diag port set auto-nego port all ability asy-flow-control /bin/diag bandwidth set egress port all rate 4194296 /bin/diag bandwidth set ingress port all rate 4194296 ``` -------------------------------- ### Set Hardware Version Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Configures the hardware version identifier for the device. ```shell flash set HW_HWVER 168D.A ``` -------------------------------- ### Individual MIB Query Commands Source: https://github.com/anime4000/rtl960x/blob/main/Docs/OMCI_CLI.md Specific commands to retrieve data for individual MIB entities. ```bash omcicli mib get 6 ``` ```bash omcicli mib get 7 ``` ```bash omcicli mib get 11 ``` ```bash omcicli mib get 53 ``` ```bash omcicli mib get 84 ``` ```bash omcicli mib get 131 ``` ```bash omcicli mib get 138 ``` ```bash omcicli mib get 171 ``` ```bash omcicli mib get 256 ``` ```bash omcicli mib get 257 ``` ```bash omcicli mib get 262 ``` ```bash omcicli mib get 263 ``` ```bash omcicli mib get 264 ``` ```bash omcicli mib get 277 ``` ```bash omcicli mib get 309 ``` ```bash omcicli mib get 329 ``` -------------------------------- ### MAC Key Generator Link Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md URL for the MAC_KEY generation utility required for proper SFP authentication. ```text https://gist.github.com/rajkosto/29c513b96ea6262d2fb1f965a52ce16f ``` -------------------------------- ### Set SFP Stick Identity via Flash Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Shell commands to apply the cloned ONT identity to the SFP stick firmware. ```sh flash set GPON_SN flash set PON_VENDOR_ID flash set HW_CWMP_MANUFACTURER GENEXIS flash set HW_HWVER flash set GPON_ONU_MODEL flash set ELAN_MAC_ADDR flash set MAC_KEY ``` -------------------------------- ### Access WAN Mapping Page Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Useful_Links.md Direct URL to the WAN mapping configuration interface. ```text http://192.168.1.1/multi_wan_generic.asp ``` -------------------------------- ### Apply Nokia G-240G-E Configuration Source: https://github.com/anime4000/rtl960x/blob/main/Docs/VS_AUTH_KEY.md Configures the V2801F with specific vendor and hardware identifiers for a Nokia G-240G-E device. ```bash flash set PON_VENDOR_ID ALCL flash set HW_CWMP_MANUFACTURER Nokia flash set HW_CWMP_PRODUCTCLASS G-240G-E flash set HW_HWVER 3FE48153CBAA flash set ELAN_MAC_ADDR 781735D35DA0 flash set VS_AUTH_KEY 4DFD2ADED74CFC990DFE675EF527D815 flash set OMCI_FAKE_OK 1 flash set OMCI_SW_VER1 3FE46606BGCB45 flash set OMCI_SW_VER2 3FE46606BGCB45 flash set GPON_ONU_MODEL G-240G-E flash set GPON_SN ALCLFBCFD831 flash set GPON_PLOAM_PASSWD 1234567890 reboot ``` -------------------------------- ### Set LAN SDS Mode via Telnet Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/V2801F/README.md Required command to configure LAN mode before upgrading to firmware version V1.9.0-240614. ```shell flash set LAN_SDS_MODE 1 ``` -------------------------------- ### Batch Print All MIB Entries Source: https://github.com/anime4000/rtl960x/blob/main/Docs/OMCI_CLI.md Iterates through a predefined list of MIB identifiers and prints their values using the omcicli tool. Recommended to save the output to a log file. ```bash for ME in 00002 00005 00006 00007 00011 00024 00045 00047 00049 00050 00052 00078 00079 00083 00084 00089 00130 00131 \ 00133 00134 00136 00137 00148 00157 00158 00171 00240 00244 00245 00248 00249 00250 00253 00255 00256 00257 00262 00263 \ 00264 00266 00267 00268 00272 00273 00274 00277 00278 00280 00281 00284 00287 00296 00298 00307 00308 00309 00310 00311 \ 00312 00321 00322 00329 00330 00334 00340 00341 65282 65294 65408 65527 65528 65529 65530 65531 74; do echo -e "\n\nMIB:" \ $ME"\n\n";omcicli mib get $ME; done; ``` -------------------------------- ### Set MikroTik Interface Queues Source: https://github.com/anime4000/rtl960x/blob/main/Docs/SlowUploadSpeed.md Assigns the multi-queue-ethernet-default queue to all available interfaces. ```rsc /queue interface set ether1 queue=multi-queue-ethernet-default /queue interface set ether2 queue=multi-queue-ethernet-default /queue interface set ether3 queue=multi-queue-ethernet-default /queue interface set ether4 queue=multi-queue-ethernet-default /queue interface set ether5 queue=multi-queue-ethernet-default /queue interface set ether6 queue=multi-queue-ethernet-default /queue interface set ether7 queue=multi-queue-ethernet-default /queue interface set ether8 queue=multi-queue-ethernet-default /queue interface set sfp-sfpplus1 queue=multi-queue-ethernet-default ``` -------------------------------- ### Check Active Partition ID Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fw_part.md Retrieves the current firmware partition identifier from the environment variables. ```shell nv getenv sw_commit ``` -------------------------------- ### Configure MAC Address Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Set the ONU MAC address, which may be required for specific EPON deployments. ```shell flash set ELAN_MAC_ADDR 000000111111 ``` -------------------------------- ### Set PON Mode Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/TWCGPON657/README.md Command to restore the PON mode after configuration. ```shell flash set PON_MODE 1 ``` -------------------------------- ### Set Device Identity Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fakeO5.md Defines the model, serial number, vendor ID, hardware version, and OMCI software versions for the device. ```shell flash set GPON_ONU_MODEL HG8240H flash set GPON_SN HWTC12345678 flash set PON_VENDOR_ID HWTC flash set HW_HWVER BF9.A flash set OMCI_SW_VER1 V3R017C10S100 flash set OMCI_SW_VER2 V3R017C10S100 ``` -------------------------------- ### Configure PLOAM Password Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Sets the GPON PLOAM password using either HEX or ASCII format. ```bash flash set GPON_PLOAM_FORMAT 0 flash set GPON_PLOAM_PASSWD 31323334353637383930 ``` -------------------------------- ### Check VLAN Tags Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Query MIB 84 to identify active VLAN tags on the device. ```bash omcicli mib get 84 ``` ```text XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX VlanTagFilterData XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityID: 0x1202 FilterTbl[0]: PRI 0,CFI 0, VID 621 FwdOp:  0x10 NumOfEntries: 1 ================================= ================================= EntityID: 0x1203 FilterTbl[0]: PRI 0,CFI 0, VID 821 FwdOp:  0x10 NumOfEntries: 1 ================================= ================================= EntityID: 0x1204 FilterTbl[0]: PRI 0,CFI 0, VID 822 FwdOp:  0x10 NumOfEntries: 1 ================================= ================================= EntityID: 0x120b FilterTbl[0]: PRI 0,CFI 0, VID 621 FilterTbl[2]: PRI 0,CFI 0, VID 821 FilterTbl[4]: PRI 0,CFI 0, VID 822 FwdOp:  0x10 NumOfEntries: 3 ================================= ================================= EntityID: 0xe102 FilterTbl[0]: PRI 0,CFI 0, VID 209 FwdOp:  0x10 NumOfEntries: 1 ================================= ================================= EntityID: 0xe10b FilterTbl[0]: PRI 0,CFI 0, VID 209 FwdOp:  0x10 NumOfEntries: 1 ================================= ``` -------------------------------- ### Set Subscriber Identity Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fakeO5.md Configures the GPON PLOAM format and password for the ONU. ```shell flash set GPON_PLOAM_FORMAT 1 flash set GPON_PLOAM_PASSWD DEFAULT012 ``` -------------------------------- ### Extract rootfs partition Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Modify_Firmware.md Use unsquashfs to extract the contents of the rootfs file. ```bash unsquashfs rootfs ``` -------------------------------- ### Show GPON Flows Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays upstream and downstream GPON flow statuses. ```text RTK.0> gpon show us-flow ============================================================ GPON ONU MAC U/S Flow Status Flow ID | GEM Port | Type | TCont 0 | 263 | ETH | 0 1 | 264 | ETH | 1 2 | 267 | ETH | 1 3 | 272 | ETH | 2 64 | 2 | OMCI | 16 ============================================================ ``` ```text RTK.0> gpon show ds-flow ============================================================ GPON ONU MAC D/S Flow Status Flow ID | GEM Port | Type | Multicast | AES 0 | 2047 | ETH | * | 1 | 263 | ETH | | * 2 | 2046 | ETH | | 3 | 264 | ETH | | * 4 | 267 | ETH | | * 5 | 272 | ETH | | * 64 | 2 | OMCI | | * ============================================================ ``` -------------------------------- ### Configure SFP MAC Address Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Sets the MAC address on the SFP interface to match the ISP's expected hardware. ```routeros /interface ethernet set [ find default-name=sfp1 ] mac-address= ``` -------------------------------- ### Set Device Capability Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fakeO5.md Configures OMCC version, traffic management options, and OLT mode settings. ```shell flash set OMCC_VER 128 flash set OMCI_TM_OPT 0 flash set OMCI_FAKE_OK 1 flash set OMCI_OLT_MODE 1 ``` -------------------------------- ### Access L2 Table via diag Utility Source: https://github.com/anime4000/rtl960x/blob/main/Docs/OMCI_VLAN.md Enter the diag utility and list L2 table entries to inspect VLAN associations. ```bash diag ``` ```bash l2-table get entry address valid ``` -------------------------------- ### Generate and apply DFP-34X-2C2 MAC_KEY Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Calculates the MD5 hash required for the MAC_KEY when modifying the ELAN_MAC_ADDR on DFP-34X-2C2 devices. ```shell echo -n "hsgq1.9aMAC_ADDR_UPPERCASE" | md5sum ``` ```shell echo -n "hsgq1.9aFFFFFF000000" | md5sum ``` ```text 46f4ea2e3f18ba3bc1f2671b5f7e1f62 ``` ```shell flash set MAC_KEY 46f4ea2e3f18ba3bc1f2671b5f7e1f62 ``` -------------------------------- ### Retrieve L2 Table Entries Source: https://github.com/anime4000/rtl960x/blob/main/Docs/DIAG.md Displays valid L2 table entries to identify VLAN configurations. ```text RTK.0> l2-table get entry address valid LUT address: 0x000c (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 00:00:00:01:00:02 3 0 1 0 Static 0 SVL CtagIf Auth DaBlock SaBlock Arp Dis Dis Dis Dis Dis LUT address: 0x0020 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 00:00:5E:00:01:57 2 0 7 629 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x0244 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash B0:95:75:BB:BB:BB 0 0 6 822 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x0264 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 00:15:5D:C0:FF:EE 0 0 7 621 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x029c (1K LUT) L2 Unicast table: MACAddress F0:1C:2D:22:87:C3 2 0 7 600 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x0384 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 00:00:5E:00:01:BE 2 0 6 500 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x03a8 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 00:00:5E:00:01:B5 2 0 7 621 Auto 0 SVL CtagIf Auth DaBlock SaBlock Arp En Dis Dis Dis Dis LUT address: 0x03e4 (1K LUT) L2 Unicast table: MACAddress Spa Fid Age Vid State Ext Hash 6C:EF:C6:FF:FF:FF 3 0 1 0 Static 0 SVL CtagIf Auth DaBlock SaBlock Arp Dis Dis Dis Dis Dis ``` -------------------------------- ### Create WAN VLAN Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Defines the VLAN interface for WAN traffic on the SFP port. ```routeros /interface vlan add comment=wan-vlan331 interface=sfp1 name=wan-vlan331 vlan-id=331 ``` -------------------------------- ### Define Interface Lists Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Categorizes interfaces into WAN and LAN lists for firewall and NAT rules. ```routeros /interface list add comment=defconf name=WAN add comment=defconf name=LAN /interface list member add comment=defconf interface=bridge list=LAN add interface=pppoe-out1 list=WAN ``` -------------------------------- ### Enable 2.5G HiSGMII PHY Mode Source: https://github.com/anime4000/rtl960x/blob/main/Firmware_Router/TP-Link/Archer BE800/README.md Commands to be entered in the router's debug page to enable 2.5G mode. Note that these settings are not persistent across reboots. ```plaintext combo_debug stop combo_debug set plus combo_debug ipg_set combo10g 1_192bit ``` -------------------------------- ### Retrieve VLAN Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/fakeO5.md Queries the MIB table to identify Filter Outer and Inner VLAN IDs for QinQ configurations. ```shell omcicli mib get 171 ``` -------------------------------- ### Retrieve OLT Vendor Information Source: https://github.com/anime4000/rtl960x/blob/main/Docs/LowyatForumPost.txt Use this command to identify the OLT brand by querying the MIB 131. ```bash omcicli mib get 131 ``` ```text XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX OltG XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x00 OltVendorId: 0x414c434c EquipId:                     Version: ToDInfo: Sequence number of GEM superframe: 0x0 Timestamp: secs 0, nanosecs 0 ================================= ``` ```text XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX OltG XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ================================= EntityId: 0x00 OltVendorId: 0x00 EquipId: Version: 0 ToDInfo:        Sequence number of GEM superframe: 0x0        Timestamp: secs 0, nanosecs 0 ================================= ``` -------------------------------- ### Set Fiber Mode via Procfs Source: https://github.com/anime4000/rtl960x/blob/main/Docs/FLASH_GETSET_INFO.md Command to manually set the fiber mode to Ethernet, preventing auto-reboots during firmware updates or configuration fixes. ```bash echo 3 > /proc/fiber_mode ``` -------------------------------- ### Configure MikroTik Ethernet Flow Control Source: https://github.com/anime4000/rtl960x/blob/main/Docs/SlowUploadSpeed.md Sets auto-negotiation and flow control parameters for the SFP+ interface. ```rsc /interface/ethernet/set sfp-sfpplus1 auto-negotiation=no speed=2.5G-baseX rx-flow-control=on tx-flow-control=on ``` -------------------------------- ### Calculate OMCI_CUSTOM_ME value Source: https://github.com/anime4000/rtl960x/blob/main/Docs/VEIP.md Shows the bitwise addition required to enable the cf_apply_customized_veip_slot_id feature. ```plaintext Initial Value: 0x10000 (65536 in decimal) + Bit Addition: 0x00100 _______________________ Result: 0x10100 (65792 in decimal) ``` -------------------------------- ### Rename rootfs files Source: https://github.com/anime4000/rtl960x/blob/main/Docs/Modify_Firmware.md Replace the old rootfs with the newly created one. ```bash mv rootfs rootfs.old mv rootfs.new rootfs ``` -------------------------------- ### Configure GPON Serial Number Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Set the GPON serial number, ensuring the Vendor ID matches the current PON_VENDOR_ID. ```shell flash set GPON_SN HWTC12345678 ``` -------------------------------- ### Inspect OMCI Managed Entities Source: https://github.com/anime4000/rtl960x/blob/main/Docs/genexis-hsgq-gpon-sfp-mikrotik-guide.md Commands to retrieve specific OMCI MIB data once the SFP stick reaches the O5 state. ```sh omcicli mib get 11 omcicli mib get 84 omcicli mib get 131 omcicli mib get 171 omcicli mib get 329 ``` -------------------------------- ### Configure PLOAM Password (HEX Format) Source: https://github.com/anime4000/rtl960x/blob/main/Docs/StickSetup.md Set the PLOAM password using hexadecimal format, required for firmware version 220304 and newer. ```shell flash set GPON_PLOAM_FORMAT 0 flash set GPON_PLOAM_PASSWD 44454641554C54303132 ``` -------------------------------- ### Dump MTD block device via SSH Source: https://github.com/anime4000/rtl960x/blob/main/Firmware/UF-Instant/README.md Executes a cat command over SSH to dump the contents of the first MTD block device to a local file. ```bash ssh ubnt@192.168.1.1 'cat /dev/mtd0' >dev_mtd0 ```