How I Made $2,000,000 In The Stock Market

In Just 18 Months, Nicolas Darvas Turned $25,000 into Over $2 Million...
This is How He Did It...

Forex E75 System to make you rich ?

What Will Users of the E75 Forex Release 2+ Trading System Be Able to Learn From This Course? Firstly, users will learn about the importance of compounding and money management

Organic Fruit Growing

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

How to Do Everything with JavaScript

This friendly, solutions-oriented guide is filled with step-by-step examples that illustrate how to write basic to advanced JavaScript applications, as well as modify existing scripts to suit individual needs.

How To Choose a Laptop

Buying and using a laptop can be a liberating experience. You will have the ability to take your work wherever you go, take your computer to class, a coffee shop, on a trip - anywhere. You may end up spending a bit more for a laptop than you would ...

Web Hosting

Thursday, August 28, 2008

How Dave Does It: Troubleshooting Communication Problems with PING

Wouldn't it be great if everyone that supported messaging didn't have to worry about the underlying infrastructure?

"If you can't PING it, it isn't my problem."

The PING utility sends out a communication packet. The communication packet is called an Internet Control Message Protocol (ICMP) Echo Request packet (echo request being the most notable portion of the name). These communication packets are special messages that are used to send network information between two devices, usually a workstation and a service provider like a server. When a machine receives an echo request, it responds with an echo reply. When the PING program gets an echo reply back from the remote device it writes/displays the response, which then provides the originator some information that can be used to troubleshoot.

Okay was that too complex? Think of it this way. When you call someone on the phone, you punch in the digits and make a phone ring on the other end. This is similar to the echo request. Then someone picks up the phone on the other end and says "hello", which is the echo reply. This whole process seems simple enough, but there are some important additions that the PING utility provides on top of this. First, is the measure of line quality on which the conversation is taking place. That is the portion that is displayed on the screen and is often ignored.

Okay, let's be practical for a minute and try a ping test. In order to PING you need to bring up a DOS session or command prompt. From the command prompt, type ping and the destination address (for example; ping 10.0.9.200 or ping an associated DNS name).

A PING looks like this:

C:>
C:> Ping MAIL1

Pinging mailserver1.mydomain.com [10.0.9.200] with 32 bytes of data:
Reply from 10.0.9.200: bytes=32 time<10ms TTL=127
Reply from 10.0.9.200: bytes=32 time<10ms TTL=127
Reply from 10.0.9.200: bytes=32 time<10ms TTL=127
Reply from 10.0.9.200: bytes=32 time<10ms TTL=127

Ping statistics for 10.0.9.200:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

Okay, now let's dig into what we've seen in this conversation. If you used PING against a DNS name, you'll see that you get the IP Address resolved, which is one way you can rule out DNS problems. What you may not be aware of is that there is a lot of detail here that can be used for troubleshooting. PING provides the following information:

  • The first thing PING provides is the IP Address of the remote device that has responded to the request. This can be verified for troubleshooting; if the wrong device responds, this can be identified here.


  • The second thing that PING provides is the "Time To Live" number, which is usually ignored as "trivial information". What you should understand is the detail behind this number. For every IP packet on a network that gets sent a specific time to live is attached in the header. This time to live (TTL) is set to a specific number (in this case, ping packets get a TTL of 128).

    So who cares right? Well, let me explain what happens to the TTL and how it can help you.
    As the PING communication packet travels across the network, whenever the packet passes through a router or other network device, it decreases by one. (NOTE: it is possible, in the most severe cases, for the TTL to drop to a value of zero and then the packet is discarded by the router). In most cases, you can see that the TTL information can be used to determine approximately how many router hops the packet has gone through. (NOTE: TTL does not count the same device twice in standard traffic flow. This is not the case with routing loops). So the example I've provided shows that this packet only went through one device on the network before getting to the destination.


  • The third thing the PING utility provides is the number of milliseconds it takes to get a reply. What does this mean to us as average people? Well, what this actually represents is an indication of the round-trip time to get a packet to/from the remote device. Again, the response is shown/written in milliseconds. As a rule of thumb, for most networks, it's best if round-trip times are under 200 milliseconds. Now if you're seeing the number change, and the variance in the round-trip times is seen to be all over the board (for example if your response times show something like 128ms, 10ms, 59ms), you are going to see poor performance talking to the host. This would indicate some type of communication problem). So, if your users are saying GroupWise performance is bad and they are getting bumped off, this can be a good way to identify something outside of GroupWise and it shouldn't be ignored. (See "variations in the PING utility" for more information on gathering response times over and extended period).


  • The last thing the PING utility provides is a summary of the statistics. This information can also be used to identify network issues. A standard rule of thumb here is that if the summary reports a loss over 1%, this is indicative of a communication problem ONLY when there is no "Response timed out" reply written/displayed.

