Nadodiyin Pulambal

A Wanderer Gripes

Archive for the ‘Unix’ Category

Stuff somehow connected with the Unix operating system

1492: Conquest of Paradise

Posted by kovaiputhalvan on April 5, 2008

Back online again. The tata indicom guys finally responded to my threat of throwing their router out of my window, and came down to fix the cable. So I’m wired again. Only, they’ve mucked up some router setting and I’m not able to view any page except Google from Linux! I’m reduced to running WinBloze to surf the Web while I figure out WTF is happening re. Linux and my router. I’m mystified… DHCP works fine, the DNS seems to be OK, ping and traceroute show that I should be able to reach the remote IP addresses that I want to talk to… but – this is a big BUT – my browser doesn’t show any pages from these places! For instance, I can login to yahoo mail on WinBloze, but all my browsers under Linux just freeze on “waiting for login.yahoo.com”. For the life of me, I can’t figure out what’s happening. Oh well, I just have to give it some time and thought, I guess.

Tomorrow’s a big day, I will finally put broom to dustpan and clean up the cumulative effects of my laziness that have made themselves felt all over the house. I hope it goes well.

Update, 06 April

Just got done with breakfast at the nearby darshini (someday I will have to expound on the distinctions between Tiffin Rooms, Darshinis, Upaharas and Sagars.) and bought a couple of newspapers. I wanted to start off with Operation Clean House by 8.30, but two idlis, a vadai (of course) and a cup of coffee have brought on me such a sense of contentment that I don’t want to start the dirty work before 9.30. As also the sense of pleasant disbelief that my internet connection is finally up and running after nearly three weeks of downtime, angry phone calls and more angry phone calls.

It is essential, however, that I get started soon. Once OCH is done, I have to read up on Broder et al’s Bloom Filter paper and troubleshoot my linux installation’s google-only fixation that I described above yesterday. Later in the afternoon, I’ll catch up with The Kid who’s now making cooing noises at the fan. Damn, bachelorhood is not a patch on fatherhood – but I will have to remain in this semi-bachelor state for a few months more.

Now let’s see. DHCP seems to be working fine, I get the correct IP address and netmask – except that I see an “eth0: no IPv6 routers found” message in /var/log/messages. Running ipconfig in WinBloze yields what seem to be IPv6 addresses for DNS servers. I don’t know if this could be the problem. DNS seems to be working fine, as ping and traceroute testify. That’s the weird part – I can ping, but I can’t connect via http! The DNS server that DHCP gets is different from the last time, though. Earlier I used to get 192.168.1.254 as my DNS server, and now it’s 192.168.1.1 – I don’t think this should really be creating any problems, though… the routing tables also seem to be just fine. This is probably some extremely trivial problem, the solution for which is staring at me as I write. As usual, it will take me several cups of coffee and several hours before I slap my forehead and let an expletive escape my lips.

Update: 06 April, an hour or so later

No coffee, maybe an hour. Got the sonofabitch. {expletive}. {expletive}. {yet another expletive}. My MTU was set to 1500, lowering it to 1400 fixed the problem, am writing this from where I should be! YES! Now I can go and clean up the house in peace. O frabjous day! Callooh, Callay! I chortle in my joy. I put in the unlikely title after realizing that the default MTU on most Unix boxes is (used to be?) 1492. I shall play Vangelis as I clean. Ha!

Extract from the iptables(8) manpage:

TCPMSS
This target allows to alter the MSS value of TCP SYN packets, to control the
maximum size for that connection (usually limiting it to your outgoing inter-
face’s MTU minus 40). Of course, it can only be used in conjunction with -p
tcp. It is only valid in the mangle table.

This target is used to overcome criminally braindead ISPs or servers which block
ICMP Fragmentation Needed packets. The symptoms of this problem are that every-
thing works fine from your Linux firewall/router, but machines behind it can
never exchange large packets:

1) Web browsers connect, then hang with no data received.
2) Small mail works fine, but large emails hang.
3) ssh works fine, but scp hangs after initial handshaking.

Workaround: activate this option and add a rule to your firewall configuration
like:

iptables -t mangle -A FORWARD -p tcp –tcp-flags SYN,RST SYN \
-j TCPMSS –clamp-mss-to-pmtu

Irrelevant Afterquote:

Why is it . . . that the first thing you are reminded of by something that happens around you, is something obscure and foreign, totally unrelated to the life and languages around you?

- Pultukaku, Agastya Sen’s uncle, from English, August.

There’s a big philosophical angst-ridden post buried in those few lines above, but I’ll save that for later. That quote is self-referential, in a manner of speaking. I really have to go clean up house now! I spent close to an hour leafing through my (actually not mine) copy of Upamanyu Chatterjee’s book to get hold of that quote :)

Posted in Books, Philosophy, Quotes, Unix, stuff | Leave a Comment »

truss(1)

Posted by kovaiputhalvan on May 30, 2007

The engineer found himself locked out of a Terminator box[1]. He would ssh to the box, only to find that his prompt would never materialize. After much agonizing, he logged in as root on another terminal, and decided to truss the offending ssh daemon. To his amazement, he found that a shell was actually being forked off – but that it was waiting for one of its children to do something. The child in question (bastard, he swore under his breath) was quota. Quota was itself waiting for something else to happen.

What was quota waiting for? A few more minutes of poking around helped solve the problem. A badly written application that he had been running was hard-mounting NFS exports, and not umounting them when done. Consequently, quota was going mad trying to calculate how much space he’d eaten up. With several hundred stale hard mounts lying around, there was no way that quota would be done before kingdom come. The engineer heartily cursed the moron who’d written the ugly piece of code, and set about kicking out the unwanted mounts. A few minutes later, all was well with the world.

The moral of the story? I can’t think of anything snappy to say, so I’ll leave it at that.

[1] “The Terminator” is how I affectionately refer to the T-[12]000 offerings from Sun:
http://www.sun.com/products-n-solutions/hardware/docs/Servers/coolthreads/t2000/index.html. Lovely beasts.

Posted in Unix, stuff | Leave a Comment »

Unlikely Bedfellows

Posted by kovaiputhalvan on November 10, 2006

A long while ago, when I was still green behind the years and was living in the Institute with Tree Lined Avenues, I was gifted one of those little plastic plaques with a pithy message written on it.

It read thus:

If you love something, set it free;
If it comes back, it is yours.
If it does not, it never was.

Read the rest of this entry »

Posted in DSP, DragonFly, Unix | Leave a Comment »

Renaming a mountpoint

Posted by kovaiputhalvan on October 14, 2006

A friend at work noticed something interesting. On his Solaris box, he tried the following:


$ mkdir /mnt1; rm -fR /mnt2
$ mount /dev/dsk/somedisk /mnt1
$ mv /mnt1 /mnt2
$ mkdir /mnt1

Read the rest of this entry »

Posted in DragonFly, Unix, stuff | Leave a Comment »