Monday, 22 January 2018

Network switches

After one of my network switches crashed catastrophically, I needed a replacement, so I went to eBay.

I should first explain what a network switch is. Each computer has an ethernet port (or uses Wifi, but most of mine use wires). The cable from that port, goes to an ethernet switch, and that acts as a kind of traffic manager. Like roads leading to a roundabout?

The switch that failed, was a 32 port switch, but I've grown a bit since then, and I looked for a 48 port switch. And I wanted it to run at 1000 mbit speed (gigabit) because I've been using gigabit speeds on an increasing number of computers. The cards cost just a couple of dollars now.

You have to be a bit careful; some switches have just a few gigabit ports and the others are all megabit. I wanted a switch that was all gigabit. So I went to eBay and rummaged.

I wound up buying a "3com Baseline Switch 2948-SFP Plus" for £30. And after a bit of thought, I bought another one for £35. These give me 48 gigabit ports, so I can put one on my front rack and one on the rear rack.

I installed the front rack switch, and that was working well. So I looked at the rear rack switch, and decided that before I installed it, I'd have a play around with it, to see what else it could do. And I was amazed! This is what is called a "managed switch". You can disable ports, or restrict the speed. You can monitor the throughput of each port, and tons more.

So after playing with my new switch, I installed it, so now my main Data Shed is entirely gigabit switches.

And then I went to eBay about bought another "3com Baseline Switch 2948-SFP Plus" for £35. The only thing I don't really understand, is why they are so cheap!

Sunday, 21 January 2018

A consulting job

This happened a couple of decades back. I was asked by a computer dealer to appear in court as an expert witness. They wanted me to swear that a 10 mbit ethernet network, is 2.5 times as fast as a 4 mbit token ring network. They had replaced, for a customer, their old Token Ring network with a new ethernet network, and the customer was complaining that it ran very very slowly now. And this was going to be a court case, because customer wanted dealer to rip out the ethernet cabling and hardware, and reinstall their old token ring, and that would be very expensive for the dealer.

It sounds like it would be faster. But networks aren't quite that simple. And why would the customer be wrong about this? So I said "I need to visit and have a look at this." "The dealer said, "Why? It's very simple, 10 mbit compared to 4 mbit." So I explained, when I'm up on the witness stand giving my expert opinion, and the cross-examination asks me "So, Dr Solomon, did you actually go and look at this network?"  then I don't want to have to ansewr, "No, I'm just guessing."

So we made an appointment, and I went to visit the customer. The customer showed me; he started up Dataease (a database that I knew and loved) and nothing happened, for a very very long time, until eventually, the opening screen came up. "Odd, I though, "that should have been instant, they haven't actually done anything yet." So we closed it down, and started it up, and this time I went to watch the server. And the disk light was flashing, and flashing, and flashing - lots of disk access, and eventually the database started up.

"Hmmm, I thought, "I wonder what's causing that?" So I started it up again, but in single user mode, and this time, it came alive instantly. The customer was watching, and said "Yes, that's more like it! Well done, you've fixed it." No, I hadn't. You can't use a multi-user database in single user mode, there will be collisions. But it was clear what was wrong; the database was implementing locking by opening little files to indicate "File in use", and closing them, and opening them, and so on.

So, how to fix this? I phoned Dataease tech support; I had a good name to talk to, which got me past the front line support "Have you switched the monitor on?". And he said, "Yes, that was version 4, but version 5 does proper in-memory locking using the operating system locks." "So how can I get an update?" I asked. And the customer interrupted, "Do you mean this?" he asked, waggling a copy of Dataease 5 that they had been sent but hadn't bothered to install.

So  I upgraded their software, ran it multiuser, it was swift as an arrow, everyone was happy (the customer, the dealer and me - but not the lawyers who had been deprived of their fees).

Job done.

Thursday, 18 January 2018

Power controller

I use APC remote control power distribution units. They give me eight power ports, controllable remotely via my network; very nice. It means that I can be on the other side of the world, and reboot my computers.

I used to have three DSL lines, used for backup across the internet, because they were cheaper than my old 2mbit leased line. When I moved to a 100 mbit connection, I didn't really need them. But I kept one, because A) it gives me at least some connectivity if the 100 mbit line goes down (which it has, they called it routine maintenance, but they didn't warn me in advance, so I claimed compensation, which I got) and it also means that I have a way of accessing my network from "outside".

The APC PDU was still there, now controlling only one DSL router. Which is a waste, I could find a use for that elsewhere. So, I thought, let's make a remote rebooter from parts in my parts box.

I used a Raspberry Pi, of course, version 1. I also had a little relay board, they cost £1 on eBay.

The DSL is powered by a plug-in power supply which claims to give 12 volts; it actually gave 15 volts. Too rich for the Pi, I already fried one that way! So I used a step-down converter (eBay, £1.33) to get it down to the needed 5 volts.

I connected pin 2 of the Pi to give the relay its 5 volts, and pin 6 for the ground. Pin 12 is GPIO18, and that was the pin that would switch the relay. So the 15 volt PSU supplied the Pi after going through the converter, and also supplied the DSL router, after going through the relay.

The software to control this was pretty simple. First, run only once after boot-up, to set up the Pi gpio pin.

