Monday, December 7, 2015

IP/Networking Commands

There are a lot of IP commands with short descriptions listed here but you should only need the ones mentioned here at the top of the page to diagnose and configure your network.

C:>ping
C:>ipconfig
C:>ipconfig /all
C:>ipconfig /release
C:>ipconfig /renew
C:\>nbtstat –a 

Remember when typing from the command prompt you can only type one command per line, and press Enter after each one to execute it.

C:\>arp –a: is short for address resolution protocol, It will show the IP address of your computer along with the IP address and MAC address of your router.

C:\>hostname: This is the simplest of all TCP/IP commands. It simply displays the name of your computer.

C:\>ipconfig: The ipconfig command displays information about the host (the computer your sitting at)computer TCP/IP configuration.

C:\>ipconfig /all: This command displays detailed configuration information about your TCP/IP connection including Router, Gateway, DNS, DHCP, and type of Ethernet adapter in your system.

C:\>Ipconfig /renew: Using this command will renew all your IP addresses that you are currently (leasing) borrowing from the DHCP server. This command is a quick problem solver if you are having connection issues, but does not work if you have been configured with a static IP address.

C:\>Ipconifg /release: This command allows you to drop the IP lease from the DHCP server.

C:\>ipconfig /flushdns: This command is only needed if you’re having trouble with your networks DNS configuration. The best time to use this command is after network configuration frustration sets in, and you really need the computer to reply with flushed.

C:\>nbtstat –a: This command helps solve problems with NetBIOS name resolution. (Nbt stands for NetBIOS over TCP/IP) Definitions

C:\netdiag: Netdiag is a network testing utility that performs a variety of network diagnostic tests, allowing you to pinpoint problems in your network. Netdiag isn’t installed by default, but can be installed from the Windows XP CD after saying no to the install. Navigate to the CD ROM drive letter and open the support\tools folder on the XP CD and click the setup.exe icon in the support\tools folder.

C:\>netstat: Netstat displays a variety of statistics about a computers active TCP/IP connections. This tool is most useful when you’re having trouble with TCP/IP applications such as HTTP, and FTP.

C:\>nslookup: Nslookup is used for diagnosing DNS problems. If you can access a resource by specifying an IP address but not it’s DNS you have a DNS problem.

C:\>pathping: Pathping is unique to Window’s, and is basically a combination of the Ping and Tracert commands. Pathping traces the route to the destination address then launches a 25 second test of each router along the way, gathering statistics on the rate of data loss along each hop.

C:\>ping: Ping is the most basic TCP/IP command, and it’s the same as placing a phone call to your best friend. You pick up your telephone and dial a number, expecting your best friend to reply with “Hello” on the other end. Computers make phone calls to each other over a network by using a Ping command. The Ping commands main purpose is to place a phone call to another computer on the network, and request an answer. Ping has 2 options it can use to place a phone call to another computer on the network. It can use the computers name or IP address.

C:\>route: The route command displays the computers routing table. A typical computer, with a single network interface, connected to a LAN, with a router is fairly simple and generally doesn’t pose any network problems. But if you’re having trouble accessing other computers on your network, you can use the route command to make sure the entries in the routing table are correct.

C:\>tracert: The tracert command displays a list of all the routers that a packet has to go through to get from the computer where tracert is run to any other computer on the internet. 

Important TCP /IP commands in windows

networking commands to track ip address
To day am going to tel you few simple networking commands to keep
keep track ip journey.

Commands:

1. tracert
2. netstat
3. nslookup

1.tracert:

Tracert (traceroute) is another command adopted from Unix system. When ever you try
to open any website from your computer.We request our computer to go to that website
IP address by hopping into a few router address and fetch the website for you,tracert
is networking command and which is used to track hopping path.

PROCEDURE:

1.Open Command prompt and type cmd.




2.In command prompt simply type tracert sitename


tracert command













From the above picture you can see it your trying to trace Google routing path from
your computer it has taken 12 router paths. and It differs with internet speed.

2.netstat:

Netstat displays the active TCP connections and ports on which the computer is listening, Ethernet statistics, the IP routing table, statistics for the IP, ICMP, TCP, and UDP protocols. Netstat also can be used to tracking your outbound or inbound connection to your computer, it’s useful to malicious connection. Let’s see the picture below to see the available switch in netstat. 

PROCEDURE:

1.Open Command prompt and type cmd.













2.In command prompt simply type netstat
















In above picture you can see all active networking connections.You can also find which
port correctly listings.type following command.

netstat -np TCP | find "80"


3.nslookup:

This command helps to diagnose the Domain Name System (DNS) infrastructure and comes with a number of sub-commands. Usually used by hackers to find out some useful information that you can’t find on search engine. In this tips and trick I’m only show you how to find server IP address or host name. Type nslookup and the enter the URL of website you want to know it’s IP address for example I use Google. 

PROCEDURE:


1.Open Command prompt and type cmd.
2.In command prompt simply type nslookup
3.Type website  name.















In above image you can see Google actually using couple of address. Google can be pinged 
from any of above address.

10 Useful Windows Commands You Should Know


windows-8-command-prompt

