B.

Bulk Add IP Addresses

I do a lot of local development with Internet Information Services and either ColdFusion, PHP or ASP.net and for the longest time I would actually run the websites on separate ports on 127.0.0.1.

Unfortunately running multiple websites on various other ports causes some issues like:

  • Port conflicts with other programs
  • Remembering which port is used for what website
  • Causes problems with some websites that look for port 80
  • Doesn’t really work with SSL (port 443)

So what I started doing was running my websites on separate private IP addresses which are local to my machine only, and this worked GREAT! I could load up websitexyz, bind it to IP 1.1.1.10, setup SSL to work on port 443 for 1.1.1.10 and I would go about my business.

The only downside was when I would run out of IP addresses, because I would only add about 5 to 10 IPs at a time to my local loopback adapter. It is a bit of a pain in the butt to add a bunch of IP addresses in Windows, so it would take me a bit of time to do this everytime I needed more IPs.

That was until I ran into a small batch script which can add as many IP addresses as I want in a range.

Here’s the code:

FOR /L %A IN (41,1,100) DO netsh interface ipv4 add address “ColdFusion-IIS” 1.1.1.%A 255.255.255.0

Simply copy that into either a command prompt or a .bat file and run it to add as many IP addresses in a range that you want.

Here’s the break down of the script:

FOR /L %A IN (START,INCREMENT,END) DO netsh interface ipv4 add address “INTERFACE_NAME” IPMASK SUBNET

If we take a look at my script above we see that

  • START = 41
  • INCREMENT = 1
  • END = 100
  • INTERFACE_NAME = ColdFusion-IIS
  • IPMASK = 1.1.1.%A
  • SUBNET = 255.255.255.0

What this basically equates to is adding 1.1.1.41 to 1.1.1.100 to my network adapter called ColdFusion-IIS.
It is a super handy script and saved me a bunch of time, I would recommend it 10/10 for local development.
S.

Screen Rotation on the M200

After upgrading your video drivers on the M200 to something decent, like the Forceware 98.16 drivers, the automatic screen rotation will cease to function. However not having the screen auto-rotate doesn’t spell the end of the world. To correct the orientation of your screen simply press Windows key + X to open the Windows Mobility Center. Once the Windows Mobility Center opens, press the R key until the screen is in the desired orientation.

If you want to change the sequence of the screen rotation, go into your Control Panel and find Tablet PC Settings. Near the bottom of the window there should be a link Go to Orientation, and in there you can change or remove rotation sequences. I’ll also have to suggest that you calibrate your screen, if you haven’t done so already, before you rotate your screen. To calibrate your screen with your pen, press the Calibrate… button in the Table PC Settings window and follow the instruction.

T.

Toshiba M200 and Standby

I found a neat trick to fixing the problem with resuming from standby on the M200 when using updated video drivers.

My setup:

– Windows 7 x86 build 7100

– Forceware 98.16

– Dual Displays enabled (see other posts)

The trick:

After resuming from standby press Fn + F5, the switch display function, twice. This will cause your computer to attempt to switch to the secondary display and then back again to your primary display which will reinitialize your screen.

I haven’t done enough testing on other setups to say that this will work for everyone, I’d imagine that so long as you have the Dual Display trick enabled you should be able to do this.

T.

Toshiba M200 and Dual Displays

Like me, most of you who have the infamous Toshiba M200 tablet have probably upgraded that outdated XP installation to either Windows Vista or Windows 7. And you probably upgraded the video drivers from the old 64 Forceware to the 97 or 98 Forceware off of LaptopVideo2Go. But you’ve probably also noticed a few things in regards to the display no longer work, such as Dual Displays. Fortunately there’s a solution for enabling Dual Displays in the BIOS.

Reboot your computer and hold down the ESC key before the TOSHIBA logo appears. The laptop will prompt you with an error message “Check system. Then press [F1] key.”  Press the F1 key. Once in the BIOS setup, navigate using the directional keys to get all the way over to the right side where it says Power On Display in the DISPLAY box. Press the Space key until it changes to LCD+Analog RGB. Press the End key followed by the Y key to save your changes.

And that’s it! You can now plug in your monitor to the VGA output of the tablet and enable dual displays in Windows using the mobility center. I was actually quite surprised when I could run my main monitor at 1920×1080 and the laptop LCD at 1400×1050 with out any issues.

C.

Compiling Samba…

I’m working on my DNS 323 to update everything so Debian will take over all control. This includes upgrading Samba. Now installing Samba using the apt-get call to the Debian package library proved unsuccessful, not that it didn’t install it just didn’t run afterwards. The package in the Debian repository is a bit behind in revisions so I figured I’d grab the source from the Samba SVN and compile it. Well after like an hour of compiling it errors out (bah!) with an error basically indicating it can’t find the main() function in one of the script files. Guess it’ll be a work in progress for now.