Category Archives: Tech: general

Make DHCP auto-update the DNS

Update: added a new post on configuring Solaris, link below.

Motivation

In today's dynamic R&D network environments, it's not easy to keep the DNS records up-to-date: hosts are reinstalled/renamed/added frequently, virtual machines are so easy to deploy and destroy, DHCP allocates different IPs..

This even leads to pitiful situations, in which people get used to referring to computer by their IPs (or using /etc/hosts), because the DNS cannot be trusted to reflect the reality.

Solution

DHCP servers have the ability to send dynamic DNS updates, as they allocate IPs to clients. The great thing, is that it even works out-of-the-box on some operating systems. Still, if it doesn't, here are 3 things to care about, so to enable this feature: Continue reading

DNS SRV records (or: why Google Talk doesn't connect through this network)

[ There is some blabla here about SRV records, See last paragraph for the direct solution ]

Recently, the bus home was replaced with a shiny new one, which also provides Wi-Fi access. That's brilliant - as long as I have a seat, I don't mind how long the ride home takes. I just hope it doesn't radiate too much =)

Anyway, I've noticed that I fail to connect to Google talk through my favorite client, Pidgin, when connected to this Bus' wireless LAN. It's really fun to do some debugging with xterm and wireshark with passengers watching with curiosity.

And to the point - I'm not sure where this standard is defined (XMPP?), but Google recommends setting the Google Talk "domain" as gmail.com. But where is the XMPP server ip/name taken from? It's not gmail.com, as the telnet gmail.com 5222 fails.

Quick sniffing tells that my pidgin (and probably other clients) use DNS SRV records. SRV records (RFC2782) are a pretty neat idea: it lets you query your domain for services. Why remember (or worse: guess) what's the name of the SMTP server? Instead, SRV records suggest a way to ask a domain what's the IP of the domain's major SMTP service.

The DNS name is of the following structure: _<service name>._<protocol>.domain.

In our case: _xmpp-client._tcp.gmail.com. Let's run this nice command line:

# host -t SRV _xmpp-client._tcp.gmail.com

_xmpp-client._tcp.gmail.com has SRV record 20 0 5222 talk2.l.google.com.
_xmpp-client._tcp.gmail.com has SRV record 20 0 5222 talk3.l.google.com.
_xmpp-client._tcp.gmail.com has SRV record 20 0 5222 talk4.l.google.com.
_xmpp-client._tcp.gmail.com has SRV record 5 0 5222 talk.l.google.com.
_xmpp-client._tcp.gmail.com has SRV record 20 0 5222 talk1.l.google.com.

So briefly, each SRV record holds host name, port number, priority and weight. A single service may have several records, thus providing some kind of high availability and load balancing.

SRV records are intensively used in Microsoft Domains since Windows 2000, and it's even possible that they invented it (they're signed in the RFC after some non-microsoft guy). In that case, kudos to Microsoft for either inventing or pushing forward a good technological standard. Haven't seen this frequently.

So, it seems that the DNS in this bus disrespects my SRV queries, and thus my Pidgin can't figure out who is the Google Talk server. Setting another DNS server solved the problem.

Local issues

This is not a post of original content, I'm simply linking to interesting things I've read recently.

  1. Israel: Linux-IL mailing list is inspecting some weird phenomenon. Looks like 012 ISP is blocking SSH packets which are  sent abroad.
  2. Hebrew: this feature is too hidden.. Diego explains that how to enable left/right alignment switching by ctrl+shift. (Useful for RTL languages).  The "trick" works for QT, KDE (3+4) apps.

A global ZoneEdit DNS update problem?

Update: Manually updating it in the web gui seems to fix the issue. I wonder if it's a temporary issue that was solved..

yet another an Is-it-just-me-or-is-it-a-global-problem? post:

A lightning had struck nearby and killed the power at around 03:00UTC. I've turned the computer back on at 09:22UTC (yes I know, I slept too much), and ddclient updated zoneedit.com with my new IP.

According to zoneedit's web gui, my IP got updated. But their DNS servers still give the old IP. (It's been 10hrs since my update, for it's 17:00UTC now)

I mailed their support, no reply yet (I'll update in this post, when there's news). Is anybody else experiencing the same problem?

14hrs without a functioning mail. Everything is so quiet and peaceful 🙂

