Aleksandar's computer workshop

Let's see what Aleksandar was fixing today.
My findings, tips & tricks related to computers, internet, programming and other stuff I was working with.

IIS Version

To determine which Microsoft IIS (Internet Information Services) is running on your PC you can check following table:

  • IIS 1.0, Windows NT 3.51, SP3 or available as a free add-on
  • IIS 2.0, Windows NT 4.0
  • IIS 3.0, Windows NT 4.0 SP3 (IIS 2.0 is automatically upgraded to IIS 3.0 during the install of SP3)
  • IIS 4.0, Windows NT 4.0 Option Pack
  • IIS 5.0, Windows 2000
  • IIS 5.1, Windows XP Professional, Windows MCE
  • IIS 6.0, Windows Server 2003, Windows XP Professional x64 Edition
  • IIS 7.0, Windows Server 2008, Windows Vista  

Up to date list is available here

How to add bunch of IP addresses to Windows network connection from command line

To add a bunch of IP addresses in Windows XP/Server 2003 to a network connection without having to type each one individually create a batch file like the below:

netsh in ip add address "Local Area Connection" 10.0.0.2 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.3 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.4 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.5 255.0.0.0
netsh in ip add address "Local Area Connection" 10.0.0.6 255.0.0.0
[...]
netsh in ip add address "Local Area Connection" 10.0.0.224 255.0.0.0

or just do a command like


for /L %a in (2,1,224) do netsh in ip add address "Local Area Connection" 10.0.0.%a 255.0.0.0

Both methods will add IP's in range from 10.0.0.2 up to 10.0.0.224 to the network device named "Local Area Connection"

Adding extra IP(s) to one network interface in RHL

To permanently add one or more IP's to network interface in RedHat Linux is quite easy if you follow this steps:

  • Go to the /etc/sysconfig/network-scripts/ directory
    cd /etc/sysconfig/network-scripts/
  • Copy the interface file that you want to add the IP to, and give it the same name as the current file, with ‘:0′ added (or :1, :2, depending on how many IPs are on this interface).
    cp ifcfg-eth0 ifcfg-eth0:0
  • Edit the new file, and you only have to change a few things
    > Change IPADDR= to your new IP address
    > Change DEVICE= to add :0
    (depending if this is the 2nd IP on that interface)
    > Remove DHCP_HOSTNAME (or set it to what it needs to be)
    > remove the HWADDR entry
  • Save the file that you just were working on
  • Restart the network interfaces
    /etc/init.d/network restart
  • Done!

 

So here are the examples:

Original file ifcfg-eth0 looks like

# Intel Corporation 82557/8/9 [Ethernet Pro 100]
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.5.255
HWADDR=00:06:5B:38:C8:5D
IPADDR=192.168.5.230
NETMASK=255.255.255.0
NETWORK=192.168.5.0
ONBOOT=yes
GATEWAY=192.168.5.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes

Config file ifcfg-eth0:0 for second IP looks like:

DEVICE=eth0:0
BOOTPROTO=none
BROADCAST=192.168.5.255
IPADDR=192.168.5.20
NETMASK=255.255.255.0
NETWORK=192.168.5.0
GATEWAY=192.168.5.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
ONPARENT=yes