IP Fun – Back to basics – again..

Class address ranges:

Class A = 1.0.0.0 to 126.0.0.0
Class B = 128.0.0.0 to 191.255.0.0
Class C = 192.0.1.0 to 223.255.255.0

 

Reserved address ranges for private (non-routed) use (see RFC 1918):
10.0.0.0 -> 10.255.255.255
172.16.0.0 -> 172.31.255.255
192.168.0.0 -> 192.168.255.255

Other reserved addresses:
127.0.0.0 is reserved for loopback and IPC on the local host
224.0.0.0 -> 239.255.255.255 is reserved for multicast addresses

Chart notes:
Number of Subnets – “( )” Refers to the number of effective subnets, since the use of subnet numbers of all 0s or all 1s is highly frowned upon and RFC non-compliant.
Number of Hosts – Refers to the number of effective hosts, excluding the network and broadcast address.

Class A
Network Bits Subnet Mask Number of Subnets Number of Hosts
/8 255.0.0.0 0 16777214
/9 255.128.0.0 2 (0) 8388606
/10 255.192.0.0 4 (2) 4194302
/11 255.224.0.0 8 (6) 2097150
/12 255.240.0.0 16 (14) 1048574
/13 255.248.0.0 32 (30) 524286
/14 255.252.0.0 64 (62) 262142
/15 255.254.0.0 128 (126) 131070
/16 255.255.0.0 256 (254) 65534
/17 255.255.128.0 512 (510) 32766
/18 255.255.192.0 1024 (1022) 16382
/19 255.255.224.0 2048 (2046) 8190
/20 255.255.240.0 4096 (4094) 4094
/21 255.255.248.0 8192 (8190) 2046
/22 255.255.252.0 16384 (16382) 1022
/23 255.255.254.0 32768 (32766) 510
/24 255.255.255.0 65536 (65534) 254
/25 255.255.255.128 131072 (131070) 126
/26 255.255.255.192 262144 (262142) 62
/27 255.255.255.224 524288 (524286) 30
/28 255.255.255.240 1048576 (1048574) 14
/29 255.255.255.248 2097152 (2097150) 6
/30 255.255.255.252 4194304 (4194302) 2

Class B
Network Bits Subnet Mask Number of Subnets Number of Hosts
/16 255.255.0.0 0 65534
/17 255.255.128.0 2 (0) 32766
/18 255.255.192.0 4 (2) 16382
/19 255.255.224.0 8 (6) 8190
/20 255.255.240.0 16 (14) 4094
/21 255.255.248.0 32 (30) 2046
/22 255.255.252.0 64 (62) 1022
/23 255.255.254.0 128 (126) 510
/24 255.255.255.0 256 (254) 254
/25 255.255.255.128 512 (510) 126
/26 255.255.255.192 1024 (1022) 62
/27 255.255.255.224 2048 (2046) 30
/28 255.255.255.240 4096 (4094) 14
/29 255.255.255.248 8192 (8190) 6
/30 255.255.255.252 16384 (16382) 2

Class C
Network Bits Subnet Mask Number of Subnets Number of Hosts
/24 255.255.255.0 0 254
/25 255.255.255.128 2 (0) 126
/26 255.255.255.192 4 (2) 62
/27 255.255.255.224 8 (6) 30
/28 255.255.255.240 16 (14) 14
/29 255.255.255.248 32 (30) 6
/30 255.255.255.252 64 (62) 2

Supernetting (CIDR) Chart
CIDR – Classless Inter-Domain Routing.
Note: The Number of Class C networks must be contiguous.
For example, 192.169.1.0/22 represents the following block of addresses:
192.169.1.0, 192.169.2.0, 192.169.3.0 and 192.169.4.0.

Class C

CIDR Block Supernet Mask Number of Class C Addresses Number of Hosts
/14 255.252.0.0 1024 262144
/15 255.254.0.0 512 131072
/16 255.255.0.0 256 65536
/17 255.255.128.0 128 32768
/18 255.255.192.0 64 16384
/19 255.255.224.0 32 8192
/20 255.255.240.0 16 4096
/21 255.255.248.0 8 2048
/22 255.255.252.0 4 1024
/23 255.255.254.0 2 512

Posted in CCNA | Leave a comment

Fix a “Bricked” Linksys

Hi…

If you have ever been in this situation this is worth a shot…

I found this on another site and take no responsibility for the accuracy or if this even works… However, I was in this situation recently when one of our customers dropped off his Linksys that would just power-cycle… I never got to this article by the time I gave up on the device. The customer had already replaced the device…

How to fix a Bricked Linksys Router