Radio Buttons: a bad design?

Just a thought: once a user clicks on some radio button, it'll be selected, but the user will have no standard way to remove/undo this selection. The only possibility is to switch to another radio button on the same radio button group. As far as I know*, this behavior occurs on all popular GUIs, including web, windows forms, qt and gtk, and probably others.

It's been like that for so many years, isn't it time to add a "deselect radio button" standard? Just like a checkbox, a single click would be a simple enough way to undo a selection. For special cases, a "ForceSelection" property may indicate that this radio button group cannot be deselected, to preserve the current behavior.

* I merely researched this topic, it's a just-a-thought kind of post and might be inaccurate.

PAE – what’s that, and how bad for performance?

Err, what's PAE?

PAE (Physical Address Extension) is a "workaround" for letting x86-32bit(!) OS see more than 4GB of RAM. 4GB is the limit for 32bit memory addresses. PAE is not needed and not implemented on x86-64 processors when 64 bit ("long mode") is enabled.

How does it work?

In short, it simply adds 4 bits to the memory addresses (32bit -> 36bit) and one more level of memory-lookup-hierarchy, and: voila, OS can access up to 64GB ram (which is not science fiction these crazy days..). Of course, a single 32bit process is not aware, and would still only have a 4GB of virtual address space, even with PAE.

Performance penalty: yes or no, and how much?

I was given a task to research the PAE technology for recommending my company whether we should use it or not, especially performance-wise.

Continue reading

Pidgin can't connect to ICQ anymore

Update2: Irrelevant. Pidgin/libpurple 2.4.3 quickly fixed the issue. Hurray to foss community! 🙂

Update: Seems like there'll be a new version soon. From #pidgin at irc.freenode.net:

There are issues with ICQ - ignore the message to upgrade and wait || We know pidgin.im is having difficulties


A few hours ago (01/Jul/2008 ~16:00 UTC) I tried connecting to ICQ using pidgin. Pidgin failed to connect and displayed the following error message:

The client version you are using is too old. Please upgrade at http://pidgin.im/

http://pidgin.im is down at the moment, probably because of the traffic this message caused 🙂

So, apparently ICQ have just changed the protocol with no backward compatibility, or at least blocked nonstandard clients. Or maybe it's just a temporary problem?

The only relevant post I've found so far is this Russian post.

I'll update this post when I hear something. Does it happen with other clients as well?

More useful keyboard shortcuts; Apache evilness

As a sequel to this browser shortcuts post, here're two new shortcuts that rocked my world (ok, almost..) :

  1. F4: opens a select box. Seems like a standard for all UIs! (Windows/Linux at least)
  2. Tick (') key in FireFox: would switch to 'search' mode just like slash (/), but would search for links only. Just type the beginning of the link's name and hit Enter.

Do you know any other shocking keyboard shortcuts?


On a completely other subject, I was fighting (along with a collegue) today with Apache httpd's configuration. The web server seemed to "automatically guess" URLs in a weird fashion.

The cause is that we had the MultiViews feature enabled. With MultiViews, when a URL points to a nonexisting file, i.e. http://mydomain/my/file, apache tries to look for an existing file which looks similar to the directory (I won't describe here the exact algorithm), i.e. http://mydomain/my.php. Then it loads it instead, and the user doesn't get 404.

Maybe some people need it.. but it's also weird and error-prone..

DDClient: Problem updating Zoneedit

I use Zoneedit for DNS "hosting". They give great, free service, with additional features at small costs.

For updating my Dynamic IP, I use the DDClient script (supports zoneedit, dyndns.org and many other providers)

A few days ago (according to my logs: 30/05/08 18:15:00 UTC) DDClient stopped updating my IP in Zoneedit. Apparently Zoneedit changed the URL, and ddclient.conf should be updated accordingly:

server=www.zoneedit.com

should become

server=dynamic.zoneedit.com

It probably hurt many users.. I hope I didn't lose too many emails =)

Update: I notified ddclient developers and it was fixed (in SVN only currently).

Update 2: According to wimpunk (ddclient developer), the "server=www.zoneedit.com" can be simply commented-out from ddclient.conf (it's an optional parameter!); when commented-out, default already uses the correct address (dynamic.zoneedit.com), even in 3.7.3 or earlier.