Other echo replies

  • Response timed out. This indicates that a device has not responded within the specified number of milliseconds. A standard echo reply is generated by the initiating workstation; "Response timed out" indicating that the device is not functioning or not reachable by the initiator.

    NOTE: Many times when using PING to communicate to devices outside of your network via DNS the first response will timeout. This is because the PING utility looks at the local network's DNS server first. If the local DNS server does not have the information/address it sends a response back based on the fact it received a request but the standard response is the "timed out" as it is not the destination. The DNS server will then go out to the next designated site (such as DNS hosted by your corporate ISP) to gather the information/address, once the DNS server has the information, it hands the proper address back the initiator and the reply will begin to display with statistical information. This entire process takes only a few milliseconds when communication is functioning properly but you do see it.

When and where to use the PING utility:

Now here's something that is important to understand and a lot of support people overlook this. Let's say a user calls into your support desk and you take the call–

The end user says they are having difficulty accessing a device/service/application on the network. You can run through the following mental questions (1.) Can I ping the device? And (2.) Can the end user PING the device?

NOTE: A PING test is NOT very useful if a support area is the only one who initiates the PING, this is mainly because all of the information that is written is representative of the support area's communication pathway to the device, which does not provide any information about the end user's physical network pathway (who may not be able to access the device).

Variations in the PING utility:

Ping address/name - T

This will start a PING session that will not stop until it is interrupted by the initiator using the CNTRL + C combination. This is often useful when monitoring a device for a long period of time to gather statistics (TTL) or when watching to see if a server restart has completed properly. When a server is restarted, the PING will show "request timed out" when the server is completely down, once the server begins to load up again, the responses will re-initiate.

Ping - A ipaddress

By typing the "dash A" before the IP address of the device it will write/display the DNS name that the address responds to. Many times this will respond with the server name, or other DNS records that are designated for the server or service.

CNTRL + C

By hitting these two keys during a PING session, the PING utility will stop and return a command prompt.

"Loopback"

By typing the below ping address, this will test the workstation or originating device's NIC. If this fails, it would indicate an issue with the initiation device, possibly related to the IP stack on the initiating device being improperly installed or potentially mis-configured.

Ping 127.0.0.1

Gathering the ping response

The entire ping process can be captured to a text file that can then be transferred to whatever other system (email, tracking system, etc.). In order to do this, the following format is required:

PING IP_Address space > space C:\pingtest.txt

(For example the following statement would create a text file on the root of the c drive called "loopback.txt" ping 127.0.0.1 > C:\loopback.txt)

NOTE: Any file already located in the same directory with the same name will automatically be overwritten without prompting the PING initiator. It is also important to note that when this process is used, the screen will not have any responses written to it, all data is written to the file. When the command prompt ( C:> ) reappears, this indicates the data has finished writing to the text file that was specified.

A full example of this process is shown below:

C:>
C:>ping gcs1 > C:\pingtest.txt
C:>

Pinging with packets larger than 32 bytes

At times it's necessary to test communication with more data than the standard #@ bytes that PING uses. In order to do this, you can add a "dash L" and then the size you require after the ping command. For example; ping 127.0.0.1 -L 1024

Note the response below and the change in byte size recorded for this conversation.

Pinging 127.0.0.1 with 1024 bytes of data:

Reply from 127.0.0.1: bytes=1024 time<1ms TTL=128
Reply from 127.0.0.1: bytes=1024 time<1ms TTL=128
Reply from 127.0.0.1: bytes=1024 time<1ms TTL=128
Reply from 127.0.0.1: bytes=1024 time<1ms TTL=128

Ping statistics for 127.0.0.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

More Advanced Ping Options:

I'll briefly cover some additional options you may wish to experiment with, as there are so many, I don't think you want a detailed explanation of each, but I'd like to give you some ideas on what else can be done with the PING utility.

"Dash R"

By adding a "dash R" and a number between 1 and 9, the PING will record the route between the initiator and the address, identifying all hops by IP address up to the number that was specified.

"Dash N"