There are some things you can only do from the command line, even on Windows. Some of these tools don’t have graphical equivalents, while others are just plain faster to use than their graphical interfaces.
We can’t possibly cover all the useful commands you can use in the Command Prompt or PowerShell here. We’ll be focusing on commands that should be useful even if you’re not a command-line person.

ipconfig – Quickly Find Your IP Address

You can find your IP address from the Control Panel, but this takes quite a few clicks. The ipconfig command is a fast way of determining your computer’s IP address and other information, such as the address of its default gateway — useful if you want to know the IP address of your router’s web interface.
To use the command, just type ipconfig into a Command Prompt window. You’ll see a list of all the network connections your computer is using. Look under Wireless LAN adapter if you’re connected to Wi-Fi or Ethernet adapter Local Area Connection if you’re connected to a wired network.
ipconfig-command[4]

ipconfig /flushdns – Flush Your DNS Resolver Cache

If you change your DNS server, the effects won’t necessarily take place immediately. Windows uses a cache that remembers DNS responses it’s received, saving time when you access the same addresses again in the future.
To ensure Windows is getting addresses from the new DNS servers instead of using old, cached entries, run the ipconfig /flushdns command after changing your DNS server.
flush-dns-resolver-cache

ping, tracert – Troubleshoot Network Connection Issues

If you’re experiencing issues connecting to a website or other network connection issues, Windows and other operating systems have some standard tools you can use to identify problems.
First, there’s the ping command. Type ping google.com and Windows will send packets to Google.com. Google will respond and let you know it’s received them. You’ll be able to see if any packets didn’t make it to Google.com — perhaps you’re experiencing packet loss — and how long it took you to hear back — perhaps the network is saturated and packets are taking a while to reach their destinations.
ping-command-on-windows
There’s also the tracert command, which traces the route it takes for a packet to reach a destination. For example, run tracert google.com and you’ll see the path your packet takes to reach Google. If you’re having issues connecting to a website, tracert can show you where the problem is occurring.
tracert-command-on-windows
For more information about using these commands, read our introduction to troubleshooting Internet connection problems.

shutdown – Create Shutdown Shortcuts on Windows 8

The shutdown command is particularly useful on Windows 8. You can use it to create your own shortcuts and place them on your Start screen or desktop, allowing you to more easily shut down Windows without digging through the charms bar or logging out first.
This command can also be used to restart your computer. On Windows 8, you can even use a special switch to restart your computer into the advanced startup options menu.
  • Shut Down: shutdown /s /t 0
  • Restart: shutdown /r /t 0
  • Restart Into Startup Options: shutdown /r /o
create-shut-down-shortcut-on-windows-8

recimg – Create Custom Recovery Images

The Refresh Your PC feature on Windows 8 allows you to restore your computer’s system state to its original state — either from a clean Windows install or as the computer came from its manufacturer. You can create your own custom recovery images, but this feature is hidden — you have to do it with the recimg command from a command line. This allows you to removemanufacturer-installed bloatware or add your favorite desktop programs to your recovery image.
For more information about using recimg, read our overview of everything you need to know about creating and using custom recovery images on Windows 8.

wbadmin start backup – Create System Recovery Images

Windows 8.1 removes the Windows 7 backup interface, which allowed you to create system backup images. These system images contain a complete snapshot of every single file on the system, so they’re different from Windows 8’s recovery images.
While the graphical interface has been removed, system administrators and geeks can still create system image backups by running the wbadmin start backup cmdlet in a PowerShell window. Unlike all the other commands here, this command-line tool must be run from within PowerShell, not the Command Prompt.

sfc /scannow – Scan System Files for Problems

Windows includes a system file checker tool that scans its system files and looks for problems. If system files are missing or corrupted, the system file checker will repair them. This may fix problems with some Windows systems.
To use this tool, open a Command Prompt window as Administrator and run the sfc /scannowcommand.
sfc-scannow

telnet – Connect to Telnet Servers

The telnet client isn’t installed by default. You’ll have to install it from the Control Panel. Once installed, you can use the telnet command to connect to telnet servers without installing any third-party software.
You should avoid using telnet if you can help it, but if you’re connected directly to a device and it requires that you use telnet to set something up — well, that’s what you have to do.
install-windows-telnet-client

cipher – Permanently Delete and Overwrite a Directory

The cipher command is mostly used for managing encryption, but it also has an option that will write garbage data to a drive, clearing its free space and ensuring no deleted file can be recovered. Deleted files normally stick around on disk unless you’re using a solid state drive. The cipher command effectively allows you to “wipe” a drive without installing any third-party tools.
To use the command, specify the drive you want to wipe like so:
ciper /w:C:\
cipher wipe drive

netstat -an – List Network Connections and Ports

The netstat command is particularly useful, displaying all sorts of network statistics when used with its various options. One of the most interesting variants of netstat is netstat -an, which will display a list of all open network connections on their computer, along with the port they’re using and the foreign IP address they’re connected to.
netstat-show-connections

This isn’t a comprehensive list of all the commands you might find useful, but we hope it’s given you some idea of the many powerful tools lurking under the surface. Linux isn’t the only operating system where users can benefit from learning some commands.