Loopback causing blacklisted ont

  • Thread starter Thread starter orrville
  • Start date Start date
  • Replies Replies 78
  • Views Views 11,404
oh, if you have ssh, do you have full access to the router? i have looked a bit at the firmware and it appears the mac addresses are set by /etc/runoam.sh during boot. it gets the addresses from nv memory (some mtd partition). it reads mac address by cmd "flash get ELAN_MAC_ADDR". the best thing to temporarily set mac may be to copy commands from runoam.sh except the last line (which executes the cmd) and type "echo $exeCmd" which will display the command which would be executed to set the mac addr. in that change to your desired mac.
Should I just update the /etc/runoam.sh to set the macaddr variable to required MAC value, instead of output of "flash get ELAN_MAC_ADDR | sed 's/ELAN_MAC_ADDR=//g'" and reboot?


Code:
#!/bin/sh

exeCmd="eponoamd "
i=0
result=`flash get EPON_LLID_TBL.$i | grep 'fail'`
if [ "result" != "" ]
then
    macaddr=`flash get ELAN_MAC_ADDR | sed 's/ELAN_MAC_ADDR=//g'`
    exeCmd=$exeCmd" -mac "$i" "$macaddr" "
    i=$((i+1))
    result=`flash get EPON_LLID_TBL.$i | grep 'fail'`
fi

while [ "$result" == "" ]
do
macaddr=`flash get EPON_LLID_TBL.$i | sed 's/macAddr=//g'`
macaddr0=`echo $macaddr | sed 's/:[0-9a-fA-F]*:[0-9a-fA-F]*:://g'`
macaddr1=`echo $macaddr | sed 's/:[0-9a-fA-F]*:://g' | sed 's/[0-9a-fA-F]*://g'`
macaddr2=`echo $macaddr | sed 's/^[0-9a-fA-F]*:[0-9a-fA-F]*://g' | sed 's/:://g'`
macaddr0=`echo "0x"$macaddr0`
macaddr1=`echo "0x"$macaddr1`
macaddr2=`echo "0x"$macaddr2`
macaddr=`printf %04x%04x%04x $macaddr0 $macaddr1 $macaddr2`

exeCmd=$exeCmd"-mac "$i" "$macaddr" "

i=$((i+1))
result=`flash get EPON_LLID_TBL.$i | grep 'fail'`
done

$exeCmd &

Edit: Found that there is /var/config/lastgood_hs.xml and /var/config/lastgood_mp_hs.xml file, which has the ELAN_MAC_ADDRESS and GPON_SN. If I modify that, will that work?
 
Last edited:
@orrville SSH/Telnet/Console access is required.

Or, you can transfer an init.d script through ftp which will run the commands at boot.
 
@jayanta525 there are more that 100 files in /bin folder, anything specific you are looking for? /usr does not have any bin folder.

How to I get the SSH/Telnet/Console access? I can't see SSH/Telnet root level password anywhere. How to get console access?

init.d is folder with bunch files without extension. Looks like they call various scripts.

One of them calls /bin/sh /etc/scripts/config_xmlconfig.sh -b
Here is the script config_xmlconfig.sh
 
Last edited:
On my device, /bin directory has a 'setmac' executable, which allows to set Pon_macaddr.

You'll need an UART to USB adapter to get console access. On top of that, console will prompt for root login password.
 
no setmac executable in /bin. I have updated the post above, looks like start up script does read from xml. Need expert opinion though.

That's what it comes down to, where to to get the root password from?
 


create an empty executable in init.d, with 'touch /root/abc', and reboot the device. Check if /root/abc is present.
 
Can't believe this.

Copying files to remote side failed.
rc4: Read-only file system.


Looks like even FTP is read only.
 
Yes, will give it a try to set ELAN_MAC_ADDRESS from lastgood.xml first.

LCO might not entertain that, as problem is not with ONT. So if I have to, which cheap one would you suggest, which will give me the root access? The Revo? Or something else?
 
Get one of any brand that looks like this:

dbc-epon-onu-500x500.png


The REVO, yes, get that one.
 
Its root/root for serial console and root/Pon521 for telnet.

Change PON MAC with 'setmac 1 32769 XX:XX.....' and reboot.
 
SUCCESS!!

Uploaded lastgood.xml with following and reboot, PON is back!

Code:
 <Dir Name="HW_MIB_TABLE">
  <Value Name="ELAN_MAC_ADDR" Value="xxxxxxxxx"/>
 </Dir>

Now keep monitoring the loopback!

Thanks @jayanta525 and @hemant and others for all your help.
 

Top