The following simple solution explains how to fix a bricked Linksys router

Tested on a Linksys WRT54G router. Typically a router can become bricked if a firmware update was unsuccessful. Many people think that their Linksys router is no longer any good because they cannot access the Linksys admin panel after a failed firmware update. However, in most cases, a bricked Linksys router is completely repairable and simply requires a new means of flashing to get it back up and running
again.

Fixing a Bricked Linksys Router:

Note: If you have attempted a flash update and it failed, this tutorial is for you. Before proceeding, disable any wireless connections. We will be working via a wired port to communicate and repair the broken Linksys router. I have personally tested this tutorial on Linksys WRT54G and Linksys WRT600N routers.

  1. Download known working firmware for your Linksys router. Rename the bin file to works.bin and move it to your desktop
  2. Connect your PC to the broken Linksys router via an Ethernet cable
  3. Navigate to Start->Control Panel->Network Connections and double click the Local Area Connection icon. Click the Properties button and double click Internet Protocol (TCP/IP) from the list
  4. Click the option to Use the following IP address: and set it up as follows and then click Ok:
    • IP address: 192.168.1.10
    • Subnet mask: 255.255.255.0
    • Default gateway: 192.168.1.1
    1. Next, navigate to Start->Run and type cmd and click Ok
    2. Repeat step 4. You should now have two command windows open
    3. From the first command window type cd Desktop and press enter. Next, type PING -t 192.168.1.1 but DO NOT PRESS enter yet
    4. From the Second command windows type cd Desktop and press enter. Next, type tftp -i 192.168.1.1 PUT works.bin but DO NOT PRESS enter yet
    5. From the first command window press enter. Immediately following, press enter from the second command window

    10.  After the firmware has been uploaded, you should be able to reset your Linksys router and log into the Linksys admin panel

    Additional notes: The upload needs to occur within a five second window, so you may not be successful the first time! Sometimes it takes multiple tries before you get the router to accept the upload.

    Posted in Nettech | Leave a comment

    New Twist on Lenovo Update – Error 75

    My Win7 OS would not update using the Lenovo update util.

    I setup a regedit following this Lenovo Forum article…

    Link Here…

    This fix using regedit edit did not work! I replaced the system number in the reg HKLM and no joy! :(

    Still looking for a fix…

    UPDATE 10/31/2010

    Got the fix finally – You have to use the Lenovo maintenance disk to add the serial number & the model type to the bios.

    My particular system board was replaced and this process was never completed…

    Apparently, the Lenovo software update goes to the bios to check the model type/serial type every time so that it can download the appropriate files.

    The next trick is getting this disk since it is not available to the public. I was lucky because at work we have an onsite tech who happened to have this disk.

    Posted in Nettech, Win7 | Leave a comment

    Golf Revisited

    THE AMBIDEXTROUS GOLFER
    A group of guys lived and died for their Saturday morning round of golf. One got transferred to another city. It wasn’t the same without him.
    A new woman joined their Club. She overheard the guys talking about their golf round. She said, “You know, I used to play on my golf team in college and I was pretty good. Would you mind if I joined you next week?”  The three guys looked at each other. Not one of them wanted to say ‘yes’, but she had them on the spot. Finally, one man said it would be okay, but they would be starting early — at 6:30 a.m.
    He figured the early tee-time would discourage her. The woman said this may be a problem, and asked if she could be up to 15 minutes late. They rolled their eyes, but said okay. She smiled and said, “Good, I’ll be there at 6:30 or 6:45.”
    She showed up at 6:30 sharp, and, playing right-handed, beat all three of them with an eye-opening two-under-par round. She was fun and a pleasant person, and the guys were impressed. Back at the clubhouse, they congratulated her and invited her back the next week. She smiled, and said, “I’ll be there at 6:30 or 6:45.”
    The next week she again showed up at 6:30 sharp. Only this time, she played left-handed. The three guys were incredulous as she still beat them with an even par round, despite playing with her off-hand. They were totally amazed. They couldn’t figure her out. She was again very pleasant and didn’t seem to be purposely showing them up. They invited her back again, but each man harbored a burning desire to beat her.
    The third week, the guys had their game faces on. But this time, she was 15 minutes late, which made the guys irritable. This week the lady again played right-handed, and narrowly beat all three of them.  The men mused that her late arrival was due to petty gamesmanship on her part. However, she was so gracious and so complimentary of their strong play, they couldn’t hold a grudge.
    Back in the clubhouse, all three guys were shaking their heads. This woman was a riddle no one could figure out. They had a couple of beers, and finally, one of the men asked her point blank, “How do you decide if you’re going to golf right-handed or left-handed?”   The lady blushed, and grinned. “That’s easy,” she said. “When my Dad taught me to play golf, I learned I was ambidextrous. I like to switch back and forth. When I got married after college, I discovered my husband always sleeps in the nude. From then on, I developed a silly habit. Right before I left in the morning for golf practice, I would pull the covers off him. If his you-know-what was pointing to the right, I golfed right-handed; if it was pointed to the left, I golfed left-handed.”  The guys thought this was hysterical. Astonished at this bizarre information, one of the guys shot back, “But what if it’s pointing straight up?”   She said, “Then, I’m fifteen minutes late.”

    Posted in Jokes | Leave a comment

    Remote Defrag on XP using PSExec…

    With the help of PsExec and console defragmentation tool (defrag.exe), you can defrag a remote computer from any location on the network.

    PsExec is a light-weight telnet-replacement that lets you execute processes on other systems, complete with full interactivity for console applications, without having to manually install client software. PsExec’s most powerful uses include launching interactive command-prompts on remote systems and remote-enabling tools like IpConfig that otherwise do not have the ability to show information about remote systems.

    Running Disk Defragmenter remotely

    1. Download PSExec and save it to the Desktop.

    2. Unzip the archive and move PSExec.exe to your Windows directory.

    3. Open a Command Prompt window (cmd.exe) and type:

    PsExec -i -s \\<RemotePC> c:\windows\system32\defrag.exe c: -f

    The above assumes that the name of the remote computer is RemotePC.

    PsExec -i -s \\<RemotePC> c:\windows\system32\defrag.exe c: -f

    Posted in XP | Leave a comment

    .Net 3.5 SP1 install error **fixed

    This will tell you how to get .net 3.5 SP1 installed when errors are encountered trying to install .net 3.5 SP1. This may also work for any other .net install problems. (Link Here…)

    This was done on a Windows 2008 x64 system. It should also work for x32 and other versions of windows.
    .
    .

    ****EDIT – Problem seems to be rooted deeper. http://community.spiceworks.com/how_to/show/408

    1.

    Clean up all .net installs with this tool

    http://blogs.msdn.com/astebner/pages/8904493.aspx

     
    2.

    Install MS Installer 4.5

    http://www.microsoft.com/downloadS/details.aspx?familyid=5A58B56F-60B6-4412-95B9-54D056D6F9F4&displaylang=en

     
    3.

    Install a fresh copy of .net 3.5

    http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en

     
    4.

    Install .net 3.5 sp1

    http://www.microsoft.com/downloads/details.aspx?familyid=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en

    This file has the exact same name as .net 3.5 but it is different. Rename it if you have to.

     
    5.

    Install hot fixes

    http://www.microsoft.com/downloads/details.aspx?familyid=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en

    There are 3 of them

     

    Conclusion

    Let me know if anything needs to be added or something is not working.

    This may be a bigger problem which is fixed here http://community.spiceworks.com/how_to/show/408

    Posted in .Net | Leave a comment

    Query Active Directory Group and Write to Excel

    Ever wonder who are members of an AD group? Well here is a simple script to determine that. (Link Here…)

    1.

    Open your favorite text editor

     

     
    2.

    Copy & Paste the code below into your text editor

    On Error Resume Next

    ‘Get the name of the group to be listed. And the DN of where the group is in AD
    strGroup = InputBox(“Enter the name of the group.”)
    strDN = InputBox(“Enter the DN of where the group is located in AD.” & VbCrLf & “EXAMPLE: cn=users,dc=domainname,dc=com” & vbCrLf & “or OU=sales,dc=domainname,dc=com”)

    ‘Create an instance of Excel and add a workbook.
    Set objExcel = CreateObject(“Excel.Application”)
    objExcel.Visible = True
    objExcel.Workbooks.Add

    ‘Connect to AD and query the DN of where the group is.
    Set objGroup = GetObject _
    (“LDAP://cn=” & strGroup & “,” & strDN)
    objGroup.GetInfo

    ‘populate an array that contains each user that’s a member of the group
    arrMemberOf = objGroup.GetEx(“member”)

    ‘Write the first line in excel and move down one cell
    objExcel.ActiveCell.Value = “Members of: ” & strGroup
    objExcel.ActiveCell.Offset(1,0).Activate

    ‘loop through the array and write each member of the array to excel and move down one cell.
    For Each strMember in arrMemberOf
    objExcel.ActiveCell.Value = strMember
    objExcel.ActiveCell.Offset(1,0).Activate
    ‘ WScript.echo strMember ‘remove comment for script debugging. Will then Prompt what’s in the loop.
    Next

     
    3.

    Save the file

    Save the file you have just created as ADQuery.vbs (or the name of your choosing).

    Posted in AD | Leave a comment

    Remote Cleanout on XP using CCleaner Plus

     

    Runs a batch script via PSEXEC and maintains system performance
    I take no credit for this and have blantantly plagerized the owner who has his post here…
    http://community.spiceworks.com/how_to/show/1531

    1.

    Get registry settings

    First you will need to get the registry settings for diskcleanup to run

    Start >> run >> cleanmgr /sageset:11
    Tick the boxes as needed and press Ok

    Then naviate and export this key
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches]

     
    2.

    Remotely deploy the settign to workstations

    Save the registry file to a network share and either have a plain text file with all your desktops PCs names in, or do it per machine

    psexec \\DesktopPC -u domain\adminaccount -p password regedit /s \\networkshare\registryexport
    Do that for a per machine
    or
    psexec @pcs.txt -u domain\adminaccount -p password regedit /s \\networkshare\registryexport
    To use a file with PC names in

    Alternatively, you can add the option -i 0 for all of the processes to appear on the current console session

     
    3.

    Run other cleanups

    We also have CCleaner on our network which also helps clean up the system drive

    You can just add ccleaner /auto to your script

     
    4.

    Do a defrag

    Its always best to run a defrag on a machine to help keep it running smoothly
    defrag c:

     
    5.

    Put it all into a script

    I have created a custom batch script so that I can effectly maintain any machine that I can access on our network
    Here is my script

    echo off

    echo.
    echo — System Maintenance —
    echo.
    copy \\ws0450\maintenance\clean.reg c:\windows\clean.reg | echo Copying registry key
    regedit /s c:\windows\clean.reg | echo Deploying registry key
    cleanmgr /sagerun:11 | echo Disk cleanup is running
    echo Disk cleanup finished
    “\program files\ccleaner\ccleaner.exe” /auto | echo CCleaner is running
    echo CCleaner has finished
    echo.

    defrag c:
    echo.
    echo — System maintance complete —
    echo.
    pause
    exit

    I have also created an interface with VB.net which helps me do this as well
    I select an individual workstation, or even the file with names of workstation, then I can run my script on the target machine(s) using admin priviedges

    I have found it is better to copy the reg file to their machine first and then import it into the registry

    The psexec line my program does is

    psexec \\remotepc -u domain\admin -p password -c \\networkshare\CleanUpScript.cmd

    That copies the script to the target machine and then runs the script using the admin credentials I gave it

     

    Conclusion

    I have found is very useful when detailing with users complaining
    MY PC IS SLOW
    Normally a defrag sorts them out just fine, but there is no harm is cleaning up the computer anyway :D

    Hope you find this helpful, as it certainly made my life easier

    Posted in XP | Leave a comment

    Speed Tweeks with XP in Corp Environment

    Some articles on Speed Tweeks for XP in Corporate Environment…

    Link Here…

    Posted in XP | Leave a comment

    CheckPoint VPN-1 password

    Originally Posted by boldin View Post
    This is what we use:
    1. Obtain a CentOS 5.3 #1 iso or CD/DVD. Boot up with it. Press F5 for Rescue and then enter “linux rescue”
    No need to activate network connectivity, just use the defaults.
    2. mkdir /checkpoint
    3. mount /dev/sda7 /checkpoint
    4. mount /dev/sda1 /checkpoint/boot
    5. chroot /checkpoint
    6. /bin/expert_password (change expert password here)
    7. \passwd admin (change admin password cpshell here)
    8. reboot system

    I haven’t done this myself, but documented from a coworker who says it works…

    This method works ONLY if you did NOT change the “cpshell” to “bash” in the /etc/passwd file for “admin” account.

    If you change from “cpshell” to “bash” in the /etc/passwd file for the “admin” account, this method does NOT work. In that case, you have to use this method:

    #1: boot up with CentOS 5.3 CD #1 iso. You can do this from the IBM RSA Rack card if you have one. Go to “F5″ to for rescue, then enter “linux rescue”

    #2: do not need to active network connecvitity, just follow the default,

    #3: mkdir /checkpoint

    #4 mount /dev/sda7 /checkpoint

    #5: mount /dev/sda1 /checkpoint/boot

    #6: chroot /checkpoint

    #7: /bin/expert_password (change your expert password here)

    #8: \passwd admin (change admin password cpshell here)

    #9: reboot the box

    Posted in Checkpoint | Leave a comment