Use Mikrotik with SFP port to replace ISP (Tet) modem

Hello,

I’m looking for options to avoid using ISP (Tet) issued modem for my network setup, but not sure where to begin, I hope someone here can help with some advice.

ISP (Tet) is issuing modem/router/AP/switch combo device, but I’m not keen of using ISP provided hardware, instead I want to take ownership and full control of devices that I am deploying in my home.
Can someone please share insights, if its possible to install Mikroitk router with SFP port and optical transceiver to connect ISP optical cable directly in router and essentially avoid using modem? ISP modem have 4 LAN ports from which two are network ports (each have its own public IP address) and other two are used for IPTV.

Can someone please comment it this is possible to configure Mikrotik router so that modem can be fully avoided?

Thanks a ton!

Yes, it might be possible, i have done this, but there is no general answer on how to achieve this if at all.
If you want a solution, you need to find out what the ISP uses to get the CPE connected.

Thank you for encouraging response!

There are several models used by ISP (Tet). Modem list can be found in this article: https://tet.lv/palidziba/lv/palidziba_majai/internets/majas-internets/problemas_un_risinajumi/32902 from which latest model used by ISP is Alcatel Lucent I-240W-A from what I can tell.

I hope this answers your question. Please let me know if you have any other questions about ISP or its hardware.

looks like they use GPON
so without the ISP gpon configuration it is a try and error guessing game

MT had something for that but it is discontinnued
https://mikrotik.com/product/SFPONU

I found a way to get configuration from Alcatel-Lucent I-240G-P. But only through uart.
Same steps may work for other Alcatel-Lucent devices.

