Monthly Archives: October 2014

Asus router QoS

I run this website via dynamic DNS from a home server connected to the internet via a ASUS RT-n66u which is a great router. A couple of weeks ago, our internet connection got a bit wonky and Singtel send a technician over who could not solve the problem. The problem is that internet connectivity would be lost for a hour or two almost every day which was the reason for the script that I wrote. The problem has since disappear and since I have not changes any equipment, it must have been an issue with Singtel’s backend.

But during the problem period, I was tweaking the settings on the router in the hopes of solving the problem which it did not. But what I did do was to screw up the internal network access to this website. The routing used to work within the internal network when computers at home accessed this website but since the tweaking exercise, it has not. But the external world is fine.

After much searching and head scratching, I finally found out the issue was due to the QoS option not being turned on in the ASUS router. Why would NAT loopback only work when QoS is enabled is beyond me. But it works now and I am happy.

Dinner

We went to the Central Library to borrow some books and went over to Bras Bash Complex for dinner. We had the famous former Parklane bak chor mee which was pretty good. Here are some photos.

2014-10-26 18.04.23

2014-10-26 18.04.36

2014-10-26 18.05.28

Esther’s dou hua art

Esther is always making art with her food. This one is made from dou hua and looks like a flower. She tells me that she always does this before she finishes it up and boy does she like dou hua. If there is a chance for it after a meal, she will always reserve some space for it.

2014-10-23 19.22.04

Technology advancements

Looking at the following picture taken using my iPhone 5S and processed using Snapseed on the same phone, it is amazing how much technology has advanced. What used to take a dedicated dSLR and post processing using a computer is now a trivial process on a phone. It is either amazing or it is showing my age.

IMG_1412.JPG

Checking internet connectivity

Pauline was complaining of internet connectivity issues at home which was rather random and prolonged. Each time, connectivity would drop for an hour or 2 and then it would suddenly work without intervention.

This is really strange and has happened in the past but it was not common. It appears to be more frequent recently or it could be that Pauline is at home more often and notices it.

So I wrote a small naive Python script to ping Google and placed that in the crontab to run every five minutes. The following is the script if it helps anyone.

#!/usr/bin/env python

import urllib2
import datetime

try:
 r = urllib2.urlopen("http://www.google.com")
 outfile = open("/home/bernett/google_ping.txt", "a")
 outfile.write("%s - HTTP code %s\n" % (datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"), r.getcode()))
 outfile.close()
except:
 outfile = open("/home/bernett/google_ping.txt", "a")
 outfile.write("%s - %s\n" % (datetime.datetime.now().strftime("%Y%m%d %H:%M:%S"), "ERROR - failed to connect to Google"))
 outfile.close()