By adding the "dash N" and any number, you will tell the PING utility how many echo requests to initiate. Meaning if you add a "- N 8 ", there will be 8 echo requests and that means there should be 8 echo replies written to the screen.

"Dash F"

This option tells the Ping Utility not to fragment the packet. That's something you should use with caution. My theory: "Don't play if you don't want to pay."

For those of you who are now completely enthralled with this utility (like me), you can also find other options if you type ping -h at the command prompt. You'll get a brief description, and most likely have to experiment to get the options working. My suggestion - don't do this on a production network– it's always safest to experiment in a lab.



Six Easy Steps to Telnet

Most PCs have the Telnet utility on them already. Each operating system seems to have a different "flavor" of telnet; some are GUI, and some are run through a DOS-type shell. I'm going to cover the GUI version, but almost everything I mention can be done in the DOS-type version as well. SMTP commands are standard and will work regardless of the utility you have. (Note: you can copy the Telnet application from one OS version to another and have it work most of the time, as long as, you are using the same OS vendor).

To get started, all you have to do is Start - Run - and type telnet into the target field. This will launch the version installed on your PC or allow you to execute the GUI application window. From the GUI application you may want to change some of the application preferences, most often you'll need to turn on the local echo, which allows you to see what you are typing when connected to a device, in our case a GWIA.

  1. From the Connect menu, select the Remote System option. Then in the new window that appears enter the IP Address or DNS name of your GWIA server and fill out the port field as 25 (SMTP) and hit the connect button. You should then see a "Service Ready" message like the following:
    220 server_name.domain.com GroupWise Internet Agent 6.0.5 (C)1993, 2001 Novell, Inc. Ready
    The above line indicates that communication from your physical location on the network is able to get to the GWIA server via port 25 (SMTP). Just this simple test proves some firewall rules are working and some of the GWIA configuration is setup properly. From the ready prompt you can continue to enter some basic commands that will actually generate and send a message.


  2. Start with the Hello command - "HELO" and hit enter.

    You should get a response of "250 server_name.domain.com Ok".


  3. The next command to enter is who you are - "MAIL FROM:" line and hit enter. For example: MAIL FROM: jsmith@companyinc.com

    Again, you should get a response of "250 Ok". At any point that you don't get a positive response you will see a different error code (generally in the 500 range) with a hint at what may be wrong.


  4. The third command that you type is the who are you sending to - "RCPT TO:" and hit enter For example: RCPT TO: ssmith@companyinc.com

    Again, you should get a response of "250 Ok".


  5. The fourth command to enter is "DATA", that's it - just data and then hit enter.

    You should get a response of "354 Enter mail, end with "." on a line by itself" and your cursor should be a line by itself. At this point you can type your message. You can type anything on the screen and the application will wrap the text for you. When you've completed typing the message start a new line and just type a period (".") and hit enter. Which will again respond with a "250 OK" message and at that point send the item.


  6. To disconnect from the GWIA you can type "Quit" and hit enter or from the drop-down you can select disconnect.

That's it! A few simple steps that allow you to verify many things, such as delivery of the message that was created (either inside or outside your network), firewall rules, SMTP Access Control rules and so on including things like SPAM or content filters.

Friday, August 22, 2008

How to Modify Windows Registry with VBS : Introduction

Introduction

Editor's Note: Tom's Hardware is pretty heavily oriented toward, well, hardware. However, we thought you'd appreciate this valuable little voyage into Windows Visual Basic scripting (VBScript) and Windows Registry modification. Starting with this article, when we see something you might find interesting, whatever it may be, we'll let you know about it. Take it away Mr. Thomas.

I'm a sort of evangelist for VBScript. One of my goals here is to lure you into using this programming language. Even if you have no interest in VBScript, I'm going to show you how to do something that you may like: how to remove those annoying arrows on shortcuts. In addition to VBScript code, I'll provide instructions on how to accomplish the same task using simple Windows Registry .reg files.

Beware, the IsShortCut method works fine for XP and Windows Server 2003, but can produce ugly side-effects in Vista. Down the road a bit, I'll publish a separate Shell Icons script to remove the arrows from Vista shortcuts.

Thanks to the .reg files supplied, you don't actually have to study VBScript to get this job done. However, if you use or would like to use VBScript, the VBScript examples show how easy it is to create objects. In this instance the object and its .RegDelete method modify the Windows Registry. It almost goes without saying that in other scripts you can use different methods to automate any task that you can perform through a GUI.