Get root shell Alcatel-Lucent I-240G-P:
1.Connect uart(3.3v, but 5.0v also may be plugged) (5 pin connector on the middle of the board, (2,4) pins - IO, 3 pin - GND)
2.Plug in power to I-240G-P
3.Send Crl+A or hex ‘01’ when ‘Ctrl+A – Enter console terminal’ message appears, ‘[ONT Loader]’ should appear
4.Run command: ‘setenv bootargs ${bootargs} init=/bin/sh +m ; run bootcmd’, wait until '# ’ message appears
Next command should be executed fastly, otherwise device will reboot
5.Run command: ‘/etc/init.d/rcS’, wait until ‘INFO: ALL APPs are ready.’ message appears
Next command recomended to execute fastly, otherwise Console may cause problems (if ‘ONT>’ Console appears run commands: [‘enable’, ‘login’], enter User name: ‘CRAFTSPERSON’, enter Password: ‘ALC#FGU’, after that Console input ‘ONT>’ should disappear for a time)
6.Run command: ‘killall Console’
Done, next steps to enable login through ssh (which is more comfortable instead uart)
7.Run command: ‘killall dropbear’
8.Run command ‘dropbear &’
9.Connect ethernet cable to 1 ethernet port
10.Set ip address: 192.168.1.253, mask: 255.255.255.0, gateway: 192.168.1.251
11.Connect ssh to: 192.168.1.251 (password:admin)

Dump mib:
1.Login to ssh, or use ‘GponCLI’ command if connected through uart, ‘#ONT>’ should appear
2.Run command: ‘system’
3.Run command: ‘mib’
4.Run command: ‘dump’ ‘MIB is saved to the file /tmp/mibdump.txt’ should appear
5.Go back to system (Run command: ‘exit’)
6.Run command: ‘shell’
7.Run command: ‘cat /tmp/mibdump.txt’
Done

Using this I got ‘O5’ state with ONU id.
But no IP, (I still haven’t figured out the next steps (VLAN IDS, DHCP headers, e.t.c)).

I found a way to get configuration from Alcatel-Lucent I-240G-P. But only through uart.

I’ve tried using UART yesterday. I’ve managed to connect through Putty but only managed to connect to “user”. After “enable” couldn’t relog to a different user. Got some info from logs, but not much,.

If just wait until full boot there is 'ONT> ’ console with login.
The only ‘User name:’ I found is: ‘CRAFTSPERSON’ Password: ‘ALC#FGU’.
But after login through uart console closes and no any input will accepted until reboot.
This console also avilable through telnet(may not work until full reset) but after login there is only option to configure is SLID (PLOAM Password).

There is 3 different 'ONT> ’ console binary.
‘/bin/Console’ - login console (that appears after full boot)
‘/bin/GponSLID’ - very restricted, only SLID avilable, (appears after login ‘CRAFTSPERSON’ through telnet)
‘/bin/GponCLI’ - the full acces (avilable from 1 ethernet port after ssh server restart (dropbear))
Thoose binary also may be started after root shell got.

After command ‘/etc/init.d/rcS’ full booted I recomended to not wait too long because there is two consoles on same time and full access '# ’ console may be overlaped by 'ONT> ’ login.
If 'ONT> ’ login console appear you still can disable it for a time by login to it.
Recomend to kill ‘/bin/Console’ as soon as possible by ‘killall Console’ command, you can run it multiple times.

The boot log is not very informative.
I bought same device and compared logs, to find differences.
The uniqule values from log:

String starts with: 'Update timer:'
String starts with: 'Check base image file CRC:'
The strange part behind 'CPU revision is: 0001937c' and ' Linux version 2.6.21.7-cig-63'

My log looks like this:

Gpon System Boot


Copyright 2008 CIG Gpon ONT System.

CPU           : MIPS32 (Speed 450 MHz)
BOOT version  : V4.6.33
DRAM          : 64 MB
Flash Size    : 16 MB
EEPROM version: 0x0003
Creation date : Dec  2 2009 - 16:30:45
copy time     : 371 ms

**************************************
*                                    *
*  Ctrl+A -- Enter console terminal  *
*                                    *
**************************************
waiting for your select ...

Loading 'uImage' from  CRAMFS Partition 'imageb' to 0x80800000.

Root Filesystem crc check successfully!

Load complete: 1385127 bytes loaded to 0x80800000
        Software version:  R3.5.35.EF003sbn
        EEPROM version :   0x0003

Booting image at a0800000 ...
   Image Name:   Linux Kernel Image
   Created:      2011-03-03   6:52:45 UTC
   Image Type:   MIPS Linux Kernel Image (gzip compressed)
   Data Size:    1385063 Bytes =  1.3 MB
   Load Address: 80010000
   Entry Point:  802ce000
   Verifying Checksum2 ... OK
   Uncompressing Kernel Image ... OK

Starting kernel ...


LINUX started...
CPU clock 449MHz
 SYSTEM clock 56MHz
Linux version 2.6.21.7-cig-63 (root@Wolf) (gcc version 4.2.3) #14 Thu Mar 3 14:52:20 CST 2011
CPU revision is: 0001937c����P�ޓkX�=��n���8     ���Linux version 2.6.21.7-cig-63 (root@Wolf) (gcc version 4.2.3) #14 Thu Mar 3 14:52:20 CST 2011
CPU revision is: 0001937c
BL2348 Evaluation board (Jasmine) setup
Determined physical RAM map:
 memory: 04000000 @ 00000000 (usable)
User-defined physical RAM map:
 memory: 02c00000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Built 1 zonelists.  Total pages: 11176
Kernel command line: root=/dev/mtdblock3 mtdparts=phys_mapped_flash.0:512K@0x0(Boot),1536K@0x80000(Config),7M@0x200000(ImageA),7M@0x900000(ImageB) rootfstype=cramfs lpj=64000 5srst=0 mem=0x3600000 flashsize=0x1000000 dev_type=0x515002 console=ttyS0,115200n8
Unknown Major [0x51] Minor[0x50] HwVer[0x2]
Flash  Base 0xbf000000, Flash size 0x01000000
Runner Base 0xa3600000, Extra Addr 0xa3400000
dev_type =0x515002, (0x51, 0x50, 0x2)
Primary instruction cache 16kB, physically tagged, 4-way, linesize 32 bytes.
Primary data cache 16kB, 4-way, linesize 32 bytes.
Synthesized TLB refill handler (20 instructions).
Synthesized TLB load handler fastpath (32 instructions).
Synthesized TLB store handler fastpath (32 instructions).
Synthesized TLB modify handler fastpath (31 instructions).
Cache parity protection disabled
PID hash table entries: 256 (order: 8, 1024 bytes)
Using 224.642 MHz high precision timer.
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 41480k/45056k available (2126k kernel code, 3560k reserved, 677k data, 136k init, 0k highmem)
Mount-cache hash table entries: 512
----> bl234x_snoopy_init: 250
register time1 irq success
do not start timer
---------------- allocate timer 1 for Watchdog
NET: Registered protocol family 16

BLPCI driver initialized : vendor_id=0x5555 device_id=0x1556
version=0x380 type=0x2 revision_id=0x0 class_id=0x400000
registering PCI controller with io_map_base unset
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Time: MIPS clocksource has been installed.
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 2, 16384 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
TCP reno registered
JFFS2 version 2.2. (NAND) (C) 2001-2006 Red Hat, Inc.
io scheduler noop registered (default)
Generic RTC Driver v1.07
Serial: 8250/16550 driver $Revision: 1.4 $ 1 ports, IRQ sharing disabled
ttyS0: autoconf (0x0000, 0xaff01000): type=16550A
serial8250: ttyS0 at MMIO map 0xaff01000 mem 0xaff01000 (irq = 116) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 12000K size 4096 blocksize
loop: loaded (max 8 devices)
PPP generic driver version 2.4.2
PPP Deflate Compression module registered
PPP BSD Compression module registered
PPP MPPE Compression module registered
NET: Registered protocol family 24
----------> configure flash base bf000000, size 1000000, width 1
physmap platform flash device: 01000000 at bf000000
  *pmfr = 0x1, gPmfr = 0x1.
phys_mapped_flash.0: Found 1 x16 devices at 0x0 in 8-bit bank
 Amd/Fujitsu Extended Query Table at 0x0040
phys_mapped_flash.0: CFI does not contain boot bank location. Assuming top.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
4 cmdlinepart partitions found on MTD device phys_mapped_flash.0
Creating 4 MTD partitions on "phys_mapped_flash.0":
0x00000000-0x00080000 : "Boot"
0x00080000-0x00200000 : "Config"
0x00200000-0x00900000 : "ImageA"
0x00900000-0x01000000 : "ImageB"
usbmon: debugfs is not available
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
Netfilter messages via NETLINK v0.30.
nf_conntrack version 0.5.0 (352 buckets, 2816 max)
IPv4 over IPv4 tunneling driver
GRE over IPv4 tunneling driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
Bridge firewalling registered
VFS: Mounted root (cramfs filesystem) readonly.
Freeing unused kernel memory: 136k freed
init started: BusyBox v1.9.2 (2014-05-22 16:21:36 CST)


SSP: Set rlimit: S = 0x100000, H = 0x7fffffff
TMR: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00002000, /bin/TimerMgr................Done. elapsed time:(0)ms
Done.

Update timer: curTime=6acfc39d, gTmrTimerMsCounter=00000000
LOG: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00001000, /bin/LogMgr................Done. elapsed time:(0)ms
Done.
MMR: Set rlimit: S = 0x100000, H = 0x7fffffff
actImage[1], PartId[3], custom[UUAL] sys_cfg[/etc/sys.cfg.alu]
Starting Application: 0x00007000, /bin/MiscMgr................Done. elapsed time:(2)ms
Done.
Check base image file CRC ... cal_crc (c881f840) ori_crc (c881f840) Success.
file magic is 0x28cd3d45
Mount Backup[/dev/mtdblock2] as cramfs
Success.
actImage[1], PartId[3], custom[UUAL] sys_cfg[/etc/sys.cfg.alu]
major ID[0x51] minor ID[0x50]
enable Console ...
PMR: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00004000, /bin/PonMgr................Done. elapsed time:(0)ms
Done.
NET: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00009000, /bin/NetMgr................Done. elapsed time:(0)ms
Done.
VMR: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00006000, /bin/VmrMgr................Done. elapsed time:(0)ms
Done.
EMR: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00005000, /bin/EthMgr................Done. elapsed time:(0)ms
Done.
HMR: Set rlimit: S = 0x100000, H = 0x7fffffff
Starting Application: 0x00010000, /bin/HpnaMgr................Done. elapsed time:(0)ms
Done.
MEC: Set rlimit: S = 0x100000, H = 0x7fffffff
MEC_Init:99, remove /tmp/VmrMgr
Starting Application: 0x00003000, /bin/MecMgr................Done. elapsed time:(1)ms
Done.
init SIP.
VOS_XML_Init():
--ok to listen to port 5060acGatewayAPI version is: 2.2_build_$Rev: 17646 $
Load XML OK from file /mnt/rwdir/voicecfg.xml
INFO: ALL APPs are ready.

Also there is some information in uboot console ‘[ONT Loader]’, but you should be very carefully with commands that writes information.

Were you able to log into the ‘[ONT Loader]’ uboot console? (Ctrl+A – Enter console terminal)
Some terminals may not handle Crl+A so you can try type Ctrl+A character (I not able to add it to this message but you can got it from ‘Hex to String Converter’ website, type ‘01’ and copy result) or if it has hex input you can send ‘01’

Edit:

Because some steps have to be done at a certain time and it is difficult to explain. I created a video on YouTube: Get root shell Alcatel-Lucent I-240G-P
Edit 2:
Also I dumped mib file from same device, but I do not know which operator used on that device before, so some values may be not actual to TET, but it still can be helpful: Alcatel-Lucent I-240G-P mib dump

This stuff harks back to the dark ages of FTTC or even ADSL. In those days, your router was direct on the incoming line and you needed to fiddle like crazy to get the best throughput. And the router the ISP gave you often dictated how you set up your internal network. So, yes, I can understand why people wanted to control their incoming lines.

These days, with FTTP, if the ISP gives you an ONT, just accept the ethernet interface it gives you. If it does not intervene in the operation of your own network, just leave it be. You can improve nothing by fiddling. Just put the ISP router in a cupboard, connect your Mikrotik router to the ONT and be thankful that there is a clear interface to the ISP. No more line stats, no more fiddling to optimise them.

ye, it would be nice if it was like that. except Im not getting even promised Minimum supported speeds and have I never even got above that number. Im paying for 1gig and getting 500mbit tops. You can say its not the routers problem and it might be, but better be safe than sorry. Then comes the whole bufferbloat issue, this router cant handle these speeds and low latency.

tried commenting on youtube, but either u deleted comment or youtube auto algo idk

I didn’t delete any comments. I even can’t see it on moderation page. Now I disabled moderation again, (I disabled it on video upload but for some reason it didn’t turn off). Youtube moderation is weird.

Some values may be not valid or not where it should be because I still didn’t get IP.
All hidden characters I replaced with “*”

See all eeprom values by "#ONT/system/misc>eepinfo":
EepMfgProductSerial inside device near laser (field S/N);value: ************, eeprom value: ************
EepEqSerialNumber outside device (field S/N);value: ALCL********, eeprom value (* lower case): ALCL********
EepMfgProductCode inside device near laser (field P/N);value: 152-00010-24g, eeprom value: 152-00010-24
EepEqVersionID outside device (field P/N);value: 3FE53347ADAA, eeprom value: 3FE53347ADAA__
EepEqID outside device first line;value: I-240G-P, eeprom value: __________I-240G-P__
EepAppGponPassword ;eeprom value: ******************** 

MIB:
ME 7 Version field 2 entys; values: **************, 3FE53217AOCK44
ME 257 OMCCVer field; value: 0X86


PLOAM Password(EepAppGponPassword): ********************
GPON SN(? EepMfgProductSerial or EepEqSerialNumber): 

Vendor ID: ALCL
Software version 1 (ME 7 Version): **************
Software version 2 (ME 7 Version): 3FE53217AOCK44
OMCC version(ME 257 OMCCVer): 0X86
Product Class (EepEqID, maybe _ should be removed): __________I-240G-P__
HW version(EepEqVersionID, maybe _ should be removed): 3FE53347ADAA__
OUI (first part of mac?): 0019c7
Device Serial Number (? EepMfgProductSerial or EepEqSerialNumber):
MAC: 0019c7******

I-240G-P has 2 partitions with different software version, 3FE53217AOCK44 looks like latest. So “Software version 1” and “Software version 2” may be swapped if active partition is “A”
EepMfgProductSerial may be same as EepEqSerialNumber, or same but upper case, or different

Possible Vlan IDs: 3935, 4000

#ONT/traffic/eth>show brdgmgr cfg
Brdgtype   12            macTableSize  1280
portMask   0XF           rgPortMask    0X0
wanPort    *****         agetime(ms)   600000
testloop   0             mcBrdgMask    0X0
wanLearnSa 0             dhcpMask      0X1E
Ds Gem Flow 2
   VLAN   0xF5F       Mask    0X1          EMAC    0X1
Ds Gem Flow 3
   VLAN   0xFA0       Mask    0X2          EMAC    0X1
Ds Gem Flow 30
   VLAN   0xFFFF      Mask    0X6          EMAC    0X1
Ds Gem Flow 4
   VLAN   0xFA0       Mask    0X4          EMAC    0X1
Ds Gem Flow 5
   VLAN   0xF5F       Mask    0X8          EMAC    0X1
Block Mac Range:

Tried again. Again auto deleted :joy:
Anyway msg me on discord : ntE#4142

Has anyone managed to do it ? I am in the same situation.