# put the gpio pin 18 (physical 12) under control of the kernel
echo "18" > /sys/class/gpio/export
# make pin 18 an output pin
echo "out" > /sys/class/gpio/gpio18/direction

Then, to switch on, I do "gpio -g write 18  0" and to switch off, I do "gpio -g write 18  1".

Instead of having to log in to do this, I implemented a little cgi, so that I can access it as a web page and click the on or off button.


Wednesday, 17 January 2018

How to activate your HSBC debit card

Why does the card need activating? Is it a security thing, in case the card the posted falls into the wrong hands?

So I phone the number they give, 0800 783 5263 and the rest was automated. It asked for the card number, which I gave, and then to ensure that it really was me calling, they asked for my date of birth.

Wait, what? They think this is something known only to myself and HSBC?

No wonder there's so much fraud.

Network down

I got up this morning to find my entire network down. I did a few checks, then went down to the Data Shed to see if I could spot the problem. I saw, almost immediately, one of the big gigabit switches (32 ports) was flashing all ports. I powered that switch down, and my network came back to life.

I think the switch had simply gone gaga, and was throwing packets onto the network as fast as it could. I doubt if it's something I can fix. So I replaced it with one of my old 100mbit switches, and now everything works.

I use gigabit on most servers, because it makes throwing huge amounts of data from one server to another, very fast. I need that when I'm backing up terabytes of data. But for external access, the limit is 100 mbit, because that's the speed of my line.

I would like to use a gigabit switch instead of that temporary 100 mbit switch. So I went on to Ebay, and found a 48-port gigabit switch for £30. Which is not bad, since a 48 port gigabit switch is, when new, over £200.

 ... later ... So then I bought another one for £35.

Monday, 15 January 2018

Dental diagnosis

Time for my annual tooth check. So I toddled down to the dentist.

She poked and prodded, and stuck something sharp into my gums, and after a somewhat uncomfortable five minutes, she gave me the all-clear!

Friday, 12 January 2018

The Black Baron

This is about the first themed show that we did. We had previously done the same chrome-and-white-plastic shows as everyone else. In order to be taken seriously, you have to be serious. And boring. And people forget everything you told them as soon as you've finished talking. So I decided to try something completely different.

This was just at the time when viruses had been written by someone calling himslef the "Black Baron" - he turned out to be a British guy from Plymouth. He called his viruses Smeg.Queeg and Smeg.Pathogen, and generally seemed to be a fan of the TV show "Red Dwarf". The interesting thing about his viruses, was that they were very polymorphic. at a time when polymorphic viruses weren't common.

Before the show, I thought about what we could do, and I put together a mini-presentation, to show to our sales and marketing people, with sound from a tiny tape recorder, and I hoped they could use their imagination to see what the real thing would look like. I heard a whisper "Is he serious?".

I wanted to impress on the audience that, no matter how clever the author of the viruses were, we were cleverer, and were completely on top of the situation.

The occasion was Softteach, a show put on by distributor Softsell, aimed at dealers. And what dealers want, of course, is something they can sell, for a profit. And which doesn't cause them hassle later.

So my commercial pitch was this. We're giving you a free copy of the Antivirus Toolkit, and you can sell it to whoever you want. Because when someone wants an AV, they want it RIGHT NOW, not after a couple of days for delivery to happen. But when you sell it, you'll re-order, right? So that you can keep on selling it. Also, don't worry about tech support. We do all that, we have a free tech support line. And don't worry about us undercutting you on price - I promise that we won't sell copies to anyone at anything other than our recommended list price. So the message was "You can make money out of this".

So that was the main message. I know what turns dealers on. But that's boring. So I decided to explain to them about how polymorphic viruses worked, using an animated Powerpoint presentation to show how the viruses self-mutated in each copy. Also boring, but really the point I was trying to make is "We know what we're doing."

But how to make it really interesting? At Softteach, each vendor had a room, and you do the same presentation several times over the two days. We installed a really good sound system in our room, and we controlled the lighting.

When the dealers came in, we were playing the theme tune to "Red Dwarf", which was so popular at the time, everyone recognised it. Then, when everyone was sat down and the room filled, we started. "I'm going to tell you about the Smeg viruses, written by "The Black Baron" and when I said "The Black Baron", we did a flash of lighting and a crash of thunder, really loud. Which they weren't expecting, so it made them jump. And from then on, whenever I said "The Black Baron", we hit them with lightning and thunder again. And the presentation was quite technical (these are dealers, so they do understand about computers) and it didn't matter that it was over their heads, because A) we were flattering them by being so technical and B) we were saying "We know what we're doing."

We all wore t-shirts with the message "Smoke me a kipper" and  a picture of one of the Red Dwarf characters. I still have one of those t-shirts.

Word soon spread "Have you seen the S&S presentation? You've got to see it?" and we were packed out. We gave away hundreds of free Toolkit copies to these dealers and from that time on, whenever anyone asked for an antivirus from those dealers, they were sold one of our Toolkits. Which was, at the time, the best product around, so everyone gained.

And it was so much fun to do!

Except for Chris Pile, The Black Baron. He was apprehended, pleaded guilty, and was sentenced to 18 months.