Removing the arrows on shortcuts is a classic case of Microsoft having not one, but three ways of configuring a Registry setting; VBScript, a .reg file and of course regedit.

My VBScript method, which deletes the IsShortCut value, works for both XP and Vista machines. However beware, because in Vista, removing this Registry value causes problems with shortcuts in the Favorites folder.

If you just want to remove the arrows quickly, use the .reg file. If you are using my VBScript to remove the arrows, the .reg files provide a complimentary method for resetting the Registry before you run the script for a second time.

A hidden bonus of using a script to remove the shortcut arrows is that you learn about the full range of Registry commands: .RegWrite, .RegDelete and .RegRead.

Saturday, August 9, 2008

Ten Personal Solutions global warming

Individual choices can have an impact on global climate change. Reducing your family's heat-trapping emissions does not mean forgoing modern conveniences; it means making smart choices and using energy-efficient products, which may require an additional investment up front, but often pay you back in energy savings within a couple of years.

Since Americans' per capita emissions of heat-trapping gases is 5.6 tons—more than double the amount of western Europeans—we can all make choices that will greatly reduce our families' global warming impact.

  1. The car you drive: the most important personal climate decision.
    When you buy your next car, look for the one with the best fuel economy in its class. Each gallon of gas you use is responsible for 25 pounds of heat-trapping gases in the atmosphere. Better gas mileage not only reduces global warming, but will also save you thousands of dollars at the pump over the life of the vehicle. Compare the fuel economy of the cars you're considering and look for new technologies like hybrid engines.

  2. Choose clean power.Products that bear the Greene logo meet rigorous quality standards
    More than half the electricity in the United States comes from polluting coal-fired power plants. And power plants are the single largest source of heat-trapping gas. None of us can live without electricity, but in some states, you can switch to electricity companies that provide 50 to 100 percent renewable energy. (For more information go to
    Green-e.org.)

  3. Look for Energy Star.
    energy star logo

    When it comes time to replace appliances, look for the Energy Star label on new appliances (refrigerators, freezers, furnaces, air conditioners, and water heaters use the most energy). These items may cost a bit more initially, but the energy savings will pay back the extra investment within a couple of years. Household energy savings really can make a difference: If each household in the United States replaced its existing appliances with the most efficient models available, we would save $15 billion in energy costs and eliminate 175 million tons of heat-trapping gases.

  4. Unplug a freezer.
    One of the quickest ways to reduce your global warming impact is to unplug the extra refrigerator or freezer you rarely use (except when you need it for holidays and parties). This can reduce the typical family's carbon dioxide emissions by nearly 10 percent.

  5. Get a home energy audit.
    Take advantage of the free home energy audits offered by many utilities. Simple measures, such as installing a programmable thermostat to replace your old dial unit or sealing and insulating heating and cooling ducts, can each reduce a typical family's carbon dioxide emissions by about 5 percent.

  6. Light bulbs matter.
    John Foley helps her daughter install an energyefficient light bulbIf every household in the United States replaced one regular light bulb with an energy-saving model, we could reduce global warming pollution by more than 90 billion pounds over the life of the bulbs; the same as taking 6.3 million cars off the road. So, replace your incandescent bulbs with more efficient compact fluorescents, which now come in all shapes and sizes. You'll be doing your share to cut back on heat-trapping pollution and you'll save money on your electric bills and light bulbs.

  7. Think before you drive.
    If you own more than one vehicle, use the less fuel-efficient one only when you can fill it with passengers. Driving a full minivan may be kinder to the environment than two midsize cars. Whenever possible, join a carpool or take mass transit.

  8. Buy good wood.
    When buying wood products, check for labels that indicate the source of the timber. Supporting forests that are managed in a sustainable fashion makes sense for biodiversity, and it may make sense for the climate too. Forests that are well managed are more likely to store carbon effectively because more trees are left standing and carbon-storing soils are less disturbed.

  9. Plant a tree.
    You can also make a difference in your own backyard. Get a group in your neighborhood together and contact your local arborist or urban forester about planting trees on private property and public land. In addition to storing carbon, trees planted in and around urban areas and residences can provide much-needed shade in the summer, reducing energy bills and fossil fuel use.

  10. Let policymakers know you are concerned about global warming.
    Our elected officials and business leaders need to hear from concerned citizens.
    Sign up for the Union of Concerned Scientists Action Network to ensure that policymakers get the timely, accurate information they need to make informed decisions about global warming solutions.

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More