The Great Migration: XP to OS X

After 15 years of solid MS/PC use (with occasional Linux flirtation), I decided I wanted my computer to be an appliance, not a science project. This is my log of the difficulties I encounter. I like my MacBook, I do. But there will be no gushing here.

Wednesday, October 11, 2006

Damnit, iTunes, Stop Stealing My Whole Internet Connection

Most of the problems I've had with OS X so far have had to do with file sharing with Windows. One of the worst has been when file sharing has throttled my internet connection, leaving me without email and the web until the file sharing is done. Now this isn't really a problem with Windows or OS X, but OS X has a solution: traffic shaping. You'll need OS X 10.4 for this to work, and this specific solution applies only to file sharing with Windows, but the lessons learned could certainly be more broadly applied. I've taken the following predominantly from Mac Geekery, but I've adapted it to my own needs.

Okay, so open a Terminal (Applications --> Utilities --> Terminal.app).

Remember, Terminal is extremely powerful and can do pretty much anything you ask it to do without first asking you if you're really really sure and then offering you an Undo option. So be careful. That's the only caveat I'm doing. Don't blame me. I am not an expert.

Type the following:

sudo ipfw pipe 1 config bw 50kbit/s

You'll want to set the "50kbit/s" to something appropriate for your own internet connection. This is the amount of bandwidth you are allotting to Windows File Sharing, so it should be small enough to allow plenty of other traffic on top of it, but large enough so that you can still get files at a reasonable rate. Okay, press return, and you'll be asked for your administrator (not root) password. Enter it.

Next type:

sudo ipfw add pipe 1 dst-port 137-139

Press return. And that's it.

If by chance you screw up or decide this is a terrible idea later, type this:

sudo ipfw flush

And everything is undone. Phew.

This can probably all be more elegantly executed and I will update this as I read further on traffic shaping.