Some days are more interesting than others. Yesterday certainly was more interesting than most and is worth an entry in the blog.
It started with me struggling with a networking issue that had been noticed a couple of weeks ago but was getting worse and finally prevented one server from reaching the web for updates. This was the server on which I ran apt-cacher-ng, a caching proxy for all my updates and installations for Debian GNU/Linux. The mystery was that it seemed only one machine had the problem yet it networked perfectly with every other machine in the building except the router. I even got help from oldman, an occasional visitor here.
During the noon hour I simplified the cabling from the network switches to the router and everything started to work again. The system had been working well and something changed. I still don’t know what it was. I had inserted the Dlink router to replace a connection to the ISP on a managed switch. I had left the network switches in the configuration as I found them when I arrived here in November. The changes I made brought each switch a direct connection to the router rather than cascading through the switches. Whether it was a timing issue or a poor connection I was back on the air caching packages as before.
So the morning had been worrisome, the noon-hour curative, and the afternoon seemed very routine. I gave a lesson on routers, what they do, pros and cons of small networks, alternatives, how to set them up, etc. I thought it was pretty well done but a few students wandered off near the end… So, I talk too much. I did not think much of it. The lesson had gone fairly well with students being alert and even discussing the subject, normally a good sign.
After school, I did some work turning a PC into a router, installing all the necessary packages. I got bored and decided to install one of the new PCs in a classroom that used wireless. I installed the package wireless-tools in my lab because I would not be able to do that in the targetted classroom. I removed the wireless NIC from an old machine in the room and installed it in the new PC in my lab. I tried to verify that it worked but could not get a connection. I could not even scan for wireless access points. It seemed dead although there were no error messages. I tried contacting the AP over the wired network and failed also. Finally, I went to the room where the AP was mounted in a window and discovered it was gone!
I was ticked off. I tried to contact the authorities but I had no phone and I could not find the vice-principal who lives nearby. I did inform the maintenance manager. Pizza was in order…
Later, I returned to school and fiddled around the web and so on. The principal came by and unlocked the classroom that had the access point. We confirmed the device was indeed missing and had not just fallen off its mount. We joked about the effectiveness of my teaching and the initiatives of students. I proposed doing some war-driving to see if the device was in use but nothing came of that.
We decided to install a second access point more or less in the same place with a plan to secure it better. It worked immediately so I then carried the equipment to the other place to install the new PC. This was way more fun. I set up the new PC and got it working wirelessly. I then configured it to accept X connections via gdmsetup as root and modified the Welcome field in the login screen to Welcome to %n to show the hostname.
I was thinking to swap a ready PC from the lab with the old XP machine in the classroom but was inspired to install Debian GNU/Linux in place without networking. Routing wireless is complicated so I just used a crossover cable between the machines. I used Debian Squeeze USB-stick netinst, and just left a minimal install without X. I then booted the old machine and used SSH to forward the package proxy ports from that machine to the new machine:
ssh -L 3142:newmachine:3142 -N newmachine
and pointed the old machine to the localhost for package proxy. I installed apt-cacher-ng on the new machine although I could have forwarded a port also. Our network is pretty fast lately and I just needed 70 packages or so for X on the old machine. I had activated the free Ethernet port to a new subnet by editing /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 192.168.1.1
gateway 192.168.1.1
netmask 255.255.255.0
and did the same on the old machine with a different IP address, 192.168.1.10. Apt-get install xserver-xorg-video-intel got X installed on the old machine. I then edited /etc/rc.local on the old machine with X -query 192.168.1.1 and the thing booted to a Welcome to newmachine login. I set up a second student account on the newmachine and two can now run apps as fast as one on the newmachine.
It was a great way to end a tumultous day, paving over that other OS one more time and doubling access to computers with better performance. There was one more bit of excitement. There were folks in the gym that evening and when they left they turned on the burglar-alarm. When I left, I set it off… Oh boy.